@radix-ng/primitives 0.42.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/index.d.ts +160 -15
- package/alert-dialog/index.d.ts +54 -14
- package/arrow/README.md +1 -0
- package/arrow/index.d.ts +11 -0
- package/aspect-ratio/index.d.ts +35 -1
- package/avatar/index.d.ts +81 -11
- package/calendar/index.d.ts +310 -29
- package/checkbox/index.d.ts +163 -15
- package/collapsible/index.d.ts +82 -11
- package/config/index.d.ts +35 -2
- package/context-menu/index.d.ts +126 -23
- package/core/index.d.ts +898 -27
- package/cropper/index.d.ts +134 -14
- package/date-field/index.d.ts +209 -10
- package/dialog/index.d.ts +202 -20
- package/dismissable-layer/README.md +1 -0
- package/dismissable-layer/index.d.ts +126 -0
- package/dropdown-menu/index.d.ts +168 -23
- package/editable/index.d.ts +70 -1
- package/fesm2022/radix-ng-primitives-accordion.mjs +36 -36
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs +28 -28
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-arrow.mjs +38 -0
- package/fesm2022/radix-ng-primitives-arrow.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +5 -5
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-avatar.mjs +20 -20
- package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-calendar.mjs +110 -95
- package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +219 -209
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +27 -27
- package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-config.mjs +5 -5
- package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-context-menu.mjs +34 -34
- package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-core.mjs +72 -24
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-cropper.mjs +51 -51
- package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-date-field.mjs +48 -48
- package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dialog.mjs +33 -33
- package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +418 -0
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +37 -37
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-editable.mjs +21 -21
- package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-focus-guards.mjs +53 -0
- package/fesm2022/radix-ng-primitives-focus-guards.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-focus-scope.mjs +17 -9
- package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-hover-card.mjs +74 -74
- package/fesm2022/radix-ng-primitives-hover-card.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-label.mjs +8 -8
- package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +65 -65
- package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menubar.mjs +31 -31
- package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs +91 -88
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-number-field.mjs +56 -43
- package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-pagination.mjs +45 -45
- package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popover.mjs +68 -68
- package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popper.mjs +418 -0
- package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-portal.mjs +51 -0
- package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-presence.mjs +4 -4
- package/fesm2022/radix-ng-primitives-presence.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-progress.mjs +15 -15
- package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +30 -30
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-roving-focus.mjs +179 -163
- package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-select.mjs +37 -37
- package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-separator.mjs +16 -14
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-slider.mjs +75 -75
- package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-stepper.mjs +45 -45
- package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +28 -28
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tabs.mjs +33 -33
- package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-time-field.mjs +78 -66
- package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +22 -22
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +9 -9
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toolbar.mjs +28 -28
- package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tooltip.mjs +74 -74
- package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tooltip2.mjs +740 -0
- package/fesm2022/radix-ng-primitives-tooltip2.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +93 -98
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives.mjs.map +1 -1
- package/focus-guards/README.md +1 -0
- package/focus-guards/index.d.ts +15 -0
- package/focus-scope/index.d.ts +65 -1
- package/hover-card/index.d.ts +471 -19
- package/index.d.ts +2 -1
- package/label/index.d.ts +27 -1
- package/menu/index.d.ts +136 -26
- package/menubar/index.d.ts +53 -21
- package/navigation-menu/index.d.ts +402 -25
- package/number-field/index.d.ts +202 -16
- package/package.json +26 -5
- package/pagination/index.d.ts +96 -20
- package/popover/index.d.ts +402 -19
- package/popper/README.md +3 -0
- package/popper/index.d.ts +206 -0
- package/portal/README.md +1 -0
- package/portal/index.d.ts +22 -0
- package/presence/index.d.ts +103 -5
- package/progress/index.d.ts +76 -8
- package/radio/index.d.ts +118 -4
- package/roving-focus/index.d.ts +174 -3
- package/select/index.d.ts +211 -23
- package/separator/index.d.ts +63 -1
- package/slider/index.d.ts +262 -17
- package/stepper/index.d.ts +122 -21
- package/switch/index.d.ts +102 -9
- package/tabs/index.d.ts +111 -13
- package/time-field/index.d.ts +211 -10
- package/toggle/index.d.ts +75 -3
- package/toggle-group/index.d.ts +194 -5
- package/toolbar/index.d.ts +52 -16
- package/tooltip/index.d.ts +432 -19
- package/tooltip2/README.md +3 -0
- package/tooltip2/index.d.ts +325 -0
- package/visually-hidden/index.d.ts +65 -3
- package/accordion/src/accordion-content-presence.directive.d.ts +0 -6
- package/accordion/src/accordion-content.directive.d.ts +0 -8
- package/accordion/src/accordion-header.directive.d.ts +0 -7
- package/accordion/src/accordion-item.directive.d.ts +0 -43
- package/accordion/src/accordion-root.directive.d.ts +0 -83
- package/accordion/src/accordion-trigger.directive.d.ts +0 -10
- package/alert-dialog/src/alert-dialog-cancel.directive.d.ts +0 -7
- package/alert-dialog/src/alert-dialog-content.directive.d.ts +0 -9
- package/alert-dialog/src/alert-dialog-root.directive.d.ts +0 -9
- package/alert-dialog/src/alert-dialog-title.directive.d.ts +0 -5
- package/alert-dialog/src/alert-dialog-trigger.directive.d.ts +0 -7
- package/alert-dialog/src/alert-dialog.service.d.ts +0 -14
- package/aspect-ratio/src/aspect-ratio.directive.d.ts +0 -32
- package/avatar/src/avatar-context.token.d.ts +0 -7
- package/avatar/src/avatar-fallback.directive.d.ts +0 -20
- package/avatar/src/avatar-image.directive.d.ts +0 -29
- package/avatar/src/avatar-root.directive.d.ts +0 -8
- package/avatar/src/avatar.config.d.ts +0 -13
- package/avatar/src/types.d.ts +0 -2
- package/calendar/src/calendar-cell-trigger.directive.d.ts +0 -54
- package/calendar/src/calendar-cell.directive.d.ts +0 -11
- package/calendar/src/calendar-grid-body.directive.d.ts +0 -5
- package/calendar/src/calendar-grid-head.directive.d.ts +0 -5
- package/calendar/src/calendar-grid-row.directive.d.ts +0 -5
- package/calendar/src/calendar-grid.directive.d.ts +0 -8
- package/calendar/src/calendar-head-cell.directive.d.ts +0 -5
- package/calendar/src/calendar-header.directive.d.ts +0 -5
- package/calendar/src/calendar-heading.directive.d.ts +0 -7
- package/calendar/src/calendar-next.directive.d.ts +0 -16
- package/calendar/src/calendar-prev.directive.d.ts +0 -16
- package/calendar/src/calendar-root.directive.d.ts +0 -148
- package/calendar/src/calendar.d.ts +0 -44
- package/calendar/src//321/201alendar-/321/201ontext.token.d.ts +0 -24
- package/checkbox/src/checkbox-button.directive.d.ts +0 -8
- package/checkbox/src/checkbox-indicator.directive.d.ts +0 -6
- package/checkbox/src/checkbox-input.directive.d.ts +0 -10
- package/checkbox/src/checkbox.directive.d.ts +0 -86
- package/checkbox/src/checkbox.token.d.ts +0 -4
- package/collapsible/src/collapsible-content-presence.directive.d.ts +0 -6
- package/collapsible/src/collapsible-content.directive.d.ts +0 -18
- package/collapsible/src/collapsible-root.directive.d.ts +0 -44
- package/collapsible/src/collapsible-trigger.directive.d.ts +0 -6
- package/config/src/config.d.ts +0 -21
- package/config/src/config.provider.d.ts +0 -10
- package/context-menu/src/context-menu-content.directive.d.ts +0 -15
- package/context-menu/src/context-menu-item-checkbox.directive.d.ts +0 -9
- package/context-menu/src/context-menu-item-indicator.directive.d.ts +0 -7
- package/context-menu/src/context-menu-item-radio-group.directive.d.ts +0 -12
- package/context-menu/src/context-menu-item-radio.directive.d.ts +0 -19
- package/context-menu/src/context-menu-item-selectable.d.ts +0 -12
- package/context-menu/src/context-menu-item.directive.d.ts +0 -17
- package/context-menu/src/context-menu-label.directive.d.ts +0 -5
- package/context-menu/src/context-menu-separator.directive.d.ts +0 -6
- package/context-menu/src/context-menu-trigger.directive.d.ts +0 -31
- package/core/src/accessor/control-value-accessor.d.ts +0 -67
- package/core/src/accessor/provide-value-accessor.d.ts +0 -12
- package/core/src/auto-focus.directive.d.ts +0 -14
- package/core/src/chunk.d.ts +0 -12
- package/core/src/clamp.d.ts +0 -38
- package/core/src/create-context.d.ts +0 -10
- package/core/src/date-time/calendar.d.ts +0 -33
- package/core/src/date-time/comparators.d.ts +0 -98
- package/core/src/date-time/formatter.d.ts +0 -30
- package/core/src/date-time/index.d.ts +0 -9
- package/core/src/date-time/parser.d.ts +0 -37
- package/core/src/date-time/parts.d.ts +0 -12
- package/core/src/date-time/placeholders.d.ts +0 -8
- package/core/src/date-time/segment.d.ts +0 -4
- package/core/src/date-time/types.d.ts +0 -58
- package/core/src/date-time/useDateField.d.ts +0 -142
- package/core/src/date-time/utils.d.ts +0 -7
- package/core/src/document.d.ts +0 -1
- package/core/src/focus-initial.directive.d.ts +0 -9
- package/core/src/getActiveElement.d.ts +0 -1
- package/core/src/id-generator.d.ts +0 -12
- package/core/src/inject-ng-control.d.ts +0 -8
- package/core/src/is-client.d.ts +0 -1
- package/core/src/is-equal.d.ts +0 -7
- package/core/src/is-inside-form.d.ts +0 -2
- package/core/src/is-nullish.d.ts +0 -1
- package/core/src/is-number.d.ts +0 -1
- package/core/src/isValueEqualOrExist.d.ts +0 -10
- package/core/src/kbd-constants.d.ts +0 -41
- package/core/src/positioning/constants.d.ts +0 -3
- package/core/src/positioning/types.d.ts +0 -42
- package/core/src/positioning/utils.d.ts +0 -12
- package/core/src/provide-token.d.ts +0 -22
- package/core/src/serialize.d.ts +0 -11
- package/core/src/types.d.ts +0 -25
- package/core/src/useArrowNavigation.d.ts +0 -65
- package/core/src/useResizeObserver.d.ts +0 -15
- package/core/src/watch.d.ts +0 -41
- package/core/src/window.d.ts +0 -3
- package/cropper/src/cropper-context.token.d.ts +0 -12
- package/cropper/src/cropper-crop-area.directive.d.ts +0 -6
- package/cropper/src/cropper-description.directive.d.ts +0 -6
- package/cropper/src/cropper-image.component.d.ts +0 -10
- package/cropper/src/cropper-root.directive.d.ts +0 -91
- package/date-field/src/date-field-context.token.d.ts +0 -19
- package/date-field/src/date-field-input.directive.d.ts +0 -53
- package/date-field/src/date-field-root.directive.d.ts +0 -131
- package/dialog/src/dialog-close.directive.d.ts +0 -7
- package/dialog/src/dialog-content.directive.d.ts +0 -21
- package/dialog/src/dialog-description.directive.d.ts +0 -5
- package/dialog/src/dialog-dismiss.directive.d.ts +0 -7
- package/dialog/src/dialog-ref.d.ts +0 -40
- package/dialog/src/dialog-title.directive.d.ts +0 -5
- package/dialog/src/dialog-trigger.directive.d.ts +0 -28
- package/dialog/src/dialog.config.d.ts +0 -41
- package/dialog/src/dialog.injectors.d.ts +0 -4
- package/dialog/src/dialog.providers.d.ts +0 -19
- package/dialog/src/dialog.service.d.ts +0 -26
- package/dismissible-layer/README.md +0 -1
- package/dismissible-layer/index.d.ts +0 -1
- package/dismissible-layer/src/utils.d.ts +0 -38
- package/dropdown-menu/src/dropdown-menu-content.directive.d.ts +0 -15
- package/dropdown-menu/src/dropdown-menu-item-checkbox.directive.d.ts +0 -9
- package/dropdown-menu/src/dropdown-menu-item-indicator.directive.d.ts +0 -7
- package/dropdown-menu/src/dropdown-menu-item-radio-group.directive.d.ts +0 -12
- package/dropdown-menu/src/dropdown-menu-item-radio.directive.d.ts +0 -19
- package/dropdown-menu/src/dropdown-menu-item-selectable.d.ts +0 -12
- package/dropdown-menu/src/dropdown-menu-item.directive.d.ts +0 -17
- package/dropdown-menu/src/dropdown-menu-label.directive.d.ts +0 -6
- package/dropdown-menu/src/dropdown-menu-separator.directive.d.ts +0 -6
- package/dropdown-menu/src/dropdown-menu-trigger.directive.d.ts +0 -73
- package/editable/src/editable-root.d.ts +0 -67
- package/fesm2022/radix-ng-primitives-dismissible-layer.mjs +0 -211
- package/fesm2022/radix-ng-primitives-dismissible-layer.mjs.map +0 -1
- package/focus-scope/src/focus-scope.d.ts +0 -53
- package/focus-scope/src/stack.d.ts +0 -13
- package/focus-scope/src/utils.d.ts +0 -46
- package/hover-card/src/hover-card-anchor.directive.d.ts +0 -28
- package/hover-card/src/hover-card-anchor.token.d.ts +0 -3
- package/hover-card/src/hover-card-arrow.directive.d.ts +0 -45
- package/hover-card/src/hover-card-arrow.token.d.ts +0 -3
- package/hover-card/src/hover-card-close.directive.d.ts +0 -18
- package/hover-card/src/hover-card-close.token.d.ts +0 -3
- package/hover-card/src/hover-card-content-attributes.component.d.ts +0 -25
- package/hover-card/src/hover-card-content-attributes.token.d.ts +0 -3
- package/hover-card/src/hover-card-content.directive.d.ts +0 -124
- package/hover-card/src/hover-card-root.directive.d.ts +0 -182
- package/hover-card/src/hover-card-root.inject.d.ts +0 -3
- package/hover-card/src/hover-card-trigger.directive.d.ts +0 -26
- package/hover-card/src/hover-card.types.d.ts +0 -18
- package/hover-card/src/utils/cdk-event.service.d.ts +0 -30
- package/hover-card/src/utils/constants.d.ts +0 -1
- package/hover-card/src/utils/types.d.ts +0 -7
- package/label/src/label.directive.d.ts +0 -24
- package/menu/src/menu-content.directive.d.ts +0 -6
- package/menu/src/menu-directive.d.ts +0 -6
- package/menu/src/menu-group.directive.d.ts +0 -6
- package/menu/src/menu-item-checkbox.directive.d.ts +0 -21
- package/menu/src/menu-item-indicator.directive.d.ts +0 -10
- package/menu/src/menu-item-radio.directive.d.ts +0 -20
- package/menu/src/menu-item.directive.d.ts +0 -18
- package/menu/src/menu-label.directive.d.ts +0 -5
- package/menu/src/menu-radio-group.directive.d.ts +0 -6
- package/menu/src/menu-separator.directive.d.ts +0 -5
- package/menu/src/menu-trigger.directive.d.ts +0 -35
- package/menu/src/utils.d.ts +0 -3
- package/menubar/src/menubar-content.directive.d.ts +0 -6
- package/menubar/src/menubar-item-checkbox.directive.d.ts +0 -6
- package/menubar/src/menubar-item-indicator.directive.d.ts +0 -6
- package/menubar/src/menubar-item-radio.directive.d.ts +0 -6
- package/menubar/src/menubar-item.directive.d.ts +0 -6
- package/menubar/src/menubar-radio-group.directive.d.ts +0 -6
- package/menubar/src/menubar-root.directive.d.ts +0 -6
- package/menubar/src/menubar-separator.directive.d.ts +0 -6
- package/menubar/src/menubar-trigger.directive.d.ts +0 -6
- package/navigation-menu/src/navigation-menu-a11y.component.d.ts +0 -15
- package/navigation-menu/src/navigation-menu-content.directive.d.ts +0 -31
- package/navigation-menu/src/navigation-menu-indicator.directive.d.ts +0 -29
- package/navigation-menu/src/navigation-menu-item.directive.d.ts +0 -44
- package/navigation-menu/src/navigation-menu-link.directive.d.ts +0 -17
- package/navigation-menu/src/navigation-menu-list.directive.d.ts +0 -38
- package/navigation-menu/src/navigation-menu-sub.directive.d.ts +0 -19
- package/navigation-menu/src/navigation-menu-trigger.directive.d.ts +0 -33
- package/navigation-menu/src/navigation-menu-viewport.directive.d.ts +0 -61
- package/navigation-menu/src/navigation-menu.directive.d.ts +0 -76
- package/navigation-menu/src/navigation-menu.token.d.ts +0 -36
- package/navigation-menu/src/navigation-menu.types.d.ts +0 -13
- package/navigation-menu/src/utils.d.ts +0 -44
- package/number-field/src/number-field-context.token.d.ts +0 -24
- package/number-field/src/number-field-decrement.directive.d.ts +0 -23
- package/number-field/src/number-field-increment.directive.d.ts +0 -23
- package/number-field/src/number-field-input.directive.d.ts +0 -22
- package/number-field/src/number-field-root.directive.d.ts +0 -86
- package/number-field/src/types.d.ts +0 -1
- package/number-field/src/utils.d.ts +0 -18
- package/pagination/src/pagination-context.token.d.ts +0 -11
- package/pagination/src/pagination-ellipsis.directive.d.ts +0 -5
- package/pagination/src/pagination-first.directive.d.ts +0 -8
- package/pagination/src/pagination-last.directive.d.ts +0 -8
- package/pagination/src/pagination-list-item.directive.d.ts +0 -10
- package/pagination/src/pagination-list.directive.d.ts +0 -12
- package/pagination/src/pagination-next.directive.d.ts +0 -8
- package/pagination/src/pagination-prev.directive.d.ts +0 -8
- package/pagination/src/pagination-root.directive.d.ts +0 -18
- package/pagination/src/utils.d.ts +0 -9
- package/popover/src/popover-anchor.directive.d.ts +0 -28
- package/popover/src/popover-anchor.token.d.ts +0 -3
- package/popover/src/popover-arrow.directive.d.ts +0 -40
- package/popover/src/popover-arrow.token.d.ts +0 -3
- package/popover/src/popover-close.directive.d.ts +0 -15
- package/popover/src/popover-close.token.d.ts +0 -3
- package/popover/src/popover-content-attributes.component.d.ts +0 -23
- package/popover/src/popover-content-attributes.token.d.ts +0 -3
- package/popover/src/popover-content.directive.d.ts +0 -104
- package/popover/src/popover-root.directive.d.ts +0 -155
- package/popover/src/popover-root.inject.d.ts +0 -3
- package/popover/src/popover-trigger.directive.d.ts +0 -18
- package/popover/src/popover.types.d.ts +0 -14
- package/popover/src/utils/cdk-event.service.d.ts +0 -30
- package/popover/src/utils/constants.d.ts +0 -1
- package/popover/src/utils/types.d.ts +0 -7
- package/presence/src/presence.d.ts +0 -42
- package/presence/src/presence.directive.d.ts +0 -27
- package/presence/src/transitions/transition.collapse.d.ts +0 -15
- package/presence/src/transitions/transition.toast.d.ts +0 -3
- package/presence/src/types.d.ts +0 -15
- package/presence/src/utils.d.ts +0 -42
- package/progress/src/progress-indicator.directive.d.ts +0 -15
- package/progress/src/progress-root.directive.d.ts +0 -54
- package/radio/src/radio-indicator.directive.d.ts +0 -9
- package/radio/src/radio-item-input.directive.d.ts +0 -12
- package/radio/src/radio-item.directive.d.ts +0 -30
- package/radio/src/radio-root.directive.d.ts +0 -57
- package/radio/src/radio-tokens.d.ts +0 -14
- package/roving-focus/src/roving-focus-group.directive.d.ts +0 -50
- package/roving-focus/src/roving-focus-item.directive.d.ts +0 -50
- package/roving-focus/src/utils.d.ts +0 -19
- package/select/src/select-content.directive.d.ts +0 -20
- package/select/src/select-group.directive.d.ts +0 -5
- package/select/src/select-icon.directive.d.ts +0 -5
- package/select/src/select-item-indicator.directive.d.ts +0 -7
- package/select/src/select-item.directive.d.ts +0 -53
- package/select/src/select-label.directive.d.ts +0 -5
- package/select/src/select-separator.directive.d.ts +0 -5
- package/select/src/select-trigger.directive.d.ts +0 -17
- package/select/src/select-value.directive.d.ts +0 -8
- package/select/src/select.component.d.ts +0 -98
- package/separator/src/separator.directive.d.ts +0 -60
- package/slider/src/slider-horizontal.component.d.ts +0 -28
- package/slider/src/slider-impl.directive.d.ts +0 -17
- package/slider/src/slider-orientation-context.service.d.ts +0 -14
- package/slider/src/slider-range.component.d.ts +0 -13
- package/slider/src/slider-root.component.d.ts +0 -123
- package/slider/src/slider-thumb-impl.directive.d.ts +0 -27
- package/slider/src/slider-thumb.component.d.ts +0 -6
- package/slider/src/slider-track.component.d.ts +0 -7
- package/slider/src/slider-vertical.component.d.ts +0 -28
- package/slider/src/utils.d.ts +0 -52
- package/stepper/src/stepper-description.directive.d.ts +0 -6
- package/stepper/src/stepper-indicator.directive.d.ts +0 -6
- package/stepper/src/stepper-item-context.token.d.ts +0 -13
- package/stepper/src/stepper-item.directive.d.ts +0 -21
- package/stepper/src/stepper-root-context.token.d.ts +0 -12
- package/stepper/src/stepper-root.directive.d.ts +0 -33
- package/stepper/src/stepper-separator.directive.d.ts +0 -10
- package/stepper/src/stepper-title.directive.d.ts +0 -6
- package/stepper/src/stepper-trigger.directive.d.ts +0 -14
- package/stepper/src/types.d.ts +0 -1
- package/switch/src/switch-input.directive.d.ts +0 -11
- package/switch/src/switch-root.directive.d.ts +0 -74
- package/switch/src/switch-thumb.directive.d.ts +0 -9
- package/tabs/src/tabs-content.directive.d.ts +0 -13
- package/tabs/src/tabs-list.directive.d.ts +0 -10
- package/tabs/src/tabs-root.directive.d.ts +0 -53
- package/tabs/src/tabs-trigger.directive.d.ts +0 -29
- package/tabs/src/utils.d.ts +0 -2
- package/time-field/src/time-field-context.token.d.ts +0 -20
- package/time-field/src/time-field-input.directive.d.ts +0 -53
- package/time-field/src/time-field-root.directive.d.ts +0 -130
- package/toggle/src/toggle-visually-hidden-input.directive.d.ts +0 -6
- package/toggle/src/toggle.directive.d.ts +0 -65
- package/toggle-group/src/toggle-group-item.directive.d.ts +0 -37
- package/toggle-group/src/toggle-group-item.token.d.ts +0 -4
- package/toggle-group/src/toggle-group-without-focus.directive.d.ts +0 -69
- package/toggle-group/src/toggle-group.directive.d.ts +0 -74
- package/toggle-group/src/toggle-group.token.d.ts +0 -10
- package/toolbar/src/toolbar-button.directive.d.ts +0 -11
- package/toolbar/src/toolbar-link.directive.d.ts +0 -7
- package/toolbar/src/toolbar-root.directive.d.ts +0 -8
- package/toolbar/src/toolbar-root.token.d.ts +0 -5
- package/toolbar/src/toolbar-separator.directive.d.ts +0 -6
- package/toolbar/src/toolbar-toggle-group.directive.d.ts +0 -6
- package/toolbar/src/toolbar-toggle-item.directive.d.ts +0 -6
- package/tooltip/src/tooltip-anchor.directive.d.ts +0 -28
- package/tooltip/src/tooltip-anchor.token.d.ts +0 -3
- package/tooltip/src/tooltip-arrow.directive.d.ts +0 -40
- package/tooltip/src/tooltip-arrow.token.d.ts +0 -3
- package/tooltip/src/tooltip-close.directive.d.ts +0 -18
- package/tooltip/src/tooltip-close.token.d.ts +0 -3
- package/tooltip/src/tooltip-content-attributes.component.d.ts +0 -25
- package/tooltip/src/tooltip-content-attributes.token.d.ts +0 -3
- package/tooltip/src/tooltip-content.directive.d.ts +0 -104
- package/tooltip/src/tooltip-root.directive.d.ts +0 -168
- package/tooltip/src/tooltip-root.inject.d.ts +0 -3
- package/tooltip/src/tooltip-trigger.directive.d.ts +0 -26
- package/tooltip/src/tooltip.types.d.ts +0 -18
- package/tooltip/src/utils/cdk-event.service.d.ts +0 -30
- package/tooltip/src/utils/constants.d.ts +0 -1
- package/tooltip/src/utils/types.d.ts +0 -7
- package/visually-hidden/src/visually-hidden-input-bubble.directive.d.ts +0 -23
- package/visually-hidden/src/visually-hidden-input.directive.d.ts +0 -19
- package/visually-hidden/src/visually-hidden.directive.d.ts +0 -17
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, Directive, contentChild, computed, DestroyRef, Injector, PLATFORM_ID, input, numberAttribute, booleanAttribute, output, forwardRef, resource, afterNextRender, EnvironmentInjector, effect, createComponent, inputBinding } from '@angular/core';
|
|
3
|
+
import { RdxArrow } from '@radix-ng/primitives/arrow';
|
|
4
|
+
import { isPlatformBrowser } from '@angular/common';
|
|
5
|
+
import { computePosition, offset, shift, flip, size, arrow, hide, limitShift, autoUpdate } from '@floating-ui/dom';
|
|
6
|
+
import { createContext, elementSize } from '@radix-ng/primitives/core';
|
|
7
|
+
|
|
8
|
+
class RdxPopperAnchor {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.elementRef = inject(ElementRef);
|
|
11
|
+
}
|
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: RdxPopperAnchor, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
13
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.3", type: RdxPopperAnchor, isStandalone: true, selector: "[rdxPopperAnchor]", ngImport: i0 }); }
|
|
14
|
+
}
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: RdxPopperAnchor, decorators: [{
|
|
16
|
+
type: Directive,
|
|
17
|
+
args: [{
|
|
18
|
+
selector: '[rdxPopperAnchor]'
|
|
19
|
+
}]
|
|
20
|
+
}] });
|
|
21
|
+
|
|
22
|
+
class RdxPopper {
|
|
23
|
+
constructor() {
|
|
24
|
+
this.anchor = contentChild.required(RdxPopperAnchor);
|
|
25
|
+
}
|
|
26
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: RdxPopper, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
27
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.3", type: RdxPopper, isStandalone: true, selector: "[rdxPopperRoot]", queries: [{ propertyName: "anchor", first: true, predicate: RdxPopperAnchor, descendants: true, isSignal: true }], ngImport: i0 }); }
|
|
28
|
+
}
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: RdxPopper, decorators: [{
|
|
30
|
+
type: Directive,
|
|
31
|
+
args: [{
|
|
32
|
+
selector: '[rdxPopperRoot]'
|
|
33
|
+
}]
|
|
34
|
+
}] });
|
|
35
|
+
|
|
36
|
+
class RdxPopperContent {
|
|
37
|
+
constructor() {
|
|
38
|
+
this.popperContentWrapper = injectPopperContentWrapperContext();
|
|
39
|
+
/**
|
|
40
|
+
* if the PopperContent hasn't been placed yet (not all measurements done)
|
|
41
|
+
* we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
42
|
+
*/
|
|
43
|
+
this.style = computed(() => ({
|
|
44
|
+
animation: !this.popperContentWrapper.isPositioned() ? 'none' : undefined
|
|
45
|
+
}), ...(ngDevMode ? [{ debugName: "style" }] : []));
|
|
46
|
+
}
|
|
47
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: RdxPopperContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
48
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.3", type: RdxPopperContent, isStandalone: true, selector: "[rdxPopperContent]", host: { properties: { "attr.data-side": "popperContentWrapper.placedSide()", "attr.data-align": "popperContentWrapper.placedAlign()", "style": "style()" } }, ngImport: i0 }); }
|
|
49
|
+
}
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: RdxPopperContent, decorators: [{
|
|
51
|
+
type: Directive,
|
|
52
|
+
args: [{
|
|
53
|
+
selector: '[rdxPopperContent]',
|
|
54
|
+
host: {
|
|
55
|
+
'[attr.data-side]': 'popperContentWrapper.placedSide()',
|
|
56
|
+
'[attr.data-align]': 'popperContentWrapper.placedAlign()',
|
|
57
|
+
'[style]': 'style()'
|
|
58
|
+
}
|
|
59
|
+
}]
|
|
60
|
+
}] });
|
|
61
|
+
|
|
62
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
63
|
+
const SIDE_OPTIONS = ['top', 'right', 'bottom', 'left'];
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
65
|
+
const ALIGN_OPTIONS = ['start', 'center', 'end'];
|
|
66
|
+
function isNotNull(value) {
|
|
67
|
+
return value !== null;
|
|
68
|
+
}
|
|
69
|
+
function transformOrigin(options) {
|
|
70
|
+
return {
|
|
71
|
+
name: 'transformOrigin',
|
|
72
|
+
options,
|
|
73
|
+
fn(data) {
|
|
74
|
+
const { placement, rects, middlewareData } = data;
|
|
75
|
+
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
76
|
+
const isArrowHidden = cannotCenterArrow;
|
|
77
|
+
const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;
|
|
78
|
+
const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;
|
|
79
|
+
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
|
80
|
+
const noArrowAlign = { start: '0%', center: '50%', end: '100%' }[placedAlign];
|
|
81
|
+
const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;
|
|
82
|
+
const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;
|
|
83
|
+
let x = '';
|
|
84
|
+
let y = '';
|
|
85
|
+
if (placedSide === 'bottom') {
|
|
86
|
+
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
|
87
|
+
y = `${-arrowHeight}px`;
|
|
88
|
+
}
|
|
89
|
+
else if (placedSide === 'top') {
|
|
90
|
+
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
|
91
|
+
y = `${rects.floating.height + arrowHeight}px`;
|
|
92
|
+
}
|
|
93
|
+
else if (placedSide === 'right') {
|
|
94
|
+
x = `${-arrowHeight}px`;
|
|
95
|
+
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
|
96
|
+
}
|
|
97
|
+
else if (placedSide === 'left') {
|
|
98
|
+
x = `${rects.floating.width + arrowHeight}px`;
|
|
99
|
+
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
|
100
|
+
}
|
|
101
|
+
return { data: { x, y } };
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
function getSideAndAlignFromPlacement(placement) {
|
|
106
|
+
const [side, align = 'center'] = placement.split('-');
|
|
107
|
+
return [side, align];
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const context = () => {
|
|
111
|
+
const popperContentWrapper = inject(RdxPopperContentWrapper);
|
|
112
|
+
return {
|
|
113
|
+
placedSide: popperContentWrapper.placedSide,
|
|
114
|
+
placedAlign: popperContentWrapper.placedAlign,
|
|
115
|
+
arrowX: popperContentWrapper.arrowX,
|
|
116
|
+
arrowY: popperContentWrapper.arrowY,
|
|
117
|
+
shouldHideArrow: popperContentWrapper.shouldHideArrow,
|
|
118
|
+
isPositioned: popperContentWrapper.isPositioned
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
const [injectPopperContentWrapperContext, providePopperContentWrapperContext] = createContext('PopperContentWrapperContext');
|
|
122
|
+
class RdxPopperContentWrapper {
|
|
123
|
+
constructor() {
|
|
124
|
+
this.elementRef = inject(ElementRef);
|
|
125
|
+
this.destroyRef = inject(DestroyRef);
|
|
126
|
+
this.injector = inject(Injector);
|
|
127
|
+
this.context = inject(RdxPopper);
|
|
128
|
+
this.isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
129
|
+
/**
|
|
130
|
+
* The preferred side of the anchor to render against when open.
|
|
131
|
+
* Will be reversed when collisions occur and avoidCollisions is enabled.
|
|
132
|
+
*/
|
|
133
|
+
this.side = input('bottom', ...(ngDevMode ? [{ debugName: "side" }] : []));
|
|
134
|
+
/**
|
|
135
|
+
* Distance between the anchor and the popup in pixels.
|
|
136
|
+
*/
|
|
137
|
+
this.sideOffset = input(0, ...(ngDevMode ? [{ debugName: "sideOffset", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
138
|
+
/**
|
|
139
|
+
* How to align the popup relative to the specified side. May change when collisions occur.
|
|
140
|
+
*/
|
|
141
|
+
this.align = input('center', ...(ngDevMode ? [{ debugName: "align" }] : []));
|
|
142
|
+
/** An offset in pixels from the `start` or `end` alignment options. */
|
|
143
|
+
this.alignOffset = input(0, ...(ngDevMode ? [{ debugName: "alignOffset", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
144
|
+
/**
|
|
145
|
+
* Minimum distance to maintain between the arrow and the edges of the popup.
|
|
146
|
+
* If your content has border-radius, this will prevent it from overflowing the corners.
|
|
147
|
+
*/
|
|
148
|
+
this.arrowPadding = input(0, ...(ngDevMode ? [{ debugName: "arrowPadding", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
149
|
+
/** When `true`, overrides the `side` and `align` preferences to prevent collisions with boundary edges. */
|
|
150
|
+
this.avoidCollisions = input(true, ...(ngDevMode ? [{ debugName: "avoidCollisions", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
151
|
+
/**
|
|
152
|
+
* The element used as the collision boundary.
|
|
153
|
+
* By default this is the viewport, though you can provide additional element(s) to be included in this check.
|
|
154
|
+
*/
|
|
155
|
+
this.collisionBoundary = input(...(ngDevMode ? [undefined, { debugName: "collisionBoundary" }] : []));
|
|
156
|
+
/**
|
|
157
|
+
* The distance in pixels from the boundary edges where collision detection should occur.
|
|
158
|
+
* Accepts a number (same for all sides), or a partial padding object, for example: `{ top: 20, left: 20 }`.
|
|
159
|
+
*/
|
|
160
|
+
this.collisionPadding = input(0, ...(ngDevMode ? [{ debugName: "collisionPadding" }] : []));
|
|
161
|
+
/**
|
|
162
|
+
* The sticky behavior on the align axis. `partial` will keep the
|
|
163
|
+
* content in the boundary as long as the trigger is at least partially
|
|
164
|
+
* in the boundary whilst "always" will keep the content in the boundary
|
|
165
|
+
* regardless.
|
|
166
|
+
*/
|
|
167
|
+
this.sticky = input('partial', ...(ngDevMode ? [{ debugName: "sticky" }] : []));
|
|
168
|
+
/**
|
|
169
|
+
* Whether to hide the content when the trigger becomes fully occluded.
|
|
170
|
+
*/
|
|
171
|
+
this.hideWhenDetached = input(false, ...(ngDevMode ? [{ debugName: "hideWhenDetached", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
172
|
+
/**
|
|
173
|
+
* The type of CSS position property to use.
|
|
174
|
+
*/
|
|
175
|
+
this.positionStrategy = input('fixed', ...(ngDevMode ? [{ debugName: "positionStrategy" }] : []));
|
|
176
|
+
/**
|
|
177
|
+
* Strategy to update the position of the floating element on every animation frame.
|
|
178
|
+
*/
|
|
179
|
+
this.updatePositionStrategy = input('always', ...(ngDevMode ? [{ debugName: "updatePositionStrategy" }] : []));
|
|
180
|
+
/**
|
|
181
|
+
* Emits when the element is placed.
|
|
182
|
+
*/
|
|
183
|
+
this.placed = output();
|
|
184
|
+
this.arrow = contentChild(forwardRef(() => RdxPopperArrow), ...(ngDevMode ? [{ debugName: "arrow" }] : []));
|
|
185
|
+
this.shouldHideArrow = computed(() => this.position.value()?.middlewareData['arrow']?.centerOffset !== 0, ...(ngDevMode ? [{ debugName: "shouldHideArrow" }] : []));
|
|
186
|
+
this.arrowX = computed(() => this.position.value()?.middlewareData['arrow']?.x, ...(ngDevMode ? [{ debugName: "arrowX" }] : []));
|
|
187
|
+
this.arrowY = computed(() => this.position.value()?.middlewareData['arrow']?.y, ...(ngDevMode ? [{ debugName: "arrowY" }] : []));
|
|
188
|
+
this.desiredPlacement = computed(() => (this.side() + (this.align() !== 'center' ? '-' + this.align() : '')), ...(ngDevMode ? [{ debugName: "desiredPlacement" }] : []));
|
|
189
|
+
this.arrowSize = computed(() => {
|
|
190
|
+
const arrowElementRef = this.arrow()?.elementRef;
|
|
191
|
+
if (!arrowElementRef) {
|
|
192
|
+
return computed(() => ({
|
|
193
|
+
height: 0,
|
|
194
|
+
width: 0
|
|
195
|
+
}));
|
|
196
|
+
}
|
|
197
|
+
return elementSize({
|
|
198
|
+
elementRef: arrowElementRef,
|
|
199
|
+
injector: this.injector
|
|
200
|
+
});
|
|
201
|
+
}, ...(ngDevMode ? [{ debugName: "arrowSize" }] : []));
|
|
202
|
+
this.boundary = computed(() => {
|
|
203
|
+
const boundary = this.collisionBoundary();
|
|
204
|
+
if (Array.isArray(boundary)) {
|
|
205
|
+
return boundary.map((e) => e.nativeElement);
|
|
206
|
+
}
|
|
207
|
+
if (!boundary) {
|
|
208
|
+
return [];
|
|
209
|
+
}
|
|
210
|
+
return [boundary.nativeElement];
|
|
211
|
+
}, ...(ngDevMode ? [{ debugName: "boundary" }] : []));
|
|
212
|
+
this.hasExplicitBoundaries = computed(() => this.boundary().length > 0, ...(ngDevMode ? [{ debugName: "hasExplicitBoundaries" }] : []));
|
|
213
|
+
this.detectOverflowOptions = computed(() => ({
|
|
214
|
+
padding: this.collisionPadding(),
|
|
215
|
+
boundary: this.boundary().filter(isNotNull),
|
|
216
|
+
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
217
|
+
altBoundary: this.hasExplicitBoundaries()
|
|
218
|
+
}), ...(ngDevMode ? [{ debugName: "detectOverflowOptions" }] : []));
|
|
219
|
+
this.position = resource({
|
|
220
|
+
loader: () => computePosition(this.context.anchor().elementRef.nativeElement, this.elementRef.nativeElement, {
|
|
221
|
+
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
222
|
+
strategy: this.positionStrategy(),
|
|
223
|
+
placement: this.desiredPlacement(),
|
|
224
|
+
middleware: [
|
|
225
|
+
offset({
|
|
226
|
+
mainAxis: this.sideOffset() + this.arrowSize()().height || 0,
|
|
227
|
+
alignmentAxis: this.alignOffset()
|
|
228
|
+
}),
|
|
229
|
+
this.avoidCollisions() &&
|
|
230
|
+
shift({
|
|
231
|
+
mainAxis: true,
|
|
232
|
+
crossAxis: false,
|
|
233
|
+
limiter: this.sticky() === 'partial' ? limitShift() : undefined,
|
|
234
|
+
...this.detectOverflowOptions()
|
|
235
|
+
}),
|
|
236
|
+
this.avoidCollisions() && flip({ ...this.detectOverflowOptions() }),
|
|
237
|
+
size({
|
|
238
|
+
...this.detectOverflowOptions(),
|
|
239
|
+
apply: ({ elements, rects, availableWidth, availableHeight }) => {
|
|
240
|
+
const { width: anchorWidth, height: anchorHeight } = rects.reference;
|
|
241
|
+
const contentStyle = elements.floating.style;
|
|
242
|
+
contentStyle.setProperty('--radix-popper-available-width', `${availableWidth}px`);
|
|
243
|
+
contentStyle.setProperty('--radix-popper-available-height', `${availableHeight}px`);
|
|
244
|
+
contentStyle.setProperty('--radix-popper-anchor-width', `${anchorWidth}px`);
|
|
245
|
+
contentStyle.setProperty('--radix-popper-anchor-height', `${anchorHeight}px`);
|
|
246
|
+
}
|
|
247
|
+
}),
|
|
248
|
+
this.arrow() &&
|
|
249
|
+
arrow({
|
|
250
|
+
element: this.arrow().elementRef.nativeElement,
|
|
251
|
+
padding: this.arrowPadding()
|
|
252
|
+
}),
|
|
253
|
+
transformOrigin({
|
|
254
|
+
arrowWidth: this.arrowSize()().width,
|
|
255
|
+
arrowHeight: this.arrowSize()().height
|
|
256
|
+
}),
|
|
257
|
+
this.hideWhenDetached() &&
|
|
258
|
+
hide({
|
|
259
|
+
strategy: 'referenceHidden',
|
|
260
|
+
...this.detectOverflowOptions()
|
|
261
|
+
})
|
|
262
|
+
]
|
|
263
|
+
})
|
|
264
|
+
});
|
|
265
|
+
/**
|
|
266
|
+
* Whether the panel is positioned.
|
|
267
|
+
*/
|
|
268
|
+
this.isPositioned = computed(() => this.position.hasValue(), ...(ngDevMode ? [{ debugName: "isPositioned" }] : []));
|
|
269
|
+
/**
|
|
270
|
+
* The current placement of the panel.
|
|
271
|
+
*/
|
|
272
|
+
this.placement = computed(() => {
|
|
273
|
+
const placement = this.position.value()?.placement;
|
|
274
|
+
if (!placement) {
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
const [side, align = 'center'] = placement.split('-');
|
|
278
|
+
return {
|
|
279
|
+
side: side,
|
|
280
|
+
align: align
|
|
281
|
+
};
|
|
282
|
+
}, ...(ngDevMode ? [{ debugName: "placement" }] : []));
|
|
283
|
+
/**
|
|
284
|
+
* The side the panel is currently placed against.
|
|
285
|
+
*/
|
|
286
|
+
this.placedSide = computed(() => this.placement()?.side, ...(ngDevMode ? [{ debugName: "placedSide" }] : []));
|
|
287
|
+
/**
|
|
288
|
+
* The current alignment of the panel.
|
|
289
|
+
*/
|
|
290
|
+
this.placedAlign = computed(() => this.placement()?.align, ...(ngDevMode ? [{ debugName: "placedAlign" }] : []));
|
|
291
|
+
this.contentElementRef = contentChild.required(RdxPopperContent, {
|
|
292
|
+
read: ElementRef
|
|
293
|
+
});
|
|
294
|
+
this.contentZIndex = computed(() => {
|
|
295
|
+
if (!this.isBrowser) {
|
|
296
|
+
return 0;
|
|
297
|
+
}
|
|
298
|
+
return getComputedStyle(this.contentElementRef().nativeElement).zIndex;
|
|
299
|
+
}, ...(ngDevMode ? [{ debugName: "contentZIndex" }] : []));
|
|
300
|
+
this.style = computed(() => {
|
|
301
|
+
const pos = this.position.value();
|
|
302
|
+
const x = pos?.x;
|
|
303
|
+
const y = pos?.y;
|
|
304
|
+
const ready = Number.isFinite(x) && Number.isFinite(y);
|
|
305
|
+
return {
|
|
306
|
+
position: this.positionStrategy(),
|
|
307
|
+
transform: this.isPositioned() ? '' : 'translate(0, -200%)', // keep off the page when measuring
|
|
308
|
+
minWidth: 'max-content',
|
|
309
|
+
zIndex: this.contentZIndex(),
|
|
310
|
+
top: Number.isFinite(y) ? `${y}px` : '',
|
|
311
|
+
left: Number.isFinite(x) ? `${x}px` : '',
|
|
312
|
+
'--radix-popper-transform-origin': [
|
|
313
|
+
pos?.middlewareData['transformOrigin']?.x,
|
|
314
|
+
pos?.middlewareData['transformOrigin']?.y
|
|
315
|
+
].join(' '),
|
|
316
|
+
visibility: ready ? 'visible' : 'hidden',
|
|
317
|
+
pointerEvents: ready ? 'auto' : 'none',
|
|
318
|
+
// hide the content if using the hide middleware and should be hidden
|
|
319
|
+
// set visibility to hidden and disable pointer events so the UI behaves
|
|
320
|
+
// as if the PopperContent isn't there at all
|
|
321
|
+
...(pos?.middlewareData.hide?.referenceHidden && {
|
|
322
|
+
visibility: 'hidden',
|
|
323
|
+
pointerEvents: 'none'
|
|
324
|
+
})
|
|
325
|
+
};
|
|
326
|
+
}, ...(ngDevMode ? [{ debugName: "style" }] : []));
|
|
327
|
+
this.afterNextRender = afterNextRender(() => {
|
|
328
|
+
this.position.reload();
|
|
329
|
+
const cleanup = autoUpdate(this.context.anchor().elementRef.nativeElement, this.elementRef.nativeElement, () => this.position.reload(), {
|
|
330
|
+
animationFrame: this.updatePositionStrategy() === 'always'
|
|
331
|
+
});
|
|
332
|
+
this.destroyRef.onDestroy(() => {
|
|
333
|
+
cleanup();
|
|
334
|
+
});
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: RdxPopperContentWrapper, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
338
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.3", type: RdxPopperContentWrapper, isStandalone: true, selector: "[rdxPopperContentWrapper]", inputs: { 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" }, host: { attributes: { "data-radix-popper-content-wrapper": "" }, properties: { "style": "style()" } }, providers: [providePopperContentWrapperContext(context)], queries: [{ propertyName: "arrow", first: true, predicate: i0.forwardRef(() => RdxPopperArrow), descendants: true, isSignal: true }, { propertyName: "contentElementRef", first: true, predicate: RdxPopperContent, descendants: true, read: ElementRef, isSignal: true }], ngImport: i0 }); }
|
|
339
|
+
}
|
|
340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: RdxPopperContentWrapper, decorators: [{
|
|
341
|
+
type: Directive,
|
|
342
|
+
args: [{
|
|
343
|
+
selector: '[rdxPopperContentWrapper]',
|
|
344
|
+
providers: [providePopperContentWrapperContext(context)],
|
|
345
|
+
host: {
|
|
346
|
+
'data-radix-popper-content-wrapper': '',
|
|
347
|
+
'[style]': 'style()'
|
|
348
|
+
}
|
|
349
|
+
}]
|
|
350
|
+
}] });
|
|
351
|
+
|
|
352
|
+
const OPPOSITE_SIDE = {
|
|
353
|
+
top: 'bottom',
|
|
354
|
+
right: 'left',
|
|
355
|
+
bottom: 'top',
|
|
356
|
+
left: 'right'
|
|
357
|
+
};
|
|
358
|
+
class RdxPopperArrow {
|
|
359
|
+
constructor() {
|
|
360
|
+
this.popperContentContext = injectPopperContentWrapperContext();
|
|
361
|
+
this.environmentInjector = inject(EnvironmentInjector);
|
|
362
|
+
this.elementRef = inject(ElementRef);
|
|
363
|
+
this.width = input(10, ...(ngDevMode ? [{ debugName: "width", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
364
|
+
this.height = input(5, ...(ngDevMode ? [{ debugName: "height", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
365
|
+
this.baseSide = computed(() => OPPOSITE_SIDE[this.popperContentContext.placedSide()], ...(ngDevMode ? [{ debugName: "baseSide" }] : []));
|
|
366
|
+
this.style = computed(() => {
|
|
367
|
+
return {
|
|
368
|
+
position: 'absolute',
|
|
369
|
+
left: this.popperContentContext.arrowX() ? `${this.popperContentContext.arrowX()}px` : undefined,
|
|
370
|
+
top: this.popperContentContext.arrowY() ? `${this.popperContentContext.arrowY()}px` : undefined,
|
|
371
|
+
[this.baseSide()]: 0,
|
|
372
|
+
transformOrigin: {
|
|
373
|
+
top: '',
|
|
374
|
+
right: '0 0',
|
|
375
|
+
bottom: 'center 0',
|
|
376
|
+
left: '100% 0'
|
|
377
|
+
}[this.popperContentContext.placedSide()],
|
|
378
|
+
transform: {
|
|
379
|
+
top: 'translateY(100%)',
|
|
380
|
+
right: 'translateY(50%) rotate(90deg) translateX(-50%)',
|
|
381
|
+
bottom: `rotate(180deg)`,
|
|
382
|
+
left: 'translateY(50%) rotate(-90deg) translateX(50%)'
|
|
383
|
+
}[this.popperContentContext.placedSide()],
|
|
384
|
+
visibility: this.popperContentContext.shouldHideArrow() ? 'hidden' : undefined
|
|
385
|
+
};
|
|
386
|
+
}, ...(ngDevMode ? [{ debugName: "style" }] : []));
|
|
387
|
+
this.onCleanup = effect((onCleanup) => {
|
|
388
|
+
const component = createComponent(RdxArrow, {
|
|
389
|
+
environmentInjector: this.environmentInjector,
|
|
390
|
+
hostElement: this.elementRef.nativeElement,
|
|
391
|
+
projectableNodes: [Array.from(this.elementRef.nativeElement.childNodes)],
|
|
392
|
+
bindings: [inputBinding('width', () => this.width()), inputBinding('height', () => this.height())]
|
|
393
|
+
});
|
|
394
|
+
component.changeDetectorRef.detectChanges();
|
|
395
|
+
onCleanup(() => component.destroy());
|
|
396
|
+
}, ...(ngDevMode ? [{ debugName: "onCleanup" }] : []));
|
|
397
|
+
}
|
|
398
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: RdxPopperArrow, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
399
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.3", type: RdxPopperArrow, isStandalone: true, selector: "[rdxPopperArrow]", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style": "style()" } }, ngImport: i0 }); }
|
|
400
|
+
}
|
|
401
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: RdxPopperArrow, decorators: [{
|
|
402
|
+
type: Directive,
|
|
403
|
+
args: [{
|
|
404
|
+
selector: '[rdxPopperArrow]',
|
|
405
|
+
host: {
|
|
406
|
+
'[style]': 'style()'
|
|
407
|
+
}
|
|
408
|
+
}]
|
|
409
|
+
}] });
|
|
410
|
+
|
|
411
|
+
const popperImports = [RdxPopper, RdxPopperArrow, RdxPopperContentWrapper, RdxPopperContent, RdxPopperAnchor];
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Generated bundle index. Do not edit.
|
|
415
|
+
*/
|
|
416
|
+
|
|
417
|
+
export { RdxPopper, RdxPopperAnchor, RdxPopperArrow, RdxPopperContent, RdxPopperContentWrapper, getSideAndAlignFromPlacement, injectPopperContentWrapperContext, isNotNull, popperImports, providePopperContentWrapperContext, transformOrigin };
|
|
418
|
+
//# sourceMappingURL=radix-ng-primitives-popper.mjs.map
|