@radix-ng/primitives 0.14.0 → 0.16.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 (183) hide show
  1. package/alert-dialog/index.d.ts +11 -0
  2. package/alert-dialog/src/alert-dialog-cancel.directive.d.ts +3 -3
  3. package/alert-dialog/src/alert-dialog-content.directive.d.ts +3 -3
  4. package/alert-dialog/src/alert-dialog-root.directive.d.ts +3 -3
  5. package/alert-dialog/src/alert-dialog-title.directive.d.ts +3 -3
  6. package/alert-dialog/src/alert-dialog-trigger.directive.d.ts +3 -3
  7. package/alert-dialog/src/alert-dialog.service.d.ts +3 -3
  8. package/aspect-ratio/README.md +1 -0
  9. package/aspect-ratio/index.d.ts +1 -0
  10. package/aspect-ratio/src/aspect-ratio.directive.d.ts +30 -0
  11. package/compodoc/documentation.json +1467 -616
  12. package/core/index.d.ts +7 -0
  13. package/core/src/accessor/provide-value-accessor.d.ts +12 -0
  14. package/core/src/auto-focus.directive.d.ts +14 -0
  15. package/core/src/document.d.ts +1 -0
  16. package/core/src/inject-ng-control.d.ts +8 -0
  17. package/core/src/is-client.d.ts +1 -0
  18. package/core/src/is-inside-form.d.ts +2 -0
  19. package/core/src/window.d.ts +3 -0
  20. package/dialog/src/dialog.config.d.ts +1 -1
  21. package/esm2022/accordion/index.mjs +5 -5
  22. package/esm2022/accordion/src/accordion-content.directive.mjs +4 -4
  23. package/esm2022/accordion/src/accordion-header.directive.mjs +4 -4
  24. package/esm2022/accordion/src/accordion-item.directive.mjs +4 -4
  25. package/esm2022/accordion/src/accordion-root.directive.mjs +4 -4
  26. package/esm2022/accordion/src/accordion-trigger.directive.mjs +4 -4
  27. package/esm2022/alert-dialog/index.mjs +35 -1
  28. package/esm2022/alert-dialog/src/alert-dialog-cancel.directive.mjs +7 -7
  29. package/esm2022/alert-dialog/src/alert-dialog-content.directive.mjs +7 -7
  30. package/esm2022/alert-dialog/src/alert-dialog-root.directive.mjs +7 -7
  31. package/esm2022/alert-dialog/src/alert-dialog-title.directive.mjs +5 -5
  32. package/esm2022/alert-dialog/src/alert-dialog-trigger.directive.mjs +7 -7
  33. package/esm2022/alert-dialog/src/alert-dialog.service.mjs +5 -5
  34. package/esm2022/aspect-ratio/index.mjs +2 -0
  35. package/esm2022/aspect-ratio/radix-ng-primitives-aspect-ratio.mjs +5 -0
  36. package/esm2022/aspect-ratio/src/aspect-ratio.directive.mjs +55 -0
  37. package/esm2022/avatar/src/avatar-fallback.directive.mjs +4 -4
  38. package/esm2022/avatar/src/avatar-image.directive.mjs +5 -4
  39. package/esm2022/avatar/src/avatar-root.directive.mjs +4 -4
  40. package/esm2022/checkbox/src/checkbox-button.directive.mjs +4 -4
  41. package/esm2022/checkbox/src/checkbox-indicator.directive.mjs +4 -4
  42. package/esm2022/checkbox/src/checkbox-input.directive.mjs +4 -4
  43. package/esm2022/checkbox/src/checkbox.directive.mjs +4 -4
  44. package/esm2022/collapsible/src/collapsible-content.directive.mjs +4 -4
  45. package/esm2022/collapsible/src/collapsible-root.directive.mjs +4 -4
  46. package/esm2022/collapsible/src/collapsible-trigger.directive.mjs +4 -4
  47. package/esm2022/context-menu/index.mjs +5 -5
  48. package/esm2022/context-menu/src/context-menu-content.directive.mjs +4 -4
  49. package/esm2022/context-menu/src/context-menu-item-checkbox.directive.mjs +4 -4
  50. package/esm2022/context-menu/src/context-menu-item-indicator.directive.mjs +4 -4
  51. package/esm2022/context-menu/src/context-menu-item-radio-group.directive.mjs +4 -4
  52. package/esm2022/context-menu/src/context-menu-item-radio.directive.mjs +4 -4
  53. package/esm2022/context-menu/src/context-menu-item-selectable.mjs +4 -4
  54. package/esm2022/context-menu/src/context-menu-item.directive.mjs +4 -4
  55. package/esm2022/context-menu/src/context-menu-label.directive.mjs +4 -4
  56. package/esm2022/context-menu/src/context-menu-separator.directive.mjs +4 -4
  57. package/esm2022/context-menu/src/context-menu-trigger.directive.mjs +4 -4
  58. package/esm2022/core/index.mjs +8 -0
  59. package/esm2022/core/radix-ng-primitives-core.mjs +5 -0
  60. package/esm2022/core/src/accessor/provide-value-accessor.mjs +19 -0
  61. package/esm2022/core/src/auto-focus.directive.mjs +80 -0
  62. package/esm2022/core/src/document.mjs +6 -0
  63. package/esm2022/core/src/inject-ng-control.mjs +17 -0
  64. package/esm2022/core/src/is-client.mjs +6 -0
  65. package/esm2022/core/src/is-inside-form.mjs +7 -0
  66. package/esm2022/core/src/window.mjs +15 -0
  67. package/esm2022/dialog/index.mjs +5 -5
  68. package/esm2022/dialog/src/dialog-close.directive.mjs +4 -4
  69. package/esm2022/dialog/src/dialog-content.directive.mjs +4 -4
  70. package/esm2022/dialog/src/dialog-description.directive.mjs +4 -4
  71. package/esm2022/dialog/src/dialog-dismiss.directive.mjs +4 -4
  72. package/esm2022/dialog/src/dialog-title.directive.mjs +4 -4
  73. package/esm2022/dialog/src/dialog-trigger.directive.mjs +4 -4
  74. package/esm2022/dialog/src/dialog.config.mjs +1 -1
  75. package/esm2022/dialog/src/dialog.service.mjs +4 -4
  76. package/esm2022/dropdown-menu/index.mjs +5 -5
  77. package/esm2022/dropdown-menu/src/dropdown-menu-content.directive.mjs +4 -4
  78. package/esm2022/dropdown-menu/src/dropdown-menu-item-checkbox.directive.mjs +4 -4
  79. package/esm2022/dropdown-menu/src/dropdown-menu-item-indicator.directive.mjs +4 -4
  80. package/esm2022/dropdown-menu/src/dropdown-menu-item-radio-group.directive.mjs +4 -4
  81. package/esm2022/dropdown-menu/src/dropdown-menu-item-radio.directive.mjs +4 -4
  82. package/esm2022/dropdown-menu/src/dropdown-menu-item-selectable.mjs +4 -4
  83. package/esm2022/dropdown-menu/src/dropdown-menu-item.directive.mjs +4 -4
  84. package/esm2022/dropdown-menu/src/dropdown-menu-label.directive.mjs +4 -4
  85. package/esm2022/dropdown-menu/src/dropdown-menu-separator.directive.mjs +4 -4
  86. package/esm2022/dropdown-menu/src/dropdown-menu-trigger.directive.mjs +4 -4
  87. package/esm2022/label/src/label.directive.mjs +4 -4
  88. package/esm2022/menu/index.mjs +5 -5
  89. package/esm2022/menu/src/menu-content.directive.mjs +4 -4
  90. package/esm2022/menu/src/menu-directive.mjs +4 -4
  91. package/esm2022/menu/src/menu-group.directive.mjs +4 -4
  92. package/esm2022/menu/src/menu-item.directive.mjs +4 -4
  93. package/esm2022/menu/src/menu-label.directive.mjs +4 -4
  94. package/esm2022/menu/src/menu-separator.directive.mjs +4 -4
  95. package/esm2022/menubar/index.mjs +5 -5
  96. package/esm2022/menubar/src/menubar-content.directive.mjs +4 -4
  97. package/esm2022/menubar/src/menubar-item-checkbox.directive.mjs +4 -4
  98. package/esm2022/menubar/src/menubar-item-indicator.directive.mjs +4 -4
  99. package/esm2022/menubar/src/menubar-item-radio.directive.mjs +4 -4
  100. package/esm2022/menubar/src/menubar-item.directive.mjs +4 -4
  101. package/esm2022/menubar/src/menubar-radio-group.directive.mjs +4 -4
  102. package/esm2022/menubar/src/menubar-root.directive.mjs +4 -4
  103. package/esm2022/menubar/src/menubar-separator.directive.mjs +4 -4
  104. package/esm2022/menubar/src/menubar-trigger.directive.mjs +4 -4
  105. package/esm2022/progress/index.mjs +5 -5
  106. package/esm2022/progress/src/progress-indicator.directive.mjs +4 -4
  107. package/esm2022/progress/src/progress-root.directive.mjs +4 -4
  108. package/esm2022/radio/src/radio-indicator.directive.mjs +4 -4
  109. package/esm2022/radio/src/radio-item.directive.mjs +4 -4
  110. package/esm2022/radio/src/radio-root.directive.mjs +4 -4
  111. package/esm2022/separator/src/separator.directive.mjs +39 -17
  112. package/esm2022/switch/index.mjs +5 -5
  113. package/esm2022/switch/src/switch-input.directive.mjs +4 -4
  114. package/esm2022/switch/src/switch-root.directive.mjs +4 -4
  115. package/esm2022/switch/src/switch-thumb.directive.mjs +4 -4
  116. package/esm2022/tabs/index.mjs +5 -5
  117. package/esm2022/tabs/src/tabs-content.directive.mjs +4 -4
  118. package/esm2022/tabs/src/tabs-context.service.mjs +4 -4
  119. package/esm2022/tabs/src/tabs-list.directive.mjs +4 -4
  120. package/esm2022/tabs/src/tabs-root.directive.mjs +4 -4
  121. package/esm2022/tabs/src/tabs-trigger.directive.mjs +4 -4
  122. package/esm2022/toggle/index.mjs +2 -1
  123. package/esm2022/toggle/src/toggle-input.directive.mjs +29 -0
  124. package/esm2022/toggle/src/toggle.directive.mjs +4 -5
  125. package/esm2022/toggle-group/src/toggle-group-item.directive.mjs +4 -4
  126. package/esm2022/toggle-group/src/toggle-group-multiple.directive.mjs +4 -4
  127. package/esm2022/toggle-group/src/toggle-group.directive.mjs +4 -4
  128. package/esm2022/visually-hidden/index.mjs +4 -0
  129. package/esm2022/visually-hidden/radix-ng-primitives-visually-hidden.mjs +5 -0
  130. package/esm2022/visually-hidden/src/visually-hidden-input-bubble.directive.mjs +74 -0
  131. package/esm2022/visually-hidden/src/visually-hidden-input.directive.mjs +74 -0
  132. package/esm2022/visually-hidden/src/visually-hidden.directive.mjs +42 -0
  133. package/fesm2022/radix-ng-primitives-accordion.mjs +19 -19
  134. package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
  135. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +59 -31
  136. package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -1
  137. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +62 -0
  138. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -0
  139. package/fesm2022/radix-ng-primitives-avatar.mjs +10 -9
  140. package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
  141. package/fesm2022/radix-ng-primitives-checkbox.mjs +12 -12
  142. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  143. package/fesm2022/radix-ng-primitives-collapsible.mjs +9 -9
  144. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
  145. package/fesm2022/radix-ng-primitives-context-menu.mjs +34 -34
  146. package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
  147. package/fesm2022/radix-ng-primitives-core.mjs +151 -0
  148. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -0
  149. package/fesm2022/radix-ng-primitives-dialog.mjs +25 -25
  150. package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
  151. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +34 -34
  152. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +1 -1
  153. package/fesm2022/radix-ng-primitives-label.mjs +3 -3
  154. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  155. package/fesm2022/radix-ng-primitives-menu.mjs +22 -22
  156. package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
  157. package/fesm2022/radix-ng-primitives-menubar.mjs +31 -31
  158. package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
  159. package/fesm2022/radix-ng-primitives-progress.mjs +10 -10
  160. package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
  161. package/fesm2022/radix-ng-primitives-radio.mjs +9 -9
  162. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  163. package/fesm2022/radix-ng-primitives-separator.mjs +38 -16
  164. package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
  165. package/fesm2022/radix-ng-primitives-switch.mjs +13 -13
  166. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  167. package/fesm2022/radix-ng-primitives-tabs.mjs +19 -19
  168. package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
  169. package/fesm2022/radix-ng-primitives-toggle-group.mjs +9 -9
  170. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  171. package/fesm2022/radix-ng-primitives-toggle.mjs +32 -6
  172. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  173. package/fesm2022/radix-ng-primitives-visually-hidden.mjs +189 -0
  174. package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -0
  175. package/package.json +19 -1
  176. package/separator/src/separator.directive.d.ts +33 -5
  177. package/toggle/index.d.ts +1 -0
  178. package/toggle/src/toggle-input.directive.d.ts +6 -0
  179. package/visually-hidden/README.md +3 -0
  180. package/visually-hidden/index.d.ts +3 -0
  181. package/visually-hidden/src/visually-hidden-input-bubble.directive.d.ts +21 -0
  182. package/visually-hidden/src/visually-hidden-input.directive.d.ts +19 -0
  183. package/visually-hidden/src/visually-hidden.directive.d.ts +15 -0
@@ -1,35 +1,57 @@
1
1
  import * as i0 from '@angular/core';
2
- import { booleanAttribute, Directive, Input } from '@angular/core';
2
+ import { input, booleanAttribute, computed, Directive } from '@angular/core';
3
3
 
4
4
  const DEFAULT_ORIENTATION = 'horizontal';
5
5
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
6
6
  const ORIENTATIONS = ['horizontal', 'vertical'];
7
+ /**
8
+ * Directive that adds accessible and configurable separator element to the DOM.
9
+ * This can be either horizontal or vertical and optionally decorative (which removes
10
+ * it from the accessibility tree).
11
+ */
7
12
  class RdxSeparatorRootDirective {
8
13
  constructor() {
9
- this.orientation = DEFAULT_ORIENTATION;
10
- this.decorative = false;
14
+ /**
15
+ * Orientation of the separator, can be either 'horizontal' or 'vertical'.
16
+ * Defaults to 'horizontal'.
17
+ */
18
+ this.orientation = input(DEFAULT_ORIENTATION);
19
+ /**
20
+ * If true, the separator will be considered decorative and removed from
21
+ * the accessibility tree. Defaults to false.
22
+ */
23
+ this.decorative = input(false, { transform: booleanAttribute });
24
+ /**
25
+ * Computes the `role` attribute for the separator. If `decorative` is true,
26
+ * the role is set to "none", otherwise it is "separator".
27
+ *
28
+ * @ignore
29
+ */
30
+ this.computedRole = computed(() => (this.decorative() ? 'none' : 'separator'));
31
+ /**
32
+ * Computes the `aria-orientation` attribute. It is set to "vertical" only if
33
+ * the separator is not decorative and the orientation is set to "vertical".
34
+ * For horizontal orientation, the attribute is omitted.
35
+ *
36
+ * @ignore
37
+ */
38
+ this.computedAriaOrientation = computed(() => !this.decorative() && this.orientation() === 'vertical' ? 'vertical' : null);
11
39
  }
12
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxSeparatorRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
13
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.1", type: RdxSeparatorRootDirective, isStandalone: true, selector: "div[rdxSeparatorRoot]", inputs: { orientation: "orientation", decorative: ["decorative", "decorative", booleanAttribute] }, host: { properties: { "attr.role": "decorative ? \"none\" : \"separator\"", "attr.aria-orientation": "!decorative && orientation === \"vertical\" ? \"vertical\" : null", "attr.data-orientation": "orientation" } }, ngImport: i0 }); }
40
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxSeparatorRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
41
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.10", type: RdxSeparatorRootDirective, isStandalone: true, selector: "div[rdxSeparatorRoot]", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, decorative: { classPropertyName: "decorative", publicName: "decorative", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.role": "computedRole()", "attr.aria-orientation": "computedAriaOrientation()", "attr.data-orientation": "orientation()" } }, ngImport: i0 }); }
14
42
  }
15
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxSeparatorRootDirective, decorators: [{
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxSeparatorRootDirective, decorators: [{
16
44
  type: Directive,
17
45
  args: [{
18
46
  selector: 'div[rdxSeparatorRoot]',
19
47
  standalone: true,
20
48
  host: {
21
- '[attr.role]': 'decorative ? "none" : "separator"',
22
- // `aria-orientation` defaults to `horizontal` so we only need it if `orientation` is vertical
23
- '[attr.aria-orientation]': '!decorative && orientation === "vertical" ? "vertical" : null',
24
- '[attr.data-orientation]': 'orientation'
49
+ '[attr.role]': 'computedRole()',
50
+ '[attr.aria-orientation]': 'computedAriaOrientation()',
51
+ '[attr.data-orientation]': 'orientation()'
25
52
  }
26
53
  }]
27
- }], propDecorators: { orientation: [{
28
- type: Input
29
- }], decorative: [{
30
- type: Input,
31
- args: [{ transform: booleanAttribute }]
32
- }] } });
54
+ }] });
33
55
 
34
56
  /**
35
57
  * Generated bundle index. Do not edit.
@@ -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 { booleanAttribute, Directive, Input } from '@angular/core';\n\nconst DEFAULT_ORIENTATION = 'horizontal';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst ORIENTATIONS = ['horizontal', 'vertical'] as const;\n\nexport type Orientation = (typeof ORIENTATIONS)[number];\n\nexport interface SeparatorProps {\n /**\n * Either `vertical` or `horizontal`. Defaults to `horizontal`.\n */\n orientation?: Orientation;\n /**\n * Whether the component is purely decorative. When true, accessibility-related attributes\n * are updated so that the rendered element is removed from the accessibility tree.\n */\n decorative?: boolean;\n}\n\n@Directive({\n selector: 'div[rdxSeparatorRoot]',\n standalone: true,\n host: {\n '[attr.role]': 'decorative ? \"none\" : \"separator\"',\n // `aria-orientation` defaults to `horizontal` so we only need it if `orientation` is vertical\n '[attr.aria-orientation]': '!decorative && orientation === \"vertical\" ? \"vertical\" : null',\n '[attr.data-orientation]': 'orientation'\n }\n})\nexport class RdxSeparatorRootDirective implements SeparatorProps {\n @Input() orientation: Orientation = DEFAULT_ORIENTATION;\n\n @Input({ transform: booleanAttribute }) decorative = false;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA,MAAM,mBAAmB,GAAG,YAAY,CAAC;AACzC;AACA,MAAM,YAAY,GAAG,CAAC,YAAY,EAAE,UAAU,CAAU,CAAC;MA0B5C,yBAAyB,CAAA;AAVtC,IAAA,WAAA,GAAA;QAWa,IAAW,CAAA,WAAA,GAAgB,mBAAmB,CAAC;QAEhB,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;AAC9D,KAAA;8GAJY,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAzB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,wIAGd,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;;2FAH3B,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAVrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACF,wBAAA,aAAa,EAAE,mCAAmC;;AAElD,wBAAA,yBAAyB,EAAE,+DAA+D;AAC1F,wBAAA,yBAAyB,EAAE,aAAa;AAC3C,qBAAA;AACJ,iBAAA,CAAA;8BAEY,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBAEkC,UAAU,EAAA,CAAA;sBAAjD,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAA;;;ACjC1C;;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 { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, input } from '@angular/core';\n\nconst DEFAULT_ORIENTATION = 'horizontal';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst ORIENTATIONS = ['horizontal', 'vertical'] as const;\n\nexport type Orientation = (typeof ORIENTATIONS)[number];\n\nexport interface SeparatorProps {\n /**\n * Either `vertical` or `horizontal`. Defaults to `horizontal`.\n */\n orientation?: Orientation;\n /**\n * Whether the component is purely decorative. When true, accessibility-related attributes\n * are updated so that the rendered element is removed from the accessibility tree.\n */\n decorative?: boolean;\n}\n\n/**\n * Directive that adds accessible and configurable separator element to the DOM.\n * This can be either horizontal or vertical and optionally decorative (which removes\n * it from the accessibility tree).\n */\n@Directive({\n selector: 'div[rdxSeparatorRoot]',\n standalone: true,\n host: {\n '[attr.role]': 'computedRole()',\n '[attr.aria-orientation]': 'computedAriaOrientation()',\n\n '[attr.data-orientation]': 'orientation()'\n }\n})\nexport class RdxSeparatorRootDirective {\n /**\n * Orientation of the separator, can be either 'horizontal' or 'vertical'.\n * Defaults to 'horizontal'.\n */\n readonly orientation = input<Orientation>(DEFAULT_ORIENTATION);\n\n /**\n * If true, the separator will be considered decorative and removed from\n * the accessibility tree. Defaults to false.\n */\n readonly decorative = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Computes the `role` attribute for the separator. If `decorative` is true,\n * the role is set to \"none\", otherwise it is \"separator\".\n *\n * @ignore\n */\n protected readonly computedRole = computed(() => (this.decorative() ? 'none' : 'separator'));\n\n /**\n * Computes the `aria-orientation` attribute. It is set to \"vertical\" only if\n * the separator is not decorative and the orientation is set to \"vertical\".\n * For horizontal orientation, the attribute is omitted.\n *\n * @ignore\n */\n protected readonly computedAriaOrientation = computed(() =>\n !this.decorative() && this.orientation() === 'vertical' ? 'vertical' : null\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAGA,MAAM,mBAAmB,GAAG,YAAY;AAExC;AACA,MAAM,YAA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A,EAAA,CAAA,CAAA;;4FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAVrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACF,wBAAA,aAAa,EAAE,gBAAgB;AAC/B,wBAAA,yBAAyB,EAAE,2BAA2B;AAEtD,wBAAA,yBAAyB,EAAE;AAC9B;AACJ,iBAAA;;;ACpCD;;AAEG;;;;"}
@@ -46,12 +46,12 @@ class RdxSwitchRootDirective {
46
46
  this.checked.set(!this.checked());
47
47
  this.onCheckedChange.emit(this.checked());
48
48
  }
49
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxSwitchRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
50
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.1", type: RdxSwitchRootDirective, isStandalone: true, selector: "button[rdxSwitchRoot]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", onCheckedChange: "onCheckedChange" }, host: { attributes: { "role": "switch", "type": "button" }, listeners: { "click": "toggle()" }, properties: { "id": "elementId()", "attr.aria-checked": "checked()", "attr.aria-required": "required", "attr.data-state": "checked() ? \"checked\" : \"unchecked\"", "attr.data-disabled": "disabledState() ? \"true\" : null", "attr.disabled": "disabledState() ? disabledState() : null" } }, providers: [
49
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxSwitchRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
50
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.10", type: RdxSwitchRootDirective, isStandalone: true, selector: "button[rdxSwitchRoot]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", onCheckedChange: "onCheckedChange" }, host: { attributes: { "role": "switch", "type": "button" }, listeners: { "click": "toggle()" }, properties: { "id": "elementId()", "attr.aria-checked": "checked()", "attr.aria-required": "required", "attr.data-state": "checked() ? \"checked\" : \"unchecked\"", "attr.data-disabled": "disabledState() ? \"true\" : null", "attr.disabled": "disabledState() ? disabledState() : null" } }, providers: [
51
51
  { provide: RdxSwitchToken, useExisting: RdxSwitchRootDirective }
52
52
  ], exportAs: ["rdxSwitchRoot"], ngImport: i0 }); }
53
53
  }
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxSwitchRootDirective, decorators: [{
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxSwitchRootDirective, decorators: [{
55
55
  type: Directive,
56
56
  args: [{
57
57
  selector: 'button[rdxSwitchRoot]',
@@ -78,10 +78,10 @@ class RdxSwitchInputDirective {
78
78
  constructor() {
79
79
  this.switchRoot = injectSwitch();
80
80
  }
81
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxSwitchInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
82
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: RdxSwitchInputDirective, isStandalone: true, selector: "input[rdxSwitchInput]", host: { attributes: { "type": "checkbox", "tabindex": "-1" }, properties: { "attr.defaultChecked": "switchRoot.checked()", "attr.aria-checked": "switchRoot.checked()", "attr.aria-hidden": "true", "attr.aria-required": "switchRoot.required()", "attr.data-state": "switchRoot.checked() ? \"checked\" : \"unchecked\"", "attr.data-disabled": "switchRoot.disabledState() ? \"true\" : null", "attr.disabled": "switchRoot.disabledState() ? switchRoot.disabledState() : null", "attr.value": "switchRoot.checked() ? \"on\" : \"off\"" }, styleAttribute: "transform: translateX(-100%); position: absolute; overflow: hidden; pointerEvents: none; opacity: 0; margin: 0;" }, exportAs: ["rdxSwitchInput"], ngImport: i0 }); }
81
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxSwitchInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
82
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.10", type: RdxSwitchInputDirective, isStandalone: true, selector: "input[rdxSwitchInput]", host: { attributes: { "type": "checkbox", "tabindex": "-1" }, properties: { "attr.defaultChecked": "switchRoot.checked()", "attr.aria-checked": "switchRoot.checked()", "attr.aria-hidden": "true", "attr.aria-required": "switchRoot.required()", "attr.data-state": "switchRoot.checked() ? \"checked\" : \"unchecked\"", "attr.data-disabled": "switchRoot.disabledState() ? \"true\" : null", "attr.disabled": "switchRoot.disabledState() ? switchRoot.disabledState() : null", "attr.value": "switchRoot.checked() ? \"on\" : \"off\"" }, styleAttribute: "transform: translateX(-100%); position: absolute; overflow: hidden; pointerEvents: none; opacity: 0; margin: 0;" }, exportAs: ["rdxSwitchInput"], ngImport: i0 }); }
83
83
  }
84
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxSwitchInputDirective, decorators: [{
84
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxSwitchInputDirective, decorators: [{
85
85
  type: Directive,
86
86
  args: [{
87
87
  selector: 'input[rdxSwitchInput]',
@@ -107,10 +107,10 @@ class RdxSwitchThumbDirective {
107
107
  constructor() {
108
108
  this.switchRoot = injectSwitch();
109
109
  }
110
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxSwitchThumbDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
111
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: RdxSwitchThumbDirective, isStandalone: true, selector: "span[rdxSwitchThumb]", host: { properties: { "attr.data-disabled": "switchRoot.disabledState() ? \"true\" : null", "attr.data-state": "switchRoot.checked() ? \"checked\" : \"unchecked\"" } }, exportAs: ["rdxSwitchThumb"], ngImport: i0 }); }
110
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxSwitchThumbDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
111
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.10", type: RdxSwitchThumbDirective, isStandalone: true, selector: "span[rdxSwitchThumb]", host: { properties: { "attr.data-disabled": "switchRoot.disabledState() ? \"true\" : null", "attr.data-state": "switchRoot.checked() ? \"checked\" : \"unchecked\"" } }, exportAs: ["rdxSwitchThumb"], ngImport: i0 }); }
112
112
  }
113
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxSwitchThumbDirective, decorators: [{
113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxSwitchThumbDirective, decorators: [{
114
114
  type: Directive,
115
115
  args: [{
116
116
  selector: 'span[rdxSwitchThumb]',
@@ -129,15 +129,15 @@ const switchImports = [
129
129
  RdxSwitchThumbDirective
130
130
  ];
131
131
  class RdxSwitchModule {
132
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
133
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.1", ngImport: i0, type: RdxSwitchModule, imports: [RdxSwitchRootDirective,
132
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
133
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.10", ngImport: i0, type: RdxSwitchModule, imports: [RdxSwitchRootDirective,
134
134
  RdxSwitchInputDirective,
135
135
  RdxSwitchThumbDirective], exports: [RdxSwitchRootDirective,
136
136
  RdxSwitchInputDirective,
137
137
  RdxSwitchThumbDirective] }); }
138
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxSwitchModule }); }
138
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxSwitchModule }); }
139
139
  }
140
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxSwitchModule, decorators: [{
140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxSwitchModule, decorators: [{
141
141
  type: NgModule,
142
142
  args: [{
143
143
  imports: [...switchImports],
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-switch.mjs","sources":["../../../packages/primitives/switch/src/switch-root.directive.ts","../../../packages/primitives/switch/src/switch-input.directive.ts","../../../packages/primitives/switch/src/switch-thumb.directive.ts","../../../packages/primitives/switch/index.ts","../../../packages/primitives/switch/radix-ng-primitives-switch.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n inject,\n InjectionToken,\n input,\n InputSignalWithTransform,\n model,\n ModelSignal,\n output,\n OutputEmitterRef\n} from '@angular/core';\n\nexport const RdxSwitchToken = new InjectionToken<RdxSwitchRootDirective>('RdxSwitchToken');\n\nexport function injectSwitch(): RdxSwitchRootDirective {\n return inject(RdxSwitchToken);\n}\n\nexport interface SwitchProps {\n checked?: ModelSignal<boolean>;\n defaultChecked?: boolean;\n required?: InputSignalWithTransform<boolean, BooleanInput>;\n onCheckedChange?: OutputEmitterRef<boolean>;\n}\n\nlet idIterator = 0;\n\n@Directive({\n selector: 'button[rdxSwitchRoot]',\n exportAs: 'rdxSwitchRoot',\n standalone: true,\n providers: [\n { provide: RdxSwitchToken, useExisting: RdxSwitchRootDirective }],\n host: {\n role: 'switch',\n type: 'button',\n '[id]': 'elementId()',\n '[attr.aria-checked]': 'checked()',\n '[attr.aria-required]': 'required',\n '[attr.data-state]': 'checked() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'disabledState() ? \"true\" : null',\n '[attr.disabled]': 'disabledState() ? disabledState() : null',\n\n '(click)': 'toggle()'\n }\n})\nexport class RdxSwitchRootDirective implements SwitchProps {\n readonly id = input<string>(`rdx-switch-${idIterator++}`);\n protected readonly elementId = computed(() => (this.id() ? this.id() : null));\n\n /**\n * When true, indicates that the user must check the switch before the owning form can be submitted.\n */\n readonly required = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute\n });\n\n /**\n * The controlled state of the switch. Must be used in conjunction with onCheckedChange.\n */\n readonly checked = model<boolean>(false);\n\n /**\n * When true, prevents the user from interacting with the switch.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute\n });\n\n /*\n * @ignore\n */\n readonly disabledState = computed(() => this.disabled());\n\n /**\n * Event handler called when the state of the switch changes.\n */\n readonly onCheckedChange = output<boolean>();\n\n /**\n * Toggles the checked state of the switch.\n * If the switch is disabled, the function returns early.\n */\n protected toggle(): void {\n if (this.disabledState()) {\n return;\n }\n\n this.checked.set(!this.checked());\n\n this.onCheckedChange.emit(this.checked());\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectSwitch } from './switch-root.directive';\n\n@Directive({\n selector: 'input[rdxSwitchInput]',\n exportAs: 'rdxSwitchInput',\n standalone: true,\n host: {\n type: 'checkbox',\n tabindex: '-1',\n '[attr.defaultChecked]': 'switchRoot.checked()',\n '[attr.aria-checked]': 'switchRoot.checked()',\n '[attr.aria-hidden]': 'true',\n '[attr.aria-required]': 'switchRoot.required()',\n '[attr.data-state]': 'switchRoot.checked() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'switchRoot.disabledState() ? \"true\" : null',\n '[attr.disabled]': 'switchRoot.disabledState() ? switchRoot.disabledState() : null',\n '[attr.value]': 'switchRoot.checked() ? \"on\" : \"off\"',\n style: 'transform: translateX(-100%); position: absolute; overflow: hidden; pointerEvents: none; opacity: 0; margin: 0;'\n }\n})\nexport class RdxSwitchInputDirective {\n protected readonly switchRoot = injectSwitch();\n}\n","import { Directive } from '@angular/core';\nimport { injectSwitch } from './switch-root.directive';\n\n@Directive({\n selector: 'span[rdxSwitchThumb]',\n exportAs: 'rdxSwitchThumb',\n standalone: true,\n host: {\n '[attr.data-disabled]': 'switchRoot.disabledState() ? \"true\" : null',\n '[attr.data-state]': 'switchRoot.checked() ? \"checked\" : \"unchecked\"'\n }\n})\nexport class RdxSwitchThumbDirective {\n protected readonly switchRoot = injectSwitch();\n}\n","import { NgModule } from '@angular/core';\nimport { RdxSwitchInputDirective } from './src/switch-input.directive';\nimport { RdxSwitchRootDirective } from './src/switch-root.directive';\nimport { RdxSwitchThumbDirective } from './src/switch-thumb.directive';\n\nexport * from './src/switch-input.directive';\nexport * from './src/switch-root.directive';\nexport * from './src/switch-thumb.directive';\n\nexport type { SwitchProps } from './src/switch-root.directive';\n\nconst switchImports = [\n RdxSwitchRootDirective,\n RdxSwitchInputDirective,\n RdxSwitchThumbDirective\n];\n\n@NgModule({\n imports: [...switchImports],\n exports: [...switchImports]\n})\nexport class RdxSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAea,cAAc,GAAG,IAAI,cAAc,CAAyB,gBAAgB,EAAE;SAE3E,YAAY,GAAA;AACxB,IAAA,OAAO,MAAM,CAAC,cAAc,CAAC,CAAC;AAClC,CAAC;AASD,IAAI,UAAU,GAAG,CAAC,CAAC;MAqBN,sBAAsB,CAAA;AAnBnC,IAAA,WAAA,GAAA;QAoBa,IAAE,CAAA,EAAA,GAAG,KAAK,CAAS,CAAA,WAAA,EAAc,UAAU,EAAE,CAAA,CAAE,CAAC,CAAC;QACvC,IAAS,CAAA,SAAA,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;AAE9E;;AAEG;AACM,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,EAAE;AACpD,YAAA,SAAS,EAAE,gBAAgB;AAC9B,SAAA,CAAC,CAAC;AAEH;;AAEG;AACM,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAU,KAAK,CAAC,CAAC;AAEzC;;AAEG;AACM,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,EAAE;AACpD,YAAA,SAAS,EAAE,gBAAgB;AAC9B,SAAA,CAAC,CAAC;AAEH;;AAEG;QACM,IAAa,CAAA,aAAA,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;AAEzD;;AAEG;QACM,IAAe,CAAA,eAAA,GAAG,MAAM,EAAW,CAAC;AAehD,KAAA;AAbG;;;AAGG;IACO,MAAM,GAAA;AACZ,QAAA,IAAI,IAAI,CAAC,aAAa,EAAE,EAAE;YACtB,OAAO;SACV;QAED,IA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AAA,CAAA,CAAA,EAAA;+GAOd,eAAe,EAAA,CAAA,CAAA,EAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,aAAa,CAAC;AAC3B,oBAAA,OAAO,EAAE,CAAC,GAAG,aAAa,CAAC;AAC9B,iBAAA,CAAA;;;ACpBD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-switch.mjs","sources":["../../../packages/primitives/switch/src/switch-root.directive.ts","../../../packages/primitives/switch/src/switch-input.directive.ts","../../../packages/primitives/switch/src/switch-thumb.directive.ts","../../../packages/primitives/switch/index.ts","../../../packages/primitives/switch/radix-ng-primitives-switch.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n inject,\n InjectionToken,\n input,\n InputSignalWithTransform,\n model,\n ModelSignal,\n output,\n OutputEmitterRef\n} from '@angular/core';\n\nexport const RdxSwitchToken = new InjectionToken<RdxSwitchRootDirective>('RdxSwitchToken');\n\nexport function injectSwitch(): RdxSwitchRootDirective {\n return inject(RdxSwitchToken);\n}\n\nexport interface SwitchProps {\n checked?: ModelSignal<boolean>;\n defaultChecked?: boolean;\n required?: InputSignalWithTransform<boolean, BooleanInput>;\n onCheckedChange?: OutputEmitterRef<boolean>;\n}\n\nlet idIterator = 0;\n\n@Directive({\n selector: 'button[rdxSwitchRoot]',\n exportAs: 'rdxSwitchRoot',\n standalone: true,\n providers: [\n { provide: RdxSwitchToken, useExisting: RdxSwitchRootDirective }],\n host: {\n role: 'switch',\n type: 'button',\n '[id]': 'elementId()',\n '[attr.aria-checked]': 'checked()',\n '[attr.aria-required]': 'required',\n '[attr.data-state]': 'checked() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'disabledState() ? \"true\" : null',\n '[attr.disabled]': 'disabledState() ? disabledState() : null',\n\n '(click)': 'toggle()'\n }\n})\nexport class RdxSwitchRootDirective implements SwitchProps {\n readonly id = input<string>(`rdx-switch-${idIterator++}`);\n protected readonly elementId = computed(() => (this.id() ? this.id() : null));\n\n /**\n * When true, indicates that the user must check the switch before the owning form can be submitted.\n */\n readonly required = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute\n });\n\n /**\n * The controlled state of the switch. Must be used in conjunction with onCheckedChange.\n */\n readonly checked = model<boolean>(false);\n\n /**\n * When true, prevents the user from interacting with the switch.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute\n });\n\n /*\n * @ignore\n */\n readonly disabledState = computed(() => this.disabled());\n\n /**\n * Event handler called when the state of the switch changes.\n */\n readonly onCheckedChange = output<boolean>();\n\n /**\n * Toggles the checked state of the switch.\n * If the switch is disabled, the function returns early.\n */\n protected toggle(): void {\n if (this.disabledState()) {\n return;\n }\n\n this.checked.set(!this.checked());\n\n this.onCheckedChange.emit(this.checked());\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectSwitch } from './switch-root.directive';\n\n@Directive({\n selector: 'input[rdxSwitchInput]',\n exportAs: 'rdxSwitchInput',\n standalone: true,\n host: {\n type: 'checkbox',\n tabindex: '-1',\n '[attr.defaultChecked]': 'switchRoot.checked()',\n '[attr.aria-checked]': 'switchRoot.checked()',\n '[attr.aria-hidden]': 'true',\n '[attr.aria-required]': 'switchRoot.required()',\n '[attr.data-state]': 'switchRoot.checked() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'switchRoot.disabledState() ? \"true\" : null',\n '[attr.disabled]': 'switchRoot.disabledState() ? switchRoot.disabledState() : null',\n '[attr.value]': 'switchRoot.checked() ? \"on\" : \"off\"',\n style: 'transform: translateX(-100%); position: absolute; overflow: hidden; pointerEvents: none; opacity: 0; margin: 0;'\n }\n})\nexport class RdxSwitchInputDirective {\n protected readonly switchRoot = injectSwitch();\n}\n","import { Directive } from '@angular/core';\nimport { injectSwitch } from './switch-root.directive';\n\n@Directive({\n selector: 'span[rdxSwitchThumb]',\n exportAs: 'rdxSwitchThumb',\n standalone: true,\n host: {\n '[attr.data-disabled]': 'switchRoot.disabledState() ? \"true\" : null',\n '[attr.data-state]': 'switchRoot.checked() ? \"checked\" : \"unchecked\"'\n }\n})\nexport class RdxSwitchThumbDirective {\n protected readonly switchRoot = injectSwitch();\n}\n","import { NgModule } from '@angular/core';\nimport { RdxSwitchInputDirective } from './src/switch-input.directive';\nimport { RdxSwitchRootDirective } from './src/switch-root.directive';\nimport { RdxSwitchThumbDirective } from './src/switch-thumb.directive';\n\nexport * from './src/switch-input.directive';\nexport * from './src/switch-root.directive';\nexport * from './src/switch-thumb.directive';\n\nexport type { SwitchProps } from './src/switch-root.directive';\n\nconst switchImports = [\n RdxSwitchRootDirective,\n RdxSwitchInputDirective,\n RdxSwitchThumbDirective\n];\n\n@NgModule({\n imports: [...switchImports],\n exports: [...switchImports]\n})\nexport class RdxSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAea,cAAc,GAAG,IAAI,cAAc,CAAyB,gBAAgB;SAEzE,YAAY,GAAA;AACxB,IAAA,OAAO,MAAM,CAAC,cAAc,CAAC;AACjC;AASA,IAAI,UAAU,GAAG,CAAC;MAqBL,sBAAsB,CAAA;AAnBnC,IAAA,WAAA,GAAA;QAoBa,IAAE,CAAA,EAAA,GAAG,KAAK,CAAS,CAAA,WAAA,EAAc,UAAU,EAAE,CAAA,CAAE,CAAC;QACtC,IAAS,CAAA,SAAA,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC;AAE7E;;AAEG;AACM,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,EAAE;AACpD,YAAA,SAAS,EAAE;AACd,SAAA,CAAC;AAEF;;AAEG;AACM,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAU,K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,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YATxB,sBAAsB;YACtB,uBAAuB;AACvB,YAAA,uBAAuB,aAFvB,sBAAsB;YACtB,uBAAuB;YACvB,uBAAuB,CAAA,EAAA,CAAA,CAAA;gHAOd,eAAe,EAAA,CAAA,CAAA;;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,aAAa,CAAC;AAC3B,oBAAA,OAAO,EAAE,CAAC,GAAG,aAAa;AAC7B,iBAAA;;;ACpBD;;AAEG;;;;"}
@@ -32,10 +32,10 @@ class RdxTabsContextService {
32
32
  generateId() {
33
33
  return `tabs-${Math.random().toString(36).substr(2, 9)}`;
34
34
  }
35
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxTabsContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
36
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxTabsContextService, providedIn: 'root' }); }
35
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxTabsContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
36
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxTabsContextService, providedIn: 'root' }); }
37
37
  }
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxTabsContextService, decorators: [{
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxTabsContextService, decorators: [{
39
39
  type: Injectable,
40
40
  args: [{
41
41
  providedIn: 'root'
@@ -48,10 +48,10 @@ class RdxTabsContentDirective {
48
48
  this.value = input.required();
49
49
  this.selected = computed(() => this.tabsContext.value$() === this.value());
50
50
  }
51
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxTabsContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
52
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.1", type: RdxTabsContentDirective, isStandalone: true, selector: "[rdxTabsContent]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "tabpanel", "tabindex": "0" }, properties: { "id": "tabsContext.getBaseId()", "attr.aria-labelledby": "tabsContext.getBaseId()", "attr.data-state": "selected() ? \"active\" : \"inactive\"", "attr.data-orientation": "tabsContext.orientation$()", "hidden": "!selected()" } }, ngImport: i0 }); }
51
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxTabsContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
52
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.10", type: RdxTabsContentDirective, isStandalone: true, selector: "[rdxTabsContent]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "tabpanel", "tabindex": "0" }, properties: { "id": "tabsContext.getBaseId()", "attr.aria-labelledby": "tabsContext.getBaseId()", "attr.data-state": "selected() ? \"active\" : \"inactive\"", "attr.data-orientation": "tabsContext.orientation$()", "hidden": "!selected()" } }, ngImport: i0 }); }
53
53
  }
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxTabsContentDirective, decorators: [{
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxTabsContentDirective, decorators: [{
55
55
  type: Directive,
56
56
  args: [{
57
57
  selector: '[rdxTabsContent]',
@@ -72,10 +72,10 @@ class RdxTabsListDirective {
72
72
  constructor() {
73
73
  this.tabsContext = inject(TABS_CONTEXT_TOKEN);
74
74
  }
75
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxTabsListDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
76
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: RdxTabsListDirective, isStandalone: true, selector: "[rdxTabsList]", host: { attributes: { "role": "tablist" }, properties: { "attr.aria-orientation": "tabsContext.orientation$()", "attr.data-orientation": "tabsContext.orientation$()" } }, ngImport: i0 }); }
75
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxTabsListDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
76
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.10", type: RdxTabsListDirective, isStandalone: true, selector: "[rdxTabsList]", host: { attributes: { "role": "tablist" }, properties: { "attr.aria-orientation": "tabsContext.orientation$()", "attr.data-orientation": "tabsContext.orientation$()" } }, ngImport: i0 }); }
77
77
  }
78
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxTabsListDirective, decorators: [{
78
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxTabsListDirective, decorators: [{
79
79
  type: Directive,
80
80
  args: [{
81
81
  selector: '[rdxTabsList]',
@@ -113,10 +113,10 @@ class RdxTabsRootDirective {
113
113
  this.tabsContext.setValue(this.defaultValue);
114
114
  }
115
115
  }
116
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxTabsRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
117
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: RdxTabsRootDirective, isStandalone: true, selector: "[rdxTabsRoot]", inputs: { value: "value", defaultValue: "defaultValue", orientation: "orientation", dir: "dir" }, outputs: { onValueChange: "onValueChange" }, host: { properties: { "attr.data-orientation": "orientation", "attr.dir": "dir" } }, providers: [{ provide: TABS_CONTEXT_TOKEN, useExisting: RdxTabsContextService }], ngImport: i0 }); }
116
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxTabsRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
117
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.10", type: RdxTabsRootDirective, isStandalone: true, selector: "[rdxTabsRoot]", inputs: { value: "value", defaultValue: "defaultValue", orientation: "orientation", dir: "dir" }, outputs: { onValueChange: "onValueChange" }, host: { properties: { "attr.data-orientation": "orientation", "attr.dir": "dir" } }, providers: [{ provide: TABS_CONTEXT_TOKEN, useExisting: RdxTabsContextService }], ngImport: i0 }); }
118
118
  }
119
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxTabsRootDirective, decorators: [{
119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxTabsRootDirective, decorators: [{
120
120
  type: Directive,
121
121
  args: [{
122
122
  selector: '[rdxTabsRoot]',
@@ -166,10 +166,10 @@ class RdxTabsTriggerDirective {
166
166
  this.tabsContext?.setValue(this.value());
167
167
  }
168
168
  }
169
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxTabsTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
170
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.1", type: RdxTabsTriggerDirective, isStandalone: true, selector: "[rdxTabsTrigger]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button", "role": "tab" }, listeners: { "mousedown": "onMouseDown($event)", "keydown": "onKeyDown($event)" }, properties: { "id": "triggerId", "attr.aria-selected": "selected()", "attr.aria-controls": "contentId()", "attr.data-disabled": "disabled() ? '' : undefined", "attr.data-state": "selected() ? 'active' : 'inactive'" } }, ngImport: i0 }); }
169
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxTabsTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
170
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.10", type: RdxTabsTriggerDirective, isStandalone: true, selector: "[rdxTabsTrigger]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button", "role": "tab" }, listeners: { "mousedown": "onMouseDown($event)", "keydown": "onKeyDown($event)" }, properties: { "id": "triggerId", "attr.aria-selected": "selected()", "attr.aria-controls": "contentId()", "attr.data-disabled": "disabled() ? '' : undefined", "attr.data-state": "selected() ? 'active' : 'inactive'" } }, ngImport: i0 }); }
171
171
  }
172
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxTabsTriggerDirective, decorators: [{
172
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxTabsTriggerDirective, decorators: [{
173
173
  type: Directive,
174
174
  args: [{
175
175
  selector: '[rdxTabsTrigger]',
@@ -195,17 +195,17 @@ const tabsImports = [
195
195
  RdxTabsTriggerDirective
196
196
  ];
197
197
  class RdxTabsModule {
198
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
199
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.1", ngImport: i0, type: RdxTabsModule, imports: [RdxTabsRootDirective,
198
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
199
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.10", ngImport: i0, type: RdxTabsModule, imports: [RdxTabsRootDirective,
200
200
  RdxTabsContentDirective,
201
201
  RdxTabsListDirective,
202
202
  RdxTabsTriggerDirective], exports: [RdxTabsRootDirective,
203
203
  RdxTabsContentDirective,
204
204
  RdxTabsListDirective,
205
205
  RdxTabsTriggerDirective] }); }
206
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxTabsModule, providers: [RdxTabsContextService] }); }
206
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxTabsModule, providers: [RdxTabsContextService] }); }
207
207
  }
208
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxTabsModule, decorators: [{
208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxTabsModule, decorators: [{
209
209
  type: NgModule,
210
210
  args: [{
211
211
  imports: [...tabsImports],
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-tabs.mjs","sources":["../../../packages/primitives/tabs/src/tabs-context.service.ts","../../../packages/primitives/tabs/src/tabs-content.directive.ts","../../../packages/primitives/tabs/src/tabs-list.directive.ts","../../../packages/primitives/tabs/src/tabs-root.directive.ts","../../../packages/primitives/tabs/src/tabs-trigger.directive.ts","../../../packages/primitives/tabs/index.ts","../../../packages/primitives/tabs/radix-ng-primitives-tabs.ts"],"sourcesContent":["import { computed, Injectable, InjectionToken, signal } from '@angular/core';\n\nexport const TABS_CONTEXT_TOKEN = new InjectionToken<RdxTabsContextService>('TabsContext');\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RdxTabsContextService {\n private baseId = this.generateId();\n private value = signal<string | undefined>(undefined);\n private orientation = signal<string>('horizontal');\n private dir = signal<string | undefined>(undefined);\n private activationMode = signal<string>('automatic');\n\n readonly value$ = computed(() => this.value());\n readonly orientation$ = computed(() => this.orientation());\n readonly dir$ = computed(() => this.dir());\n readonly activationMode$ = computed(() => this.activationMode());\n\n setValue(value: string) {\n this.value.set(value);\n }\n\n setOrientation(orientation: string) {\n this.orientation.set(orientation);\n }\n\n setDir(dir: string) {\n this.dir.set(dir);\n }\n\n setActivationMode(mode: string) {\n this.activationMode.set(mode);\n }\n\n getBaseId() {\n return this.baseId;\n }\n\n private generateId() {\n return `tabs-${Math.random().toString(36).substr(2, 9)}`;\n }\n}\n","import { computed, Directive, inject, input } from '@angular/core';\nimport { TABS_CONTEXT_TOKEN } from './tabs-context.service';\n\n@Directive({\n selector: '[rdxTabsContent]',\n standalone: true,\n host: {\n role: 'tabpanel',\n tabindex: '0',\n '[id]': 'tabsContext.getBaseId()',\n '[attr.aria-labelledby]': 'tabsContext.getBaseId()',\n '[attr.data-state]': 'selected() ? \"active\" : \"inactive\"',\n '[attr.data-orientation]': 'tabsContext.orientation$()',\n '[hidden]': '!selected()'\n }\n})\nexport class RdxTabsContentDirective {\n protected readonly tabsContext = inject(TABS_CONTEXT_TOKEN);\n\n readonly value = input.required<string>();\n\n protected readonly selected = computed(() => this.tabsContext.value$() === this.value());\n}\n","import { Directive, inject } from '@angular/core';\nimport { TABS_CONTEXT_TOKEN } from './tabs-context.service';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ninterface TabsListProps {\n // When true, keyboard navigation will loop from last tab to first, and vice versa.\n loop?: boolean;\n}\n\n@Directive({\n selector: '[rdxTabsList]',\n standalone: true,\n host: {\n role: 'tablist',\n '[attr.aria-orientation]': 'tabsContext.orientation$()',\n '[attr.data-orientation]': 'tabsContext.orientation$()'\n }\n})\nexport class RdxTabsListDirective {\n protected readonly tabsContext = inject(TABS_CONTEXT_TOKEN);\n}\n","import { Directive, effect, EventEmitter, inject, Input, OnInit, Output } from '@angular/core';\nimport { RdxTabsContextService, TABS_CONTEXT_TOKEN } from './tabs-context.service';\n\nexport interface TabsProps {\n /** The value for the selected tab, if controlled */\n value?: string;\n /** The value of the tab to select by default, if uncontrolled */\n defaultValue?: string;\n /** A function called when a new tab is selected */\n onValueChange?: (value: string) => void;\n /**\n * The orientation the tabs are layed out.\n * Mainly so arrow navigation is done accordingly (left & right vs. up & down)\n * @defaultValue horizontal\n */\n orientation?: string;\n /**\n * The direction of navigation between toolbar items.\n */\n dir?: string;\n /**\n * Whether a tab is activated automatically or manually.\n * @defaultValue automatic\n * */\n activationMode?: 'automatic' | 'manual';\n}\n\n@Directive({\n selector: '[rdxTabsRoot]',\n standalone: true,\n providers: [{ provide: TABS_CONTEXT_TOKEN, useExisting: RdxTabsContextService }],\n host: {\n '[attr.data-orientation]': 'orientation',\n '[attr.dir]': 'dir'\n }\n})\nexport class RdxTabsRootDirective implements OnInit {\n private readonly tabsContext = inject(TABS_CONTEXT_TOKEN);\n\n @Input() value?: string;\n @Input() defaultValue?: string;\n @Input() orientation = 'horizontal';\n @Input() dir?: string;\n\n // Event handler called when the value changes.\n @Output() onValueChange = new EventEmitter<string>();\n\n constructor() {\n effect(() => {\n const value = this.tabsContext.value$();\n if (value !== undefined) {\n this.onValueChange.emit(value);\n }\n });\n }\n\n ngOnInit() {\n this.tabsContext.setOrientation(this.orientation);\n\n if (this.dir) {\n this.tabsContext.setDir(this.dir);\n }\n\n if (this.value) {\n this.tabsContext.setValue(this.value);\n } else if (this.defaultValue) {\n this.tabsContext.setValue(this.defaultValue);\n }\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, inject, input, InputSignalWithTransform } from '@angular/core';\nimport { TABS_CONTEXT_TOKEN } from './tabs-context.service';\n\ninterface TabsTriggerProps {\n // When true, prevents the user from interacting with the tab.\n disabled: InputSignalWithTransform<boolean, BooleanInput>;\n}\n\n@Directive({\n selector: '[rdxTabsTrigger]',\n standalone: true,\n host: {\n type: 'button',\n role: 'tab',\n '[id]': 'triggerId',\n '[attr.aria-selected]': 'selected()',\n '[attr.aria-controls]': 'contentId()',\n '[attr.data-disabled]': \"disabled() ? '' : undefined\",\n '[attr.data-state]': \"selected() ? 'active' : 'inactive'\",\n '(mousedown)': 'onMouseDown($event)',\n '(keydown)': 'onKeyDown($event)'\n }\n})\nexport class RdxTabsTriggerDirective implements TabsTriggerProps {\n protected readonly tabsContext = inject(TABS_CONTEXT_TOKEN);\n\n // A unique value that associates the trigger with a content.\n readonly value = input.required<string>();\n\n // When true, prevents the user from interacting with the tab.\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute\n });\n\n protected readonly contentId = computed(() => `${this.tabsContext.getBaseId()}-content-${this.value()}`);\n protected readonly triggerId = computed(() => `${this.tabsContext.getBaseId()}-trigger-${this.value}`);\n\n protected readonly selected = computed(() => this.tabsContext.value$() === this.value());\n\n protected onMouseDown(event: MouseEvent) {\n if (!this.disabled() && event.button === 0 && !event.ctrlKey) {\n this.tabsContext?.setValue(this.value());\n } else {\n // prevent focus to avoid accidental activation\n event.preventDefault();\n }\n }\n\n protected onKeyDown(event: KeyboardEvent) {\n if ([' ', 'Enter'].includes(event.key)) {\n this.tabsContext?.setValue(this.value());\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RdxTabsContentDirective } from './src/tabs-content.directive';\nimport { RdxTabsContextService } from './src/tabs-context.service';\nimport { RdxTabsListDirective } from './src/tabs-list.directive';\nimport { RdxTabsRootDirective } from './src/tabs-root.directive';\nimport { RdxTabsTriggerDirective } from './src/tabs-trigger.directive';\n\nexport * from './src/tabs-content.directive';\nexport * from './src/tabs-context.service';\nexport * from './src/tabs-list.directive';\nexport * from './src/tabs-root.directive';\nexport * from './src/tabs-trigger.directive';\n\nconst tabsImports = [\n RdxTabsRootDirective,\n RdxTabsContentDirective,\n RdxTabsListDirective,\n RdxTabsTriggerDirective\n];\n\n@NgModule({\n imports: [...tabsImports],\n exports: [...tabsImports],\n providers: [RdxTabsContextService]\n})\nexport class RdxTabsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAEa,kBAAkB,GAAG,IAAI,cAAc,CAAwB,aAAa,EAAE;MAK9E,qBAAqB,CAAA;AAHlC,IAAA,WAAA,GAAA;AAIY,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;AAC3B,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAqB,SAAS,CAAC,CAAC;AAC9C,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAS,YAAY,CAAC,CAAC;AAC3C,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAqB,SAAS,CAAC,CAAC;AAC5C,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAS,WAAW,CAAC,CAAC;QAE5C,IAAM,CAAA,MAAA,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QACtC,IAAY,CAAA,YAAA,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QAClD,IAAI,CAAA,IAAA,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QAClC,IAAe,CAAA,eAAA,GAAG,QAAQ,CAAC,MAAM,IAA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uB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAQd,aAAa,EAAA,SAAA,EAFX,CAAC,qBAAqB,CAAC,EAAA,CAAA,CAAA,EAAA;;2FAEzB,aAAa,EAAA,UAAA,EAAA,CAAA;kBALzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,WAAW,CAAC;AACzB,oBAAA,OAAO,EAAE,CAAC,GAAG,WAAW,CAAC;oBACzB,SAAS,EAAE,CAAC,qBAAqB,CAAC;AACrC,iBAAA,CAAA;;;ACxBD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-tabs.mjs","sources":["../../../packages/primitives/tabs/src/tabs-context.service.ts","../../../packages/primitives/tabs/src/tabs-content.directive.ts","../../../packages/primitives/tabs/src/tabs-list.directive.ts","../../../packages/primitives/tabs/src/tabs-root.directive.ts","../../../packages/primitives/tabs/src/tabs-trigger.directive.ts","../../../packages/primitives/tabs/index.ts","../../../packages/primitives/tabs/radix-ng-primitives-tabs.ts"],"sourcesContent":["import { computed, Injectable, InjectionToken, signal } from '@angular/core';\n\nexport const TABS_CONTEXT_TOKEN = new InjectionToken<RdxTabsContextService>('TabsContext');\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RdxTabsContextService {\n private baseId = this.generateId();\n private value = signal<string | undefined>(undefined);\n private orientation = signal<string>('horizontal');\n private dir = signal<string | undefined>(undefined);\n private activationMode = signal<string>('automatic');\n\n readonly value$ = computed(() => this.value());\n readonly orientation$ = computed(() => this.orientation());\n readonly dir$ = computed(() => this.dir());\n readonly activationMode$ = computed(() => this.activationMode());\n\n setValue(value: string) {\n this.value.set(value);\n }\n\n setOrientation(orientation: string) {\n this.orientation.set(orientation);\n }\n\n setDir(dir: string) {\n this.dir.set(dir);\n }\n\n setActivationMode(mode: string) {\n this.activationMode.set(mode);\n }\n\n getBaseId() {\n return this.baseId;\n }\n\n private generateId() {\n return `tabs-${Math.random().toString(36).substr(2, 9)}`;\n }\n}\n","import { computed, Directive, inject, input } from '@angular/core';\nimport { TABS_CONTEXT_TOKEN } from './tabs-context.service';\n\n@Directive({\n selector: '[rdxTabsContent]',\n standalone: true,\n host: {\n role: 'tabpanel',\n tabindex: '0',\n '[id]': 'tabsContext.getBaseId()',\n '[attr.aria-labelledby]': 'tabsContext.getBaseId()',\n '[attr.data-state]': 'selected() ? \"active\" : \"inactive\"',\n '[attr.data-orientation]': 'tabsContext.orientation$()',\n '[hidden]': '!selected()'\n }\n})\nexport class RdxTabsContentDirective {\n protected readonly tabsContext = inject(TABS_CONTEXT_TOKEN);\n\n readonly value = input.required<string>();\n\n protected readonly selected = computed(() => this.tabsContext.value$() === this.value());\n}\n","import { Directive, inject } from '@angular/core';\nimport { TABS_CONTEXT_TOKEN } from './tabs-context.service';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ninterface TabsListProps {\n // When true, keyboard navigation will loop from last tab to first, and vice versa.\n loop?: boolean;\n}\n\n@Directive({\n selector: '[rdxTabsList]',\n standalone: true,\n host: {\n role: 'tablist',\n '[attr.aria-orientation]': 'tabsContext.orientation$()',\n '[attr.data-orientation]': 'tabsContext.orientation$()'\n }\n})\nexport class RdxTabsListDirective {\n protected readonly tabsContext = inject(TABS_CONTEXT_TOKEN);\n}\n","import { Directive, effect, EventEmitter, inject, Input, OnInit, Output } from '@angular/core';\nimport { RdxTabsContextService, TABS_CONTEXT_TOKEN } from './tabs-context.service';\n\nexport interface TabsProps {\n /** The value for the selected tab, if controlled */\n value?: string;\n /** The value of the tab to select by default, if uncontrolled */\n defaultValue?: string;\n /** A function called when a new tab is selected */\n onValueChange?: (value: string) => void;\n /**\n * The orientation the tabs are layed out.\n * Mainly so arrow navigation is done accordingly (left & right vs. up & down)\n * @defaultValue horizontal\n */\n orientation?: string;\n /**\n * The direction of navigation between toolbar items.\n */\n dir?: string;\n /**\n * Whether a tab is activated automatically or manually.\n * @defaultValue automatic\n * */\n activationMode?: 'automatic' | 'manual';\n}\n\n@Directive({\n selector: '[rdxTabsRoot]',\n standalone: true,\n providers: [{ provide: TABS_CONTEXT_TOKEN, useExisting: RdxTabsContextService }],\n host: {\n '[attr.data-orientation]': 'orientation',\n '[attr.dir]': 'dir'\n }\n})\nexport class RdxTabsRootDirective implements OnInit {\n private readonly tabsContext = inject(TABS_CONTEXT_TOKEN);\n\n @Input() value?: string;\n @Input() defaultValue?: string;\n @Input() orientation = 'horizontal';\n @Input() dir?: string;\n\n // Event handler called when the value changes.\n @Output() onValueChange = new EventEmitter<string>();\n\n constructor() {\n effect(() => {\n const value = this.tabsContext.value$();\n if (value !== undefined) {\n this.onValueChange.emit(value);\n }\n });\n }\n\n ngOnInit() {\n this.tabsContext.setOrientation(this.orientation);\n\n if (this.dir) {\n this.tabsContext.setDir(this.dir);\n }\n\n if (this.value) {\n this.tabsContext.setValue(this.value);\n } else if (this.defaultValue) {\n this.tabsContext.setValue(this.defaultValue);\n }\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, inject, input, InputSignalWithTransform } from '@angular/core';\nimport { TABS_CONTEXT_TOKEN } from './tabs-context.service';\n\ninterface TabsTriggerProps {\n // When true, prevents the user from interacting with the tab.\n disabled: InputSignalWithTransform<boolean, BooleanInput>;\n}\n\n@Directive({\n selector: '[rdxTabsTrigger]',\n standalone: true,\n host: {\n type: 'button',\n role: 'tab',\n '[id]': 'triggerId',\n '[attr.aria-selected]': 'selected()',\n '[attr.aria-controls]': 'contentId()',\n '[attr.data-disabled]': \"disabled() ? '' : undefined\",\n '[attr.data-state]': \"selected() ? 'active' : 'inactive'\",\n '(mousedown)': 'onMouseDown($event)',\n '(keydown)': 'onKeyDown($event)'\n }\n})\nexport class RdxTabsTriggerDirective implements TabsTriggerProps {\n protected readonly tabsContext = inject(TABS_CONTEXT_TOKEN);\n\n // A unique value that associates the trigger with a content.\n readonly value = input.required<string>();\n\n // When true, prevents the user from interacting with the tab.\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute\n });\n\n protected readonly contentId = computed(() => `${this.tabsContext.getBaseId()}-content-${this.value()}`);\n protected readonly triggerId = computed(() => `${this.tabsContext.getBaseId()}-trigger-${this.value}`);\n\n protected readonly selected = computed(() => this.tabsContext.value$() === this.value());\n\n protected onMouseDown(event: MouseEvent) {\n if (!this.disabled() && event.button === 0 && !event.ctrlKey) {\n this.tabsContext?.setValue(this.value());\n } else {\n // prevent focus to avoid accidental activation\n event.preventDefault();\n }\n }\n\n protected onKeyDown(event: KeyboardEvent) {\n if ([' ', 'Enter'].includes(event.key)) {\n this.tabsContext?.setValue(this.value());\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RdxTabsContentDirective } from './src/tabs-content.directive';\nimport { RdxTabsContextService } from './src/tabs-context.service';\nimport { RdxTabsListDirective } from './src/tabs-list.directive';\nimport { RdxTabsRootDirective } from './src/tabs-root.directive';\nimport { RdxTabsTriggerDirective } from './src/tabs-trigger.directive';\n\nexport * from './src/tabs-content.directive';\nexport * from './src/tabs-context.service';\nexport * from './src/tabs-list.directive';\nexport * from './src/tabs-root.directive';\nexport * from './src/tabs-trigger.directive';\n\nconst tabsImports = [\n RdxTabsRootDirective,\n RdxTabsContentDirective,\n RdxTabsListDirective,\n RdxTabsTriggerDirective\n];\n\n@NgModule({\n imports: [...tabsImports],\n exports: [...tabsImports],\n providers: [RdxTabsContextService]\n})\nexport class RdxTabsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAEa,kBAAkB,GAAG,IAAI,cAAc,CAAwB,aAAa;MAK5E,qBAAqB,CAAA;AAHlC,IAAA,WAAA,GAAA;AAIY,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,CAAC,UAAU,EAAE;AAC1B,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAqB,SAAS,CAAC;AAC7C,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAS,YAAY,CAAC;AAC1C,QAA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A,CAAA,CAAA;;4FAEzB,aAAa,EAAA,UAAA,EAAA,CAAA;kBALzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,WAAW,CAAC;AACzB,oBAAA,OAAO,EAAE,CAAC,GAAG,WAAW,CAAC;oBACzB,SAAS,EAAE,CAAC,qBAAqB;AACpC,iBAAA;;;ACxBD;;AAEG;;;;"}
@@ -61,10 +61,10 @@ class RdxToggleGroupItemDirective {
61
61
  updateDisabled() {
62
62
  // TODO
63
63
  }
64
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxToggleGroupItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
65
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.1", type: RdxToggleGroupItemDirective, isStandalone: true, selector: "[rdxToggleGroupItem]", inputs: { value: "value", disabled: ["disabled", "disabled", booleanAttribute] }, host: { attributes: { "role": "radio" }, listeners: { "click": "toggle()" }, properties: { "attr.aria-checked": "checked", "attr.aria-disabled": "disabled || toggleGroup.disabled", "attr.aria-pressed": "undefined", "attr.data-disabled": "disabled || toggleGroup.disabled", "attr.data-state": "checked ? \"on\" : \"off\"", "attr.data-orientation": "toggleGroup.orientation" } }, providers: [{ provide: RdxToggleGroupItemToken, useExisting: RdxToggleGroupItemDirective }], exportAs: ["rdxToggleGroupItem"], usesOnChanges: true, ngImport: i0 }); }
64
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxToggleGroupItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
65
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.10", type: RdxToggleGroupItemDirective, isStandalone: true, selector: "[rdxToggleGroupItem]", inputs: { value: "value", disabled: ["disabled", "disabled", booleanAttribute] }, host: { attributes: { "role": "radio" }, listeners: { "click": "toggle()" }, properties: { "attr.aria-checked": "checked", "attr.aria-disabled": "disabled || toggleGroup.disabled", "attr.aria-pressed": "undefined", "attr.data-disabled": "disabled || toggleGroup.disabled", "attr.data-state": "checked ? \"on\" : \"off\"", "attr.data-orientation": "toggleGroup.orientation" } }, providers: [{ provide: RdxToggleGroupItemToken, useExisting: RdxToggleGroupItemDirective }], exportAs: ["rdxToggleGroupItem"], usesOnChanges: true, ngImport: i0 }); }
66
66
  }
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxToggleGroupItemDirective, decorators: [{
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxToggleGroupItemDirective, decorators: [{
68
68
  type: Directive,
69
69
  args: [{
70
70
  selector: '[rdxToggleGroupItem]',
@@ -228,13 +228,13 @@ class RdxToggleGroupMultipleDirective {
228
228
  this.disabled = isDisabled;
229
229
  this.buttons?.forEach((button) => button.updateDisabled());
230
230
  }
231
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxToggleGroupMultipleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
232
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.1", type: RdxToggleGroupMultipleDirective, isStandalone: true, selector: "[rdxToggleGroupMultiple]", inputs: { value: "value", orientation: "orientation", disabled: ["disabled", "disabled", booleanAttribute], wrap: ["wrap", "wrap", booleanAttribute], valueChange: "valueChange" }, host: { attributes: { "role": "group" }, listeners: { "keydown": "handleKeydown($event)", "focusin": "onFocusIn()", "focusout": "onTouched?.()" }, properties: { "attr.data-orientation": "orientation" } }, providers: [
231
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxToggleGroupMultipleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
232
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.10", type: RdxToggleGroupMultipleDirective, isStandalone: true, selector: "[rdxToggleGroupMultiple]", inputs: { value: "value", orientation: "orientation", disabled: ["disabled", "disabled", booleanAttribute], wrap: ["wrap", "wrap", booleanAttribute], valueChange: "valueChange" }, host: { attributes: { "role": "group" }, listeners: { "keydown": "handleKeydown($event)", "focusin": "onFocusIn()", "focusout": "onTouched?.()" }, properties: { "attr.data-orientation": "orientation" } }, providers: [
233
233
  { provide: RdxToggleGroupToken, useExisting: RdxToggleGroupMultipleDirective },
234
234
  { provide: NG_VALUE_ACCESSOR, useExisting: RdxToggleGroupMultipleDirective, multi: true }
235
235
  ], queries: [{ propertyName: "buttons", predicate: RdxToggleGroupItemToken }], exportAs: ["rdxToggleGroupMultiple"], usesOnChanges: true, ngImport: i0 }); }
236
236
  }
237
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxToggleGroupMultipleDirective, decorators: [{
237
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxToggleGroupMultipleDirective, decorators: [{
238
238
  type: Directive,
239
239
  args: [{
240
240
  selector: '[rdxToggleGroupMultiple]',
@@ -401,13 +401,13 @@ class RdxToggleGroupDirective {
401
401
  this.disabled = isDisabled;
402
402
  this.buttons?.forEach((button) => button.updateDisabled());
403
403
  }
404
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxToggleGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
405
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.1", type: RdxToggleGroupDirective, isStandalone: true, selector: "[rdxToggleGroup]", inputs: { value: "value", orientation: "orientation", disabled: ["disabled", "disabled", booleanAttribute], wrap: ["wrap", "wrap", booleanAttribute], valueChange: "valueChange" }, host: { attributes: { "role": "group" }, listeners: { "focusout": "onTouched?.()", "focusin": "onFocusIn()", "keydown": "handleKeydown($event)" }, properties: { "attr.data-orientation": "orientation" } }, providers: [
404
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxToggleGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
405
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.10", type: RdxToggleGroupDirective, isStandalone: true, selector: "[rdxToggleGroup]", inputs: { value: "value", orientation: "orientation", disabled: ["disabled", "disabled", booleanAttribute], wrap: ["wrap", "wrap", booleanAttribute], valueChange: "valueChange" }, host: { attributes: { "role": "group" }, listeners: { "focusout": "onTouched?.()", "focusin": "onFocusIn()", "keydown": "handleKeydown($event)" }, properties: { "attr.data-orientation": "orientation" } }, providers: [
406
406
  { provide: RdxToggleGroupToken, useExisting: RdxToggleGroupDirective },
407
407
  { provide: NG_VALUE_ACCESSOR, useExisting: RdxToggleGroupDirective, multi: true }
408
408
  ], queries: [{ propertyName: "buttons", predicate: RdxToggleGroupItemToken }], exportAs: ["rdxToggleGroup"], usesOnChanges: true, ngImport: i0 }); }
409
409
  }
410
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxToggleGroupDirective, decorators: [{
410
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: RdxToggleGroupDirective, decorators: [{
411
411
  type: Directive,
412
412
  args: [{
413
413
  selector: '[rdxToggleGroup]',