@radix-ng/primitives 1.0.0-beta.3 → 1.0.0-beta.4

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 (97) hide show
  1. package/README.md +1 -1
  2. package/fesm2022/radix-ng-primitives-accordion.mjs +5 -3
  3. package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
  4. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +3 -2
  5. package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -1
  6. package/fesm2022/radix-ng-primitives-autocomplete.mjs +617 -659
  7. package/fesm2022/radix-ng-primitives-autocomplete.mjs.map +1 -1
  8. package/fesm2022/radix-ng-primitives-calendar.mjs +5 -3
  9. package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
  10. package/fesm2022/radix-ng-primitives-combobox.mjs +1305 -572
  11. package/fesm2022/radix-ng-primitives-combobox.mjs.map +1 -1
  12. package/fesm2022/radix-ng-primitives-config.mjs +13 -4
  13. package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
  14. package/fesm2022/radix-ng-primitives-context-menu.mjs +51 -10
  15. package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
  16. package/fesm2022/radix-ng-primitives-core.mjs +1345 -64
  17. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  18. package/fesm2022/radix-ng-primitives-date-field.mjs +5 -3
  19. package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
  20. package/fesm2022/radix-ng-primitives-dialog.mjs +240 -112
  21. package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
  22. package/fesm2022/radix-ng-primitives-direction-provider.mjs +70 -0
  23. package/fesm2022/radix-ng-primitives-direction-provider.mjs.map +1 -0
  24. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +519 -184
  25. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
  26. package/fesm2022/radix-ng-primitives-drawer.mjs +3 -3
  27. package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -1
  28. package/fesm2022/radix-ng-primitives-field.mjs +3 -2
  29. package/fesm2022/radix-ng-primitives-field.mjs.map +1 -1
  30. package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs +517 -0
  31. package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs.map +1 -0
  32. package/fesm2022/radix-ng-primitives-focus-scope.mjs +296 -70
  33. package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
  34. package/fesm2022/radix-ng-primitives-menu.mjs +861 -286
  35. package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
  36. package/fesm2022/radix-ng-primitives-menubar.mjs +32 -4
  37. package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
  38. package/fesm2022/radix-ng-primitives-navigation-menu.mjs +144 -159
  39. package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
  40. package/fesm2022/radix-ng-primitives-popover.mjs +220 -205
  41. package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
  42. package/fesm2022/radix-ng-primitives-popper.mjs +94 -51
  43. package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
  44. package/fesm2022/radix-ng-primitives-presence.mjs +1 -1
  45. package/fesm2022/radix-ng-primitives-presence.mjs.map +1 -1
  46. package/fesm2022/radix-ng-primitives-preview-card.mjs +141 -173
  47. package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -1
  48. package/fesm2022/radix-ng-primitives-roving-focus.mjs +4 -2
  49. package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
  50. package/fesm2022/radix-ng-primitives-scroll-area.mjs +5 -4
  51. package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -1
  52. package/fesm2022/radix-ng-primitives-select.mjs +211 -156
  53. package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
  54. package/fesm2022/radix-ng-primitives-slider.mjs +5 -3
  55. package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
  56. package/fesm2022/radix-ng-primitives-stepper.mjs +5 -3
  57. package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
  58. package/fesm2022/radix-ng-primitives-time-field.mjs +5 -3
  59. package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
  60. package/fesm2022/radix-ng-primitives-toast.mjs +15 -36
  61. package/fesm2022/radix-ng-primitives-toast.mjs.map +1 -1
  62. package/fesm2022/radix-ng-primitives-toggle-group.mjs +5 -3
  63. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  64. package/fesm2022/radix-ng-primitives-toolbar.mjs +5 -3
  65. package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
  66. package/fesm2022/radix-ng-primitives-tooltip.mjs +73 -110
  67. package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
  68. package/package.json +10 -1
  69. package/types/radix-ng-primitives-accordion.d.ts +4 -3
  70. package/types/radix-ng-primitives-autocomplete.d.ts +217 -152
  71. package/types/radix-ng-primitives-calendar.d.ts +5 -3
  72. package/types/radix-ng-primitives-combobox.d.ts +672 -283
  73. package/types/radix-ng-primitives-config.d.ts +1 -1
  74. package/types/radix-ng-primitives-context-menu.d.ts +15 -5
  75. package/types/radix-ng-primitives-core.d.ts +762 -14
  76. package/types/radix-ng-primitives-date-field.d.ts +3 -2
  77. package/types/radix-ng-primitives-dialog.d.ts +77 -32
  78. package/types/radix-ng-primitives-direction-provider.d.ts +41 -0
  79. package/types/radix-ng-primitives-dismissable-layer.d.ts +147 -99
  80. package/types/radix-ng-primitives-field.d.ts +1 -0
  81. package/types/radix-ng-primitives-floating-focus-manager.d.ts +175 -0
  82. package/types/radix-ng-primitives-focus-scope.d.ts +132 -1
  83. package/types/radix-ng-primitives-menu.d.ts +186 -103
  84. package/types/radix-ng-primitives-navigation-menu.d.ts +37 -75
  85. package/types/radix-ng-primitives-popover.d.ts +59 -92
  86. package/types/radix-ng-primitives-popper.d.ts +39 -9
  87. package/types/radix-ng-primitives-preview-card.d.ts +39 -72
  88. package/types/radix-ng-primitives-roving-focus.d.ts +7 -6
  89. package/types/radix-ng-primitives-scroll-area.d.ts +2 -2
  90. package/types/radix-ng-primitives-select.d.ts +145 -108
  91. package/types/radix-ng-primitives-slider.d.ts +5 -4
  92. package/types/radix-ng-primitives-stepper.d.ts +4 -3
  93. package/types/radix-ng-primitives-time-field.d.ts +3 -2
  94. package/types/radix-ng-primitives-toast.d.ts +7 -7
  95. package/types/radix-ng-primitives-toggle-group.d.ts +5 -4
  96. package/types/radix-ng-primitives-toolbar.d.ts +3 -2
  97. package/types/radix-ng-primitives-tooltip.d.ts +24 -67
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-toolbar.mjs","sources":["../../../packages/primitives/toolbar/src/toolbar-context.ts","../../../packages/primitives/toolbar/src/toolbar-button.ts","../../../packages/primitives/toolbar/src/toolbar-group.ts","../../../packages/primitives/toolbar/src/toolbar-input.ts","../../../packages/primitives/toolbar/src/toolbar-link.ts","../../../packages/primitives/toolbar/src/toolbar-root.ts","../../../packages/primitives/toolbar/src/toolbar-separator.ts","../../../packages/primitives/toolbar/index.ts","../../../packages/primitives/toolbar/radix-ng-primitives-toolbar.ts"],"sourcesContent":["import { Signal } from '@angular/core';\nimport { createContext, DataOrientation } from '@radix-ng/primitives/core';\n\nexport interface RdxToolbarRootContext {\n /** The orientation of the toolbar. */\n readonly orientation: Signal<DataOrientation>;\n\n /** Whether the whole toolbar is disabled. */\n readonly disabled: Signal<boolean>;\n}\n\nexport const [injectToolbarRootContext, provideToolbarRootContext] = createContext<RdxToolbarRootContext>(\n 'RdxToolbarRootContext',\n 'components/toolbar'\n);\n\nexport interface RdxToolbarGroupContext {\n /** Whether the group (and therefore its items) is disabled. */\n readonly disabled: Signal<boolean>;\n}\n\nexport const [injectToolbarGroupContext, provideToolbarGroupContext] = createContext<RdxToolbarGroupContext>(\n 'RdxToolbarGroupContext',\n 'components/toolbar'\n);\n","import { booleanAttribute, computed, Directive, effect, inject, input } from '@angular/core';\nimport { BooleanInput } from '@radix-ng/primitives/core';\nimport { RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';\nimport { injectToolbarGroupContext, injectToolbarRootContext } from './toolbar-context';\n\n/**\n * A button within a toolbar.\n *\n * @see https://base-ui.com/react/components/toolbar\n */\n@Directive({\n selector: '[rdxToolbarButton]',\n exportAs: 'rdxToolbarButton',\n hostDirectives: [RdxRovingFocusItemDirective],\n host: {\n '[attr.type]': 'nativeButton() ? \"button\" : undefined',\n '[attr.role]': 'nativeButton() ? undefined : \"button\"',\n '[attr.data-orientation]': 'rootContext.orientation()',\n '[attr.data-disabled]': 'isDisabled() ? \"\" : undefined',\n '[attr.data-focusable]': 'focusableWhenDisabled() ? \"\" : undefined',\n '[attr.aria-disabled]': 'isDisabled() ? \"true\" : undefined',\n '[attr.disabled]': 'isDisabled() && !focusableWhenDisabled() ? \"\" : undefined',\n '(click)': 'onClick($event)'\n }\n})\nexport class RdxToolbarButton {\n protected readonly rootContext = injectToolbarRootContext();\n private readonly groupContext = injectToolbarGroupContext(true);\n private readonly rovingItem = inject(RdxRovingFocusItemDirective);\n\n /**\n * Whether the button is disabled.\n *\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the button stays focusable while disabled (so it remains discoverable for keyboard\n * and screen-reader users).\n *\n * @default true\n */\n readonly focusableWhenDisabled = input<boolean, BooleanInput>(true, { transform: booleanAttribute });\n\n /**\n * Whether the host is a native `<button>`. When `false`, adds `role=\"button\"`.\n *\n * @default true\n */\n readonly nativeButton = input<boolean, BooleanInput>(true, { transform: booleanAttribute });\n\n /** @ignore Effective disabled state, combining the button, group and toolbar. */\n readonly isDisabled = computed(\n () => this.disabled() || (this.groupContext?.disabled() ?? false) || this.rootContext.disabled()\n );\n\n constructor() {\n // A disabled-but-focusable item stays in the roving sequence; otherwise it is removed.\n effect(() => this.rovingItem.setFocusable(!this.isDisabled() || this.focusableWhenDisabled()));\n }\n\n /** @ignore */\n protected onClick(event: Event): void {\n if (this.isDisabled()) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n}\n","import { booleanAttribute, computed, Directive, inject, input } from '@angular/core';\nimport { BooleanInput } from '@radix-ng/primitives/core';\nimport { injectToolbarRootContext, provideToolbarGroupContext, RdxToolbarGroupContext } from './toolbar-context';\n\nconst groupContext = (): RdxToolbarGroupContext => {\n const group = inject(RdxToolbarGroup);\n return { disabled: group.isDisabled };\n};\n\n/**\n * Groups several toolbar items together. Disabling the group disables all of its items.\n *\n * @see https://base-ui.com/react/components/toolbar\n */\n@Directive({\n selector: '[rdxToolbarGroup]',\n exportAs: 'rdxToolbarGroup',\n providers: [provideToolbarGroupContext(groupContext)],\n host: {\n role: 'group',\n '[attr.data-orientation]': 'rootContext.orientation()',\n '[attr.data-disabled]': 'isDisabled() ? \"\" : undefined'\n }\n})\nexport class RdxToolbarGroup {\n protected readonly rootContext = injectToolbarRootContext();\n\n /**\n * Whether the group is disabled.\n *\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** @ignore Effective disabled state, combining the group and the toolbar. */\n readonly isDisabled = computed(() => this.disabled() || this.rootContext.disabled());\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n PLATFORM_ID\n} from '@angular/core';\nimport { BooleanInput } from '@radix-ng/primitives/core';\nimport { RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';\nimport { injectToolbarGroupContext, injectToolbarRootContext } from './toolbar-context';\n\n/**\n * A native input within a toolbar. Participates in the toolbar's roving focus while keeping native\n * text-editing: the arrow keys move the caret within the text and only move focus to the\n * neighbouring toolbar item once the caret is at the corresponding edge (Base UI \"composite\" input).\n *\n * @see https://base-ui.com/react/components/toolbar\n */\n@Directive({\n selector: 'input[rdxToolbarInput]',\n exportAs: 'rdxToolbarInput',\n hostDirectives: [RdxRovingFocusItemDirective],\n host: {\n '[attr.data-orientation]': 'rootContext.orientation()',\n '[attr.data-disabled]': 'isDisabled() ? \"\" : undefined',\n '[attr.data-focusable]': 'focusableWhenDisabled() ? \"\" : undefined',\n '[attr.aria-disabled]': 'isDisabled() ? \"true\" : undefined',\n '[disabled]': 'isDisabled() && !focusableWhenDisabled()'\n }\n})\nexport class RdxToolbarInput {\n protected readonly rootContext = injectToolbarRootContext();\n private readonly groupContext = injectToolbarGroupContext(true);\n private readonly rovingItem = inject(RdxRovingFocusItemDirective);\n private readonly elementRef = inject<ElementRef<HTMLInputElement>>(ElementRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n /** The initial value of the uncontrolled input. */\n readonly defaultValue = input<string>();\n\n /**\n * Whether the input is disabled.\n *\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the input stays focusable while disabled.\n *\n * @default true\n */\n readonly focusableWhenDisabled = input<boolean, BooleanInput>(true, { transform: booleanAttribute });\n\n /** @ignore */\n readonly isDisabled = computed(\n () => this.disabled() || (this.groupContext?.disabled() ?? false) || this.rootContext.disabled()\n );\n\n private appliedDefault = false;\n\n constructor() {\n effect(() => this.rovingItem.setFocusable(!this.isDisabled() || this.focusableWhenDisabled()));\n\n effect(() => {\n const value = this.defaultValue();\n if (!this.appliedDefault && value !== undefined) {\n this.appliedDefault = true;\n this.elementRef.nativeElement.value = value;\n }\n });\n\n if (this.isBrowser) {\n // Registered in the constructor — i.e. before the roving item's host `(keydown)` listener\n // — so it runs first and can keep arrow keys for caret movement (via\n // `stopImmediatePropagation`) unless the caret is at the edge, where the event is allowed\n // to reach the roving group and move focus.\n const element = this.elementRef.nativeElement;\n const handler = (event: KeyboardEvent) => this.handleCaretKeydown(event);\n element.addEventListener('keydown', handler, { capture: true });\n inject(DestroyRef).onDestroy(() => element.removeEventListener('keydown', handler, { capture: true }));\n }\n }\n\n private handleCaretKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented || event.metaKey || event.ctrlKey || event.altKey) {\n return;\n }\n\n const horizontal = this.rootContext.orientation() === 'horizontal';\n const previousKey = horizontal ? 'ArrowLeft' : 'ArrowUp';\n const nextKey = horizontal ? 'ArrowRight' : 'ArrowDown';\n const key = event.key;\n\n if (key !== previousKey && key !== nextKey && key !== 'Home' && key !== 'End') {\n return;\n }\n\n // Home/End always move the caret within the text.\n if (key === 'Home' || key === 'End') {\n event.stopImmediatePropagation();\n return;\n }\n\n const element = this.elementRef.nativeElement;\n let start: number | null;\n let end: number | null;\n try {\n start = element.selectionStart;\n end = element.selectionEnd;\n } catch {\n // Inputs such as `type=\"number\"` don't expose a selection — let the toolbar navigate.\n return;\n }\n\n if (start === null || end === null) {\n return;\n }\n\n const length = element.value.length;\n const atStart = start === 0 && end === 0;\n const atEnd = start === length && end === length;\n\n // Keep the key for caret movement unless the caret is already at the edge we're moving toward.\n if ((key === previousKey && !atStart) || (key === nextKey && !atEnd)) {\n event.stopImmediatePropagation();\n }\n }\n}\n","import { Directive } from '@angular/core';\nimport { RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';\nimport { injectToolbarRootContext } from './toolbar-context';\n\n/**\n * A link within a toolbar.\n *\n * @see https://base-ui.com/react/components/toolbar\n */\n@Directive({\n selector: '[rdxToolbarLink]',\n exportAs: 'rdxToolbarLink',\n hostDirectives: [RdxRovingFocusItemDirective],\n host: {\n '[attr.data-orientation]': 'rootContext.orientation()',\n '(keydown)': 'onKeyDown($event)'\n }\n})\nexport class RdxToolbarLink {\n protected readonly rootContext = injectToolbarRootContext();\n\n /** @ignore Space activates a link, matching native button behavior in a toolbar. */\n protected onKeyDown(event: KeyboardEvent): void {\n if (event.key === ' ') {\n event.preventDefault();\n (event.currentTarget as HTMLElement)?.click();\n }\n }\n}\n","import { booleanAttribute, Directive, effect, inject, input } from '@angular/core';\nimport { BooleanInput, DataOrientation } from '@radix-ng/primitives/core';\nimport { Direction, RdxRovingFocusGroupDirective } from '@radix-ng/primitives/roving-focus';\nimport { provideToolbarRootContext, RdxToolbarRootContext } from './toolbar-context';\n\nconst rootContext = (): RdxToolbarRootContext => {\n const root = inject(RdxToolbarRoot);\n return {\n orientation: root.orientation,\n disabled: root.disabled\n };\n};\n\n/**\n * A container for grouping a set of controls, such as buttons, toggle groups or menus.\n * Owns roving keyboard focus over its items.\n *\n * @see https://base-ui.com/react/components/toolbar\n */\n@Directive({\n selector: '[rdxToolbarRoot]',\n exportAs: 'rdxToolbarRoot',\n hostDirectives: [RdxRovingFocusGroupDirective],\n providers: [provideToolbarRootContext(rootContext)],\n host: {\n role: 'toolbar',\n '[attr.aria-orientation]': 'orientation()',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined'\n }\n})\nexport class RdxToolbarRoot {\n /**\n * The orientation of the toolbar.\n *\n * @default 'horizontal'\n */\n readonly orientation = input<DataOrientation>('horizontal');\n\n /** Text direction for arrow-key navigation. */\n readonly dir = input<Direction>('ltr');\n\n /**\n * Whether keyboard navigation should loop from the last item back to the first.\n *\n * @default true\n */\n readonly loopFocus = input<boolean, BooleanInput>(true, { transform: booleanAttribute });\n\n /**\n * Whether the whole toolbar is disabled.\n *\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n private readonly rovingFocusGroup = inject(RdxRovingFocusGroupDirective, { self: true });\n\n constructor() {\n effect(() => {\n this.rovingFocusGroup.setOrientation(this.orientation());\n this.rovingFocusGroup.setDir(this.dir());\n this.rovingFocusGroup.setLoop(this.loopFocus());\n });\n }\n}\n","import { Directive } from '@angular/core';\nimport { RdxSeparatorRootDirective } from '@radix-ng/primitives/separator';\n\n/**\n * A separator between toolbar items or groups.\n *\n * @see https://base-ui.com/react/components/toolbar\n */\n@Directive({\n selector: '[rdxToolbarSeparator]',\n exportAs: 'rdxToolbarSeparator',\n hostDirectives: [{ directive: RdxSeparatorRootDirective, inputs: ['orientation'] }]\n})\nexport class RdxToolbarSeparator {}\n","import { NgModule } from '@angular/core';\nimport { RdxToolbarButton } from './src/toolbar-button';\nimport { RdxToolbarGroup } from './src/toolbar-group';\nimport { RdxToolbarInput } from './src/toolbar-input';\nimport { RdxToolbarLink } from './src/toolbar-link';\nimport { RdxToolbarRoot } from './src/toolbar-root';\nimport { RdxToolbarSeparator } from './src/toolbar-separator';\n\nexport * from './src/toolbar-button';\nexport * from './src/toolbar-context';\nexport * from './src/toolbar-group';\nexport * from './src/toolbar-input';\nexport * from './src/toolbar-link';\nexport * from './src/toolbar-root';\nexport * from './src/toolbar-separator';\n\nexport const toolbarImports = [\n RdxToolbarRoot,\n RdxToolbarButton,\n RdxToolbarLink,\n RdxToolbarInput,\n RdxToolbarGroup,\n RdxToolbarSeparator\n];\n\n@NgModule({\n imports: [...toolbarImports],\n exports: [...toolbarImports]\n})\nexport class RdxToolbarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;AAWO,MAAM,CAAC,wBAAwB,EAAE,yBAAyB,CAAC,GAAG,aAAa,CAC9E,uBAAuB,EACvB,oBAAoB;AAQjB,MAAM,CAAC,yBAAyB,EAAE,0BAA0B,CAAC,GAAG,aAAa,CAChF,wBAAwB,EACxB,oBAAoB;;AClBxB;;;;AAIG;MAgBU,gBAAgB,CAAA;AAgCzB,IAAA,WAAA,GAAA;QA/BmB,IAAA,CAAA,WAAW,GAAG,wBAAwB,EAAE;AAC1C,QAAA,IAAA,CAAA,YAAY,GAAG,yBAAyB,CAAC,IAAI,CAAC;AAC9C,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,2BAA2B,CAAC;AAEjE;;;;AAIG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAExF;;;;;AAKG;QACM,IAAA,CAAA,qBAAqB,GAAG,KAAK,CAAwB,IAAI,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C5B,oBAAA,OAAO,EAAE,CAAC,GAAG,cAAc;AAC9B,iBAAA;;;AC5BD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-toolbar.mjs","sources":["../../../packages/primitives/toolbar/src/toolbar-context.ts","../../../packages/primitives/toolbar/src/toolbar-button.ts","../../../packages/primitives/toolbar/src/toolbar-group.ts","../../../packages/primitives/toolbar/src/toolbar-input.ts","../../../packages/primitives/toolbar/src/toolbar-link.ts","../../../packages/primitives/toolbar/src/toolbar-root.ts","../../../packages/primitives/toolbar/src/toolbar-separator.ts","../../../packages/primitives/toolbar/index.ts","../../../packages/primitives/toolbar/radix-ng-primitives-toolbar.ts"],"sourcesContent":["import { Signal } from '@angular/core';\nimport { createContext, DataOrientation } from '@radix-ng/primitives/core';\n\nexport interface RdxToolbarRootContext {\n /** The orientation of the toolbar. */\n readonly orientation: Signal<DataOrientation>;\n\n /** Whether the whole toolbar is disabled. */\n readonly disabled: Signal<boolean>;\n}\n\nexport const [injectToolbarRootContext, provideToolbarRootContext] = createContext<RdxToolbarRootContext>(\n 'RdxToolbarRootContext',\n 'components/toolbar'\n);\n\nexport interface RdxToolbarGroupContext {\n /** Whether the group (and therefore its items) is disabled. */\n readonly disabled: Signal<boolean>;\n}\n\nexport const [injectToolbarGroupContext, provideToolbarGroupContext] = createContext<RdxToolbarGroupContext>(\n 'RdxToolbarGroupContext',\n 'components/toolbar'\n);\n","import { booleanAttribute, computed, Directive, effect, inject, input } from '@angular/core';\nimport { BooleanInput } from '@radix-ng/primitives/core';\nimport { RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';\nimport { injectToolbarGroupContext, injectToolbarRootContext } from './toolbar-context';\n\n/**\n * A button within a toolbar.\n *\n * @see https://base-ui.com/react/components/toolbar\n */\n@Directive({\n selector: '[rdxToolbarButton]',\n exportAs: 'rdxToolbarButton',\n hostDirectives: [RdxRovingFocusItemDirective],\n host: {\n '[attr.type]': 'nativeButton() ? \"button\" : undefined',\n '[attr.role]': 'nativeButton() ? undefined : \"button\"',\n '[attr.data-orientation]': 'rootContext.orientation()',\n '[attr.data-disabled]': 'isDisabled() ? \"\" : undefined',\n '[attr.data-focusable]': 'focusableWhenDisabled() ? \"\" : undefined',\n '[attr.aria-disabled]': 'isDisabled() ? \"true\" : undefined',\n '[attr.disabled]': 'isDisabled() && !focusableWhenDisabled() ? \"\" : undefined',\n '(click)': 'onClick($event)'\n }\n})\nexport class RdxToolbarButton {\n protected readonly rootContext = injectToolbarRootContext();\n private readonly groupContext = injectToolbarGroupContext(true);\n private readonly rovingItem = inject(RdxRovingFocusItemDirective);\n\n /**\n * Whether the button is disabled.\n *\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the button stays focusable while disabled (so it remains discoverable for keyboard\n * and screen-reader users).\n *\n * @default true\n */\n readonly focusableWhenDisabled = input<boolean, BooleanInput>(true, { transform: booleanAttribute });\n\n /**\n * Whether the host is a native `<button>`. When `false`, adds `role=\"button\"`.\n *\n * @default true\n */\n readonly nativeButton = input<boolean, BooleanInput>(true, { transform: booleanAttribute });\n\n /** @ignore Effective disabled state, combining the button, group and toolbar. */\n readonly isDisabled = computed(\n () => this.disabled() || (this.groupContext?.disabled() ?? false) || this.rootContext.disabled()\n );\n\n constructor() {\n // A disabled-but-focusable item stays in the roving sequence; otherwise it is removed.\n effect(() => this.rovingItem.setFocusable(!this.isDisabled() || this.focusableWhenDisabled()));\n }\n\n /** @ignore */\n protected onClick(event: Event): void {\n if (this.isDisabled()) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n}\n","import { booleanAttribute, computed, Directive, inject, input } from '@angular/core';\nimport { BooleanInput } from '@radix-ng/primitives/core';\nimport { injectToolbarRootContext, provideToolbarGroupContext, RdxToolbarGroupContext } from './toolbar-context';\n\nconst groupContext = (): RdxToolbarGroupContext => {\n const group = inject(RdxToolbarGroup);\n return { disabled: group.isDisabled };\n};\n\n/**\n * Groups several toolbar items together. Disabling the group disables all of its items.\n *\n * @see https://base-ui.com/react/components/toolbar\n */\n@Directive({\n selector: '[rdxToolbarGroup]',\n exportAs: 'rdxToolbarGroup',\n providers: [provideToolbarGroupContext(groupContext)],\n host: {\n role: 'group',\n '[attr.data-orientation]': 'rootContext.orientation()',\n '[attr.data-disabled]': 'isDisabled() ? \"\" : undefined'\n }\n})\nexport class RdxToolbarGroup {\n protected readonly rootContext = injectToolbarRootContext();\n\n /**\n * Whether the group is disabled.\n *\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** @ignore Effective disabled state, combining the group and the toolbar. */\n readonly isDisabled = computed(() => this.disabled() || this.rootContext.disabled());\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n PLATFORM_ID\n} from '@angular/core';\nimport { BooleanInput } from '@radix-ng/primitives/core';\nimport { RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';\nimport { injectToolbarGroupContext, injectToolbarRootContext } from './toolbar-context';\n\n/**\n * A native input within a toolbar. Participates in the toolbar's roving focus while keeping native\n * text-editing: the arrow keys move the caret within the text and only move focus to the\n * neighbouring toolbar item once the caret is at the corresponding edge (Base UI \"composite\" input).\n *\n * @see https://base-ui.com/react/components/toolbar\n */\n@Directive({\n selector: 'input[rdxToolbarInput]',\n exportAs: 'rdxToolbarInput',\n hostDirectives: [RdxRovingFocusItemDirective],\n host: {\n '[attr.data-orientation]': 'rootContext.orientation()',\n '[attr.data-disabled]': 'isDisabled() ? \"\" : undefined',\n '[attr.data-focusable]': 'focusableWhenDisabled() ? \"\" : undefined',\n '[attr.aria-disabled]': 'isDisabled() ? \"true\" : undefined',\n '[disabled]': 'isDisabled() && !focusableWhenDisabled()'\n }\n})\nexport class RdxToolbarInput {\n protected readonly rootContext = injectToolbarRootContext();\n private readonly groupContext = injectToolbarGroupContext(true);\n private readonly rovingItem = inject(RdxRovingFocusItemDirective);\n private readonly elementRef = inject<ElementRef<HTMLInputElement>>(ElementRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n /** The initial value of the uncontrolled input. */\n readonly defaultValue = input<string>();\n\n /**\n * Whether the input is disabled.\n *\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the input stays focusable while disabled.\n *\n * @default true\n */\n readonly focusableWhenDisabled = input<boolean, BooleanInput>(true, { transform: booleanAttribute });\n\n /** @ignore */\n readonly isDisabled = computed(\n () => this.disabled() || (this.groupContext?.disabled() ?? false) || this.rootContext.disabled()\n );\n\n private appliedDefault = false;\n\n constructor() {\n effect(() => this.rovingItem.setFocusable(!this.isDisabled() || this.focusableWhenDisabled()));\n\n effect(() => {\n const value = this.defaultValue();\n if (!this.appliedDefault && value !== undefined) {\n this.appliedDefault = true;\n this.elementRef.nativeElement.value = value;\n }\n });\n\n if (this.isBrowser) {\n // Registered in the constructor — i.e. before the roving item's host `(keydown)` listener\n // — so it runs first and can keep arrow keys for caret movement (via\n // `stopImmediatePropagation`) unless the caret is at the edge, where the event is allowed\n // to reach the roving group and move focus.\n const element = this.elementRef.nativeElement;\n const handler = (event: KeyboardEvent) => this.handleCaretKeydown(event);\n element.addEventListener('keydown', handler, { capture: true });\n inject(DestroyRef).onDestroy(() => element.removeEventListener('keydown', handler, { capture: true }));\n }\n }\n\n private handleCaretKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented || event.metaKey || event.ctrlKey || event.altKey) {\n return;\n }\n\n const horizontal = this.rootContext.orientation() === 'horizontal';\n const previousKey = horizontal ? 'ArrowLeft' : 'ArrowUp';\n const nextKey = horizontal ? 'ArrowRight' : 'ArrowDown';\n const key = event.key;\n\n if (key !== previousKey && key !== nextKey && key !== 'Home' && key !== 'End') {\n return;\n }\n\n // Home/End always move the caret within the text.\n if (key === 'Home' || key === 'End') {\n event.stopImmediatePropagation();\n return;\n }\n\n const element = this.elementRef.nativeElement;\n let start: number | null;\n let end: number | null;\n try {\n start = element.selectionStart;\n end = element.selectionEnd;\n } catch {\n // Inputs such as `type=\"number\"` don't expose a selection — let the toolbar navigate.\n return;\n }\n\n if (start === null || end === null) {\n return;\n }\n\n const length = element.value.length;\n const atStart = start === 0 && end === 0;\n const atEnd = start === length && end === length;\n\n // Keep the key for caret movement unless the caret is already at the edge we're moving toward.\n if ((key === previousKey && !atStart) || (key === nextKey && !atEnd)) {\n event.stopImmediatePropagation();\n }\n }\n}\n","import { Directive } from '@angular/core';\nimport { RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';\nimport { injectToolbarRootContext } from './toolbar-context';\n\n/**\n * A link within a toolbar.\n *\n * @see https://base-ui.com/react/components/toolbar\n */\n@Directive({\n selector: '[rdxToolbarLink]',\n exportAs: 'rdxToolbarLink',\n hostDirectives: [RdxRovingFocusItemDirective],\n host: {\n '[attr.data-orientation]': 'rootContext.orientation()',\n '(keydown)': 'onKeyDown($event)'\n }\n})\nexport class RdxToolbarLink {\n protected readonly rootContext = injectToolbarRootContext();\n\n /** @ignore Space activates a link, matching native button behavior in a toolbar. */\n protected onKeyDown(event: KeyboardEvent): void {\n if (event.key === ' ') {\n event.preventDefault();\n (event.currentTarget as HTMLElement)?.click();\n }\n }\n}\n","import { booleanAttribute, Directive, effect, inject, input } from '@angular/core';\nimport { BooleanInput, DataOrientation } from '@radix-ng/primitives/core';\nimport { injectDirection } from '@radix-ng/primitives/direction-provider';\nimport { Direction, RdxRovingFocusGroupDirective } from '@radix-ng/primitives/roving-focus';\nimport { provideToolbarRootContext, RdxToolbarRootContext } from './toolbar-context';\n\nconst rootContext = (): RdxToolbarRootContext => {\n const root = inject(RdxToolbarRoot);\n return {\n orientation: root.orientation,\n disabled: root.disabled\n };\n};\n\n/**\n * A container for grouping a set of controls, such as buttons, toggle groups or menus.\n * Owns roving keyboard focus over its items.\n *\n * @see https://base-ui.com/react/components/toolbar\n */\n@Directive({\n selector: '[rdxToolbarRoot]',\n exportAs: 'rdxToolbarRoot',\n hostDirectives: [RdxRovingFocusGroupDirective],\n providers: [provideToolbarRootContext(rootContext)],\n host: {\n role: 'toolbar',\n '[attr.aria-orientation]': 'orientation()',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined'\n }\n})\nexport class RdxToolbarRoot {\n /**\n * The orientation of the toolbar.\n *\n * @default 'horizontal'\n */\n readonly orientation = input<DataOrientation>('horizontal');\n\n /** Text direction for arrow-key navigation. */\n readonly dirInput = input<Direction | undefined>(undefined, { alias: 'dir' });\n readonly dir = injectDirection(this.dirInput);\n\n /**\n * Whether keyboard navigation should loop from the last item back to the first.\n *\n * @default true\n */\n readonly loopFocus = input<boolean, BooleanInput>(true, { transform: booleanAttribute });\n\n /**\n * Whether the whole toolbar is disabled.\n *\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n private readonly rovingFocusGroup = inject(RdxRovingFocusGroupDirective, { self: true });\n\n constructor() {\n effect(() => {\n this.rovingFocusGroup.setOrientation(this.orientation());\n this.rovingFocusGroup.setDir(this.dir());\n this.rovingFocusGroup.setLoop(this.loopFocus());\n });\n }\n}\n","import { Directive } from '@angular/core';\nimport { RdxSeparatorRootDirective } from '@radix-ng/primitives/separator';\n\n/**\n * A separator between toolbar items or groups.\n *\n * @see https://base-ui.com/react/components/toolbar\n */\n@Directive({\n selector: '[rdxToolbarSeparator]',\n exportAs: 'rdxToolbarSeparator',\n hostDirectives: [{ directive: RdxSeparatorRootDirective, inputs: ['orientation'] }]\n})\nexport class RdxToolbarSeparator {}\n","import { NgModule } from '@angular/core';\nimport { RdxToolbarButton } from './src/toolbar-button';\nimport { RdxToolbarGroup } from './src/toolbar-group';\nimport { RdxToolbarInput } from './src/toolbar-input';\nimport { RdxToolbarLink } from './src/toolbar-link';\nimport { RdxToolbarRoot } from './src/toolbar-root';\nimport { RdxToolbarSeparator } from './src/toolbar-separator';\n\nexport * from './src/toolbar-button';\nexport * from './src/toolbar-context';\nexport * from './src/toolbar-group';\nexport * from './src/toolbar-input';\nexport * from './src/toolbar-link';\nexport * from './src/toolbar-root';\nexport * from './src/toolbar-separator';\n\nexport const toolbarImports = [\n RdxToolbarRoot,\n RdxToolbarButton,\n RdxToolbarLink,\n RdxToolbarInput,\n RdxToolbarGroup,\n RdxToolbarSeparator\n];\n\n@NgModule({\n imports: [...toolbarImports],\n exports: [...toolbarImports]\n})\nexport class RdxToolbarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;AAWO,MAAM,CAAC,wBAAwB,EAAE,yBAAyB,CAAC,GAAG,aAAa,CAC9E,uBAAuB,EACvB,oBAAoB;AAQjB,MAAM,CAAC,yBAAyB,EAAE,0BAA0B,CAAC,GAAG,aAAa,CAChF,wBAAwB,EACxB,oBAAoB;;AClBxB;;;;AAIG;MAgBU,gBAAgB,CAAA;AAgCzB,IAAA,WAAA,GAAA;QA/BmB,IAAA,CAAA,WAAW,GAAG,wBAAwB,EAAE;AAC1C,QAAA,IAAA,CAAA,YAAY,GAAG,yBAAyB,CAAC,IAAI,CAAC;AAC9C,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,2BAA2B,CAAC;AAEjE;;;;AAIG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAExF;;;;;AAKG;QACM,IAAA,CAAA,qBAAqB,GAAG,KAAK,CAAwB,IAAI,6FAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEpG;;;;AAIG;QACM,IAAA,CAAA,YAAY,GAAG,KAAK,CAAwB,IAAI,oFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAGlF,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAC1B,MAAM,IAAI,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,YA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ttribute, DestroyRef, input, Directive, model, booleanAttribute, output, computed, effect, untracked, isDevMode, ElementRef, afterNextRender } from '@angular/core';
3
- import { createContext, injectId, watch, useGraceArea } from '@radix-ng/primitives/core';
2
+ import { InjectionToken, inject, signal, numberAttribute, DestroyRef, input, Directive, ElementRef, model, booleanAttribute, output, computed, effect, untracked, isDevMode, afterNextRender } from '@angular/core';
3
+ import * as i1$2 from '@radix-ng/primitives/core';
4
+ import { createContext, createFloatingRootContext, injectId, watch, provideFloatingTree, provideFloatingRootContext, rdxDevError, RDX_FLOATING_ROOT_CONTEXT, RDX_FLOATING_REGISTRATION, useGraceArea, RdxFloatingNodeRegistration } from '@radix-ng/primitives/core';
4
5
  import * as i1 from '@radix-ng/primitives/popper';
5
- import { RdxPopper, RdxPopperContentWrapper, RdxPopperArrow, RdxPopperContent, provideRdxPopperContentConfig, RdxPopperAnchor } from '@radix-ng/primitives/popper';
6
+ import { RdxPopper, RdxPopperContentWrapper, RdxPopperArrow, RdxPopperContent, provideRdxPopperContentWrapper, provideRdxPopperContentConfig, RdxPopperAnchor } from '@radix-ng/primitives/popper';
6
7
  import { RdxVisuallyHiddenDirective } from '@radix-ng/primitives/visually-hidden';
7
8
  import * as i1$1 from '@radix-ng/primitives/portal';
8
9
  import { RdxPortalPresence } from '@radix-ng/primitives/portal';
9
10
  import { provideRdxPresenceContext } from '@radix-ng/primitives/presence';
10
- import { outputFromObservable, outputToObservable } from '@angular/core/rxjs-interop';
11
- import * as i1$2 from '@radix-ng/primitives/dismissable-layer';
12
- import { RdxDismissableLayer } from '@radix-ng/primitives/dismissable-layer';
11
+ import { RdxDismiss } from '@radix-ng/primitives/dismissable-layer';
13
12
 
14
13
  const defaultTooltipConfig = {
15
14
  delay: 600,
@@ -133,6 +132,15 @@ class RdxTooltip {
133
132
  this.popper = inject(RdxPopper);
134
133
  this.destroyRef = inject(DestroyRef);
135
134
  this.hasAppliedDefaultOpen = false;
135
+ /**
136
+ * Per-popup floating root context (ADR 0015) — the shared store the positioner's dismissal
137
+ * capability reads (`open`, `triggers`, the reference/floating elements). The tree node is
138
+ * registered by the positioner; this context exists independently so dismissal can read `open()`.
139
+ */
140
+ this.floatingContext = createFloatingRootContext({
141
+ ownerDocument: inject(ElementRef).nativeElement.ownerDocument,
142
+ open: () => this.open()
143
+ });
136
144
  /**
137
145
  * Whether the tooltip is currently open.
138
146
  */
@@ -230,6 +238,9 @@ class RdxTooltip {
230
238
  });
231
239
  // Keep the popper anchored to the active trigger, or to the cursor while tracking.
232
240
  effect(() => this.popper.anchorOverride.set(this.virtualAnchor()));
241
+ // Sync the dismissal reference (the active trigger) so an outside-press on the trigger counts
242
+ // as "inside" and never dismisses (ADR 0015).
243
+ effect(() => this.floatingContext.setReferenceElement(this.trigger() ?? null));
233
244
  watch([this.open], ([isOpen]) => {
234
245
  this.onOpenChange.emit(isOpen);
235
246
  if (isOpen) {
@@ -286,11 +297,13 @@ class RdxTooltip {
286
297
  }
287
298
  registerTrigger(trigger) {
288
299
  this.triggers.update((triggers) => (triggers.includes(trigger) ? triggers : [...triggers, trigger]));
300
+ this.floatingContext.triggers.add(trigger);
289
301
  if (!this.trigger()) {
290
302
  this.trigger.set(trigger);
291
303
  }
292
304
  return () => {
293
305
  this.triggers.update((triggers) => triggers.filter((candidate) => candidate !== trigger));
306
+ this.floatingContext.triggers.delete(trigger);
294
307
  if (this.trigger() === trigger) {
295
308
  const nextTrigger = this.triggers()[0];
296
309
  this.trigger.set(nextTrigger);
@@ -328,14 +341,22 @@ class RdxTooltip {
328
341
  this.open.set(false);
329
342
  }
330
343
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTooltip, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
331
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxTooltip, isStandalone: true, selector: "[rdxTooltip]", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, defaultOpen: { classPropertyName: "defaultOpen", publicName: "defaultOpen", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, closeDelay: { classPropertyName: "closeDelay", publicName: "closeDelay", isSignal: true, isRequired: false, transformFunction: null }, disableHoverablePopup: { classPropertyName: "disableHoverablePopup", publicName: "disableHoverablePopup", isSignal: true, isRequired: false, transformFunction: null }, trackCursorAxis: { classPropertyName: "trackCursorAxis", publicName: "trackCursorAxis", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, handle: { classPropertyName: "handle", publicName: "handle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", onOpenChange: "onOpenChange" }, providers: [provideRdxTooltipContext(context)], exportAs: ["rdxTooltip"], hostDirectives: [{ directive: i1.RdxPopper }], ngImport: i0 }); }
344
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxTooltip, isStandalone: true, selector: "[rdxTooltip]", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, defaultOpen: { classPropertyName: "defaultOpen", publicName: "defaultOpen", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, closeDelay: { classPropertyName: "closeDelay", publicName: "closeDelay", isSignal: true, isRequired: false, transformFunction: null }, disableHoverablePopup: { classPropertyName: "disableHoverablePopup", publicName: "disableHoverablePopup", isSignal: true, isRequired: false, transformFunction: null }, trackCursorAxis: { classPropertyName: "trackCursorAxis", publicName: "trackCursorAxis", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, handle: { classPropertyName: "handle", publicName: "handle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", onOpenChange: "onOpenChange" }, providers: [
345
+ provideRdxTooltipContext(context),
346
+ provideFloatingTree(),
347
+ provideFloatingRootContext(() => inject(RdxTooltip).floatingContext)
348
+ ], exportAs: ["rdxTooltip"], hostDirectives: [{ directive: i1.RdxPopper }], ngImport: i0 }); }
332
349
  }
333
350
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTooltip, decorators: [{
334
351
  type: Directive,
335
352
  args: [{
336
353
  selector: '[rdxTooltip]',
337
354
  exportAs: 'rdxTooltip',
338
- providers: [provideRdxTooltipContext(context)],
355
+ providers: [
356
+ provideRdxTooltipContext(context),
357
+ provideFloatingTree(),
358
+ provideFloatingRootContext(() => inject(RdxTooltip).floatingContext)
359
+ ],
339
360
  hostDirectives: [RdxPopper]
340
361
  }]
341
362
  }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], defaultOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultOpen", required: false }] }], delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "delay", required: false }] }], closeDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeDelay", required: false }] }], disableHoverablePopup: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableHoverablePopup", required: false }] }], trackCursorAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackCursorAxis", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], handle: [{ type: i0.Input, args: [{ isSignal: true, alias: "handle", required: false }] }], onOpenChange: [{ type: i0.Output, args: ["onOpenChange"] }] } });
@@ -450,9 +471,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
450
471
  class RdxTooltipPortalMisuseGuard {
451
472
  constructor() {
452
473
  if (isDevMode()) {
453
- throw new Error('[rdxTooltipPortal] is now a structural directive. ' +
474
+ rdxDevError('tooltip/portal-on-element', '`rdxTooltipPortal` is now a structural directive. ' +
454
475
  'Use `*rdxTooltipPortal` on the positioner element or `<ng-template rdxTooltipPortal>`. ' +
455
- 'rdxTooltipPortalPresence has been removed. See https://radix-ng.com/components/tooltip.md');
476
+ 'rdxTooltipPortalPresence has been removed.', 'components/tooltip');
456
477
  }
457
478
  }
458
479
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTooltipPortalMisuseGuard, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
@@ -467,84 +488,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
467
488
 
468
489
  /**
469
490
  * Positions the tooltip popup against its trigger (or a custom anchor).
491
+ *
492
+ * A "thin" positioner (ADR 0012): it inherits the popper positioning surface (inputs, `placed`
493
+ * output, unified vars + placement attrs) from {@link RdxPopperContentWrapper} and adds tooltip's own
494
+ * concerns — Base UI-aligned defaults (`side: 'top'`) via the config provider, dismiss handling
495
+ * (ADR 0015 — inline {@link RdxDismiss} on the shared floating tree, dismissal-only with
496
+ * no focus manager), the cursor-follow pointer-through behavior (via the inherited `nonInteractive`
497
+ * signal), the open/closed state attributes, and the hover grace area.
470
498
  */
471
- class RdxTooltipPositioner {
499
+ class RdxTooltipPositioner extends RdxPopperContentWrapper {
472
500
  constructor() {
501
+ super();
473
502
  this.rootContext = injectRdxTooltipContext();
474
- this.wrapper = inject(RdxPopperContentWrapper);
475
503
  this.destroyRef = inject(DestroyRef);
476
- this.dismissableLayer = inject(RdxDismissableLayer);
477
- this.elementRef = inject(ElementRef);
478
- /**
479
- * An element to position the popup against. Defaults to the trigger.
480
- */
481
- this.anchor = input(...(ngDevMode ? [undefined, { debugName: "anchor" }] : /* istanbul ignore next */ []));
482
- /**
483
- * The preferred side of the anchor to render against when open.
484
- */
485
- this.side = input('top', ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
486
- /**
487
- * The distance in pixels from the anchor.
488
- */
489
- this.sideOffset = input(0, { ...(ngDevMode ? { debugName: "sideOffset" } : /* istanbul ignore next */ {}), transform: numberAttribute });
490
- /**
491
- * The preferred alignment against the anchor.
492
- */
493
- this.align = input('center', ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
494
- /**
495
- * An offset in pixels from the `start` or `end` alignment options.
496
- */
497
- this.alignOffset = input(0, { ...(ngDevMode ? { debugName: "alignOffset" } : /* istanbul ignore next */ {}), transform: numberAttribute });
498
- /**
499
- * The padding between the arrow and the edges of the content.
500
- */
501
- this.arrowPadding = input(5, { ...(ngDevMode ? { debugName: "arrowPadding" } : /* istanbul ignore next */ {}), transform: numberAttribute });
502
- /**
503
- * When `true`, overrides the `side` and `align` preferences to prevent collisions with boundary edges.
504
- */
505
- this.avoidCollisions = input(true, { ...(ngDevMode ? { debugName: "avoidCollisions" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
506
- /**
507
- * The element used as the collision boundary.
508
- */
509
- this.collisionBoundary = input(...(ngDevMode ? [undefined, { debugName: "collisionBoundary" }] : /* istanbul ignore next */ []));
510
- /**
511
- * The distance in pixels from the boundary edges where collision detection should occur.
512
- */
513
- this.collisionPadding = input(5, ...(ngDevMode ? [{ debugName: "collisionPadding" }] : /* istanbul ignore next */ []));
514
- /**
515
- * The sticky behavior on the `align` axis.
516
- */
517
- this.sticky = input('partial', ...(ngDevMode ? [{ debugName: "sticky" }] : /* istanbul ignore next */ []));
518
- /**
519
- * Whether to hide the content when the trigger becomes fully occluded.
520
- */
521
- this.hideWhenDetached = input(false, { ...(ngDevMode ? { debugName: "hideWhenDetached" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
522
- /**
523
- * The CSS position strategy used by Floating UI.
524
- */
525
- this.positionStrategy = input('fixed', ...(ngDevMode ? [{ debugName: "positionStrategy" }] : /* istanbul ignore next */ []));
526
- /**
527
- * Whether to update the position of the floating element on every animation frame if required.
528
- */
529
- this.updatePositionStrategy = input('always', ...(ngDevMode ? [{ debugName: "updatePositionStrategy" }] : /* istanbul ignore next */ []));
530
- /**
531
- * Emits when the element is placed.
532
- */
533
- this.placed = outputFromObservable(outputToObservable(this.wrapper.placed));
504
+ this.floatingContext = inject(RDX_FLOATING_ROOT_CONTEXT);
505
+ this.registration = inject(RDX_FLOATING_REGISTRATION, { optional: true });
506
+ this.containerRef = inject(ElementRef);
534
507
  /**
535
508
  * Event handler called when the escape key is down. Can be prevented.
536
509
  */
537
- this.escapeKeyDown = outputFromObservable(outputToObservable(this.dismissableLayer.escapeKeyDown));
510
+ this.escapeKeyDown = output();
538
511
  /**
539
- * Event handler called when a `pointerdown` event happens outside of the `DismissableLayer`. Can be prevented.
512
+ * Event handler called when a `pointerdown` event happens outside of the popup. Can be prevented.
540
513
  */
541
- this.pointerDownOutside = outputFromObservable(outputToObservable(this.dismissableLayer.pointerDownOutside));
514
+ this.pointerDownOutside = output();
542
515
  this.triggerEl = signal(null, ...(ngDevMode ? [{ debugName: "triggerEl" }] : /* istanbul ignore next */ []));
543
516
  this.containerEl = signal(null, ...(ngDevMode ? [{ debugName: "containerEl" }] : /* istanbul ignore next */ []));
544
517
  this.graceArea = useGraceArea(this.triggerEl, this.containerEl, 300);
545
518
  this.afterNextRender = afterNextRender(() => {
546
519
  this.triggerEl.set(this.rootContext.trigger() ?? null);
547
- this.containerEl.set(this.elementRef.nativeElement);
520
+ this.containerEl.set(this.containerRef.nativeElement);
548
521
  const handleScroll = (event) => {
549
522
  const target = event.target;
550
523
  const trigger = this.rootContext.trigger();
@@ -566,57 +539,47 @@ class RdxTooltipPositioner {
566
539
  this.rootContext.closeDelayed();
567
540
  });
568
541
  });
569
- this.dismissableLayer.focusOutside.subscribe((e) => e.preventDefault());
570
- this.dismissableLayer.dismiss.subscribe(() => this.rootContext.close());
542
+ // Register as the floating element so dismissal containment (outside-press / focus) treats the
543
+ // popup as "inside".
544
+ this.floatingContext.setFloatingElement(this.containerRef.nativeElement);
545
+ // Dismissal-only (ADR 0017 §1 — a tooltip has no focus manager): Escape and an outside press
546
+ // close it; focus-out is intentionally a no-op (a tooltip never traps or follows focus).
547
+ new RdxDismiss(this.floatingContext, () => this.registration?.node() ?? null, {
548
+ escapeKey: () => true,
549
+ outsidePress: () => true,
550
+ focusOutside: () => false,
551
+ onEscapeKeyDown: (event) => this.escapeKeyDown.emit(event),
552
+ onPointerDownOutside: (event) => this.pointerDownOutside.emit(event),
553
+ onDismiss: () => this.rootContext.close()
554
+ });
571
555
  // While following the cursor the popup sits right under the pointer; if it could intercept
572
556
  // the pointer it would steal hover from the trigger and the tooltip would flicker. Render it
573
557
  // pointer-events: none so the pointer always passes through to the trigger underneath.
574
- effect(() => this.wrapper.nonInteractive.set(this.rootContext.trackCursorAxis() !== 'none'));
558
+ effect(() => this.nonInteractive.set(this.rootContext.trackCursorAxis() !== 'none'));
575
559
  }
576
560
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTooltipPositioner, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
577
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxTooltipPositioner, isStandalone: true, selector: "[rdxTooltipPositioner]", inputs: { anchor: { classPropertyName: "anchor", publicName: "anchor", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, sideOffset: { classPropertyName: "sideOffset", publicName: "sideOffset", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, alignOffset: { classPropertyName: "alignOffset", publicName: "alignOffset", isSignal: true, isRequired: false, transformFunction: null }, arrowPadding: { classPropertyName: "arrowPadding", publicName: "arrowPadding", isSignal: true, isRequired: false, transformFunction: null }, avoidCollisions: { classPropertyName: "avoidCollisions", publicName: "avoidCollisions", isSignal: true, isRequired: false, transformFunction: null }, collisionBoundary: { classPropertyName: "collisionBoundary", publicName: "collisionBoundary", isSignal: true, isRequired: false, transformFunction: null }, collisionPadding: { classPropertyName: "collisionPadding", publicName: "collisionPadding", isSignal: true, isRequired: false, transformFunction: null }, sticky: { classPropertyName: "sticky", publicName: "sticky", isSignal: true, isRequired: false, transformFunction: null }, hideWhenDetached: { classPropertyName: "hideWhenDetached", publicName: "hideWhenDetached", isSignal: true, isRequired: false, transformFunction: null }, positionStrategy: { classPropertyName: "positionStrategy", publicName: "positionStrategy", isSignal: true, isRequired: false, transformFunction: null }, updatePositionStrategy: { classPropertyName: "updatePositionStrategy", publicName: "updatePositionStrategy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { placed: "placed", escapeKeyDown: "escapeKeyDown", pointerDownOutside: "pointerDownOutside" }, host: { properties: { "attr.data-open": "rootContext.isOpen() ? \"\" : undefined", "attr.data-closed": "rootContext.isOpen() ? undefined : \"\"", "attr.data-side": "wrapper.placedSide()", "attr.data-align": "wrapper.placedAlign()", "style": "{\n '--anchor-width': 'var(--radix-popper-anchor-width)',\n '--anchor-height': 'var(--radix-popper-anchor-height)',\n '--available-width': 'var(--radix-popper-available-width)',\n '--available-height': 'var(--radix-popper-available-height)',\n '--transform-origin': 'var(--radix-popper-transform-origin)'\n }" } }, providers: [provideRdxPopperContentConfig({ side: 'top', arrowPadding: 5, collisionPadding: 5 })], hostDirectives: [{ directive: i1$2.RdxDismissableLayer }, { directive: i1.RdxPopperContentWrapper, inputs: ["anchor", "anchor", "side", "side", "sideOffset", "sideOffset", "align", "align", "alignOffset", "alignOffset", "arrowPadding", "arrowPadding", "avoidCollisions", "avoidCollisions", "collisionBoundary", "collisionBoundary", "collisionPadding", "collisionPadding", "sticky", "sticky", "hideWhenDetached", "hideWhenDetached", "positionStrategy", "positionStrategy", "updatePositionStrategy", "updatePositionStrategy"] }], ngImport: i0 }); }
561
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxTooltipPositioner, isStandalone: true, selector: "[rdxTooltipPositioner]", outputs: { escapeKeyDown: "escapeKeyDown", pointerDownOutside: "pointerDownOutside" }, host: { properties: { "attr.data-open": "rootContext.isOpen() ? \"\" : undefined", "attr.data-closed": "rootContext.isOpen() ? undefined : \"\"" } }, providers: [
562
+ ...provideRdxPopperContentWrapper(RdxTooltipPositioner),
563
+ provideRdxPopperContentConfig({ side: 'top', arrowPadding: 5, collisionPadding: 5 })
564
+ ], usesInheritance: true, hostDirectives: [{ directive: i1$2.RdxFloatingNodeRegistration }], ngImport: i0 }); }
578
565
  }
579
566
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxTooltipPositioner, decorators: [{
580
567
  type: Directive,
581
568
  args: [{
582
569
  selector: '[rdxTooltipPositioner]',
583
- providers: [provideRdxPopperContentConfig({ side: 'top', arrowPadding: 5, collisionPadding: 5 })],
584
- hostDirectives: [
585
- RdxDismissableLayer,
586
- {
587
- directive: RdxPopperContentWrapper,
588
- inputs: [
589
- 'anchor',
590
- 'side',
591
- 'sideOffset',
592
- 'align',
593
- 'alignOffset',
594
- 'arrowPadding',
595
- 'avoidCollisions',
596
- 'collisionBoundary',
597
- 'collisionPadding',
598
- 'sticky',
599
- 'hideWhenDetached',
600
- 'positionStrategy',
601
- 'updatePositionStrategy'
602
- ]
603
- }
570
+ providers: [
571
+ ...provideRdxPopperContentWrapper(RdxTooltipPositioner),
572
+ provideRdxPopperContentConfig({ side: 'top', arrowPadding: 5, collisionPadding: 5 })
604
573
  ],
574
+ hostDirectives: [RdxFloatingNodeRegistration],
605
575
  host: {
606
576
  '[attr.data-open]': 'rootContext.isOpen() ? "" : undefined',
607
- '[attr.data-closed]': 'rootContext.isOpen() ? undefined : ""',
608
- '[attr.data-side]': 'wrapper.placedSide()',
609
- '[attr.data-align]': 'wrapper.placedAlign()',
610
- '[style]': `{
611
- '--anchor-width': 'var(--radix-popper-anchor-width)',
612
- '--anchor-height': 'var(--radix-popper-anchor-height)',
613
- '--available-width': 'var(--radix-popper-available-width)',
614
- '--available-height': 'var(--radix-popper-available-height)',
615
- '--transform-origin': 'var(--radix-popper-transform-origin)'
616
- }`
577
+ '[attr.data-closed]': 'rootContext.isOpen() ? undefined : ""'
578
+ // `data-side`/`data-align`/`data-anchor-hidden` and the unified vars come from the inherited
579
+ // wrapper (ADR 0012); tooltip exposes no legacy `--radix-*` aliases.
617
580
  }
618
581
  }]
619
- }], ctorParameters: () => [], propDecorators: { anchor: [{ type: i0.Input, args: [{ isSignal: true, alias: "anchor", required: false }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], sideOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "sideOffset", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], alignOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignOffset", required: false }] }], arrowPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "arrowPadding", required: false }] }], avoidCollisions: [{ type: i0.Input, args: [{ isSignal: true, alias: "avoidCollisions", required: false }] }], collisionBoundary: [{ type: i0.Input, args: [{ isSignal: true, alias: "collisionBoundary", required: false }] }], collisionPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "collisionPadding", required: false }] }], sticky: [{ type: i0.Input, args: [{ isSignal: true, alias: "sticky", required: false }] }], hideWhenDetached: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideWhenDetached", required: false }] }], positionStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "positionStrategy", required: false }] }], updatePositionStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "updatePositionStrategy", required: false }] }], placed: [{ type: i0.Output, args: ["placed"] }], escapeKeyDown: [{ type: i0.Output, args: ["escapeKeyDown"] }], pointerDownOutside: [{ type: i0.Output, args: ["pointerDownOutside"] }] } });
582
+ }], ctorParameters: () => [], propDecorators: { escapeKeyDown: [{ type: i0.Output, args: ["escapeKeyDown"] }], pointerDownOutside: [{ type: i0.Output, args: ["pointerDownOutside"] }] } });
620
583
 
621
584
  class RdxTooltipTrigger {
622
585
  constructor() {