@radix-ng/primitives 0.2.0 → 0.4.0

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 (123) hide show
  1. package/avatar/README.md +1 -0
  2. package/avatar/index.d.ts +4 -0
  3. package/avatar/src/avatar-fallback.directive.d.ts +34 -0
  4. package/avatar/src/avatar-image.directive.d.ts +17 -0
  5. package/avatar/src/avatar.config.d.ts +12 -0
  6. package/avatar/src/avatar.directive.d.ts +22 -0
  7. package/avatar/src/avatar.token.d.ts +4 -0
  8. package/checkbox/index.d.ts +1 -1
  9. package/checkbox/src/checkbox-indicator.directive.d.ts +4 -4
  10. package/checkbox/src/checkbox.directive.d.ts +3 -3
  11. package/checkbox/src/checkbox.token.d.ts +3 -3
  12. package/esm2022/avatar/index.mjs +5 -0
  13. package/esm2022/avatar/radix-ng-primitives-avatar.mjs +5 -0
  14. package/esm2022/avatar/src/avatar-fallback.directive.mjs +61 -0
  15. package/esm2022/avatar/src/avatar-image.directive.mjs +50 -0
  16. package/esm2022/avatar/src/avatar.config.mjs +17 -0
  17. package/esm2022/avatar/src/avatar.directive.mjs +38 -0
  18. package/esm2022/avatar/src/avatar.token.mjs +6 -0
  19. package/esm2022/checkbox/index.mjs +2 -2
  20. package/esm2022/checkbox/src/checkbox-indicator.directive.mjs +5 -5
  21. package/esm2022/checkbox/src/checkbox.directive.mjs +11 -11
  22. package/esm2022/checkbox/src/checkbox.token.mjs +4 -4
  23. package/esm2022/label/src/label.directive.mjs +5 -5
  24. package/esm2022/overlay/index.mjs +5 -0
  25. package/esm2022/overlay/radix-ng-primitives-overlay.mjs +5 -0
  26. package/esm2022/overlay/src/overlay-arrow.directive.mjs +59 -0
  27. package/esm2022/overlay/src/overlay-arrow.token.mjs +3 -0
  28. package/esm2022/overlay/src/overlay-trigger.directive.mjs +279 -0
  29. package/esm2022/overlay/src/overlay-trigger.token.mjs +9 -0
  30. package/esm2022/overlay/src/overlay.directive.mjs +51 -0
  31. package/esm2022/overlay/src/overlay.token.mjs +3 -0
  32. package/esm2022/progress/src/progress-indicator.directive.mjs +5 -5
  33. package/esm2022/progress/src/progress.directive.mjs +7 -7
  34. package/esm2022/progress/src/progress.token.mjs +4 -4
  35. package/esm2022/radio/index.mjs +2 -2
  36. package/esm2022/radio/src/radio-group.directive.mjs +14 -14
  37. package/esm2022/radio/src/radio-group.token.mjs +4 -4
  38. package/esm2022/radio/src/radio-indicator.directive.mjs +5 -5
  39. package/esm2022/radio/src/radio-item.directive.mjs +11 -11
  40. package/esm2022/radio/src/radio-item.token.mjs +4 -4
  41. package/esm2022/roving-focus/src/roving-focus-group.directive.mjs +8 -8
  42. package/esm2022/roving-focus/src/roving-focus-group.token.mjs +4 -4
  43. package/esm2022/roving-focus/src/roving-focus-item.directive.mjs +8 -8
  44. package/esm2022/roving-focus/src/roving-focus-item.token.mjs +4 -4
  45. package/esm2022/separator/src/separator.directive.mjs +6 -6
  46. package/esm2022/switch/index.mjs +2 -2
  47. package/esm2022/switch/src/switch-thumb.directive.mjs +5 -5
  48. package/esm2022/switch/src/switch.directive.mjs +11 -11
  49. package/esm2022/switch/src/switch.token.mjs +4 -4
  50. package/esm2022/toggle/index.mjs +2 -0
  51. package/esm2022/toggle/radix-ng-primitives-toggle.mjs +5 -0
  52. package/esm2022/toggle/src/toggle.directive.mjs +65 -0
  53. package/esm2022/tooltip/index.mjs +5 -0
  54. package/esm2022/tooltip/radix-ng-primitives-tooltip.mjs +5 -0
  55. package/esm2022/tooltip/src/tooltip-arrow.directive.mjs +17 -0
  56. package/esm2022/tooltip/src/tooltip-trigger.directive.mjs +148 -0
  57. package/esm2022/tooltip/src/tooltip-trigger.token.mjs +6 -0
  58. package/esm2022/tooltip/src/tooltip.config.mjs +31 -0
  59. package/esm2022/tooltip/src/tooltip.directive.mjs +46 -0
  60. package/esm2022/visually-hidden/src/visually-hidden.directive.mjs +5 -5
  61. package/fesm2022/radix-ng-primitives-avatar.mjs +167 -0
  62. package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -0
  63. package/fesm2022/radix-ng-primitives-checkbox.mjs +32 -32
  64. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  65. package/fesm2022/radix-ng-primitives-label.mjs +5 -5
  66. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  67. package/fesm2022/radix-ng-primitives-overlay.mjs +399 -0
  68. package/fesm2022/radix-ng-primitives-overlay.mjs.map +1 -0
  69. package/fesm2022/radix-ng-primitives-progress.mjs +12 -12
  70. package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
  71. package/fesm2022/radix-ng-primitives-radio.mjs +48 -48
  72. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  73. package/fesm2022/radix-ng-primitives-roving-focus.mjs +15 -15
  74. package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
  75. package/fesm2022/radix-ng-primitives-separator.mjs +5 -5
  76. package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
  77. package/fesm2022/radix-ng-primitives-switch.mjs +34 -34
  78. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  79. package/fesm2022/radix-ng-primitives-toggle.mjs +72 -0
  80. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -0
  81. package/fesm2022/radix-ng-primitives-tooltip.mjs +242 -0
  82. package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -0
  83. package/fesm2022/radix-ng-primitives-visually-hidden.mjs +5 -5
  84. package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
  85. package/label/src/label.directive.d.ts +3 -3
  86. package/overlay/README.md +1 -0
  87. package/overlay/index.d.ts +4 -0
  88. package/overlay/src/overlay-arrow.directive.d.ts +29 -0
  89. package/overlay/src/overlay-arrow.token.d.ts +3 -0
  90. package/overlay/src/overlay-trigger.directive.d.ts +163 -0
  91. package/overlay/src/overlay-trigger.token.d.ts +7 -0
  92. package/overlay/src/overlay.directive.d.ts +29 -0
  93. package/overlay/src/overlay.token.d.ts +3 -0
  94. package/package.json +29 -4
  95. package/progress/src/progress-indicator.directive.d.ts +4 -4
  96. package/progress/src/progress.directive.d.ts +3 -3
  97. package/progress/src/progress.token.d.ts +3 -3
  98. package/radio/index.d.ts +1 -1
  99. package/radio/src/radio-group.directive.d.ts +3 -3
  100. package/radio/src/radio-group.token.d.ts +3 -3
  101. package/radio/src/radio-indicator.directive.d.ts +5 -5
  102. package/radio/src/radio-item.directive.d.ts +4 -4
  103. package/radio/src/radio-item.token.d.ts +3 -3
  104. package/roving-focus/src/roving-focus-group.directive.d.ts +7 -7
  105. package/roving-focus/src/roving-focus-group.token.d.ts +3 -3
  106. package/roving-focus/src/roving-focus-item.directive.d.ts +3 -3
  107. package/roving-focus/src/roving-focus-item.token.d.ts +3 -3
  108. package/separator/src/separator.directive.d.ts +3 -3
  109. package/switch/index.d.ts +1 -1
  110. package/switch/src/switch-thumb.directive.d.ts +4 -4
  111. package/switch/src/switch.directive.d.ts +3 -3
  112. package/switch/src/switch.token.d.ts +3 -3
  113. package/toggle/README.md +3 -0
  114. package/toggle/index.d.ts +1 -0
  115. package/toggle/src/toggle.directive.d.ts +30 -0
  116. package/tooltip/README.md +1 -0
  117. package/tooltip/index.d.ts +4 -0
  118. package/tooltip/src/tooltip-arrow.directive.d.ts +6 -0
  119. package/tooltip/src/tooltip-trigger.directive.d.ts +79 -0
  120. package/tooltip/src/tooltip-trigger.token.d.ts +4 -0
  121. package/tooltip/src/tooltip.config.d.ts +46 -0
  122. package/tooltip/src/tooltip.directive.d.ts +17 -0
  123. package/visually-hidden/src/visually-hidden.directive.d.ts +3 -3
@@ -1,19 +1,19 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { InjectionToken, inject, Directive, numberAttribute, Input } from '@angular/core';
3
3
 
4
- const ProgressToken = new InjectionToken('ProgressDirective');
4
+ const RdxProgressToken = new InjectionToken('RdxProgressDirective');
5
5
  function injectProgress() {
6
- return inject(ProgressToken);
6
+ return inject(RdxProgressToken);
7
7
  }
8
8
 
9
- class ProgressIndicatorDirective {
9
+ class RdxProgressIndicatorDirective {
10
10
  constructor() {
11
11
  this.progress = injectProgress();
12
12
  }
13
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ProgressIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
14
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.3", type: ProgressIndicatorDirective, isStandalone: true, selector: "[rdxProgressIndicator]", host: { properties: { "attr.data-state": "progress.state", "attr.data-value": "progress.value", "attr.data-max": "progress.max" } }, ngImport: i0 }); }
13
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxProgressIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
14
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.3", type: RdxProgressIndicatorDirective, isStandalone: true, selector: "[rdxProgressIndicator]", host: { properties: { "attr.data-state": "progress.state", "attr.data-value": "progress.value", "attr.data-max": "progress.max" } }, ngImport: i0 }); }
15
15
  }
16
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ProgressIndicatorDirective, decorators: [{
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxProgressIndicatorDirective, decorators: [{
17
17
  type: Directive,
18
18
  args: [{
19
19
  selector: '[rdxProgressIndicator]',
@@ -26,7 +26,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
26
26
  }]
27
27
  }] });
28
28
 
29
- class ProgressDirective {
29
+ class RdxProgressDirective {
30
30
  constructor() {
31
31
  /**
32
32
  * Define the progress value.
@@ -54,15 +54,15 @@ class ProgressDirective {
54
54
  ? 'complete'
55
55
  : 'loading';
56
56
  }
57
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ProgressDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
58
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.3", type: ProgressDirective, isStandalone: true, selector: "[rdxProgress]", inputs: { value: ["rdxProgressValue", "value", numberAttribute], max: ["rdxProgressMax", "max", numberAttribute], valueLabel: ["rdxProgressValueLabel", "valueLabel"] }, host: { attributes: { "role": "progressbar" }, properties: { "attr.aria-valuemax": "max", "attr.aria-valuemin": "0", "attr.aria-valuenow": "value", "attr.aria-valuetext": "valueLabel(value, max)", "attr.data-state": "state", "attr.data-value": "value", "attr.data-max": "max" } }, providers: [{ provide: ProgressToken, useExisting: ProgressDirective }], ngImport: i0 }); }
57
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxProgressDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
58
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.3", type: RdxProgressDirective, isStandalone: true, selector: "[rdxProgress]", inputs: { value: ["rdxProgressValue", "value", numberAttribute], max: ["rdxProgressMax", "max", numberAttribute], valueLabel: ["rdxProgressValueLabel", "valueLabel"] }, host: { attributes: { "role": "progressbar" }, properties: { "attr.aria-valuemax": "max", "attr.aria-valuemin": "0", "attr.aria-valuenow": "value", "attr.aria-valuetext": "valueLabel(value, max)", "attr.data-state": "state", "attr.data-value": "value", "attr.data-max": "max" } }, providers: [{ provide: RdxProgressToken, useExisting: RdxProgressDirective }], ngImport: i0 }); }
59
59
  }
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ProgressDirective, decorators: [{
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxProgressDirective, decorators: [{
61
61
  type: Directive,
62
62
  args: [{
63
63
  selector: '[rdxProgress]',
64
64
  standalone: true,
65
- providers: [{ provide: ProgressToken, useExisting: ProgressDirective }],
65
+ providers: [{ provide: RdxProgressToken, useExisting: RdxProgressDirective }],
66
66
  host: {
67
67
  role: 'progressbar',
68
68
  '[attr.aria-valuemax]': 'max',
@@ -89,5 +89,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
89
89
  * Generated bundle index. Do not edit.
90
90
  */
91
91
 
92
- export { ProgressDirective, ProgressIndicatorDirective };
92
+ export { RdxProgressDirective, RdxProgressIndicatorDirective };
93
93
  //# sourceMappingURL=radix-ng-primitives-progress.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-progress.mjs","sources":["../../../packages/primitives/progress/src/progress.token.ts","../../../packages/primitives/progress/src/progress-indicator.directive.ts","../../../packages/primitives/progress/src/progress.directive.ts","../../../packages/primitives/progress/radix-ng-primitives-progress.ts"],"sourcesContent":["import { InjectionToken, inject } from '@angular/core';\nimport type { ProgressDirective } from './progress.directive';\n\nexport const ProgressToken = new InjectionToken<ProgressDirective>('ProgressDirective');\n\nexport function injectProgress(): ProgressDirective {\n return inject(ProgressToken);\n}\n","import { Directive } from '@angular/core';\nimport { injectProgress } from './progress.token';\n\n@Directive({\n selector: '[rdxProgressIndicator]',\n standalone: true,\n host: {\n '[attr.data-state]': 'progress.state',\n '[attr.data-value]': 'progress.value',\n '[attr.data-max]': 'progress.max'\n }\n})\nexport class ProgressIndicatorDirective {\n protected readonly progress = injectProgress();\n}\n","import { Directive, Input, numberAttribute } from '@angular/core';\nimport { ProgressToken } from './progress.token';\n\n@Directive({\n selector: '[rdxProgress]',\n standalone: true,\n providers: [{ provide: ProgressToken, useExisting: ProgressDirective }],\n host: {\n role: 'progressbar',\n '[attr.aria-valuemax]': 'max',\n '[attr.aria-valuemin]': '0',\n '[attr.aria-valuenow]': 'value',\n '[attr.aria-valuetext]': 'valueLabel(value, max)',\n '[attr.data-state]': 'state',\n '[attr.data-value]': 'value',\n '[attr.data-max]': 'max'\n }\n})\nexport class ProgressDirective {\n /**\n * Define the progress value.\n */\n @Input({ alias: 'rdxProgressValue', transform: numberAttribute }) value = 0;\n\n /**\n * Define the progress max value.\n * @default 100\n */\n @Input({ alias: 'rdxProgressMax', transform: numberAttribute }) max = 100;\n\n /**\n * Define a function that returns the progress value label.\n */\n @Input('rdxProgressValueLabel') valueLabel: (value: number, max: number) => string = (\n value,\n max\n ) => `${Math.round((value / max) * 100)}%`;\n\n /**\n * Get the state of the progress bar.\n * @returns 'indeterminate' | 'loading' | 'complete'\n * @internal\n */\n get state(): 'indeterminate' | 'loading' | 'complete' {\n return this.value == null\n ? 'indeterminate'\n : this.value === this.max\n ? 'complete'\n : 'loading';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAGO,MAAM,aAAa,GAAG,IAAI,cAAc,CAAoB,mBAAmB,CAAC,CAAC;SAExE,cAAc,GAAA;AAC1B,IAAA,OAAO,MAAM,CAAC,aAAa,CAAC,CAAC;AACjC;;MCKa,0BAA0B,CAAA;AATvC,IAAA,WAAA,GAAA;QAUuB,IAAQ,CAAA,QAAA,GAAG,cAAc,EAAE,CAAC;AAClD,KAAA;8GAFY,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,eAAA,EAAA,cAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBATtC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CAAA,gBAAA,EAAA,KAAA,EAAA,eAAe,8VAtBjD,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAY9D,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAf7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,UAAU,EAAE,IAAI;oBAChB,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAmB,iBAAA,EAAE,CAAC;AACvE,oBAAA,IAAI,EAAE;AACF,wBAAA,IAAI,EAAE,aAAa;AACnB,wBAAA,sBAAsB,EAAE,KAAK;AAC7B,wBAAA,sBAAsB,EAAE,GAAG;AAC3B,wBAAA,sBAAsB,EAAE,OAAO;AAC/B,wBAAA,uBAAuB,EAAE,wBAAwB;AACjD,wBAAA,mBAAmB,EAAE,OAAO;AAC5B,wBAAA,mBAAmB,EAAE,OAAO;AAC5B,wBAAA,iBAAiB,EAAE,KAAK;AAC3B,qBAAA;AACJ,iBAAA,CAAA;8BAKqE,KAAK,EAAA,CAAA;sBAAtE,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA,EAAE,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,eAAe,EAAE,CAAA;gBAMA,GAAG,EAAA,CAAA;sBAAlE,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA,EAAE,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,eAAe,EAAE,CAAA;gBAK9B,UAAU,EAAA,CAAA;sBAAzC,KAAK;uBAAC,uBAAuB,CAAA;;;ACjClC;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-progress.mjs","sources":["../../../packages/primitives/progress/src/progress.token.ts","../../../packages/primitives/progress/src/progress-indicator.directive.ts","../../../packages/primitives/progress/src/progress.directive.ts","../../../packages/primitives/progress/radix-ng-primitives-progress.ts"],"sourcesContent":["import { inject, InjectionToken } from '@angular/core';\n\nimport type { RdxProgressDirective } from './progress.directive';\n\nexport const RdxProgressToken = new InjectionToken<RdxProgressDirective>('RdxProgressDirective');\n\nexport function injectProgress(): RdxProgressDirective {\n return inject(RdxProgressToken);\n}\n","import { Directive } from '@angular/core';\n\nimport { injectProgress } from './progress.token';\n\n@Directive({\n selector: '[rdxProgressIndicator]',\n standalone: true,\n host: {\n '[attr.data-state]': 'progress.state',\n '[attr.data-value]': 'progress.value',\n '[attr.data-max]': 'progress.max'\n }\n})\nexport class RdxProgressIndicatorDirective {\n protected readonly progress = injectProgress();\n}\n","import { Directive, Input, numberAttribute } from '@angular/core';\n\nimport { RdxProgressToken } from './progress.token';\n\n@Directive({\n selector: '[rdxProgress]',\n standalone: true,\n providers: [{ provide: RdxProgressToken, useExisting: RdxProgressDirective }],\n host: {\n role: 'progressbar',\n '[attr.aria-valuemax]': 'max',\n '[attr.aria-valuemin]': '0',\n '[attr.aria-valuenow]': 'value',\n '[attr.aria-valuetext]': 'valueLabel(value, max)',\n '[attr.data-state]': 'state',\n '[attr.data-value]': 'value',\n '[attr.data-max]': 'max'\n }\n})\nexport class RdxProgressDirective {\n /**\n * Define the progress value.\n */\n @Input({ alias: 'rdxProgressValue', transform: numberAttribute }) value = 0;\n\n /**\n * Define the progress max value.\n * @default 100\n */\n @Input({ alias: 'rdxProgressMax', transform: numberAttribute }) max = 100;\n\n /**\n * Define a function that returns the progress value label.\n */\n @Input('rdxProgressValueLabel') valueLabel: (value: number, max: number) => string = (\n value,\n max\n ) => `${Math.round((value / max) * 100)}%`;\n\n /**\n * Get the state of the progress bar.\n * @returns 'indeterminate' | 'loading' | 'complete'\n * @internal\n */\n get state(): 'indeterminate' | 'loading' | 'complete' {\n return this.value == null\n ? 'indeterminate'\n : this.value === this.max\n ? 'complete'\n : 'loading';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[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B,wBAAA,uBAAuB,EAAE,wBAAwB;AACjD,wBAAA,mBAAmB,EAAE,OAAO;AAC5B,wBAAA,mBAAmB,EAAE,OAAO;AAC5B,wBAAA,iBAAiB,EAAE,KAAK;AAC3B,qBAAA;AACJ,iBAAA,CAAA;8BAKqE,KAAK,EAAA,CAAA;sBAAtE,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA,EAAE,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,eAAe,EAAE,CAAA;gBAMA,GAAG,EAAA,CAAA;sBAAlE,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA,EAAE,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,eAAe,EAAE,CAAA;gBAK9B,UAAU,EAAA,CAAA;sBAAzC,KAAK;uBAAC,uBAAuB,CAAA;;;AClClC;;AAEG;;;;"}
@@ -2,14 +2,14 @@ import * as i0 from '@angular/core';
2
2
  import { InjectionToken, inject, EventEmitter, booleanAttribute, Directive, Input, Output, HostListener } from '@angular/core';
3
3
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
4
  import * as i1 from '@radix-ng/primitives/roving-focus';
5
- import { RovingFocusGroupDirective, RovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';
5
+ import { RdxRovingFocusGroupDirective, RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';
6
6
 
7
- const RadioGroupToken = new InjectionToken('RadioGroupToken');
7
+ const RdxRadioGroupToken = new InjectionToken('RdxRadioGroupToken');
8
8
  function injectRadioGroup() {
9
- return inject(RadioGroupToken);
9
+ return inject(RdxRadioGroupToken);
10
10
  }
11
11
 
12
- class RadioGroupDirective {
12
+ class RdxRadioGroupDirective {
13
13
  constructor() {
14
14
  /**
15
15
  * Whether the radio group is disabled.
@@ -68,22 +68,22 @@ class RadioGroupDirective {
68
68
  onFocusout() {
69
69
  this.onTouched?.();
70
70
  }
71
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RadioGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
72
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.3", type: RadioGroupDirective, isStandalone: true, selector: "[rdxRadioGroup]", inputs: { value: ["rdxRadioGroupValue", "value"], disabled: ["rdxRadioGroupDisabled", "disabled", booleanAttribute], orientation: ["rdxRadioGroupOrientation", "orientation"] }, outputs: { valueChange: "rdxRadioGroupValueChange" }, host: { attributes: { "role": "radiogroup" }, listeners: { "focusout": "onFocusout()" }, properties: { "attr.aria-orientation": "orientation", "attr.data-disabled": "disabled ? \"\" : null" } }, providers: [
73
- { provide: RadioGroupToken, useExisting: RadioGroupDirective },
74
- { provide: NG_VALUE_ACCESSOR, useExisting: RadioGroupDirective, multi: true }
75
- ], hostDirectives: [{ directive: i1.RovingFocusGroupDirective }], ngImport: i0 }); }
71
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxRadioGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
72
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.3", type: RdxRadioGroupDirective, isStandalone: true, selector: "[rdxRadioGroup]", inputs: { value: ["rdxRadioGroupValue", "value"], disabled: ["rdxRadioGroupDisabled", "disabled", booleanAttribute], orientation: ["rdxRadioGroupOrientation", "orientation"] }, outputs: { valueChange: "rdxRadioGroupValueChange" }, host: { attributes: { "role": "radiogroup" }, listeners: { "focusout": "onFocusout()" }, properties: { "attr.aria-orientation": "orientation", "attr.data-disabled": "disabled ? \"\" : null" } }, providers: [
73
+ { provide: RdxRadioGroupToken, useExisting: RdxRadioGroupDirective },
74
+ { provide: NG_VALUE_ACCESSOR, useExisting: RdxRadioGroupDirective, multi: true }
75
+ ], hostDirectives: [{ directive: i1.RdxRovingFocusGroupDirective }], ngImport: i0 }); }
76
76
  }
77
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RadioGroupDirective, decorators: [{
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxRadioGroupDirective, decorators: [{
78
78
  type: Directive,
79
79
  args: [{
80
80
  selector: '[rdxRadioGroup]',
81
81
  standalone: true,
82
82
  providers: [
83
- { provide: RadioGroupToken, useExisting: RadioGroupDirective },
84
- { provide: NG_VALUE_ACCESSOR, useExisting: RadioGroupDirective, multi: true }
83
+ { provide: RdxRadioGroupToken, useExisting: RdxRadioGroupDirective },
84
+ { provide: NG_VALUE_ACCESSOR, useExisting: RdxRadioGroupDirective, multi: true }
85
85
  ],
86
- hostDirectives: [RovingFocusGroupDirective],
86
+ hostDirectives: [RdxRovingFocusGroupDirective],
87
87
  host: {
88
88
  role: 'radiogroup',
89
89
  '[attr.aria-orientation]': 'orientation',
@@ -110,12 +110,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
110
110
  args: ['focusout']
111
111
  }] } });
112
112
 
113
- const RadioItemToken = new InjectionToken('RadioItemToken');
113
+ const RdxRadioItemToken = new InjectionToken('RadioItemToken');
114
114
  function injectRadioItem() {
115
- return inject(RadioItemToken);
115
+ return inject(RdxRadioItemToken);
116
116
  }
117
117
 
118
- class RadioItemDirective {
118
+ class RdxRadioIndicatorDirective {
119
+ constructor() {
120
+ /**
121
+ * Access the radio group.
122
+ */
123
+ this.radioGroup = injectRadioGroup();
124
+ /**
125
+ * Access the radio group item.
126
+ */
127
+ this.radioItem = injectRadioItem();
128
+ }
129
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxRadioIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
130
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.3", type: RdxRadioIndicatorDirective, isStandalone: true, selector: "[rdxRadioIndicator]", host: { properties: { "attr.data-state": "radioGroup.value === this.radioItem.value ? \"checked\" : \"unchecked\"", "attr.data-disabled": "radioItem.disabled ? \"\" : null" } }, ngImport: i0 }); }
131
+ }
132
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxRadioIndicatorDirective, decorators: [{
133
+ type: Directive,
134
+ args: [{
135
+ selector: '[rdxRadioIndicator]',
136
+ standalone: true,
137
+ host: {
138
+ '[attr.data-state]': 'radioGroup.value === this.radioItem.value ? "checked" : "unchecked"',
139
+ '[attr.data-disabled]': 'radioItem.disabled ? "" : null'
140
+ }
141
+ }]
142
+ }] });
143
+
144
+ class RdxRadioItemDirective {
119
145
  constructor() {
120
146
  /**
121
147
  * Access the radio group.
@@ -152,16 +178,16 @@ class RadioItemDirective {
152
178
  onClick() {
153
179
  this.radioGroup.select(this.value);
154
180
  }
155
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RadioItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
156
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.3", type: RadioItemDirective, isStandalone: true, selector: "button[rdxRadioItem]", inputs: { value: "value", disabled: ["disabled", "disabled", booleanAttribute] }, host: { attributes: { "type": "button", "role": "radio" }, listeners: { "keydown": "onKeydown($event)", "focus": "onFocus()", "click": "onClick()" }, properties: { "attr.aria-checked": "radioGroup.value === value ? \"true\" : \"false\"", "attr.data-disabled": "disabled ? \"\" : null", "attr.data-state": "radioGroup.value === value ? \"checked\" : \"unchecked\"" } }, providers: [{ provide: RadioItemToken, useExisting: RadioItemDirective }], hostDirectives: [{ directive: i1.RovingFocusItemDirective }], ngImport: i0 }); }
181
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxRadioItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
182
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.3", type: RdxRadioItemDirective, isStandalone: true, selector: "button[rdxRadioItem]", inputs: { value: "value", disabled: ["disabled", "disabled", booleanAttribute] }, host: { attributes: { "type": "button", "role": "radio" }, listeners: { "keydown": "onKeydown($event)", "focus": "onFocus()", "click": "onClick()" }, properties: { "attr.aria-checked": "radioGroup.value === value ? \"true\" : \"false\"", "attr.data-disabled": "disabled ? \"\" : null", "attr.data-state": "radioGroup.value === value ? \"checked\" : \"unchecked\"" } }, providers: [{ provide: RdxRadioItemToken, useExisting: RdxRadioItemDirective }], hostDirectives: [{ directive: i1.RdxRovingFocusItemDirective }], ngImport: i0 }); }
157
183
  }
158
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RadioItemDirective, decorators: [{
184
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxRadioItemDirective, decorators: [{
159
185
  type: Directive,
160
186
  args: [{
161
187
  selector: 'button[rdxRadioItem]',
162
188
  standalone: true,
163
- hostDirectives: [RovingFocusItemDirective],
164
- providers: [{ provide: RadioItemToken, useExisting: RadioItemDirective }],
189
+ hostDirectives: [RdxRovingFocusItemDirective],
190
+ providers: [{ provide: RdxRadioItemToken, useExisting: RdxRadioItemDirective }],
165
191
  host: {
166
192
  type: 'button',
167
193
  role: 'radio',
@@ -187,35 +213,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
187
213
  args: ['click']
188
214
  }] } });
189
215
 
190
- class RadioIndicatorDirective {
191
- constructor() {
192
- /**
193
- * Access the radio group.
194
- */
195
- this.radioGroup = injectRadioGroup();
196
- /**
197
- * Access the radio group item.
198
- */
199
- this.radioItem = injectRadioItem();
200
- }
201
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RadioIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
202
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.3", type: RadioIndicatorDirective, isStandalone: true, selector: "[rdxRadioIndicator]", host: { properties: { "attr.data-state": "radioGroup.value === this.radioItem.value ? \"checked\" : \"unchecked\"", "attr.data-disabled": "radioItem.disabled ? \"\" : null" } }, ngImport: i0 }); }
203
- }
204
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RadioIndicatorDirective, decorators: [{
205
- type: Directive,
206
- args: [{
207
- selector: '[rdxRadioIndicator]',
208
- standalone: true,
209
- host: {
210
- '[attr.data-state]': 'radioGroup.value === this.radioItem.value ? "checked" : "unchecked"',
211
- '[attr.data-disabled]': 'radioItem.disabled ? "" : null'
212
- }
213
- }]
214
- }] });
215
-
216
216
  /**
217
217
  * Generated bundle index. Do not edit.
218
218
  */
219
219
 
220
- export { RadioGroupDirective, RadioGroupToken, RadioIndicatorDirective, RadioItemDirective, RadioItemToken, injectRadioGroup, injectRadioItem };
220
+ export { RdxRadioGroupDirective, RdxRadioGroupToken, RdxRadioIndicatorDirective, RdxRadioItemDirective, RdxRadioItemToken, injectRadioGroup, injectRadioItem };
221
221
  //# sourceMappingURL=radix-ng-primitives-radio.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-radio.mjs","sources":["../../../packages/primitives/radio/src/radio-group.token.ts","../../../packages/primitives/radio/src/radio-group.directive.ts","../../../packages/primitives/radio/src/radio-item.token.ts","../../../packages/primitives/radio/src/radio-item.directive.ts","../../../packages/primitives/radio/src/radio-indicator.directive.ts","../../../packages/primitives/radio/radix-ng-primitives-radio.ts"],"sourcesContent":["import { InjectionToken, inject } from '@angular/core';\nimport type { RadioGroupDirective } from './radio-group.directive';\n\nexport const RadioGroupToken = new InjectionToken<RadioGroupDirective>('RadioGroupToken');\n\nexport function injectRadioGroup(): RadioGroupDirective {\n return inject(RadioGroupToken);\n}\n","import {\n Directive,\n EventEmitter,\n HostListener,\n Input,\n Output,\n booleanAttribute\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n// eslint-disable-next-line @nx/enforce-module-boundaries\nimport { RovingFocusGroupDirective } from '@radix-ng/primitives/roving-focus';\nimport { RadioGroupToken } from './radio-group.token';\n\n@Directive({\n selector: '[rdxRadioGroup]',\n standalone: true,\n providers: [\n { provide: RadioGroupToken, useExisting: RadioGroupDirective },\n { provide: NG_VALUE_ACCESSOR, useExisting: RadioGroupDirective, multi: true }\n ],\n hostDirectives: [RovingFocusGroupDirective],\n host: {\n role: 'radiogroup',\n '[attr.aria-orientation]': 'orientation',\n '[attr.data-disabled]': 'disabled ? \"\" : null'\n }\n})\nexport class RadioGroupDirective implements ControlValueAccessor {\n /**\n * The value of the radio group.\n */\n @Input('rdxRadioGroupValue') value?: string;\n\n /**\n * Whether the radio group is disabled.\n */\n @Input({\n alias: 'rdxRadioGroupDisabled',\n transform: booleanAttribute\n })\n disabled = false;\n\n /**\n * The orientation of the radio group.\n * @default 'horizontal'\n */\n @Input('rdxRadioGroupOrientation') orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Event emitted when the value of the radio group changes.\n */\n @Output('rdxRadioGroupValueChange') readonly valueChange = new EventEmitter<string>();\n\n /**\n * The callback function to call when the value of the radio group changes.\n * @internal\n */\n private onChange?: (value: string) => void;\n\n /**\n * The callback function to call when the radio group is touched.\n * @internal\n */\n private onTouched?: () => void;\n\n /**\n * Select a radio item.\n * @param value The value of the radio item to select.\n */\n select(value: string): void {\n this.value = value;\n this.valueChange.emit(value);\n this.onChange?.(value);\n }\n\n /**\n * Update the value of the radio group.\n * @param value The new value of the radio group.\n * @internal\n */\n writeValue(value: string): void {\n this.value = value;\n }\n\n /**\n * Register a callback function to call when the value of the radio group changes.\n * @param fn The callback function to call when the value of the radio group changes.\n * @internal\n */\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * Set the disabled state of the radio group.\n * @param isDisabled Whether the radio group is disabled.\n * @internal\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /**\n * When focus leaves the radio group, mark it as touched.\n * @internal\n */\n @HostListener('focusout')\n protected onFocusout(): void {\n this.onTouched?.();\n }\n}\n","import { InjectionToken, inject } from '@angular/core';\nimport type { RadioItemDirective } from './radio-item.directive';\n\nexport const RadioItemToken = new InjectionToken<RadioItemDirective>('RadioItemToken');\n\nexport function injectRadioItem(): RadioItemDirective {\n return inject(RadioItemToken);\n}\n","import { Directive, HostListener, Input, booleanAttribute } from '@angular/core';\nimport { injectRadioGroup } from './radio-group.token';\nimport { RadioItemToken } from './radio-item.token';\n// eslint-disable-next-line @nx/enforce-module-boundaries\nimport { RovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';\n\n@Directive({\n selector: 'button[rdxRadioItem]',\n standalone: true,\n hostDirectives: [RovingFocusItemDirective],\n providers: [{ provide: RadioItemToken, useExisting: RadioItemDirective }],\n host: {\n type: 'button',\n role: 'radio',\n '[attr.aria-checked]': 'radioGroup.value === value ? \"true\" : \"false\"',\n '[attr.data-disabled]': 'disabled ? \"\" : null',\n '[attr.data-state]': 'radioGroup.value === value ? \"checked\" : \"unchecked\"'\n }\n})\nexport class RadioItemDirective {\n /**\n * Access the radio group.\n */\n protected readonly radioGroup = injectRadioGroup();\n\n /**\n * The value of the radio item.\n */\n @Input({ required: true }) value!: string;\n\n /**\n * Whether the radio item is disabled.\n * @default false\n */\n @Input({ transform: booleanAttribute }) disabled = false;\n\n /**\n * Handle keydown events.\n * @param event The keydown event.\n * @internal\n */\n @HostListener('keydown', ['$event'])\n protected onKeydown(event: KeyboardEvent): void {\n // According to WAI ARIA, radio groups don't activate items on enter keypress\n if (event.key === 'Enter') {\n event.preventDefault();\n }\n }\n\n /**\n * When the item receives focus, select it.\n * @internal\n */\n @HostListener('focus')\n protected onFocus(): void {\n this.radioGroup.select(this.value);\n }\n\n /**\n * When the item receives a click, select it.\n * @internal\n */\n @HostListener('click')\n protected onClick(): void {\n this.radioGroup.select(this.value);\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectRadioGroup } from './radio-group.token';\nimport { injectRadioItem } from './radio-item.token';\n\n@Directive({\n selector: '[rdxRadioIndicator]',\n standalone: true,\n host: {\n '[attr.data-state]': 'radioGroup.value === this.radioItem.value ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'radioItem.disabled ? \"\" : null'\n }\n})\nexport class RadioIndicatorDirective {\n /**\n * Access the radio group.\n */\n protected readonly radioGroup = injectRadioGroup();\n\n /**\n * Access the radio group item.\n */\n protected readonly radioItem = injectRadioItem();\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAGa,eAAe,GAAG,IAAI,cAAc,CAAsB,iBAAiB,EAAE;SAE1E,gBAAgB,GAAA;AAC5B,IAAA,OAAO,MAAM,CAAC,eAAe,CAAC,CAAC;AACnC;;MCoBa,mBAAmB,CAAA;AAdhC,IAAA,WAAA,GAAA;AAoBI;;AAEG;QAKH,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;AAEjB;;;AAGG;QACgC,IAAW,CAAA,WAAA,GAA8B,YAAY,CAAC;AAEzF;;AAEG;AAC0C,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAU,CAAC;AA+DzF,KAAA;AAjDG;;;AAGG;AACH,IAAA,MAAM,CAAC,KAAa,EAAA;AAChB,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AACnB,QAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7B,QAAA,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,CAAC;KAC1B;AAED;;;;AAIG;AACH,I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gBAAgB,EAAE,CAAC;AAEnD;;AAEG;QACgB,IAAS,CAAA,SAAA,GAAG,eAAe,EAAE,CAAC;AACpD,KAAA;8GAVY,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,yEAAA,EAAA,oBAAA,EAAA,kCAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBARnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACF,wBAAA,mBAAmB,EAAE,qEAAqE;AAC1F,wBAAA,sBAAsB,EAAE,gCAAgC;AAC3D,qBAAA;AACJ,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-radio.mjs","sources":["../../../packages/primitives/radio/src/radio-group.token.ts","../../../packages/primitives/radio/src/radio-group.directive.ts","../../../packages/primitives/radio/src/radio-item.token.ts","../../../packages/primitives/radio/src/radio-indicator.directive.ts","../../../packages/primitives/radio/src/radio-item.directive.ts","../../../packages/primitives/radio/radix-ng-primitives-radio.ts"],"sourcesContent":["import { inject, InjectionToken } from '@angular/core';\n\nimport type { RdxRadioGroupDirective } from './radio-group.directive';\n\nexport const RdxRadioGroupToken = new InjectionToken<RdxRadioGroupDirective>('RdxRadioGroupToken');\n\nexport function injectRadioGroup(): RdxRadioGroupDirective {\n return inject(RdxRadioGroupToken);\n}\n","import {\n booleanAttribute,\n Directive,\n EventEmitter,\n HostListener,\n Input,\n Output\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n// eslint-disable-next-line @nx/enforce-module-boundaries\nimport { RdxRovingFocusGroupDirective } from '@radix-ng/primitives/roving-focus';\n\nimport { RdxRadioGroupToken } from './radio-group.token';\n\n@Directive({\n selector: '[rdxRadioGroup]',\n standalone: true,\n providers: [\n { provide: RdxRadioGroupToken, useExisting: RdxRadioGroupDirective },\n { provide: NG_VALUE_ACCESSOR, useExisting: RdxRadioGroupDirective, multi: true }\n ],\n hostDirectives: [RdxRovingFocusGroupDirective],\n host: {\n role: 'radiogroup',\n '[attr.aria-orientation]': 'orientation',\n '[attr.data-disabled]': 'disabled ? \"\" : null'\n }\n})\nexport class RdxRadioGroupDirective implements ControlValueAccessor {\n /**\n * The value of the radio group.\n */\n @Input('rdxRadioGroupValue') value?: string;\n\n /**\n * Whether the radio group is disabled.\n */\n @Input({\n alias: 'rdxRadioGroupDisabled',\n transform: booleanAttribute\n })\n disabled = false;\n\n /**\n * The orientation of the radio group.\n * @default 'horizontal'\n */\n @Input('rdxRadioGroupOrientation') orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Event emitted when the value of the radio group changes.\n */\n @Output('rdxRadioGroupValueChange') readonly valueChange = new EventEmitter<string>();\n\n /**\n * The callback function to call when the value of the radio group changes.\n * @internal\n */\n private onChange?: (value: string) => void;\n\n /**\n * The callback function to call when the radio group is touched.\n * @internal\n */\n private onTouched?: () => void;\n\n /**\n * Select a radio item.\n * @param value The value of the radio item to select.\n */\n select(value: string): void {\n this.value = value;\n this.valueChange.emit(value);\n this.onChange?.(value);\n }\n\n /**\n * Update the value of the radio group.\n * @param value The new value of the radio group.\n * @internal\n */\n writeValue(value: string): void {\n this.value = value;\n }\n\n /**\n * Register a callback function to call when the value of the radio group changes.\n * @param fn The callback function to call when the value of the radio group changes.\n * @internal\n */\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * Set the disabled state of the radio group.\n * @param isDisabled Whether the radio group is disabled.\n * @internal\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /**\n * When focus leaves the radio group, mark it as touched.\n * @internal\n */\n @HostListener('focusout')\n protected onFocusout(): void {\n this.onTouched?.();\n }\n}\n","import { inject, InjectionToken } from '@angular/core';\n\nimport type { RdxRadioItemDirective } from './radio-item.directive';\n\nexport const RdxRadioItemToken = new InjectionToken<RdxRadioItemDirective>('RadioItemToken');\n\nexport function injectRadioItem(): RdxRadioItemDirective {\n return inject(RdxRadioItemToken);\n}\n","import { Directive } from '@angular/core';\n\nimport { injectRadioGroup } from './radio-group.token';\nimport { injectRadioItem } from './radio-item.token';\n\n@Directive({\n selector: '[rdxRadioIndicator]',\n standalone: true,\n host: {\n '[attr.data-state]': 'radioGroup.value === this.radioItem.value ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'radioItem.disabled ? \"\" : null'\n }\n})\nexport class RdxRadioIndicatorDirective {\n /**\n * Access the radio group.\n */\n protected readonly radioGroup = injectRadioGroup();\n\n /**\n * Access the radio group item.\n */\n protected readonly radioItem = injectRadioItem();\n}\n","import { booleanAttribute, Directive, HostListener, Input } from '@angular/core';\n\n// eslint-disable-next-line @nx/enforce-module-boundaries\nimport { RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';\n\nimport { injectRadioGroup } from './radio-group.token';\nimport { RdxRadioItemToken } from './radio-item.token';\n\n@Directive({\n selector: 'button[rdxRadioItem]',\n standalone: true,\n hostDirectives: [RdxRovingFocusItemDirective],\n providers: [{ provide: RdxRadioItemToken, useExisting: RdxRadioItemDirective }],\n host: {\n type: 'button',\n role: 'radio',\n '[attr.aria-checked]': 'radioGroup.value === value ? \"true\" : \"false\"',\n '[attr.data-disabled]': 'disabled ? \"\" : null',\n '[attr.data-state]': 'radioGroup.value === value ? \"checked\" : \"unchecked\"'\n }\n})\nexport class RdxRadioItemDirective {\n /**\n * Access the radio group.\n */\n protected readonly radioGroup = injectRadioGroup();\n\n /**\n * The value of the radio item.\n */\n @Input({ required: true }) value!: string;\n\n /**\n * Whether the radio item is disabled.\n * @default false\n */\n @Input({ transform: booleanAttribute }) disabled = false;\n\n /**\n * Handle keydown events.\n * @param event The keydown event.\n * @internal\n */\n @HostListener('keydown', ['$event'])\n protected onKeydown(event: KeyboardEvent): void {\n // According to WAI ARIA, radio groups don't activate items on enter keypress\n if (event.key === 'Enter') {\n event.preventDefault();\n }\n }\n\n /**\n * When the item receives focus, select it.\n * @internal\n */\n @HostListener('focus')\n protected onFocus(): void {\n this.radioGroup.select(this.value);\n }\n\n /**\n * When the item receives a click, select it.\n * @internal\n */\n @HostListener('click')\n protected onClick(): void {\n this.radioGroup.select(this.value);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAIa,kBAAkB,GAAG,IAAI,cAAc,CAAyB,oBAAoB,EAAE;SAEnF,gBAAgB,GAAA;AAC5B,IAAA,OAAO,MAAM,CAAC,kBAAkB,CAAC,CAAC;AACtC;;MCqBa,sBAAsB,CAAA;AAdnC,IAAA,WAAA,GAAA;AAoBI;;AAEG;QAKH,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;AAEjB;;;AAGG;QACgC,IAAW,CAAA,WAAA,GAA8B,YAAY,CAAC;AAEzF;;AAEG;AAC0C,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAU,CAAC;AA+DzF,KAAA;AAjDG;;;AAGG;AACH,IAAA,MAAM,CAAC,KAAa,EAAA;AAChB,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AACnB,QAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7B,QAAA,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,CAAC;KAC1B;AAED;;;;AAIG;AACH,IAAA,UAAU,CAAC,KAAa,EAAA;AACpB,Q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EAAE,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAuB,qBAAA,EAAE,CAAC;AAC/E,oBAAA,IAAI,EAAE;AACF,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,qBAAqB,EAAE,+CAA+C;AACtE,wBAAA,sBAAsB,EAAE,sBAAsB;AAC9C,wBAAA,mBAAmB,EAAE,sDAAsD;AAC9E,qBAAA;AACJ,iBAAA,CAAA;8BAU8B,KAAK,EAAA,CAAA;sBAA/B,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;gBAMe,QAAQ,EAAA,CAAA;sBAA/C,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAA;gBAQ5B,SAAS,EAAA,CAAA;sBADlB,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC,CAAA;gBAazB,OAAO,EAAA,CAAA;sBADhB,YAAY;uBAAC,OAAO,CAAA;gBAUX,OAAO,EAAA,CAAA;sBADhB,YAAY;uBAAC,OAAO,CAAA;;;AChEzB;;AAEG;;;;"}
@@ -5,15 +5,15 @@ import { InjectionToken, inject, DestroyRef, QueryList, booleanAttribute, Direct
5
5
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
6
  import { filter } from 'rxjs';
7
7
 
8
- const RovingFocusGroupToken = new InjectionToken('RovingFocusToken');
8
+ const RdxRovingFocusGroupToken = new InjectionToken('RdxRovingFocusToken');
9
9
  /**
10
10
  * Inject the roving focus directive instance.
11
11
  */
12
12
  function injectRovingFocusGroup() {
13
- return inject(RovingFocusGroupToken);
13
+ return inject(RdxRovingFocusGroupToken);
14
14
  }
15
15
 
16
- class RovingFocusGroupDirective {
16
+ class RdxRovingFocusGroupDirective {
17
17
  constructor() {
18
18
  this.directionality = inject(Directionality);
19
19
  this.destroyRef = inject(DestroyRef);
@@ -104,15 +104,15 @@ class RovingFocusGroupDirective {
104
104
  this.keyManager.withVerticalOrientation();
105
105
  }
106
106
  }
107
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RovingFocusGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
108
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.3", type: RovingFocusGroupDirective, isStandalone: true, selector: "[rdxRovingFocusGroup]", inputs: { orientation: "orientation", wrap: ["wrap", "wrap", booleanAttribute] }, providers: [{ provide: RovingFocusGroupToken, useExisting: RovingFocusGroupDirective }], usesOnChanges: true, ngImport: i0 }); }
107
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxRovingFocusGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
108
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.3", type: RdxRovingFocusGroupDirective, isStandalone: true, selector: "[rdxRovingFocusGroup]", inputs: { orientation: "orientation", wrap: ["wrap", "wrap", booleanAttribute] }, providers: [{ provide: RdxRovingFocusGroupToken, useExisting: RdxRovingFocusGroupDirective }], usesOnChanges: true, ngImport: i0 }); }
109
109
  }
110
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RovingFocusGroupDirective, decorators: [{
110
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxRovingFocusGroupDirective, decorators: [{
111
111
  type: Directive,
112
112
  args: [{
113
113
  selector: '[rdxRovingFocusGroup]',
114
114
  standalone: true,
115
- providers: [{ provide: RovingFocusGroupToken, useExisting: RovingFocusGroupDirective }]
115
+ providers: [{ provide: RdxRovingFocusGroupToken, useExisting: RdxRovingFocusGroupDirective }]
116
116
  }]
117
117
  }], propDecorators: { orientation: [{
118
118
  type: Input
@@ -121,12 +121,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
121
121
  args: [{ transform: booleanAttribute }]
122
122
  }] } });
123
123
 
124
- const RovingFocusItemToken = new InjectionToken('RovingFocusItemToken');
124
+ const RdxRovingFocusItemToken = new InjectionToken('RdxRovingFocusItemToken');
125
125
  function injectRovingFocusItem() {
126
- return inject(RovingFocusItemToken);
126
+ return inject(RdxRovingFocusItemToken);
127
127
  }
128
128
 
129
- class RovingFocusItemDirective {
129
+ class RdxRovingFocusItemDirective {
130
130
  constructor() {
131
131
  /**
132
132
  * Access the group the roving focus item belongs to.
@@ -188,15 +188,15 @@ class RovingFocusItemDirective {
188
188
  focus() {
189
189
  this.elementRef?.nativeElement.focus();
190
190
  }
191
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RovingFocusItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
192
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.3", type: RovingFocusItemDirective, isStandalone: true, selector: "[rdxRovingFocusItem]", inputs: { order: ["order", "order", numberAttribute], disabled: ["disabled", "disabled", booleanAttribute] }, host: { listeners: { "keydown": "onKeydown($event)" }, properties: { "attr.tabindex": "this.tabindex" } }, providers: [{ provide: RovingFocusItemToken, useExisting: RovingFocusItemDirective }], ngImport: i0 }); }
191
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxRovingFocusItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
192
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.3", type: RdxRovingFocusItemDirective, isStandalone: true, selector: "[rdxRovingFocusItem]", inputs: { order: ["order", "order", numberAttribute], disabled: ["disabled", "disabled", booleanAttribute] }, host: { listeners: { "keydown": "onKeydown($event)" }, properties: { "attr.tabindex": "this.tabindex" } }, providers: [{ provide: RdxRovingFocusItemToken, useExisting: RdxRovingFocusItemDirective }], ngImport: i0 }); }
193
193
  }
194
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RovingFocusItemDirective, decorators: [{
194
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxRovingFocusItemDirective, decorators: [{
195
195
  type: Directive,
196
196
  args: [{
197
197
  selector: '[rdxRovingFocusItem]',
198
198
  standalone: true,
199
- providers: [{ provide: RovingFocusItemToken, useExisting: RovingFocusItemDirective }]
199
+ providers: [{ provide: RdxRovingFocusItemToken, useExisting: RdxRovingFocusItemDirective }]
200
200
  }]
201
201
  }], propDecorators: { order: [{
202
202
  type: Input,
@@ -216,5 +216,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
216
216
  * Generated bundle index. Do not edit.
217
217
  */
218
218
 
219
- export { RovingFocusGroupDirective, RovingFocusGroupToken, RovingFocusItemDirective, RovingFocusItemToken, injectRovingFocusGroup, injectRovingFocusItem };
219
+ export { RdxRovingFocusGroupDirective, RdxRovingFocusGroupToken, RdxRovingFocusItemDirective, RdxRovingFocusItemToken, injectRovingFocusGroup, injectRovingFocusItem };
220
220
  //# sourceMappingURL=radix-ng-primitives-roving-focus.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-roving-focus.mjs","sources":["../../../packages/primitives/roving-focus/src/roving-focus-group.token.ts","../../../packages/primitives/roving-focus/src/roving-focus-group.directive.ts","../../../packages/primitives/roving-focus/src/roving-focus-item.token.ts","../../../packages/primitives/roving-focus/src/roving-focus-item.directive.ts","../../../packages/primitives/roving-focus/radix-ng-primitives-roving-focus.ts"],"sourcesContent":["import { InjectionToken, inject } from '@angular/core';\nimport type { RovingFocusGroupDirective } from './roving-focus-group.directive';\n\nexport const RovingFocusGroupToken = new InjectionToken<RovingFocusGroupDirective>(\n 'RovingFocusToken'\n);\n\n/**\n * Inject the roving focus directive instance.\n */\nexport function injectRovingFocusGroup(): RovingFocusGroupDirective {\n return inject(RovingFocusGroupToken);\n}\n","import { FocusKeyManager } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport {\n DestroyRef,\n Directive,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n QueryList,\n SimpleChanges,\n booleanAttribute,\n inject\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { filter } from 'rxjs';\nimport type { RovingFocusItemDirective } from './roving-focus-item.directive';\nimport { RovingFocusGroupToken } from './roving-focus-group.token';\n\n@Directive({\n selector: '[rdxRovingFocusGroup]',\n standalone: true,\n providers: [{ provide: RovingFocusGroupToken, useExisting: RovingFocusGroupDirective }]\n})\nexport class RovingFocusGroupDirective implements OnInit, OnChanges, OnDestroy {\n private readonly directionality = inject(Directionality);\n\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * Create a query list of all the roving focus items.\n * We don't use ContentChildren as dynamically added items may not be in the correct order.\n */\n private readonly items = new QueryList<RovingFocusItemDirective>();\n\n /**\n * Create the focus key manager instance.\n * @internal\n */\n readonly keyManager = new FocusKeyManager<RovingFocusItemDirective>(this.items);\n\n /**\n * Determine the orientation of the roving focus group.\n * @default vertical\n */\n @Input() orientation: 'horizontal' | 'vertical' = 'vertical';\n\n /**\n * Determine if focus should wrap when the end or beginning is reached.\n * @default true\n */\n @Input({ transform: booleanAttribute }) wrap = true;\n\n ngOnInit(): void {\n this.keyManager.withWrap(this.wrap);\n\n this.setOrientation(this.orientation);\n\n // update the key manager orientation if the document direction changes\n this.directionality.change\n .pipe(\n filter(() => this.orientation === 'horizontal'),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe((direction) => this.keyManager.withHorizontalOrientation(direction));\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if ('orientation' in changes) {\n this.setOrientation(this.orientation);\n }\n\n if ('wrap' in changes) {\n this.keyManager.withWrap(this.wrap);\n }\n }\n\n ngOnDestroy(): void {\n this.keyManager.destroy();\n }\n\n /**\n * Register a roving focus item.\n * @param item The roving focus item to register.\n */\n register(item: RovingFocusItemDirective): void {\n // add the item to the query list by sort the items based on their order\n this.items.reset([...this.items.toArray(), item].sort((a, b) => a.order - b.order));\n\n // if this is the first item, make it the active item\n if (this.items.length === 1) {\n this.keyManager.updateActiveItem(item);\n }\n }\n\n /**\n * Unregister a roving focus item.\n * @param item The roving focus item to unregister.\n */\n unregister(item: RovingFocusItemDirective): void {\n // determine if the item being removed is the active item\n const isActive = this.keyManager.activeItem === item;\n\n // remove the item from the query list\n this.items.reset(this.items.toArray().filter((i) => i !== item));\n\n // if the item being removed is the active item, make the first item the active item\n if (isActive) {\n this.keyManager.updateActiveItem(0);\n }\n }\n\n /**\n * Handle key events on the roving focus items.\n * @param event The key event.\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n this.keyManager.onKeydown(event);\n }\n\n /**\n * Set the orientation of the roving focus group.\n * @param orientation The orientation of the roving focus group.\n */\n setOrientation(orientation: 'horizontal' | 'vertical'): void {\n this.orientation = orientation;\n\n if (orientation === 'horizontal') {\n this.keyManager.withHorizontalOrientation(this.directionality.value);\n } else {\n this.keyManager.withVerticalOrientation();\n }\n }\n}\n","import { InjectionToken, inject } from '@angular/core';\nimport type { RovingFocusItemDirective } from './roving-focus-item.directive';\n\nexport const RovingFocusItemToken = new InjectionToken<RovingFocusItemDirective>(\n 'RovingFocusItemToken'\n);\n\nexport function injectRovingFocusItem(): RovingFocusItemDirective {\n return inject(RovingFocusItemToken);\n}\n","import { FocusableOption } from '@angular/cdk/a11y';\nimport {\n ChangeDetectorRef,\n DestroyRef,\n Directive,\n ElementRef,\n HostBinding,\n HostListener,\n Input,\n OnDestroy,\n OnInit,\n booleanAttribute,\n inject,\n numberAttribute\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { injectRovingFocusGroup } from './roving-focus-group.token';\nimport { RovingFocusItemToken } from './roving-focus-item.token';\n\n@Directive({\n selector: '[rdxRovingFocusItem]',\n standalone: true,\n providers: [{ provide: RovingFocusItemToken, useExisting: RovingFocusItemDirective }]\n})\nexport class RovingFocusItemDirective implements OnInit, OnDestroy, FocusableOption {\n /**\n * Access the group the roving focus item belongs to.\n */\n private readonly group = injectRovingFocusGroup();\n\n /**\n * Access the element reference of the roving focus item.\n */\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n /**\n * Access the destroyRef\n */\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * Access the change detector ref\n */\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\n\n /**\n * Define the order of the roving focus item in the group.\n */\n @Input({ transform: numberAttribute }) order = 0;\n\n /**\n * Define if the item is disabled.\n */\n @Input({ transform: booleanAttribute }) disabled = false;\n\n /**\n * Derive the tabindex of the roving focus item.\n * @internal\n */\n @HostBinding('attr.tabindex')\n get tabindex(): number {\n return this.group.keyManager.activeItem === this ? 0 : -1;\n }\n\n ngOnInit(): void {\n // register the roving focus item with the group\n this.group.register(this);\n\n // listen for changes to the active item and run change detection\n this.group.keyManager.change\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.changeDetectorRef.markForCheck());\n }\n\n ngOnDestroy(): void {\n // unregister the roving focus item with the group\n this.group.unregister(this);\n }\n\n /**\n * Handle key events on the roving focus item.\n * @param event The key event.\n * @internal\n */\n @HostListener('keydown', ['$event'])\n onKeydown(event: KeyboardEvent): void {\n this.group.onKeydown(event);\n }\n\n /**\n * Focus the roving focus item.\n * @param origin The origin of the focus request.\n * @internal\n */\n focus(): void {\n this.elementRef?.nativeElement.focus();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAGa,qBAAqB,GAAG,IAAI,cAAc,CACnD,kBAAkB,EACpB;AAEF;;AAEG;SACa,sBAAsB,GAAA;AAClC,IAAA,OAAO,MAAM,CAAC,qBAAqB,CAAC,CA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AAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAxB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,EAwBb,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,CAAA,OAAA,EAAA,OAAA,EAAA,eAAe,CAKf,EAAA,QAAA,EAAA,CAAA,UAAA,EAAA,UAAA,EAAA,gBAAgB,2HA/BzB,CAAC,EAAE,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAE5E,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBALpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,UAAU,EAAE,IAAI;oBAChB,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAA0B,wBAAA,EAAE,CAAC;AACxF,iBAAA,CAAA;8BAyB0C,KAAK,EAAA,CAAA;sBAA3C,KAAK;uBAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAA;gBAKG,QAAQ,EAAA,CAAA;sBAA/C,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAA;gBAOlC,QAAQ,EAAA,CAAA;sBADX,WAAW;uBAAC,eAAe,CAAA;gBA0B5B,SAAS,EAAA,CAAA;sBADR,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC,CAAA;;;ACpFvC;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-roving-focus.mjs","sources":["../../../packages/primitives/roving-focus/src/roving-focus-group.token.ts","../../../packages/primitives/roving-focus/src/roving-focus-group.directive.ts","../../../packages/primitives/roving-focus/src/roving-focus-item.token.ts","../../../packages/primitives/roving-focus/src/roving-focus-item.directive.ts","../../../packages/primitives/roving-focus/radix-ng-primitives-roving-focus.ts"],"sourcesContent":["import { inject, InjectionToken } from '@angular/core';\n\nimport type { RdxRovingFocusGroupDirective } from './roving-focus-group.directive';\n\nexport const RdxRovingFocusGroupToken = new InjectionToken<RdxRovingFocusGroupDirective>(\n 'RdxRovingFocusToken'\n);\n\n/**\n * Inject the roving focus directive instance.\n */\nexport function injectRovingFocusGroup(): RdxRovingFocusGroupDirective {\n return inject(RdxRovingFocusGroupToken);\n}\n","import { FocusKeyManager } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport {\n booleanAttribute,\n DestroyRef,\n Directive,\n inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n QueryList,\n SimpleChanges\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { filter } from 'rxjs';\n\nimport { RdxRovingFocusGroupToken } from './roving-focus-group.token';\nimport type { RdxRovingFocusItemDirective } from './roving-focus-item.directive';\n\n@Directive({\n selector: '[rdxRovingFocusGroup]',\n standalone: true,\n providers: [{ provide: RdxRovingFocusGroupToken, useExisting: RdxRovingFocusGroupDirective }]\n})\nexport class RdxRovingFocusGroupDirective implements OnInit, OnChanges, OnDestroy {\n private readonly directionality = inject(Directionality);\n\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * Create a query list of all the roving focus items.\n * We don't use ContentChildren as dynamically added items may not be in the correct order.\n */\n private readonly items = new QueryList<RdxRovingFocusItemDirective>();\n\n /**\n * Create the focus key manager instance.\n * @internal\n */\n readonly keyManager = new FocusKeyManager<RdxRovingFocusItemDirective>(this.items);\n\n /**\n * Determine the orientation of the roving focus group.\n * @default vertical\n */\n @Input() orientation: 'horizontal' | 'vertical' = 'vertical';\n\n /**\n * Determine if focus should wrap when the end or beginning is reached.\n * @default true\n */\n @Input({ transform: booleanAttribute }) wrap = true;\n\n ngOnInit(): void {\n this.keyManager.withWrap(this.wrap);\n\n this.setOrientation(this.orientation);\n\n // update the key manager orientation if the document direction changes\n this.directionality.change\n .pipe(\n filter(() => this.orientation === 'horizontal'),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe((direction) => this.keyManager.withHorizontalOrientation(direction));\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if ('orientation' in changes) {\n this.setOrientation(this.orientation);\n }\n\n if ('wrap' in changes) {\n this.keyManager.withWrap(this.wrap);\n }\n }\n\n ngOnDestroy(): void {\n this.keyManager.destroy();\n }\n\n /**\n * Register a roving focus item.\n * @param item The roving focus item to register.\n */\n register(item: RdxRovingFocusItemDirective): void {\n // add the item to the query list by sort the items based on their order\n this.items.reset([...this.items.toArray(), item].sort((a, b) => a.order - b.order));\n\n // if this is the first item, make it the active item\n if (this.items.length === 1) {\n this.keyManager.updateActiveItem(item);\n }\n }\n\n /**\n * Unregister a roving focus item.\n * @param item The roving focus item to unregister.\n */\n unregister(item: RdxRovingFocusItemDirective): void {\n // determine if the item being removed is the active item\n const isActive = this.keyManager.activeItem === item;\n\n // remove the item from the query list\n this.items.reset(this.items.toArray().filter((i) => i !== item));\n\n // if the item being removed is the active item, make the first item the active item\n if (isActive) {\n this.keyManager.updateActiveItem(0);\n }\n }\n\n /**\n * Handle key events on the roving focus items.\n * @param event The key event.\n * @internal\n */\n onKeydown(event: KeyboardEvent): void {\n this.keyManager.onKeydown(event);\n }\n\n /**\n * Set the orientation of the roving focus group.\n * @param orientation The orientation of the roving focus group.\n */\n setOrientation(orientation: 'horizontal' | 'vertical'): void {\n this.orientation = orientation;\n\n if (orientation === 'horizontal') {\n this.keyManager.withHorizontalOrientation(this.directionality.value);\n } else {\n this.keyManager.withVerticalOrientation();\n }\n }\n}\n","import { inject, InjectionToken } from '@angular/core';\n\nimport type { RdxRovingFocusItemDirective } from './roving-focus-item.directive';\n\nexport const RdxRovingFocusItemToken = new InjectionToken<RdxRovingFocusItemDirective>(\n 'RdxRovingFocusItemToken'\n);\n\nexport function injectRovingFocusItem(): RdxRovingFocusItemDirective {\n return inject(RdxRovingFocusItemToken);\n}\n","import { FocusableOption } from '@angular/cdk/a11y';\nimport {\n booleanAttribute,\n ChangeDetectorRef,\n DestroyRef,\n Directive,\n ElementRef,\n HostBinding,\n HostListener,\n inject,\n Input,\n numberAttribute,\n OnDestroy,\n OnInit\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { injectRovingFocusGroup } from './roving-focus-group.token';\nimport { RdxRovingFocusItemToken } from './roving-focus-item.token';\n\n@Directive({\n selector: '[rdxRovingFocusItem]',\n standalone: true,\n providers: [{ provide: RdxRovingFocusItemToken, useExisting: RdxRovingFocusItemDirective }]\n})\nexport class RdxRovingFocusItemDirective implements OnInit, OnDestroy, FocusableOption {\n /**\n * Access the group the roving focus item belongs to.\n */\n private readonly group = injectRovingFocusGroup();\n\n /**\n * Access the element reference of the roving focus item.\n */\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n /**\n * Access the destroyRef\n */\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * Access the change detector ref\n */\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\n\n /**\n * Define the order of the roving focus item in the group.\n */\n @Input({ transform: numberAttribute }) order = 0;\n\n /**\n * Define if the item is disabled.\n */\n @Input({ transform: booleanAttribute }) disabled = false;\n\n /**\n * Derive the tabindex of the roving focus item.\n * @internal\n */\n @HostBinding('attr.tabindex')\n get tabindex(): number {\n return this.group.keyManager.activeItem === this ? 0 : -1;\n }\n\n ngOnInit(): void {\n // register the roving focus item with the group\n this.group.register(this);\n\n // listen for changes to the active item and run change detection\n this.group.keyManager.change\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.changeDetectorRef.markForCheck());\n }\n\n ngOnDestroy(): void {\n // unregister the roving focus item with the group\n this.group.unregister(this);\n }\n\n /**\n * Handle key events on the roving focus item.\n * @param event The key event.\n * @internal\n */\n @HostListener('keydown', ['$event'])\n onKeydown(event: KeyboardEvent): void {\n this.group.onKeydown(event);\n }\n\n /**\n * Focus the roving focus item.\n * @param origin The origin of the focus request.\n * @internal\n */\n focus(): void {\n this.elementRef?.nativeElement.focus();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAIa,wBAAwB,GAAG,IAAI,cAAc,CACtD,qBAAqB,EACvB;AAEF;;AAEG;SACa,sBAAsB,GAAA;AAClC,IAAA,OAAO,MAAM,CAAC,wBAAwB,CAAC,CAAC;AAC5C;;MCYa,4BAA4B,CAAA;AALzC,IAAA,WAAA,GAAA;AAMqB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAExC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAEjD;;;AAGG;AACc,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,SAAS,EAA+B,CAAC;AAEtE;;;AAGG;QACM,IAAU,CAAA,UAAA,GAAG,IAAI,eAAe,CAA8B,IAAI,CAAC,KAAK,CAAC,CAAC;AAEnF;;;AAGG;QACM,IAAW,CAAA,WAAA,GAA8B,UAAU,CAAC;AAE7D;;;AAGG;QACqC,IAAI,CAAA,IAAA,GAAG,IAAI,CAAC;AAmFvD,KAAA;IAjFG,QAAQ,GAAA;QACJ,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEpC,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;;QAGtC,IAAI,CAAC,cAAc,CAAC,MAAM;AACrB,aAAA,IAAI,CACD,MAAM,CAAC,MAAM,IAAI,CAAC,WAAW,KAAK,YAAY,CAAC,EAC/C,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CACtC;AACA,aAAA,SAAS,CAAC,CAAC,SAAS,K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AAe,EAAE,CAAA;gBAKG,QAAQ,EAAA,CAAA;sBAA/C,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAA;gBAOlC,QAAQ,EAAA,CAAA;sBADX,WAAW;uBAAC,eAAe,CAAA;gBA0B5B,SAAS,EAAA,CAAA;sBADR,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC,CAAA;;;ACrFvC;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { booleanAttribute, Directive, Input } from '@angular/core';
3
3
 
4
- class SeparatorDirective {
4
+ class RdxSeparatorDirective {
5
5
  constructor() {
6
6
  /**
7
7
  * The orientation of the separator.
@@ -14,10 +14,10 @@ class SeparatorDirective {
14
14
  */
15
15
  this.decorative = false;
16
16
  }
17
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: SeparatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
18
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.3", type: SeparatorDirective, isStandalone: true, selector: "[rdxSeparator]", inputs: { orientation: ["rdxSeparatorOrientation", "orientation"], decorative: ["rdxSeparatorDecorative", "decorative", booleanAttribute] }, host: { properties: { "attr.role": "decorative ? \"none\" : \"separator\"", "attr.aria-orientation": "!decorative && orientation === \"vertical\" ? \"vertical\" : null", "attr.data-orientation": "orientation" } }, ngImport: i0 }); }
17
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxSeparatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
18
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.3", type: RdxSeparatorDirective, isStandalone: true, selector: "[rdxSeparator]", inputs: { orientation: ["rdxSeparatorOrientation", "orientation"], decorative: ["rdxSeparatorDecorative", "decorative", booleanAttribute] }, host: { properties: { "attr.role": "decorative ? \"none\" : \"separator\"", "attr.aria-orientation": "!decorative && orientation === \"vertical\" ? \"vertical\" : null", "attr.data-orientation": "orientation" } }, ngImport: i0 }); }
19
19
  }
20
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: SeparatorDirective, decorators: [{
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxSeparatorDirective, decorators: [{
21
21
  type: Directive,
22
22
  args: [{
23
23
  selector: '[rdxSeparator]',
@@ -40,5 +40,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
40
40
  * Generated bundle index. Do not edit.
41
41
  */
42
42
 
43
- export { SeparatorDirective };
43
+ export { RdxSeparatorDirective };
44
44
  //# sourceMappingURL=radix-ng-primitives-separator.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-separator.mjs","sources":["../../../packages/primitives/separator/src/separator.directive.ts","../../../packages/primitives/separator/radix-ng-primitives-separator.ts"],"sourcesContent":["import { Directive, Input, booleanAttribute } from '@angular/core';\n\n@Directive({\n selector: '[rdxSeparator]',\n standalone: true,\n host: {\n '[attr.role]': 'decorative ? \"none\" : \"separator\"',\n '[attr.aria-orientation]': '!decorative && orientation === \"vertical\" ? \"vertical\" : null',\n '[attr.data-orientation]': 'orientation'\n }\n})\nexport class SeparatorDirective {\n /**\n * The orientation of the separator.\n * @default 'horizontal'\n */\n @Input('rdxSeparatorOrientation') orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Whether the separator is for decoration purposes. If true, the separator will not be included in the accessibility tree.\n * @default false\n */\n @Input({ alias: 'rdxSeparatorDecorative', transform: booleanAttribute }) decorative = false;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAWa,kBAAkB,CAAA;AAT/B,IAAA,WAAA,GAAA;AAUI;;;AAGG;QAC+B,IAAW,CAAA,WAAA,GAA8B,YAAY,CAAC;AAExF;;;AAGG;QACsE,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;AAC/F,KAAA;8GAZY,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,0KAW0B,gBAAgB,CAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,WAAA,EAAA,uCAAA,EAAA,uBAAA,EAAA,mEAAA,EAAA,uBAAA,EAAA,aAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAX5D,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAT9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACF,wBAAA,aAAa,EAAE,mCAAmC;AAClD,wBAAA,yBAAyB,EAAE,+DAA+D;AAC1F,wBAAA,yBAAyB,EAAE,aAAa;AAC3C,qBAAA;AACJ,iBAAA,CAAA;8BAMqC,WAAW,EAAA,CAAA;sBAA5C,KAAK;uBAAC,yBAAyB,CAAA;gBAMyC,UAAU,EAAA,CAAA;sBAAlF,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA,EAAE,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAA;;;ACtB3E;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-separator.mjs","sources":["../../../packages/primitives/separator/src/separator.directive.ts","../../../packages/primitives/separator/radix-ng-primitives-separator.ts"],"sourcesContent":["import { booleanAttribute, Directive, Input } from '@angular/core';\n\n@Directive({\n selector: '[rdxSeparator]',\n standalone: true,\n host: {\n '[attr.role]': 'decorative ? \"none\" : \"separator\"',\n '[attr.aria-orientation]': '!decorative && orientation === \"vertical\" ? \"vertical\" : null',\n '[attr.data-orientation]': 'orientation'\n }\n})\nexport class RdxSeparatorDirective {\n /**\n * The orientation of the separator.\n * @default 'horizontal'\n */\n @Input('rdxSeparatorOrientation') orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Whether the separator is for decoration purposes. If true, the separator will not be included in the accessibility tree.\n * @default false\n */\n @Input({ alias: 'rdxSeparatorDecorative', transform: booleanAttribute }) decorative = false;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAWa,qBAAqB,CAAA;AATlC,IAAA,WAAA,GAAA;AAUI;;;AAGG;QAC+B,IAAW,CAAA,WAAA,GAA8B,YAAY,CAAC;AAExF;;;AAGG;QACsE,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;AAC/F,KAAA;8GAZY,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,0KAWuB,gBAAgB,CAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,WAAA,EAAA,uCAAA,EAAA,uBAAA,EAAA,mEAAA,EAAA,uBAAA,EAAA,aAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAX5D,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBATjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ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