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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/fesm2022/radix-ng-primitives-accordion.mjs +105 -38
  2. package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
  3. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +221 -129
  4. package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -1
  5. package/fesm2022/radix-ng-primitives-arrow.mjs +20 -4
  6. package/fesm2022/radix-ng-primitives-arrow.mjs.map +1 -1
  7. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
  8. package/fesm2022/radix-ng-primitives-avatar.mjs +54 -61
  9. package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
  10. package/fesm2022/radix-ng-primitives-button.mjs +123 -0
  11. package/fesm2022/radix-ng-primitives-button.mjs.map +1 -0
  12. package/fesm2022/radix-ng-primitives-calendar.mjs +95 -83
  13. package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
  14. package/fesm2022/radix-ng-primitives-checkbox.mjs +378 -54
  15. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  16. package/fesm2022/radix-ng-primitives-collapsible.mjs +182 -81
  17. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
  18. package/fesm2022/radix-ng-primitives-collection.mjs +40 -57
  19. package/fesm2022/radix-ng-primitives-collection.mjs.map +1 -1
  20. package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
  21. package/fesm2022/radix-ng-primitives-context-menu.mjs +140 -424
  22. package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
  23. package/fesm2022/radix-ng-primitives-core.mjs +845 -744
  24. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  25. package/fesm2022/radix-ng-primitives-cropper.mjs +288 -308
  26. package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
  27. package/fesm2022/radix-ng-primitives-date-field.mjs +104 -58
  28. package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
  29. package/fesm2022/radix-ng-primitives-dialog.mjs +655 -327
  30. package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
  31. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +70 -46
  32. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
  33. package/fesm2022/radix-ng-primitives-drawer.mjs +960 -0
  34. package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -0
  35. package/fesm2022/radix-ng-primitives-editable.mjs +304 -23
  36. package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
  37. package/fesm2022/radix-ng-primitives-field.mjs +363 -0
  38. package/fesm2022/radix-ng-primitives-field.mjs.map +1 -0
  39. package/fesm2022/radix-ng-primitives-fieldset.mjs +79 -0
  40. package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -0
  41. package/fesm2022/radix-ng-primitives-focus-scope.mjs +23 -8
  42. package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
  43. package/fesm2022/radix-ng-primitives-input.mjs +172 -0
  44. package/fesm2022/radix-ng-primitives-input.mjs.map +1 -0
  45. package/fesm2022/radix-ng-primitives-label.mjs +6 -6
  46. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  47. package/fesm2022/radix-ng-primitives-menu.mjs +1907 -363
  48. package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
  49. package/fesm2022/radix-ng-primitives-menubar.mjs +290 -162
  50. package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
  51. package/fesm2022/radix-ng-primitives-meter.mjs +271 -0
  52. package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -0
  53. package/fesm2022/radix-ng-primitives-navigation-menu.mjs +1052 -1553
  54. package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
  55. package/fesm2022/radix-ng-primitives-number-field.mjs +1102 -367
  56. package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
  57. package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
  58. package/fesm2022/radix-ng-primitives-popover.mjs +978 -989
  59. package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
  60. package/fesm2022/radix-ng-primitives-popper.mjs +111 -44
  61. package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
  62. package/fesm2022/radix-ng-primitives-portal.mjs +34 -10
  63. package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
  64. package/fesm2022/radix-ng-primitives-presence.mjs +134 -246
  65. package/fesm2022/radix-ng-primitives-presence.mjs.map +1 -1
  66. package/fesm2022/radix-ng-primitives-preview-card.mjs +997 -0
  67. package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -0
  68. package/fesm2022/radix-ng-primitives-progress.mjs +223 -84
  69. package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
  70. package/fesm2022/radix-ng-primitives-radio.mjs +191 -51
  71. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  72. package/fesm2022/radix-ng-primitives-roving-focus.mjs +96 -50
  73. package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
  74. package/fesm2022/radix-ng-primitives-scroll-area.mjs +923 -0
  75. package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -0
  76. package/fesm2022/radix-ng-primitives-select.mjs +791 -509
  77. package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
  78. package/fesm2022/radix-ng-primitives-separator.mjs +12 -35
  79. package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
  80. package/fesm2022/radix-ng-primitives-slider.mjs +969 -717
  81. package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
  82. package/fesm2022/radix-ng-primitives-stepper.mjs +15 -19
  83. package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
  84. package/fesm2022/radix-ng-primitives-switch.mjs +125 -113
  85. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  86. package/fesm2022/radix-ng-primitives-tabs.mjs +390 -108
  87. package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
  88. package/fesm2022/radix-ng-primitives-time-field.mjs +55 -46
  89. package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
  90. package/fesm2022/radix-ng-primitives-toast.mjs +839 -0
  91. package/fesm2022/radix-ng-primitives-toast.mjs.map +1 -0
  92. package/fesm2022/radix-ng-primitives-toggle-group.mjs +121 -247
  93. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  94. package/fesm2022/radix-ng-primitives-toggle.mjs +98 -61
  95. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  96. package/fesm2022/radix-ng-primitives-toolbar.mjs +303 -92
  97. package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
  98. package/fesm2022/radix-ng-primitives-tooltip.mjs +699 -1072
  99. package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
  100. package/fesm2022/radix-ng-primitives-visually-hidden.mjs +25 -66
  101. package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
  102. package/meter/README.md +3 -0
  103. package/navigation-menu/README.md +2 -1
  104. package/package.json +39 -18
  105. package/portal/README.md +2 -0
  106. package/preview-card/README.md +3 -0
  107. package/schematics/collection.json +1 -0
  108. package/schematics/ng-add/index.d.ts +3 -2
  109. package/schematics/ng-add/index.js +62 -31
  110. package/schematics/ng-add/index.js.map +1 -1
  111. package/schematics/ng-add/package-config.d.ts +4 -2
  112. package/schematics/ng-add/package-config.js +10 -2
  113. package/schematics/ng-add/package-config.js.map +1 -1
  114. package/schematics/ng-add/schema.d.ts +3 -0
  115. package/schematics/ng-add/schema.js +3 -0
  116. package/schematics/ng-add/schema.js.map +1 -0
  117. package/schematics/ng-add/schema.json +14 -0
  118. package/select/README.md +2 -0
  119. package/types/radix-ng-primitives-accordion.d.ts +51 -16
  120. package/types/radix-ng-primitives-alert-dialog.d.ts +95 -38
  121. package/types/radix-ng-primitives-arrow.d.ts +1 -1
  122. package/types/radix-ng-primitives-aspect-ratio.d.ts +1 -1
  123. package/types/radix-ng-primitives-avatar.d.ts +7 -11
  124. package/types/radix-ng-primitives-button.d.ts +73 -0
  125. package/types/radix-ng-primitives-calendar.d.ts +39 -20
  126. package/types/radix-ng-primitives-checkbox.d.ts +204 -35
  127. package/types/radix-ng-primitives-collapsible.d.ts +114 -40
  128. package/types/radix-ng-primitives-collection.d.ts +38 -34
  129. package/types/radix-ng-primitives-config.d.ts +1 -1
  130. package/types/radix-ng-primitives-context-menu.d.ts +61 -116
  131. package/types/radix-ng-primitives-core.d.ts +345 -235
  132. package/types/radix-ng-primitives-cropper.d.ts +89 -56
  133. package/types/radix-ng-primitives-date-field.d.ts +49 -28
  134. package/types/radix-ng-primitives-dialog.d.ts +283 -165
  135. package/types/radix-ng-primitives-dismissable-layer.d.ts +15 -7
  136. package/types/radix-ng-primitives-drawer.d.ts +426 -0
  137. package/types/radix-ng-primitives-editable.d.ts +91 -14
  138. package/types/radix-ng-primitives-field.d.ts +374 -0
  139. package/types/radix-ng-primitives-fieldset.d.ts +49 -0
  140. package/types/radix-ng-primitives-focus-scope.d.ts +15 -6
  141. package/types/radix-ng-primitives-input.d.ts +87 -0
  142. package/types/radix-ng-primitives-label.d.ts +0 -1
  143. package/types/radix-ng-primitives-menu.d.ts +584 -99
  144. package/types/radix-ng-primitives-menubar.d.ts +61 -50
  145. package/types/radix-ng-primitives-meter.d.ts +194 -0
  146. package/types/radix-ng-primitives-navigation-menu.d.ts +422 -340
  147. package/types/radix-ng-primitives-number-field.d.ts +405 -145
  148. package/types/radix-ng-primitives-pagination.d.ts +2 -2
  149. package/types/radix-ng-primitives-popover.d.ts +366 -351
  150. package/types/radix-ng-primitives-popper.d.ts +68 -11
  151. package/types/radix-ng-primitives-portal.d.ts +14 -6
  152. package/types/radix-ng-primitives-presence.d.ts +28 -76
  153. package/types/radix-ng-primitives-preview-card.d.ts +359 -0
  154. package/types/radix-ng-primitives-progress.d.ts +175 -48
  155. package/types/radix-ng-primitives-radio.d.ts +55 -25
  156. package/types/radix-ng-primitives-roving-focus.d.ts +33 -23
  157. package/types/radix-ng-primitives-scroll-area.d.ts +253 -0
  158. package/types/radix-ng-primitives-select.d.ts +475 -177
  159. package/types/radix-ng-primitives-separator.d.ts +7 -32
  160. package/types/radix-ng-primitives-slider.d.ts +315 -201
  161. package/types/radix-ng-primitives-stepper.d.ts +5 -7
  162. package/types/radix-ng-primitives-switch.d.ts +86 -71
  163. package/types/radix-ng-primitives-tabs.d.ts +213 -79
  164. package/types/radix-ng-primitives-time-field.d.ts +42 -27
  165. package/types/radix-ng-primitives-toast.d.ts +378 -0
  166. package/types/radix-ng-primitives-toggle-group.d.ts +86 -164
  167. package/types/radix-ng-primitives-toggle.d.ts +43 -53
  168. package/types/radix-ng-primitives-toolbar.d.ts +164 -38
  169. package/types/radix-ng-primitives-tooltip.d.ts +348 -384
  170. package/types/radix-ng-primitives-visually-hidden.d.ts +19 -19
  171. package/dropdown-menu/README.md +0 -1
  172. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +0 -581
  173. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +0 -1
  174. package/fesm2022/radix-ng-primitives-hover-card.mjs +0 -1238
  175. package/fesm2022/radix-ng-primitives-hover-card.mjs.map +0 -1
  176. package/fesm2022/radix-ng-primitives-select2.mjs +0 -897
  177. package/fesm2022/radix-ng-primitives-select2.mjs.map +0 -1
  178. package/fesm2022/radix-ng-primitives-tooltip2.mjs +0 -735
  179. package/fesm2022/radix-ng-primitives-tooltip2.mjs.map +0 -1
  180. package/hover-card/README.md +0 -3
  181. package/select2/README.md +0 -3
  182. package/tooltip2/README.md +0 -3
  183. package/types/radix-ng-primitives-dropdown-menu.d.ts +0 -171
  184. package/types/radix-ng-primitives-hover-card.d.ts +0 -471
  185. package/types/radix-ng-primitives-select2.d.ts +0 -511
  186. package/types/radix-ng-primitives-tooltip2.d.ts +0 -325
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-stepper.mjs","sources":["../../../packages/primitives/stepper/src/stepper-item-context.token.ts","../../../packages/primitives/stepper/src/stepper-description.directive.ts","../../../packages/primitives/stepper/src/stepper-indicator.directive.ts","../../../packages/primitives/stepper/src/stepper-root-context.token.ts","../../../packages/primitives/stepper/src/stepper-item.directive.ts","../../../packages/primitives/stepper/src/stepper-root.directive.ts","../../../packages/primitives/stepper/src/stepper-separator.directive.ts","../../../packages/primitives/stepper/src/stepper-title.directive.ts","../../../packages/primitives/stepper/src/stepper-trigger.directive.ts","../../../packages/primitives/stepper/index.ts","../../../packages/primitives/stepper/radix-ng-primitives-stepper.ts"],"sourcesContent":["import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { inject, InjectionToken, InputSignalWithTransform, Signal } from '@angular/core';\nimport { StepperState } from './types';\n\nexport interface StepperItemContext {\n titleId: string;\n descriptionId: string;\n step: InputSignalWithTransform<number, NumberInput>;\n disabled: InputSignalWithTransform<boolean, BooleanInput>;\n isFocusable: Signal<boolean>;\n itemState: Signal<StepperState>;\n}\n\nexport const STEPPER_ITEM_CONTEXT = new InjectionToken<StepperItemContext>('StepperItemContext');\n\nexport function injectStepperItemContext(): StepperItemContext {\n return inject(STEPPER_ITEM_CONTEXT);\n}\n","import { Directive } from '@angular/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\n\n@Directive({\n selector: '[rdxStepperDescription]',\n host: {\n '[attr.id]': 'itemContext.descriptionId'\n }\n})\nexport class RdxStepperDescriptionDirective {\n readonly itemContext = injectStepperItemContext();\n}\n","import { Directive } from '@angular/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\n\n@Directive({\n selector: '[rdxStepperIndicator]',\n exportAs: 'rdxStepperIndicator'\n})\nexport class RdxStepperIndicatorDirective {\n readonly itemContext = injectStepperItemContext();\n}\n","import { Direction } from '@angular/cdk/bidi';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport {\n inject,\n InjectionToken,\n InputSignal,\n InputSignalWithTransform,\n ModelSignal,\n WritableSignal\n} from '@angular/core';\n\nexport interface StepperRootContext {\n value: ModelSignal<number | undefined>;\n orientation: InputSignal<'vertical' | 'horizontal'>;\n dir: InputSignal<Direction>;\n linear: InputSignalWithTransform<boolean, BooleanInput>;\n totalStepperItems: WritableSignal<HTMLElement[]>;\n}\n\nexport const STEPPER_ROOT_CONTEXT = new InjectionToken<StepperRootContext>('StepperRootContext');\n\nexport function injectStepperRootContext(): StepperRootContext {\n return inject(STEPPER_ROOT_CONTEXT);\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, forwardRef, inject, input, numberAttribute } from '@angular/core';\nimport { _IdGenerator } from '@radix-ng/primitives/core';\nimport { STEPPER_ITEM_CONTEXT, StepperItemContext } from './stepper-item-context.token';\nimport { injectStepperRootContext } from './stepper-root-context.token';\nimport { StepperState } from './types';\n\n@Directive({\n selector: '[rdxStepperItem]',\n providers: [\n {\n provide: STEPPER_ITEM_CONTEXT,\n useExisting: forwardRef(() => RdxStepperItemDirective)\n }\n ],\n host: {\n '[attr.aria-current]': 'itemState() === \"active\" ? true : undefined',\n\n '[attr.data-state]': 'itemState()',\n '[attr.disabled]': 'disabled() || !isFocusable() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabled() || !isFocusable() ? \"\" : undefined',\n '[attr.data-orientation]': 'rootContext.orientation()'\n }\n})\nexport class RdxStepperItemDirective implements StepperItemContext {\n protected readonly rootContext = injectStepperRootContext();\n\n /** @ignore */\n readonly titleId = inject(_IdGenerator).getId('rdx-stepper-item-title');\n\n /** @ignore */\n readonly descriptionId = inject(_IdGenerator).getId('rdx-stepper-item-description');\n\n readonly step = input<number, NumberInput>(NaN, { transform: numberAttribute });\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** @ignore */\n readonly completed = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** @ignore */\n readonly itemState = computed<StepperState>(() => {\n if (this.completed()) return 'completed';\n if (this.rootContext.value() === this.step()) return 'active';\n\n const step = this.step() ?? 1;\n if (this.rootContext.value()! > step) {\n return 'completed';\n }\n\n return 'inactive';\n });\n\n /** @ignore */\n readonly isFocusable = computed(() => {\n if (this.disabled()) return false;\n\n const step = this.step() ?? 1;\n if (this.rootContext.linear()) {\n return step <= this.rootContext.value()! || step === this.rootContext.value()! + 1;\n }\n\n return true;\n });\n}\n","import { LiveAnnouncer } from '@angular/cdk/a11y';\nimport { Direction } from '@angular/cdk/bidi';\nimport { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n effect,\n forwardRef,\n inject,\n input,\n model,\n numberAttribute,\n output,\n signal\n} from '@angular/core';\nimport { STEPPER_ROOT_CONTEXT, StepperRootContext } from './stepper-root-context.token';\n\n@Directive({\n selector: '[rdxStepperRoot]',\n exportAs: 'rdxStepperRoot',\n providers: [\n {\n provide: STEPPER_ROOT_CONTEXT,\n useExisting: forwardRef(() => RdxStepperRootDirective)\n }\n ],\n host: {\n role: 'group',\n '[attr.aria-label]': '\"progress\"',\n '[attr.data-linear]': 'linear() ? \"\" : undefined',\n '[attr.data-orientation]': 'orientation()'\n }\n})\nexport class RdxStepperRootDirective implements StepperRootContext {\n private readonly liveAnnouncer = inject(LiveAnnouncer);\n\n readonly defaultValue = input<number, NumberInput>(undefined, { transform: numberAttribute });\n\n readonly value = model<number | undefined>(this.defaultValue());\n\n readonly linear = input<boolean, BooleanInput>(true, { transform: booleanAttribute });\n\n readonly dir = input<Direction>('ltr');\n\n readonly orientation = input<'vertical' | 'horizontal'>('horizontal');\n\n /** @ignore */\n readonly totalStepperItemsArray = computed(() => Array.from(this.totalStepperItems()));\n\n readonly onValueChange = output<number>();\n\n /** @ignore */\n readonly isFirstStep = computed(() => this.value() === 1);\n\n /** @ignore */\n readonly isLastStep = computed(() => this.value() === this.totalStepperItemsArray().length);\n\n /** @ignore */\n readonly totalSteps = computed(() => this.totalStepperItems().length);\n\n /** @ignore */\n readonly isNextDisabled = computed<boolean>(() => {\n const item = this.nextStepperItem();\n return item ? item.hasAttribute('disabled') : true;\n });\n\n /** @ignore */\n readonly isPrevDisabled = computed<boolean>(() => {\n const item = this.prevStepperItem();\n return item ? item.hasAttribute('disabled') : true;\n });\n\n /** @ignore */\n readonly totalStepperItems = signal<HTMLElement[]>([]);\n\n private readonly nextStepperItem = signal<HTMLElement | null>(null);\n private readonly prevStepperItem = signal<HTMLElement | null>(null);\n\n constructor() {\n effect(() => {\n const items = this.totalStepperItemsArray();\n const currentValue = this.value();\n\n if (currentValue) {\n if (items.length && currentValue < items.length) {\n this.nextStepperItem.set(items[currentValue]);\n } else {\n this.nextStepperItem.set(null);\n }\n\n if (items.length && currentValue > 1) {\n this.prevStepperItem.set(items[currentValue - 2]);\n } else {\n this.prevStepperItem.set(null);\n }\n\n this.onValueChange.emit(currentValue);\n this.liveAnnouncer.announce(`Step ${currentValue} of ${items.length}`);\n }\n });\n }\n\n goToStep(step: number) {\n if (step > this.totalSteps()) {\n return;\n }\n\n if (step < 1) {\n return;\n }\n\n if (\n this.totalStepperItems().length &&\n !!this.totalStepperItemsArray()[step] &&\n this.totalStepperItemsArray()[step].hasAttribute('disabled')\n ) {\n return;\n }\n\n if (this.linear()) {\n const currentValue = this.value() ?? 1;\n if (step > currentValue + 1) {\n return;\n }\n }\n this.value.set(step);\n this.onValueChange.emit(step);\n }\n}\n","import { Directive, effect, inject } from '@angular/core';\nimport { RdxSeparatorRootDirective } from '@radix-ng/primitives/separator';\nimport { injectStepperItemContext } from './stepper-item-context.token';\nimport { injectStepperRootContext } from './stepper-root-context.token';\n\n@Directive({\n selector: '[rdxStepperSeparator]',\n hostDirectives: [{ directive: RdxSeparatorRootDirective, inputs: ['orientation', 'decorative'] }],\n host: {\n '[attr.data-state]': 'itemContext.itemState()'\n }\n})\nexport class RdxStepperSeparatorDirective {\n protected readonly rootContext = injectStepperRootContext();\n protected readonly itemContext = injectStepperItemContext();\n\n private readonly rdxSeparator = inject(RdxSeparatorRootDirective, { host: true });\n\n constructor() {\n effect(() => {\n this.rdxSeparator.updateDecorative(true);\n this.rdxSeparator.updateOrientation(this.rootContext.orientation());\n });\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\n\n@Directive({\n selector: '[rdxStepperTitle]',\n host: {\n '[attr.id]': 'itemContext.titleId'\n }\n})\nexport class RdxStepperTitleDirective {\n readonly itemContext = injectStepperItemContext();\n}\n","import { computed, Directive, ElementRef, inject, OnDestroy, OnInit } from '@angular/core';\nimport * as kbd from '@radix-ng/primitives/core';\nimport { getActiveElement, useArrowNavigation } from '@radix-ng/primitives/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\nimport { injectStepperRootContext } from './stepper-root-context.token';\n\n// as button\n@Directive({\n selector: 'button[rdxStepperTrigger]',\n host: {\n '[attr.tabindex]': 'itemContext.isFocusable() ? 0 : -1',\n '[attr.aria-describedby]': 'itemContext.descriptionId',\n '[attr.aria-labelledby]': 'itemContext.titleId',\n\n '[attr.data-state]': 'itemContext.itemState()',\n '[attr.data-orientation]': 'rootContext.orientation()',\n '[attr.disabled]': 'itemContext.disabled() || !itemContext.isFocusable() ? \"\" : undefined',\n '[attr.data-disabled]': 'itemContext.disabled() || !itemContext.isFocusable() ? \"\" : undefined',\n\n '(mousedown)': 'handleMouseDown($event)',\n\n '(keydown.Enter)': 'handleKeyDown($event)',\n '(keydown.Space)': 'handleKeyDown($event)',\n '(keydown.ArrowLeft)': 'handleKeyDown($event)',\n '(keydown.ArrowRight)': 'handleKeyDown($event)',\n '(keydown.ArrowUp)': 'handleKeyDown($event)',\n '(keydown.ArrowDown)': 'handleKeyDown($event)'\n }\n})\nexport class RdxStepperTriggerDirective implements OnInit, OnDestroy {\n protected readonly rootContext = injectStepperRootContext();\n protected readonly itemContext = injectStepperItemContext();\n\n private readonly elementRef = inject(ElementRef);\n\n readonly stepperItems = computed(() => Array.from(this.rootContext.totalStepperItems()));\n\n ngOnInit() {\n const current = this.rootContext.totalStepperItems();\n this.rootContext.totalStepperItems.set([...current, this.elementRef.nativeElement]);\n }\n\n ngOnDestroy() {\n const current = this.rootContext.totalStepperItems();\n const updated = current.filter((el: HTMLElement) => el !== this.elementRef.nativeElement);\n\n this.rootContext.totalStepperItems.set(updated);\n }\n\n handleMouseDown(event: Event) {\n const mouseEvent = event as MouseEvent;\n if (this.itemContext.disabled()) {\n return;\n }\n\n // handler only left mouse click\n if (mouseEvent.button !== 0) {\n return;\n }\n\n if (this.rootContext.linear()) {\n if (\n this.itemContext.step() <= this.rootContext.value()! ||\n this.itemContext.step() === this.rootContext.value()! + 1\n ) {\n if (!mouseEvent.ctrlKey) {\n this.rootContext.value.set(this.itemContext.step());\n return;\n }\n }\n } else {\n if (!mouseEvent.ctrlKey) {\n this.rootContext.value.set(this.itemContext.step());\n return;\n }\n }\n\n // prevent focus to avoid accidental activation\n event.preventDefault();\n }\n\n handleKeyDown(event: Event) {\n const keyEvent = event as KeyboardEvent;\n event.preventDefault();\n\n if (this.itemContext.disabled()) {\n return;\n }\n\n if ((keyEvent.key === kbd.ENTER || keyEvent.key === kbd.SPACE) && !keyEvent.ctrlKey && !keyEvent.shiftKey)\n this.rootContext.value.set(this.itemContext.step());\n\n if ([kbd.ARROW_LEFT, kbd.ARROW_RIGHT, kbd.ARROW_UP, kbd.ARROW_DOWN].includes(keyEvent.key)) {\n useArrowNavigation(keyEvent, getActiveElement() as HTMLElement, undefined, {\n itemsArray: this.stepperItems() as HTMLElement[],\n focus: true,\n loop: false,\n arrowKeyOptions: this.rootContext.orientation(),\n dir: this.rootContext.dir()\n });\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RdxStepperDescriptionDirective } from './src/stepper-description.directive';\nimport { RdxStepperIndicatorDirective } from './src/stepper-indicator.directive';\nimport { RdxStepperItemDirective } from './src/stepper-item.directive';\nimport { RdxStepperRootDirective } from './src/stepper-root.directive';\nimport { RdxStepperSeparatorDirective } from './src/stepper-separator.directive';\nimport { RdxStepperTitleDirective } from './src/stepper-title.directive';\nimport { RdxStepperTriggerDirective } from './src/stepper-trigger.directive';\n\nexport * from './src/stepper-description.directive';\nexport * from './src/stepper-indicator.directive';\nexport * from './src/stepper-item.directive';\nexport * from './src/stepper-root-context.token';\nexport * from './src/stepper-root.directive';\nexport * from './src/stepper-separator.directive';\nexport * from './src/stepper-title.directive';\nexport * from './src/stepper-trigger.directive';\nexport * from './src/types';\n\nconst _imports = [\n RdxStepperDescriptionDirective,\n RdxStepperTitleDirective,\n RdxStepperSeparatorDirective,\n RdxStepperItemDirective,\n RdxStepperIndicatorDirective,\n RdxStepperRootDirective,\n RdxStepperTriggerDirective\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxStepperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAaO,MAAM,oBAAoB,GAAG,IAAI,cAAc,CAAqB,oBAAoB,CAAC;SAEhF,wBAAwB,GAAA;AACpC,IAAA,OAAO,MAAM,CAAC,oBAAoB,CAAC;AACvC;;MCRa,8BAA8B,CAAA;AAN3C,IAAA,WAAA,GAAA;QAOa,IAAA,CAAA,WAAW,GAAG,wBAAwB,EAAE;AACpD,IAAA;8GAFY,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA9B,8BAA8B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,SAAA,EAAA,2BAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA9B,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAN1C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE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AAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAbzB,8BAA8B;YAC9B,wBAAwB;YACxB,4BAA4B;YAC5B,uBAAuB;YACvB,4BAA4B;YAC5B,uBAAuB;AACvB,YAAA,0BAA0B,aAN1B,8BAA8B;YAC9B,wBAAwB;YACxB,4BAA4B;YAC5B,uBAAuB;YACvB,4BAA4B;YAC5B,uBAAuB;YACvB,0BAA0B,CAAA,EAAA,CAAA,CAAA;+GAOjB,gBAAgB,EAAA,CAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC;AACtB,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ;AACxB,iBAAA;;;AChCD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-stepper.mjs","sources":["../../../packages/primitives/stepper/src/stepper-item-context.token.ts","../../../packages/primitives/stepper/src/stepper-description.directive.ts","../../../packages/primitives/stepper/src/stepper-indicator.directive.ts","../../../packages/primitives/stepper/src/stepper-root-context.token.ts","../../../packages/primitives/stepper/src/stepper-item.directive.ts","../../../packages/primitives/stepper/src/stepper-root.directive.ts","../../../packages/primitives/stepper/src/stepper-separator.directive.ts","../../../packages/primitives/stepper/src/stepper-title.directive.ts","../../../packages/primitives/stepper/src/stepper-trigger.directive.ts","../../../packages/primitives/stepper/index.ts","../../../packages/primitives/stepper/radix-ng-primitives-stepper.ts"],"sourcesContent":["import { inject, InjectionToken, InputSignalWithTransform, Signal } from '@angular/core';\nimport { BooleanInput, NumberInput } from '@radix-ng/primitives/core';\nimport { StepperState } from './types';\n\nexport interface StepperItemContext {\n titleId: string;\n descriptionId: string;\n step: InputSignalWithTransform<number, NumberInput>;\n disabled: InputSignalWithTransform<boolean, BooleanInput>;\n isFocusable: Signal<boolean>;\n itemState: Signal<StepperState>;\n}\n\nexport const STEPPER_ITEM_CONTEXT = new InjectionToken<StepperItemContext>('StepperItemContext');\n\nexport function injectStepperItemContext(): StepperItemContext {\n return inject(STEPPER_ITEM_CONTEXT);\n}\n","import { Directive } from '@angular/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\n\n@Directive({\n selector: '[rdxStepperDescription]',\n host: {\n '[attr.id]': 'itemContext.descriptionId'\n }\n})\nexport class RdxStepperDescriptionDirective {\n readonly itemContext = injectStepperItemContext();\n}\n","import { Directive } from '@angular/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\n\n@Directive({\n selector: '[rdxStepperIndicator]',\n exportAs: 'rdxStepperIndicator'\n})\nexport class RdxStepperIndicatorDirective {\n readonly itemContext = injectStepperItemContext();\n}\n","import {\n inject,\n InjectionToken,\n InputSignal,\n InputSignalWithTransform,\n ModelSignal,\n WritableSignal\n} from '@angular/core';\nimport { BooleanInput, Direction } from '@radix-ng/primitives/core';\n\nexport interface StepperRootContext {\n value: ModelSignal<number | undefined>;\n orientation: InputSignal<'vertical' | 'horizontal'>;\n dir: InputSignal<Direction>;\n linear: InputSignalWithTransform<boolean, BooleanInput>;\n totalStepperItems: WritableSignal<HTMLElement[]>;\n}\n\nexport const STEPPER_ROOT_CONTEXT = new InjectionToken<StepperRootContext>('StepperRootContext');\n\nexport function injectStepperRootContext(): StepperRootContext {\n return inject(STEPPER_ROOT_CONTEXT);\n}\n","import { booleanAttribute, computed, Directive, forwardRef, input, numberAttribute } from '@angular/core';\nimport { BooleanInput, injectId, NumberInput } from '@radix-ng/primitives/core';\nimport { STEPPER_ITEM_CONTEXT, StepperItemContext } from './stepper-item-context.token';\nimport { injectStepperRootContext } from './stepper-root-context.token';\nimport { StepperState } from './types';\n\n@Directive({\n selector: '[rdxStepperItem]',\n providers: [\n {\n provide: STEPPER_ITEM_CONTEXT,\n useExisting: forwardRef(() => RdxStepperItemDirective)\n }\n ],\n host: {\n '[attr.aria-current]': 'itemState() === \"active\" ? true : undefined',\n\n '[attr.data-state]': 'itemState()',\n '[attr.disabled]': 'disabled() || !isFocusable() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabled() || !isFocusable() ? \"\" : undefined',\n '[attr.data-orientation]': 'rootContext.orientation()'\n }\n})\nexport class RdxStepperItemDirective implements StepperItemContext {\n protected readonly rootContext = injectStepperRootContext();\n\n /** @ignore */\n readonly titleId = injectId('rdx-stepper-item-title');\n\n /** @ignore */\n readonly descriptionId = injectId('rdx-stepper-item-description');\n\n readonly step = input<number, NumberInput>(NaN, { transform: numberAttribute });\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** @ignore */\n readonly completed = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** @ignore */\n readonly itemState = computed<StepperState>(() => {\n if (this.completed()) return 'completed';\n if (this.rootContext.value() === this.step()) return 'active';\n\n const step = this.step() ?? 1;\n if (this.rootContext.value()! > step) {\n return 'completed';\n }\n\n return 'inactive';\n });\n\n /** @ignore */\n readonly isFocusable = computed(() => {\n if (this.disabled()) return false;\n\n const step = this.step() ?? 1;\n if (this.rootContext.linear()) {\n return step <= this.rootContext.value()! || step === this.rootContext.value()! + 1;\n }\n\n return true;\n });\n}\n","import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n forwardRef,\n inject,\n input,\n model,\n numberAttribute,\n output,\n signal\n} from '@angular/core';\nimport { BooleanInput, Direction, NumberInput, RdxLiveAnnouncer } from '@radix-ng/primitives/core';\nimport { STEPPER_ROOT_CONTEXT, StepperRootContext } from './stepper-root-context.token';\n\n@Directive({\n selector: '[rdxStepperRoot]',\n exportAs: 'rdxStepperRoot',\n providers: [\n {\n provide: STEPPER_ROOT_CONTEXT,\n useExisting: forwardRef(() => RdxStepperRootDirective)\n }\n ],\n host: {\n role: 'group',\n '[attr.aria-label]': '\"progress\"',\n '[attr.data-linear]': 'linear() ? \"\" : undefined',\n '[attr.data-orientation]': 'orientation()'\n }\n})\nexport class RdxStepperRootDirective implements StepperRootContext {\n private readonly liveAnnouncer = inject(RdxLiveAnnouncer);\n\n readonly defaultValue = input<number, NumberInput>(undefined, { transform: numberAttribute });\n\n readonly value = model<number | undefined>(this.defaultValue());\n\n readonly linear = input<boolean, BooleanInput>(true, { transform: booleanAttribute });\n\n readonly dir = input<Direction>('ltr');\n\n readonly orientation = input<'vertical' | 'horizontal'>('horizontal');\n\n /** @ignore */\n readonly totalStepperItemsArray = computed(() => Array.from(this.totalStepperItems()));\n\n readonly onValueChange = output<number>();\n\n /** @ignore */\n readonly isFirstStep = computed(() => this.value() === 1);\n\n /** @ignore */\n readonly isLastStep = computed(() => this.value() === this.totalStepperItemsArray().length);\n\n /** @ignore */\n readonly totalSteps = computed(() => this.totalStepperItems().length);\n\n /** @ignore */\n readonly isNextDisabled = computed<boolean>(() => {\n const item = this.nextStepperItem();\n return item ? item.hasAttribute('disabled') : true;\n });\n\n /** @ignore */\n readonly isPrevDisabled = computed<boolean>(() => {\n const item = this.prevStepperItem();\n return item ? item.hasAttribute('disabled') : true;\n });\n\n /** @ignore */\n readonly totalStepperItems = signal<HTMLElement[]>([]);\n\n private readonly nextStepperItem = signal<HTMLElement | null>(null);\n private readonly prevStepperItem = signal<HTMLElement | null>(null);\n\n constructor() {\n effect(() => {\n const items = this.totalStepperItemsArray();\n const currentValue = this.value();\n\n if (currentValue) {\n if (items.length && currentValue < items.length) {\n this.nextStepperItem.set(items[currentValue]);\n } else {\n this.nextStepperItem.set(null);\n }\n\n if (items.length && currentValue > 1) {\n this.prevStepperItem.set(items[currentValue - 2]);\n } else {\n this.prevStepperItem.set(null);\n }\n\n this.onValueChange.emit(currentValue);\n this.liveAnnouncer.announce(`Step ${currentValue} of ${items.length}`);\n }\n });\n }\n\n goToStep(step: number) {\n if (step > this.totalSteps()) {\n return;\n }\n\n if (step < 1) {\n return;\n }\n\n if (\n this.totalStepperItems().length &&\n !!this.totalStepperItemsArray()[step] &&\n this.totalStepperItemsArray()[step].hasAttribute('disabled')\n ) {\n return;\n }\n\n if (this.linear()) {\n const currentValue = this.value() ?? 1;\n if (step > currentValue + 1) {\n return;\n }\n }\n this.value.set(step);\n this.onValueChange.emit(step);\n }\n}\n","import { Directive, effect, inject } from '@angular/core';\nimport { RdxSeparatorRootDirective } from '@radix-ng/primitives/separator';\nimport { injectStepperItemContext } from './stepper-item-context.token';\nimport { injectStepperRootContext } from './stepper-root-context.token';\n\n@Directive({\n selector: '[rdxStepperSeparator]',\n hostDirectives: [{ directive: RdxSeparatorRootDirective, inputs: ['orientation'] }],\n host: {\n '[attr.data-state]': 'itemContext.itemState()'\n }\n})\nexport class RdxStepperSeparatorDirective {\n protected readonly rootContext = injectStepperRootContext();\n protected readonly itemContext = injectStepperItemContext();\n\n private readonly rdxSeparator = inject(RdxSeparatorRootDirective, { host: true });\n\n constructor() {\n effect(() => {\n this.rdxSeparator.updateOrientation(this.rootContext.orientation());\n });\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\n\n@Directive({\n selector: '[rdxStepperTitle]',\n host: {\n '[attr.id]': 'itemContext.titleId'\n }\n})\nexport class RdxStepperTitleDirective {\n readonly itemContext = injectStepperItemContext();\n}\n","import { computed, DestroyRef, Directive, ElementRef, inject } from '@angular/core';\nimport * as kbd from '@radix-ng/primitives/core';\nimport { getActiveElement, useArrowNavigation } from '@radix-ng/primitives/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\nimport { injectStepperRootContext } from './stepper-root-context.token';\n\n// as button\n@Directive({\n selector: 'button[rdxStepperTrigger]',\n host: {\n '[attr.tabindex]': 'itemContext.isFocusable() ? 0 : -1',\n '[attr.aria-describedby]': 'itemContext.descriptionId',\n '[attr.aria-labelledby]': 'itemContext.titleId',\n\n '[attr.data-state]': 'itemContext.itemState()',\n '[attr.data-orientation]': 'rootContext.orientation()',\n '[attr.disabled]': 'itemContext.disabled() || !itemContext.isFocusable() ? \"\" : undefined',\n '[attr.data-disabled]': 'itemContext.disabled() || !itemContext.isFocusable() ? \"\" : undefined',\n\n '(mousedown)': 'handleMouseDown($event)',\n\n '(keydown.Enter)': 'handleKeyDown($event)',\n '(keydown.Space)': 'handleKeyDown($event)',\n '(keydown.ArrowLeft)': 'handleKeyDown($event)',\n '(keydown.ArrowRight)': 'handleKeyDown($event)',\n '(keydown.ArrowUp)': 'handleKeyDown($event)',\n '(keydown.ArrowDown)': 'handleKeyDown($event)'\n }\n})\nexport class RdxStepperTriggerDirective {\n protected readonly rootContext = injectStepperRootContext();\n protected readonly itemContext = injectStepperItemContext();\n\n private readonly elementRef = inject(ElementRef);\n\n readonly stepperItems = computed(() => Array.from(this.rootContext.totalStepperItems()));\n\n constructor() {\n // Register/deregister this trigger's host element with the root, in DOM order.\n const element = this.elementRef.nativeElement;\n this.rootContext.totalStepperItems.set([...this.rootContext.totalStepperItems(), element]);\n\n inject(DestroyRef).onDestroy(() => {\n const updated = this.rootContext.totalStepperItems().filter((el: HTMLElement) => el !== element);\n\n this.rootContext.totalStepperItems.set(updated);\n });\n }\n\n handleMouseDown(event: Event) {\n const mouseEvent = event as MouseEvent;\n if (this.itemContext.disabled()) {\n return;\n }\n\n // handler only left mouse click\n if (mouseEvent.button !== 0) {\n return;\n }\n\n if (this.rootContext.linear()) {\n if (\n this.itemContext.step() <= this.rootContext.value()! ||\n this.itemContext.step() === this.rootContext.value()! + 1\n ) {\n if (!mouseEvent.ctrlKey) {\n this.rootContext.value.set(this.itemContext.step());\n return;\n }\n }\n } else {\n if (!mouseEvent.ctrlKey) {\n this.rootContext.value.set(this.itemContext.step());\n return;\n }\n }\n\n // prevent focus to avoid accidental activation\n event.preventDefault();\n }\n\n handleKeyDown(event: Event) {\n const keyEvent = event as KeyboardEvent;\n event.preventDefault();\n\n if (this.itemContext.disabled()) {\n return;\n }\n\n if ((keyEvent.key === kbd.ENTER || keyEvent.key === kbd.SPACE) && !keyEvent.ctrlKey && !keyEvent.shiftKey)\n this.rootContext.value.set(this.itemContext.step());\n\n if ([kbd.ARROW_LEFT, kbd.ARROW_RIGHT, kbd.ARROW_UP, kbd.ARROW_DOWN].includes(keyEvent.key)) {\n useArrowNavigation(keyEvent, getActiveElement() as HTMLElement, undefined, {\n itemsArray: this.stepperItems(),\n focus: true,\n loop: false,\n arrowKeyOptions: this.rootContext.orientation(),\n dir: this.rootContext.dir()\n });\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RdxStepperDescriptionDirective } from './src/stepper-description.directive';\nimport { RdxStepperIndicatorDirective } from './src/stepper-indicator.directive';\nimport { RdxStepperItemDirective } from './src/stepper-item.directive';\nimport { RdxStepperRootDirective } from './src/stepper-root.directive';\nimport { RdxStepperSeparatorDirective } from './src/stepper-separator.directive';\nimport { RdxStepperTitleDirective } from './src/stepper-title.directive';\nimport { RdxStepperTriggerDirective } from './src/stepper-trigger.directive';\n\nexport * from './src/stepper-description.directive';\nexport * from './src/stepper-indicator.directive';\nexport * from './src/stepper-item.directive';\nexport * from './src/stepper-root-context.token';\nexport * from './src/stepper-root.directive';\nexport * from './src/stepper-separator.directive';\nexport * from './src/stepper-title.directive';\nexport * from './src/stepper-trigger.directive';\nexport * from './src/types';\n\nconst _imports = [\n RdxStepperDescriptionDirective,\n RdxStepperTitleDirective,\n RdxStepperSeparatorDirective,\n RdxStepperItemDirective,\n RdxStepperIndicatorDirective,\n RdxStepperRootDirective,\n RdxStepperTriggerDirective\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxStepperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAaO,MAAM,oBAAoB,GAAG,IAAI,cAAc,CAAqB,oBAAo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ject, input, booleanAttribute, model, Directive, NgModule } from '@angular/core';
3
- import { _IdGenerator } from '@angular/cdk/a11y';
4
- import { outputFromObservable, outputToObservable } from '@angular/core/rxjs-interop';
2
+ import { Directive, inject, computed, input, booleanAttribute, model, output, NgModule } from '@angular/core';
5
3
  import * as i1 from '@radix-ng/primitives/core';
6
- import { createContext, injectControlValueAccessor, RdxControlValueAccessor } from '@radix-ng/primitives/core';
4
+ import { createContext, injectControlValueAccessor, injectId, RdxControlValueAccessor } from '@radix-ng/primitives/core';
7
5
 
8
- const [injectSwitchRootContext, provideSwitchRootContext] = createContext('Switch');
9
- const rootContext = () => {
10
- const instance = inject(RdxSwitchRootDirective);
6
+ const [injectSwitchContext, provideSwitchContext] = createContext('RdxSwitchContext');
7
+
8
+ /**
9
+ * The hidden native checkbox that mirrors the switch state for form submission and screen readers.
10
+ *
11
+ * @see https://base-ui.com/react/components/switch
12
+ */
13
+ class RdxSwitchInput {
14
+ constructor() {
15
+ this.rootContext = injectSwitchContext();
16
+ }
17
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
18
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxSwitchInput, isStandalone: true, selector: "input[rdxSwitchInput]", host: { attributes: { "type": "checkbox", "tabindex": "-1", "aria-hidden": "true" }, listeners: { "blur": "rootContext.markAsTouched()" }, properties: { "attr.name": "rootContext.name()", "attr.value": "rootContext.value()", "checked": "rootContext.checked()", "disabled": "rootContext.disabled()", "attr.required": "rootContext.required() ? \"\" : undefined", "attr.aria-label": "rootContext.ariaLabel()", "attr.aria-labelledby": "rootContext.ariaLabelledBy()", "attr.data-checked": "rootContext.checked() ? \"\" : undefined", "attr.data-unchecked": "rootContext.checked() ? undefined : \"\"" }, styleAttribute: "transform: translateX(-100%); position: absolute; overflow: hidden; pointer-events: none; opacity: 0; margin: 0;" }, exportAs: ["rdxSwitchInput"], ngImport: i0 }); }
19
+ }
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchInput, decorators: [{
21
+ type: Directive,
22
+ args: [{
23
+ selector: 'input[rdxSwitchInput]',
24
+ exportAs: 'rdxSwitchInput',
25
+ host: {
26
+ type: 'checkbox',
27
+ tabindex: '-1',
28
+ 'aria-hidden': 'true',
29
+ '[attr.name]': 'rootContext.name()',
30
+ '[attr.value]': 'rootContext.value()',
31
+ '[checked]': 'rootContext.checked()',
32
+ '[disabled]': 'rootContext.disabled()',
33
+ '[attr.required]': 'rootContext.required() ? "" : undefined',
34
+ '[attr.aria-label]': 'rootContext.ariaLabel()',
35
+ '[attr.aria-labelledby]': 'rootContext.ariaLabelledBy()',
36
+ '[attr.data-checked]': 'rootContext.checked() ? "" : undefined',
37
+ '[attr.data-unchecked]': 'rootContext.checked() ? undefined : ""',
38
+ style: 'transform: translateX(-100%); position: absolute; overflow: hidden; pointer-events: none; opacity: 0; margin: 0;',
39
+ '(blur)': 'rootContext.markAsTouched()'
40
+ }
41
+ }]
42
+ }] });
43
+
44
+ const context = () => {
45
+ const root = inject(RdxSwitchRoot);
11
46
  const cva = injectControlValueAccessor();
12
47
  return {
13
- required: instance.required,
14
- value: instance.checked,
15
- checked: cva.value,
16
- disabled: cva.disabled,
17
- ariaLabel: instance.ariaLabel,
18
- ariaLabelledBy: instance.ariaLabelledBy,
19
- markAsTouched: () => cva.markAsTouched(),
20
- toggle: () => instance.toggle()
48
+ checked: root.checkedState,
49
+ disabled: computed(() => !!cva.disabled()),
50
+ readonly: root.readonly,
51
+ required: root.required,
52
+ name: root.name,
53
+ value: root.submitValue,
54
+ ariaLabel: root.ariaLabel,
55
+ ariaLabelledBy: root.ariaLabelledBy,
56
+ markAsTouched: () => cva.markAsTouched()
21
57
  };
22
58
  };
23
59
  /**
24
- * @group Components
60
+ * A control that toggles between on and off.
61
+ *
62
+ * @see https://base-ui.com/react/components/switch
25
63
  */
26
- class RdxSwitchRootDirective {
64
+ class RdxSwitchRoot {
27
65
  constructor() {
66
+ /** @ignore */
28
67
  this.cva = injectControlValueAccessor();
29
- this.id = input(inject(_IdGenerator).getId('rdx-switch-'), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
68
+ this.id = input(injectId('rdx-switch-'), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
30
69
  /**
31
- * When true, indicates that the user must check the switch before the owning form can be submitted.
70
+ * The state of the switch when it is initially rendered. Use when you do not need to control its state.
32
71
  *
33
72
  * @default false
34
- * @group Props
35
73
  */
36
- this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
37
- /**
38
- * Establishes relationships between the component and label(s) where its value should be one or more element IDs.
39
- * @default null
40
- * @group Props
41
- */
42
- this.ariaLabelledBy = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
74
+ this.defaultChecked = input(false, { ...(ngDevMode ? { debugName: "defaultChecked" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
43
75
  /**
44
- * Used to define a string that autocomplete attribute the current element.
45
- * @default null
46
- * @group Props
76
+ * The controlled checked state. Use with `(onCheckedChange)` or two-way `[(checked)]`.
47
77
  */
48
- this.ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
78
+ this.checked = model(this.defaultChecked(), ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
49
79
  /**
50
- * The state of the switch when it is initially rendered. Use when you do not need to control its state.
80
+ * When `true`, prevents the user from interacting with the switch.
81
+ *
51
82
  * @default false
52
- * @group Props
53
83
  */
54
- this.defaultChecked = input(false, { ...(ngDevMode ? { debugName: "defaultChecked" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
84
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
55
85
  /**
56
- * The controlled state of the switch. Must be used in conjunction with onCheckedChange.
57
- * @defaultValue false
58
- * @group Props
86
+ * When `true`, the switch is focusable but cannot be toggled.
87
+ *
88
+ * @default false
59
89
  */
60
- this.checked = model(this.defaultChecked(), ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
90
+ this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
61
91
  /**
62
- * When `true`, prevents the user from interacting with the switch.
92
+ * When `true`, the switch must be on before the owning form can be submitted.
93
+ *
63
94
  * @default false
64
- * @group Props
65
95
  */
66
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
96
+ this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
97
+ /** Name of the hidden form input rendered by `[rdxSwitchInput]`. */
98
+ this.name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
67
99
  /**
68
- * Event handler called when the state of the switch changes.
100
+ * Value submitted with the form when the switch is on.
69
101
  *
70
- * @param {boolean} value - Boolean value indicates that the option is changed.
71
- * @group Emits
102
+ * Bound publicly as `[value]`; the TS member is named `submitValue` so the
103
+ * directive can satisfy `RdxFormCheckboxControl`, whose contract reserves a
104
+ * `value` member for `RdxFormValueControl` and forbids it on checkbox-style
105
+ * controls.
106
+ *
107
+ * @default 'on'
72
108
  */
73
- this.onCheckedChange = outputFromObservable(outputToObservable(this.cva.valueChange));
109
+ this.submitValue = input('on', { ...(ngDevMode ? { debugName: "submitValue" } : /* istanbul ignore next */ {}), alias: 'value' });
110
+ this.ariaLabelledBy = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
111
+ this.ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
112
+ /** Event handler called when the checked state of the switch changes. */
113
+ this.onCheckedChange = output();
114
+ /** @ignore */
115
+ this.checkedState = computed(() => !!this.cva.value(), ...(ngDevMode ? [{ debugName: "checkedState" }] : /* istanbul ignore next */ []));
116
+ /** @ignore */
117
+ this.isDisabled = computed(() => !!this.cva.disabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
74
118
  }
75
- /**
76
- * Toggles the checked state of the switch.
77
- * If the switch is disabled, the function returns early.
78
- * @ignore
79
- */
119
+ /** @ignore Toggles the checked state unless disabled or read-only. */
80
120
  toggle() {
81
- if (!this.disabled()) {
82
- this.checked.set(!this.checked());
83
- this.cva.setValue(this.checked());
121
+ if (this.isDisabled() || this.readonly()) {
122
+ return;
84
123
  }
124
+ const next = !this.cva.value();
125
+ this.checked.set(next);
126
+ this.cva.setValue(next);
127
+ this.onCheckedChange.emit(next);
85
128
  }
86
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
87
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", 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 }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, defaultChecked: { classPropertyName: "defaultChecked", publicName: "defaultChecked", 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()", "keydown.enter": "$event.preventDefault()" }, properties: { "id": "id()", "attr.aria-checked": "cva.value()", "attr.aria-required": "required()", "attr.data-state": "cva.value() ? \"checked\" : \"unchecked\"", "attr.data-disabled": "cva.disabled() ? \"true\" : undefined", "attr.disabled": "cva.disabled() ? cva.disabled() : undefined", "attr.value": "cva.value()" } }, providers: [provideSwitchRootContext(rootContext)], exportAs: ["rdxSwitchRoot"], hostDirectives: [{ directive: i1.RdxControlValueAccessor, inputs: ["value", "checked", "disabled", "disabled"] }], ngImport: i0 }); }
129
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
130
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxSwitchRoot, isStandalone: true, selector: "button[rdxSwitchRoot]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, defaultChecked: { classPropertyName: "defaultChecked", publicName: "defaultChecked", 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 }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, submitValue: { classPropertyName: "submitValue", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", onCheckedChange: "onCheckedChange" }, host: { attributes: { "role": "switch", "type": "button" }, listeners: { "click": "toggle()", "keydown.enter": "$event.preventDefault()" }, properties: { "id": "id()", "attr.aria-checked": "checkedState()", "attr.aria-required": "required() ? \"true\" : undefined", "attr.aria-readonly": "readonly() ? \"true\" : undefined", "attr.data-checked": "checkedState() ? \"\" : undefined", "attr.data-unchecked": "checkedState() ? undefined : \"\"", "attr.data-disabled": "isDisabled() ? \"\" : undefined", "attr.data-readonly": "readonly() ? \"\" : undefined", "attr.data-required": "required() ? \"\" : undefined", "attr.disabled": "isDisabled() ? \"\" : undefined" } }, providers: [provideSwitchContext(context)], exportAs: ["rdxSwitchRoot"], hostDirectives: [{ directive: i1.RdxControlValueAccessor, inputs: ["value", "checked", "disabled", "disabled"] }], ngImport: i0 }); }
88
131
  }
89
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchRootDirective, decorators: [{
132
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchRoot, decorators: [{
90
133
  type: Directive,
91
134
  args: [{
92
135
  selector: 'button[rdxSwitchRoot]',
93
136
  exportAs: 'rdxSwitchRoot',
94
- providers: [provideSwitchRootContext(rootContext)],
137
+ providers: [provideSwitchContext(context)],
95
138
  hostDirectives: [
96
139
  {
97
140
  directive: RdxControlValueAccessor,
@@ -102,82 +145,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
102
145
  role: 'switch',
103
146
  type: 'button',
104
147
  '[id]': 'id()',
105
- '[attr.aria-checked]': 'cva.value()',
106
- '[attr.aria-required]': 'required()',
107
- '[attr.data-state]': 'cva.value() ? "checked" : "unchecked"',
108
- '[attr.data-disabled]': 'cva.disabled() ? "true" : undefined',
109
- '[attr.disabled]': 'cva.disabled() ? cva.disabled() : undefined',
110
- '[attr.value]': 'cva.value()',
148
+ '[attr.aria-checked]': 'checkedState()',
149
+ '[attr.aria-required]': 'required() ? "true" : undefined',
150
+ '[attr.aria-readonly]': 'readonly() ? "true" : undefined',
151
+ '[attr.data-checked]': 'checkedState() ? "" : undefined',
152
+ '[attr.data-unchecked]': 'checkedState() ? undefined : ""',
153
+ '[attr.data-disabled]': 'isDisabled() ? "" : undefined',
154
+ '[attr.data-readonly]': 'readonly() ? "" : undefined',
155
+ '[attr.data-required]': 'required() ? "" : undefined',
156
+ '[attr.disabled]': 'isDisabled() ? "" : undefined',
111
157
  '(click)': 'toggle()',
112
158
  '(keydown.enter)': '$event.preventDefault()'
113
159
  }
114
160
  }]
115
- }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], defaultChecked: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultChecked", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], onCheckedChange: [{ type: i0.Output, args: ["onCheckedChange"] }] } });
116
-
117
- /**
118
- * @group Components
119
- */
120
- class RdxSwitchInputDirective {
121
- constructor() {
122
- this.rootContext = injectSwitchRootContext();
123
- }
124
- /** @ignore */
125
- onBlur() {
126
- this.rootContext?.markAsTouched();
127
- }
128
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
129
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxSwitchInputDirective, isStandalone: true, selector: "input[rdxSwitchInput]", host: { attributes: { "type": "checkbox", "tabindex": "-1" }, listeners: { "blur": "onBlur()" }, properties: { "attr.defaultChecked": "rootContext.checked()", "attr.aria-checked": "rootContext.checked()", "attr.aria-hidden": "true", "attr.aria-label": "rootContext.ariaLabel()", "attr.aria-labelledby": "rootContext.ariaLabelledBy()", "attr.aria-required": "rootContext.required()", "attr.data-state": "rootContext.checked() ? \"checked\" : \"unchecked\"", "attr.data-disabled": "rootContext.disabled() ? \"true\" : null", "attr.disabled": "rootContext.disabled() ? rootContext.disabled() : undefined", "attr.value": "rootContext.checked() ? \"on\" : \"off\"" }, styleAttribute: "transform: translateX(-100%); position: absolute; overflow: hidden; pointerEvents: none; opacity: 0; margin: 0;" }, exportAs: ["rdxSwitchInput"], ngImport: i0 }); }
130
- }
131
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchInputDirective, decorators: [{
132
- type: Directive,
133
- args: [{
134
- selector: 'input[rdxSwitchInput]',
135
- exportAs: 'rdxSwitchInput',
136
- host: {
137
- type: 'checkbox',
138
- tabindex: '-1',
139
- '[attr.defaultChecked]': 'rootContext.checked()',
140
- '[attr.aria-checked]': 'rootContext.checked()',
141
- '[attr.aria-hidden]': 'true',
142
- '[attr.aria-label]': 'rootContext.ariaLabel()',
143
- '[attr.aria-labelledby]': 'rootContext.ariaLabelledBy()',
144
- '[attr.aria-required]': 'rootContext.required()',
145
- '[attr.data-state]': 'rootContext.checked() ? "checked" : "unchecked"',
146
- '[attr.data-disabled]': 'rootContext.disabled() ? "true" : null',
147
- '[attr.disabled]': 'rootContext.disabled() ? rootContext.disabled() : undefined',
148
- '[attr.value]': 'rootContext.checked() ? "on" : "off"',
149
- style: 'transform: translateX(-100%); position: absolute; overflow: hidden; pointerEvents: none; opacity: 0; margin: 0;',
150
- '(blur)': 'onBlur()'
151
- }
152
- }]
153
- }] });
161
+ }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], defaultChecked: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultChecked", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], submitValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], onCheckedChange: [{ type: i0.Output, args: ["onCheckedChange"] }] } });
154
162
 
155
163
  /**
156
- * @group Components
164
+ * The moving part of the switch that indicates whether it is on or off.
165
+ *
166
+ * @see https://base-ui.com/react/components/switch
157
167
  */
158
- class RdxSwitchThumbDirective {
168
+ class RdxSwitchThumb {
159
169
  constructor() {
160
- this.rootContext = injectSwitchRootContext();
170
+ this.rootContext = injectSwitchContext();
161
171
  }
162
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchThumbDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
163
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxSwitchThumbDirective, isStandalone: true, selector: "span[rdxSwitchThumb]", host: { properties: { "attr.data-disabled": "rootContext?.disabled() ? \"\" : undefined", "attr.data-state": "rootContext?.checked() ? \"checked\" : \"unchecked\"" } }, exportAs: ["rdxSwitchThumb"], ngImport: i0 }); }
172
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
173
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxSwitchThumb, isStandalone: true, selector: "span[rdxSwitchThumb]", host: { properties: { "attr.data-checked": "rootContext.checked() ? \"\" : undefined", "attr.data-unchecked": "rootContext.checked() ? undefined : \"\"", "attr.data-disabled": "rootContext.disabled() ? \"\" : undefined", "attr.data-readonly": "rootContext.readonly() ? \"\" : undefined" } }, exportAs: ["rdxSwitchThumb"], ngImport: i0 }); }
164
174
  }
165
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchThumbDirective, decorators: [{
175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchThumb, decorators: [{
166
176
  type: Directive,
167
177
  args: [{
168
178
  selector: 'span[rdxSwitchThumb]',
169
179
  exportAs: 'rdxSwitchThumb',
170
180
  host: {
171
- '[attr.data-disabled]': 'rootContext?.disabled() ? "" : undefined',
172
- '[attr.data-state]': 'rootContext?.checked() ? "checked" : "unchecked"'
181
+ '[attr.data-checked]': 'rootContext.checked() ? "" : undefined',
182
+ '[attr.data-unchecked]': 'rootContext.checked() ? undefined : ""',
183
+ '[attr.data-disabled]': 'rootContext.disabled() ? "" : undefined',
184
+ '[attr.data-readonly]': 'rootContext.readonly() ? "" : undefined'
173
185
  }
174
186
  }]
175
187
  }] });
176
188
 
177
- const switchImports = [RdxSwitchRootDirective, RdxSwitchInputDirective, RdxSwitchThumbDirective];
189
+ const switchImports = [RdxSwitchRoot, RdxSwitchInput, RdxSwitchThumb];
178
190
  class RdxSwitchModule {
179
191
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
180
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchModule, imports: [RdxSwitchRootDirective, RdxSwitchInputDirective, RdxSwitchThumbDirective], exports: [RdxSwitchRootDirective, RdxSwitchInputDirective, RdxSwitchThumbDirective] }); }
192
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchModule, imports: [RdxSwitchRoot, RdxSwitchInput, RdxSwitchThumb], exports: [RdxSwitchRoot, RdxSwitchInput, RdxSwitchThumb] }); }
181
193
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchModule }); }
182
194
  }
183
195
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchModule, decorators: [{
@@ -192,5 +204,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
192
204
  * Generated bundle index. Do not edit.
193
205
  */
194
206
 
195
- export { RdxSwitchInputDirective, RdxSwitchModule, RdxSwitchRootDirective, RdxSwitchThumbDirective, injectSwitchRootContext, provideSwitchRootContext };
207
+ export { RdxSwitchInput, RdxSwitchModule, RdxSwitchRoot, RdxSwitchThumb, injectSwitchContext, provideSwitchContext, switchImports };
196
208
  //# sourceMappingURL=radix-ng-primitives-switch.mjs.map
@@ -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 { _IdGenerator } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n Directive,\n inject,\n input,\n InputSignal,\n InputSignalWithTransform,\n model,\n Signal\n} from '@angular/core';\nimport { outputFromObservable, outputToObservable } from '@angular/core/rxjs-interop';\nimport { createContext, injectControlValueAccessor, RdxControlValueAccessor } from '@radix-ng/primitives/core';\n\nexport interface SwitchContext {\n required: InputSignalWithTransform<boolean, BooleanInput>;\n checked: Signal<boolean | undefined>;\n disabled: Signal<boolean | undefined>;\n ariaLabel: InputSignal<string | undefined>;\n ariaLabelledBy: InputSignal<string | undefined>;\n markAsTouched: () => void;\n toggle: () => void;\n}\n\nexport const [injectSwitchRootContext, provideSwitchRootContext] = createContext<SwitchContext>('Switch');\n\nconst rootContext = () => {\n const instance = inject(RdxSwitchRootDirective);\n const cva = injectControlValueAccessor<boolean | undefined>();\n\n return {\n required: instance.required,\n value: instance.checked,\n checked: cva.value,\n disabled: cva.disabled,\n ariaLabel: instance.ariaLabel,\n ariaLabelledBy: instance.ariaLabelledBy,\n markAsTouched: () => cva.markAsTouched(),\n toggle: () => instance.toggle()\n };\n};\n\n/**\n * @group Components\n */\n@Directive({\n selector: 'button[rdxSwitchRoot]',\n exportAs: 'rdxSwitchRoot',\n providers: [provideSwitchRootContext(rootContext)],\n hostDirectives: [\n {\n directive: RdxControlValueAccessor,\n inputs: ['value: checked', 'disabled']\n }\n ],\n host: {\n role: 'switch',\n type: 'button',\n '[id]': 'id()',\n '[attr.aria-checked]': 'cva.value()',\n '[attr.aria-required]': 'required()',\n '[attr.data-state]': 'cva.value() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'cva.disabled() ? \"true\" : undefined',\n '[attr.disabled]': 'cva.disabled() ? cva.disabled() : undefined',\n '[attr.value]': 'cva.value()',\n\n '(click)': 'toggle()',\n '(keydown.enter)': '$event.preventDefault()'\n }\n})\nexport class RdxSwitchRootDirective {\n protected readonly cva = injectControlValueAccessor<boolean | undefined>();\n\n readonly id = input<string>(inject(_IdGenerator).getId('rdx-switch-'));\n\n /**\n * When true, indicates that the user must check the switch before the owning form can be submitted.\n *\n * @default false\n * @group Props\n */\n readonly required = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute\n });\n\n /**\n * Establishes relationships between the component and label(s) where its value should be one or more element IDs.\n * @default null\n * @group Props\n */\n readonly ariaLabelledBy = input<string | undefined>(undefined, {\n alias: 'aria-labelledby'\n });\n\n /**\n * Used to define a string that autocomplete attribute the current element.\n * @default null\n * @group Props\n */\n readonly ariaLabel = input<string | undefined>(undefined, {\n alias: 'aria-label'\n });\n\n /**\n * The state of the switch when it is initially rendered. Use when you do not need to control its state.\n * @default false\n * @group Props\n */\n readonly defaultChecked = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * The controlled state of the switch. Must be used in conjunction with onCheckedChange.\n * @defaultValue false\n * @group Props\n */\n readonly checked = model<boolean>(this.defaultChecked());\n\n /**\n * When `true`, prevents the user from interacting with the switch.\n * @default false\n * @group Props\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute\n });\n\n /**\n * Event handler called when the state of the switch changes.\n *\n * @param {boolean} value - Boolean value indicates that the option is changed.\n * @group Emits\n */\n readonly onCheckedChange = outputFromObservable(outputToObservable(this.cva.valueChange));\n\n /**\n * Toggles the checked state of the switch.\n * If the switch is disabled, the function returns early.\n * @ignore\n */\n toggle(): void {\n if (!this.disabled()) {\n this.checked.set(!this.checked());\n this.cva.setValue(this.checked());\n }\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectSwitchRootContext } from './switch-root.directive';\n\n/**\n * @group Components\n */\n@Directive({\n selector: 'input[rdxSwitchInput]',\n exportAs: 'rdxSwitchInput',\n host: {\n type: 'checkbox',\n tabindex: '-1',\n '[attr.defaultChecked]': 'rootContext.checked()',\n '[attr.aria-checked]': 'rootContext.checked()',\n '[attr.aria-hidden]': 'true',\n '[attr.aria-label]': 'rootContext.ariaLabel()',\n '[attr.aria-labelledby]': 'rootContext.ariaLabelledBy()',\n '[attr.aria-required]': 'rootContext.required()',\n '[attr.data-state]': 'rootContext.checked() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'rootContext.disabled() ? \"true\" : null',\n '[attr.disabled]': 'rootContext.disabled() ? rootContext.disabled() : undefined',\n '[attr.value]': 'rootContext.checked() ? \"on\" : \"off\"',\n style: 'transform: translateX(-100%); position: absolute; overflow: hidden; pointerEvents: none; opacity: 0; margin: 0;',\n\n '(blur)': 'onBlur()'\n }\n})\nexport class RdxSwitchInputDirective {\n protected readonly rootContext = injectSwitchRootContext()!;\n\n /** @ignore */\n protected onBlur() {\n this.rootContext?.markAsTouched();\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectSwitchRootContext } from './switch-root.directive';\n\n/**\n * @group Components\n */\n@Directive({\n selector: 'span[rdxSwitchThumb]',\n exportAs: 'rdxSwitchThumb',\n host: {\n '[attr.data-disabled]': 'rootContext?.disabled() ? \"\" : undefined',\n '[attr.data-state]': 'rootContext?.checked() ? \"checked\" : \"unchecked\"'\n }\n})\nexport class RdxSwitchThumbDirective {\n protected readonly rootContext = injectSwitchRootContext();\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\nconst switchImports = [RdxSwitchRootDirective, RdxSwitchInputDirective, RdxSwitchThumbDirective];\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":";;;;;;;AAyBO,MAAM,CAAC,uBAAuB,EAAE,wBAAwB,CAAC,GAAG,aAAa,CAAgB,QAAQ;AAExG,MAAM,WAAW,GAAG,MAAK;AACrB,IA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A,EAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBARnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,IAAI,EAAE;AACF,wBAAA,sBAAsB,EAAE,0CAA0C;AAClE,wBAAA,mBAAmB,EAAE;AACxB;AACJ,iBAAA;;;ACJD,MAAM,aAAa,GAAG,CAAC,sBAAsB,EAAE,uBAAuB,EAAE,uBAAuB,CAAC;MAMnF,eAAe,CAAA;8GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAf,eAAe,EAAA,OAAA,EAAA,CANL,sBAAsB,EAAE,uBAAuB,EAAE,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAAxE,sBAAsB,EAAE,uBAAuB,EAAE,uBAAuB,CAAA,EAAA,CAAA,CAAA;+GAMlF,eAAe,EAAA,CAAA,CAAA;;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;AAC7B,iBAAA;;;ACdD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-switch.mjs","sources":["../../../packages/primitives/switch/src/switch-context.ts","../../../packages/primitives/switch/src/switch-input.ts","../../../packages/primitives/switch/src/switch-root.ts","../../../packages/primitives/switch/src/switch-thumb.ts","../../../packages/primitives/switch/index.ts","../../../packages/primitives/switch/radix-ng-primitives-switch.ts"],"sourcesContent":["import { Signal } from '@angular/core';\nimport { createContext } from '@radix-ng/primitives/core';\n\nexport interface RdxSwitchContext {\n /** Whether the switch is on. */\n readonly checked: Signal<boolean>;\n\n /** Whether the switch is disabled. */\n readonly disabled: Signal<boolean>;\n\n /** Whether the switch is read-only (focusable, but cannot be toggled). */\n readonly readonly: Signal<boolean>;\n\n /** Whether the switch must be on to submit the owning form. */\n readonly required: Signal<boolean>;\n\n /** Name of the hidden form input. */\n readonly name: Signal<string | undefined>;\n\n /** Value submitted with the form when the switch is on. */\n readonly value: Signal<string>;\n\n readonly ariaLabel: Signal<string | undefined>;\n readonly ariaLabelledBy: Signal<string | undefined>;\n\n markAsTouched(): void;\n}\n\nexport const [injectSwitchContext, provideSwitchContext] = createContext<RdxSwitchContext>('RdxSwitchContext');\n","import { Directive } from '@angular/core';\nimport { injectSwitchContext } from './switch-context';\n\n/**\n * The hidden native checkbox that mirrors the switch state for form submission and screen readers.\n *\n * @see https://base-ui.com/react/components/switch\n */\n@Directive({\n selector: 'input[rdxSwitchInput]',\n exportAs: 'rdxSwitchInput',\n host: {\n type: 'checkbox',\n tabindex: '-1',\n 'aria-hidden': 'true',\n '[attr.name]': 'rootContext.name()',\n '[attr.value]': 'rootContext.value()',\n '[checked]': 'rootContext.checked()',\n '[disabled]': 'rootContext.disabled()',\n '[attr.required]': 'rootContext.required() ? \"\" : undefined',\n '[attr.aria-label]': 'rootContext.ariaLabel()',\n '[attr.aria-labelledby]': 'rootContext.ariaLabelledBy()',\n '[attr.data-checked]': 'rootContext.checked() ? \"\" : undefined',\n '[attr.data-unchecked]': 'rootContext.checked() ? undefined : \"\"',\n style: 'transform: translateX(-100%); position: absolute; overflow: hidden; pointer-events: none; opacity: 0; margin: 0;',\n '(blur)': 'rootContext.markAsTouched()'\n }\n})\nexport class RdxSwitchInput {\n protected readonly rootContext = injectSwitchContext();\n}\n","import { booleanAttribute, computed, Directive, inject, input, model, output } from '@angular/core';\nimport {\n BooleanInput,\n injectControlValueAccessor,\n injectId,\n RdxControlValueAccessor,\n RdxFormCheckboxControl\n} from '@radix-ng/primitives/core';\nimport { provideSwitchContext, RdxSwitchContext } from './switch-context';\n\nconst context = (): RdxSwitchContext => {\n const root = inject(RdxSwitchRoot);\n const cva = injectControlValueAccessor<boolean | undefined>();\n\n return {\n checked: root.checkedState,\n disabled: computed(() => !!cva.disabled()),\n readonly: root.readonly,\n required: root.required,\n name: root.name,\n value: root.submitValue,\n ariaLabel: root.ariaLabel,\n ariaLabelledBy: root.ariaLabelledBy,\n markAsTouched: () => cva.markAsTouched()\n };\n};\n\n/**\n * A control that toggles between on and off.\n *\n * @see https://base-ui.com/react/components/switch\n */\n@Directive({\n selector: 'button[rdxSwitchRoot]',\n exportAs: 'rdxSwitchRoot',\n providers: [provideSwitchContext(context)],\n hostDirectives: [\n {\n directive: RdxControlValueAccessor,\n inputs: ['value: checked', 'disabled']\n }\n ],\n host: {\n role: 'switch',\n type: 'button',\n '[id]': 'id()',\n '[attr.aria-checked]': 'checkedState()',\n '[attr.aria-required]': 'required() ? \"true\" : undefined',\n '[attr.aria-readonly]': 'readonly() ? \"true\" : undefined',\n '[attr.data-checked]': 'checkedState() ? \"\" : undefined',\n '[attr.data-unchecked]': 'checkedState() ? undefined : \"\"',\n '[attr.data-disabled]': 'isDisabled() ? \"\" : undefined',\n '[attr.data-readonly]': 'readonly() ? \"\" : undefined',\n '[attr.data-required]': 'required() ? \"\" : undefined',\n '[attr.disabled]': 'isDisabled() ? \"\" : undefined',\n '(click)': 'toggle()',\n '(keydown.enter)': '$event.preventDefault()'\n }\n})\nexport class RdxSwitchRoot implements RdxFormCheckboxControl {\n /** @ignore */\n protected readonly cva = injectControlValueAccessor<boolean | undefined>();\n\n readonly id = input<string>(injectId('rdx-switch-'));\n\n /**\n * The state of the switch when it is initially rendered. Use when you do not need to control its state.\n *\n * @default false\n */\n readonly defaultChecked = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * The controlled checked state. Use with `(onCheckedChange)` or two-way `[(checked)]`.\n */\n readonly checked = model<boolean>(this.defaultChecked());\n\n /**\n * When `true`, prevents the user from interacting with the switch.\n *\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * When `true`, the switch is focusable but cannot be toggled.\n *\n * @default false\n */\n readonly readonly = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * When `true`, the switch must be on before the owning form can be submitted.\n *\n * @default false\n */\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** Name of the hidden form input rendered by `[rdxSwitchInput]`. */\n readonly name = input<string>();\n\n /**\n * Value submitted with the form when the switch is on.\n *\n * Bound publicly as `[value]`; the TS member is named `submitValue` so the\n * directive can satisfy `RdxFormCheckboxControl`, whose contract reserves a\n * `value` member for `RdxFormValueControl` and forbids it on checkbox-style\n * controls.\n *\n * @default 'on'\n */\n readonly submitValue = input<string>('on', { alias: 'value' });\n\n readonly ariaLabelledBy = input<string | undefined>(undefined, { alias: 'aria-labelledby' });\n readonly ariaLabel = input<string | undefined>(undefined, { alias: 'aria-label' });\n\n /** Event handler called when the checked state of the switch changes. */\n readonly onCheckedChange = output<boolean>();\n\n /** @ignore */\n readonly checkedState = computed(() => !!this.cva.value());\n /** @ignore */\n protected readonly isDisabled = computed(() => !!this.cva.disabled());\n\n /** @ignore Toggles the checked state unless disabled or read-only. */\n toggle(): void {\n if (this.isDisabled() || this.readonly()) {\n return;\n }\n\n const next = !this.cva.value();\n this.checked.set(next);\n this.cva.setValue(next);\n this.onCheckedChange.emit(next);\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectSwitchContext } from './switch-context';\n\n/**\n * The moving part of the switch that indicates whether it is on or off.\n *\n * @see https://base-ui.com/react/components/switch\n */\n@Directive({\n selector: 'span[rdxSwitchThumb]',\n exportAs: 'rdxSwitchThumb',\n host: {\n '[attr.data-checked]': 'rootContext.checked() ? \"\" : undefined',\n '[attr.data-unchecked]': 'rootContext.checked() ? undefined : \"\"',\n '[attr.data-disabled]': 'rootContext.disabled() ? \"\" : undefined',\n '[attr.data-readonly]': 'rootContext.readonly() ? \"\" : undefined'\n }\n})\nexport class RdxSwitchThumb {\n protected readonly rootContext = injectSwitchContext();\n}\n","import { NgModule } from '@angular/core';\nimport { RdxSwitchInput } from './src/switch-input';\nimport { RdxSwitchRoot } from './src/switch-root';\nimport { RdxSwitchThumb } from './src/switch-thumb';\n\nexport * from './src/switch-context';\nexport * from './src/switch-input';\nexport * from './src/switch-root';\nexport * from './src/switch-thumb';\n\nexport const switchImports = [RdxSwitchRoot, RdxSwitchInput, RdxSwitchThumb];\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":";;;;;AA4BO,MAAM,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,GAAG,aAAa,CAAmB,kBAAkB;;ACzB7G;;;;AAIG;MAqBU,cAAc,CAAA;AApB3B,IAAA,WAAA,GAAA;QAqBuB,IAAA,CAAA,WAAW,GAAG,mBAAmB,EAAE;AACzD,IAAA;8GAFY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,UAAA,EAAA,UAAA,EAAA,IAAA,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,MAAA,EAAA,6BAAA,EAAA,EAAA,UAAA,EAAA,EAAA,WAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,qBAAA,EAAA,SAAA,EAAA,uBAAA,EAAA,UAAA,EAAA,wBAAA,EAAA,eAAA,EAAA,2CAAA,EAAA,iBAAA,EAAA,yBAAA,EAAA,sBAAA,EAAA,8BAAA,EAAA,mBAAA,EAAA,0CAAA,EAAA,qBA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