@radix-ng/primitives 0.11.0 → 0.12.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/.compodocrc.json +12 -0
- package/CHANGELOG.md +182 -0
- package/LICENSE +21 -0
- package/accordion/__tests__/accordion-content.directive.spec.ts +8 -0
- package/accordion/__tests__/accordion-header.directive.spec.ts +8 -0
- package/accordion/__tests__/accordion-item.directive.spec.ts +8 -0
- package/accordion/__tests__/accordion-root.directive.spec.ts +8 -0
- package/accordion/__tests__/accordion-trigger.directive.spec.ts +8 -0
- package/accordion/ng-package.json +5 -0
- package/accordion/src/accordion-content.directive.ts +46 -0
- package/accordion/src/accordion-header.directive.ts +15 -0
- package/accordion/src/accordion-item.directive.ts +216 -0
- package/accordion/src/accordion-root.directive.ts +205 -0
- package/accordion/src/accordion-trigger.directive.ts +37 -0
- package/accordion/stories/accordion.docs.mdx +77 -0
- package/accordion/stories/accordion.stories.ts +340 -0
- package/alert-dialog/{index.d.ts → index.ts} +1 -0
- package/alert-dialog/ng-package.json +5 -0
- package/alert-dialog/src/alert-dialog-cancel.directive.ts +17 -0
- package/alert-dialog/src/alert-dialog-content.directive.ts +24 -0
- package/alert-dialog/src/alert-dialog-root.directive.ts +15 -0
- package/alert-dialog/src/alert-dialog-title.directive.ts +7 -0
- package/alert-dialog/src/alert-dialog-trigger.directive.ts +17 -0
- package/alert-dialog/src/alert-dialog.service.ts +51 -0
- package/alert-dialog/stories/alert-dialog.stories.ts +139 -0
- package/avatar/__tests__/avatar-fallback.directive.spec.ts +31 -0
- package/avatar/__tests__/avatar-image.directive.spec.ts +36 -0
- package/avatar/ng-package.json +5 -0
- package/avatar/src/avatar-fallback.directive.ts +62 -0
- package/avatar/src/avatar-image.directive.ts +55 -0
- package/avatar/src/avatar-root.directive.ts +35 -0
- package/avatar/src/avatar.config.ts +29 -0
- package/avatar/stories/avatar.docs.mdx +37 -0
- package/avatar/stories/avatar.stories.ts +87 -0
- package/button/__tests__/.gitkeep +0 -0
- package/button/src/button-abstract.directive.ts +46 -0
- package/checkbox/ng-package.json +5 -0
- package/checkbox/src/checkbox-button.directive.ts +26 -0
- package/checkbox/src/checkbox-indicator.directive.ts +16 -0
- package/checkbox/src/checkbox-input.directive.ts +36 -0
- package/checkbox/src/checkbox.directive.ts +146 -0
- package/checkbox/src/checkbox.token.ts +8 -0
- package/checkbox/stories/checkbox-group.component.ts +87 -0
- package/checkbox/stories/checkbox-group.styles.scss +49 -0
- package/checkbox/stories/checkbox-indeterminate.component.ts +52 -0
- package/checkbox/stories/checkbox.docs.mdx +58 -0
- package/checkbox/stories/checkbox.stories.ts +105 -0
- package/collapsible/__tests__/collapsible-content.directive.spec.ts +30 -0
- package/collapsible/__tests__/collapsible-root.directive.spec.ts +27 -0
- package/collapsible/__tests__/collapsible-trigger.directive.spec.ts +30 -0
- package/collapsible/ng-package.json +5 -0
- package/collapsible/src/collapsible-content.directive.ts +34 -0
- package/collapsible/src/collapsible-content.token.ts +6 -0
- package/collapsible/src/collapsible-root.directive.ts +120 -0
- package/collapsible/src/collapsible-trigger.directive.ts +44 -0
- package/collapsible/stories/collapsible-animation.component.ts +116 -0
- package/collapsible/stories/collapsible-external-triggering.component.ts +86 -0
- package/collapsible/stories/collapsible.docs.mdx +53 -0
- package/collapsible/stories/collapsible.stories.ts +151 -0
- package/context-menu/README.md +1 -0
- package/context-menu/index.ts +10 -0
- package/context-menu/ng-package.json +5 -0
- package/context-menu/src/context-menu-content.directive.ts +47 -0
- package/context-menu/src/context-menu-item-checkbox.directive.ts +30 -0
- package/context-menu/src/context-menu-item-indicator.directive.ts +14 -0
- package/context-menu/src/context-menu-item-radio-group.directive.ts +31 -0
- package/context-menu/src/context-menu-item-radio.directive.ts +69 -0
- package/context-menu/src/context-menu-item-selectable.ts +18 -0
- package/context-menu/src/context-menu-item.directive.ts +65 -0
- package/context-menu/src/context-menu-label.directive.ts +7 -0
- package/context-menu/src/context-menu-separator.directive.ts +13 -0
- package/context-menu/src/context-menu-trigger.directive.ts +82 -0
- package/context-menu/stories/context-menu.docs.mdx +23 -0
- package/context-menu/stories/context-menu.stories.ts +253 -0
- package/core/index.ts +3 -0
- package/core/src/accessor/provide-value-accessor.ts +20 -0
- package/core/src/auto-focus.directive.ts +81 -0
- package/core/src/inject-ng-control.ts +28 -0
- package/core/src/mount.ts +27 -0
- package/dialog/README.md +1 -0
- package/dialog/__tests__/dialog-content.directive.spec.ts +77 -0
- package/dialog/__tests__/dialog-trigger.directive.spec.ts +85 -0
- package/dialog/index.ts +31 -0
- package/dialog/ng-package.json +5 -0
- package/dialog/src/dialog-close.directive.ts +18 -0
- package/dialog/src/dialog-content.directive.ts +45 -0
- package/dialog/src/dialog-description.directive.ts +7 -0
- package/dialog/src/dialog-dismiss.directive.ts +18 -0
- package/dialog/src/dialog-ref.ts +70 -0
- package/dialog/src/dialog-title.directive.ts +7 -0
- package/dialog/src/dialog-trigger.directive.ts +52 -0
- package/dialog/src/dialog.config.ts +55 -0
- package/dialog/src/dialog.injectors.ts +12 -0
- package/dialog/src/dialog.providers.ts +27 -0
- package/dialog/src/dialog.service.ts +94 -0
- package/dialog/stories/dialog.docs.mdx +32 -0
- package/dialog/stories/dialog.stories.ts +233 -0
- package/dropdown-menu/ng-package.json +5 -0
- package/dropdown-menu/src/dropdown-menu-content.directive.ts +47 -0
- package/dropdown-menu/src/dropdown-menu-item-checkbox.directive.ts +30 -0
- package/dropdown-menu/src/dropdown-menu-item-indicator.directive.ts +14 -0
- package/dropdown-menu/src/dropdown-menu-item-radio-group.directive.ts +31 -0
- package/dropdown-menu/src/dropdown-menu-item-radio.directive.ts +72 -0
- package/dropdown-menu/src/dropdown-menu-item-selectable.ts +18 -0
- package/dropdown-menu/src/dropdown-menu-item.directive.ts +66 -0
- package/dropdown-menu/src/dropdown-menu-label.directive.ts +7 -0
- package/dropdown-menu/src/dropdown-menu-separator.directive.ts +13 -0
- package/dropdown-menu/src/dropdown-menu-trigger.directive.ts +185 -0
- package/dropdown-menu/stories/dropdown-menu-item-checkbox.component.ts +104 -0
- package/dropdown-menu/stories/dropdown-menu-item-checkbox.styles.scss +106 -0
- package/dropdown-menu/stories/dropdown-menu-item-radio.component.ts +95 -0
- package/dropdown-menu/stories/dropdown-menu-item-radio.styles.scss +106 -0
- package/dropdown-menu/stories/dropdown.docs.mdx +27 -0
- package/dropdown-menu/stories/dropdown.stories.ts +212 -0
- package/form-field/index.ts +1 -0
- package/form-field/src/.gitkeep +0 -0
- package/jest.config.ts +21 -0
- package/label/__tests__/label-root.directive.spec.ts +99 -0
- package/label/ng-package.json +5 -0
- package/label/src/label.directive.ts +58 -0
- package/label/stories/label.docs.mdx +40 -0
- package/label/stories/label.stories.ts +76 -0
- package/menu/index.ts +29 -0
- package/menu/ng-package.json +5 -0
- package/menu/src/menu-content.directive.ts +9 -0
- package/menu/src/menu-directive.ts +10 -0
- package/menu/src/menu-group.directive.ts +12 -0
- package/menu/src/menu-item.directive.ts +44 -0
- package/menu/src/menu-label.directive.ts +7 -0
- package/menu/src/menu-separator.directive.ts +13 -0
- package/menubar/index.ts +38 -0
- package/menubar/ng-package.json +5 -0
- package/menubar/src/menubar-content.directive.ts +9 -0
- package/menubar/src/menubar-item-checkbox.directive.ts +32 -0
- package/menubar/src/menubar-item-indicator.directive.ts +10 -0
- package/menubar/src/menubar-item-radio.directive.ts +33 -0
- package/menubar/src/menubar-item.directive.ts +12 -0
- package/menubar/src/menubar-radio-group.directive.ts +9 -0
- package/menubar/src/menubar-root.directive.ts +15 -0
- package/menubar/src/menubar-separator.directive.ts +9 -0
- package/menubar/src/menubar-trigger.directive.ts +40 -0
- package/menubar/stories/menubar.stories.ts +229 -0
- package/ng-package.json +8 -0
- package/package.json +4 -112
- package/portal/stories/portal.docs.mdx +85 -0
- package/presence/__test__/presence-test.component.ts +51 -0
- package/presence/__test__/presence.spec.ts +50 -0
- package/presence/index.ts +4 -0
- package/presence/src/presence.ts +119 -0
- package/presence/src/transitions/transition.collapse.ts +99 -0
- package/presence/src/transitions/transition.toast.ts +27 -0
- package/presence/src/types.ts +20 -0
- package/presence/src/utils.ts +63 -0
- package/presence/stories/presence-story.componen.ts +69 -0
- package/presence/stories/presence.docs.mdx +40 -0
- package/presence/stories/presence.stories.ts +29 -0
- package/progress/__test__/progress.spec.ts +55 -0
- package/progress/{index.d.ts → index.ts} +1 -0
- package/progress/ng-package.json +5 -0
- package/progress/src/progress-indicator.directive.ts +26 -0
- package/progress/src/progress-root.directive.ts +134 -0
- package/progress/stories/progress.docs.mdx +65 -0
- package/progress/stories/progress.stories.ts +66 -0
- package/project.json +39 -0
- package/radio/{index.d.ts → index.ts} +1 -0
- package/radio/ng-package.json +5 -0
- package/radio/src/radio-indicator.directive.ts +17 -0
- package/radio/src/radio-item.directive.ts +68 -0
- package/radio/src/radio-root.directive.ts +207 -0
- package/radio/src/{radio-tokens.d.ts → radio-tokens.ts} +5 -1
- package/radio/stories/radio-group.component.ts +39 -0
- package/radio/stories/radio-group.styles.scss +70 -0
- package/radio/stories/radio.docs.mdx +68 -0
- package/radio/stories/radio.stories.ts +155 -0
- package/separator/__tests__/separator.directive.spec.ts +58 -0
- package/separator/ng-package.json +5 -0
- package/separator/src/separator.directive.ts +35 -0
- package/separator/stories/separator.docs.mdx +37 -0
- package/separator/stories/separator.stories.ts +82 -0
- package/slider/src/slider-input.directive.ts +0 -0
- package/slider/src/slider-thumb.directives.ts +60 -0
- package/slider/src/slider-track.directive.ts +11 -0
- package/slider/src/slider.directive.ts +59 -0
- package/slider/src/slider.types.ts +4 -0
- package/switch/index.ts +22 -0
- package/switch/ng-package.json +5 -0
- package/switch/src/switch-input.directive.ts +24 -0
- package/switch/src/switch-root.directive.ts +127 -0
- package/switch/src/switch-thumb.directive.ts +15 -0
- package/switch/stories/switch.docs.mdx +83 -0
- package/switch/stories/switch.stories.ts +149 -0
- package/tabs/__tests__/tabs-context.service.spec.ts +35 -0
- package/tabs/index.ts +26 -0
- package/tabs/ng-package.json +5 -0
- package/tabs/src/tabs-content.directive.ts +23 -0
- package/tabs/src/tabs-context.service.ts +43 -0
- package/tabs/src/tabs-list.directive.ts +21 -0
- package/tabs/src/tabs-root.directive.ts +70 -0
- package/tabs/src/tabs-trigger.directive.ts +55 -0
- package/tabs/stories/tabs.stories.ts +213 -0
- package/test-setup.ts +1 -0
- package/toggle/__tests__/toggle.directive.spec.ts +87 -0
- package/toggle/ng-package.json +5 -0
- package/toggle/src/toggle.directive.ts +49 -0
- package/toggle/stories/toggle.docs.mdx +60 -0
- package/toggle/stories/toggle.stories.ts +84 -0
- package/toggle-group/ng-package.json +5 -0
- package/toggle-group/src/toggle-group-button.directive.ts +73 -0
- package/toggle-group/src/toggle-group-button.token.ts +8 -0
- package/toggle-group/src/toggle-group-multi.directive.ts +158 -0
- package/toggle-group/src/toggle-group.directive.ts +148 -0
- package/toggle-group/src/toggle-group.token.ts +11 -0
- package/toggle-group/stories/toggle-group.docs.mdx +87 -0
- package/toggle-group/stories/toggle-group.stories.ts +95 -0
- package/tsconfig.doc.json +11 -0
- package/tsconfig.json +29 -0
- package/tsconfig.lib.json +19 -0
- package/tsconfig.lib.prod.json +12 -0
- package/tsconfig.spec.json +11 -0
- package/visually-hidden/README.md +3 -0
- package/visually-hidden/stories/visually-hidden.docs.mdx +36 -0
- package/accordion/src/accordion-content.directive.d.ts +0 -16
- package/accordion/src/accordion-header.directive.d.ts +0 -7
- package/accordion/src/accordion-item.directive.d.ts +0 -62
- package/accordion/src/accordion-root.directive.d.ts +0 -78
- package/accordion/src/accordion-trigger.directive.d.ts +0 -15
- 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/avatar/src/avatar-fallback.directive.d.ts +0 -27
- package/avatar/src/avatar-image.directive.d.ts +0 -16
- package/avatar/src/avatar-root.directive.d.ts +0 -21
- package/avatar/src/avatar.config.d.ts +0 -13
- 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 -9
- package/checkbox/src/checkbox.directive.d.ts +0 -75
- package/checkbox/src/checkbox.token.d.ts +0 -4
- package/collapsible/src/collapsible-content.directive.d.ts +0 -17
- package/collapsible/src/collapsible-content.token.d.ts +0 -3
- package/collapsible/src/collapsible-root.directive.d.ts +0 -55
- package/collapsible/src/collapsible-trigger.directive.d.ts +0 -26
- package/compodoc/documentation.json +0 -11395
- 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 -5
- package/dropdown-menu/src/dropdown-menu-separator.directive.d.ts +0 -6
- package/dropdown-menu/src/dropdown-menu-trigger.directive.d.ts +0 -43
- package/esm2022/accordion/index.mjs +0 -6
- package/esm2022/accordion/radix-ng-primitives-accordion.mjs +0 -5
- package/esm2022/accordion/src/accordion-content.directive.mjs +0 -36
- package/esm2022/accordion/src/accordion-header.directive.mjs +0 -23
- package/esm2022/accordion/src/accordion-item.directive.mjs +0 -170
- package/esm2022/accordion/src/accordion-root.directive.mjs +0 -157
- package/esm2022/accordion/src/accordion-trigger.directive.mjs +0 -42
- package/esm2022/alert-dialog/index.mjs +0 -7
- package/esm2022/alert-dialog/radix-ng-primitives-alert-dialog.mjs +0 -5
- package/esm2022/alert-dialog/src/alert-dialog-cancel.directive.mjs +0 -24
- package/esm2022/alert-dialog/src/alert-dialog-content.directive.mjs +0 -34
- package/esm2022/alert-dialog/src/alert-dialog-root.directive.mjs +0 -25
- package/esm2022/alert-dialog/src/alert-dialog-title.directive.mjs +0 -14
- package/esm2022/alert-dialog/src/alert-dialog-trigger.directive.mjs +0 -24
- package/esm2022/alert-dialog/src/alert-dialog.service.mjs +0 -47
- package/esm2022/avatar/index.mjs +0 -5
- package/esm2022/avatar/radix-ng-primitives-avatar.mjs +0 -5
- package/esm2022/avatar/src/avatar-fallback.directive.mjs +0 -54
- package/esm2022/avatar/src/avatar-image.directive.mjs +0 -48
- package/esm2022/avatar/src/avatar-root.directive.mjs +0 -38
- package/esm2022/avatar/src/avatar.config.mjs +0 -17
- package/esm2022/checkbox/index.mjs +0 -6
- package/esm2022/checkbox/radix-ng-primitives-checkbox.mjs +0 -5
- package/esm2022/checkbox/src/checkbox-button.directive.mjs +0 -33
- package/esm2022/checkbox/src/checkbox-indicator.directive.mjs +0 -24
- package/esm2022/checkbox/src/checkbox-input.directive.mjs +0 -41
- package/esm2022/checkbox/src/checkbox.directive.mjs +0 -141
- package/esm2022/checkbox/src/checkbox.token.mjs +0 -6
- package/esm2022/collapsible/index.mjs +0 -4
- package/esm2022/collapsible/radix-ng-primitives-collapsible.mjs +0 -5
- package/esm2022/collapsible/src/collapsible-content.directive.mjs +0 -45
- package/esm2022/collapsible/src/collapsible-content.token.mjs +0 -3
- package/esm2022/collapsible/src/collapsible-root.directive.mjs +0 -118
- package/esm2022/collapsible/src/collapsible-trigger.directive.mjs +0 -49
- package/esm2022/dropdown-menu/index.mjs +0 -11
- package/esm2022/dropdown-menu/radix-ng-primitives-dropdown-menu.mjs +0 -5
- package/esm2022/dropdown-menu/src/dropdown-menu-content.directive.mjs +0 -56
- package/esm2022/dropdown-menu/src/dropdown-menu-item-checkbox.directive.mjs +0 -36
- package/esm2022/dropdown-menu/src/dropdown-menu-item-indicator.directive.mjs +0 -22
- package/esm2022/dropdown-menu/src/dropdown-menu-item-radio-group.directive.mjs +0 -37
- package/esm2022/dropdown-menu/src/dropdown-menu-item-radio.directive.mjs +0 -64
- package/esm2022/dropdown-menu/src/dropdown-menu-item-selectable.mjs +0 -31
- package/esm2022/dropdown-menu/src/dropdown-menu-item.directive.mjs +0 -71
- package/esm2022/dropdown-menu/src/dropdown-menu-label.directive.mjs +0 -14
- package/esm2022/dropdown-menu/src/dropdown-menu-separator.directive.mjs +0 -21
- package/esm2022/dropdown-menu/src/dropdown-menu-trigger.directive.mjs +0 -176
- package/esm2022/index.mjs +0 -2
- package/esm2022/label/index.mjs +0 -2
- package/esm2022/label/radix-ng-primitives-label.mjs +0 -5
- package/esm2022/label/src/label.directive.mjs +0 -59
- package/esm2022/menu/index.mjs +0 -45
- package/esm2022/menu/radix-ng-primitives-menu.mjs +0 -5
- package/esm2022/menu/src/menu-content.directive.mjs +0 -17
- package/esm2022/menu/src/menu-directive.mjs +0 -18
- package/esm2022/menu/src/menu-group.directive.mjs +0 -20
- package/esm2022/menu/src/menu-item.directive.mjs +0 -46
- package/esm2022/menu/src/menu-label.directive.mjs +0 -14
- package/esm2022/menu/src/menu-separator.directive.mjs +0 -21
- package/esm2022/menubar/index.mjs +0 -60
- package/esm2022/menubar/radix-ng-primitives-menubar.mjs +0 -5
- package/esm2022/menubar/src/menubar-content.directive.mjs +0 -17
- package/esm2022/menubar/src/menubar-item-checkbox.directive.mjs +0 -34
- package/esm2022/menubar/src/menubar-item-indicator.directive.mjs +0 -17
- package/esm2022/menubar/src/menubar-item-radio.directive.mjs +0 -35
- package/esm2022/menubar/src/menubar-item.directive.mjs +0 -20
- package/esm2022/menubar/src/menubar-radio-group.directive.mjs +0 -17
- package/esm2022/menubar/src/menubar-root.directive.mjs +0 -24
- package/esm2022/menubar/src/menubar-separator.directive.mjs +0 -17
- package/esm2022/menubar/src/menubar-trigger.directive.mjs +0 -45
- package/esm2022/progress/index.mjs +0 -3
- package/esm2022/progress/radix-ng-primitives-progress.mjs +0 -5
- package/esm2022/progress/src/progress-indicator.directive.mjs +0 -34
- package/esm2022/progress/src/progress-root.directive.mjs +0 -127
- package/esm2022/radio/index.mjs +0 -4
- package/esm2022/radio/radix-ng-primitives-radio.mjs +0 -5
- package/esm2022/radio/src/radio-indicator.directive.mjs +0 -25
- package/esm2022/radio/src/radio-item.directive.mjs +0 -70
- package/esm2022/radio/src/radio-root.directive.mjs +0 -194
- package/esm2022/radio/src/radio-tokens.mjs +0 -3
- package/esm2022/radix-ng-primitives.mjs +0 -5
- package/esm2022/separator/index.mjs +0 -2
- package/esm2022/separator/radix-ng-primitives-separator.mjs +0 -5
- package/esm2022/separator/src/separator.directive.mjs +0 -31
- package/esm2022/switch/index.mjs +0 -30
- package/esm2022/switch/radix-ng-primitives-switch.mjs +0 -5
- package/esm2022/switch/src/switch-input.directive.mjs +0 -32
- package/esm2022/switch/src/switch-root.directive.mjs +0 -95
- package/esm2022/switch/src/switch-thumb.directive.mjs +0 -23
- package/esm2022/tabs/index.mjs +0 -38
- package/esm2022/tabs/radix-ng-primitives-tabs.mjs +0 -5
- package/esm2022/tabs/src/tabs-content.directive.mjs +0 -29
- package/esm2022/tabs/src/tabs-context.service.mjs +0 -43
- package/esm2022/tabs/src/tabs-list.directive.mjs +0 -23
- package/esm2022/tabs/src/tabs-root.directive.mjs +0 -54
- package/esm2022/tabs/src/tabs-trigger.directive.mjs +0 -52
- package/esm2022/toggle/index.mjs +0 -2
- package/esm2022/toggle/radix-ng-primitives-toggle.mjs +0 -5
- package/esm2022/toggle/src/toggle.directive.mjs +0 -39
- package/esm2022/toggle-group/index.mjs +0 -6
- package/esm2022/toggle-group/radix-ng-primitives-toggle-group.mjs +0 -5
- package/esm2022/toggle-group/src/toggle-group-button.directive.mjs +0 -75
- package/esm2022/toggle-group/src/toggle-group-button.token.mjs +0 -6
- package/esm2022/toggle-group/src/toggle-group-multi.directive.mjs +0 -143
- package/esm2022/toggle-group/src/toggle-group.directive.mjs +0 -134
- package/esm2022/toggle-group/src/toggle-group.token.mjs +0 -6
- package/fesm2022/radix-ng-primitives-accordion.mjs +0 -418
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs +0 -161
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-avatar.mjs +0 -156
- package/fesm2022/radix-ng-primitives-avatar.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +0 -241
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +0 -213
- package/fesm2022/radix-ng-primitives-collapsible.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +0 -502
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-label.mjs +0 -66
- package/fesm2022/radix-ng-primitives-label.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +0 -158
- package/fesm2022/radix-ng-primitives-menu.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-menubar.mjs +0 -245
- package/fesm2022/radix-ng-primitives-menubar.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-progress.mjs +0 -165
- package/fesm2022/radix-ng-primitives-progress.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +0 -289
- package/fesm2022/radix-ng-primitives-radio.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-separator.mjs +0 -38
- package/fesm2022/radix-ng-primitives-separator.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +0 -173
- package/fesm2022/radix-ng-primitives-switch.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-tabs.mjs +0 -222
- package/fesm2022/radix-ng-primitives-tabs.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +0 -358
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +0 -46
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives.mjs +0 -4
- package/fesm2022/radix-ng-primitives.mjs.map +0 -1
- package/label/src/label.directive.d.ts +0 -29
- package/menu/index.d.ts +0 -18
- 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.directive.d.ts +0 -12
- package/menu/src/menu-label.directive.d.ts +0 -5
- package/menu/src/menu-separator.directive.d.ts +0 -6
- package/menubar/index.d.ts +0 -24
- package/menubar/src/menubar-content.directive.d.ts +0 -6
- package/menubar/src/menubar-item-checkbox.directive.d.ts +0 -14
- package/menubar/src/menubar-item-indicator.directive.d.ts +0 -5
- package/menubar/src/menubar-item-radio.directive.d.ts +0 -14
- package/menubar/src/menubar-item.directive.d.ts +0 -8
- package/menubar/src/menubar-radio-group.directive.d.ts +0 -6
- package/menubar/src/menubar-root.directive.d.ts +0 -7
- package/menubar/src/menubar-separator.directive.d.ts +0 -6
- package/menubar/src/menubar-trigger.directive.d.ts +0 -11
- package/progress/src/progress-indicator.directive.d.ts +0 -16
- package/progress/src/progress-root.directive.d.ts +0 -63
- package/radio/src/radio-indicator.directive.d.ts +0 -9
- package/radio/src/radio-item.directive.d.ts +0 -21
- package/radio/src/radio-root.directive.d.ts +0 -72
- package/separator/src/separator.directive.d.ts +0 -22
- package/switch/index.d.ts +0 -13
- package/switch/src/switch-input.directive.d.ts +0 -6
- package/switch/src/switch-root.directive.d.ts +0 -51
- package/switch/src/switch-thumb.directive.d.ts +0 -6
- package/tabs/index.d.ts +0 -15
- package/tabs/src/tabs-content.directive.d.ts +0 -8
- package/tabs/src/tabs-context.service.d.ts +0 -22
- package/tabs/src/tabs-list.directive.d.ts +0 -6
- package/tabs/src/tabs-root.directive.d.ts +0 -37
- package/tabs/src/tabs-trigger.directive.d.ts +0 -19
- package/toggle/src/toggle.directive.d.ts +0 -30
- package/toggle-group/src/toggle-group-button.directive.d.ts +0 -39
- package/toggle-group/src/toggle-group-button.token.d.ts +0 -4
- package/toggle-group/src/toggle-group-multi.directive.d.ts +0 -93
- package/toggle-group/src/toggle-group.directive.d.ts +0 -84
- package/toggle-group/src/toggle-group.token.d.ts +0 -5
- /package/accordion/{index.d.ts → index.ts} +0 -0
- /package/avatar/{index.d.ts → index.ts} +0 -0
- /package/checkbox/{index.d.ts → index.ts} +0 -0
- /package/collapsible/{index.d.ts → index.ts} +0 -0
- /package/dropdown-menu/{index.d.ts → index.ts} +0 -0
- /package/{index.d.ts → index.ts} +0 -0
- /package/label/{index.d.ts → index.ts} +0 -0
- /package/separator/{index.d.ts → index.ts} +0 -0
- /package/toggle/{index.d.ts → index.ts} +0 -0
- /package/toggle-group/{index.d.ts → index.ts} +0 -0
@@ -1,418 +0,0 @@
|
|
1
|
-
import * as i0 from '@angular/core';
|
2
|
-
import { InjectionToken, inject, EventEmitter, booleanAttribute, Directive, Input, ContentChildren, forwardRef, Output, ElementRef, ChangeDetectorRef, ContentChild } from '@angular/core';
|
3
|
-
import { UniqueSelectionDispatcher } from '@angular/cdk/collections';
|
4
|
-
import { Subject, merge, Subscription } from 'rxjs';
|
5
|
-
import { FocusKeyManager } from '@angular/cdk/a11y';
|
6
|
-
import { Directionality } from '@angular/cdk/bidi';
|
7
|
-
import { ENTER, SPACE } from '@angular/cdk/keycodes';
|
8
|
-
|
9
|
-
const RdxAccordionRootToken = new InjectionToken('RdxAccordionRootDirective');
|
10
|
-
let nextId$1 = 0;
|
11
|
-
class RdxAccordionRootDirective {
|
12
|
-
constructor() {
|
13
|
-
this.selectionDispatcher = inject(UniqueSelectionDispatcher);
|
14
|
-
this.dir = inject(Directionality, { optional: true });
|
15
|
-
this.id = `rdx-accordion-${nextId$1++}`;
|
16
|
-
this.openCloseAllActions = new Subject();
|
17
|
-
/**
|
18
|
-
* The orientation of the accordion.
|
19
|
-
*/
|
20
|
-
this.orientation = 'vertical';
|
21
|
-
/**
|
22
|
-
* Determines whether one or multiple items can be opened at the same time.
|
23
|
-
*/
|
24
|
-
this.type = 'single';
|
25
|
-
/**
|
26
|
-
* @ignore
|
27
|
-
*/
|
28
|
-
this.collapsible = true;
|
29
|
-
this.onValueChange = new EventEmitter();
|
30
|
-
}
|
31
|
-
get isMultiple() {
|
32
|
-
return this.type === 'multiple';
|
33
|
-
}
|
34
|
-
/**
|
35
|
-
* The value of the item to expand when initially rendered and type is "single". Use when you do not need to control the state of the items.
|
36
|
-
*/
|
37
|
-
set defaultValue(value) {
|
38
|
-
if (value !== this._defaultValue) {
|
39
|
-
this._defaultValue = Array.isArray(value) ? value : [value];
|
40
|
-
this.selectionDispatcher.notify(this.defaultValue, this.id);
|
41
|
-
}
|
42
|
-
}
|
43
|
-
get defaultValue() {
|
44
|
-
return this._defaultValue ?? this.defaultValue;
|
45
|
-
}
|
46
|
-
/**
|
47
|
-
* The controlled value of the item to expand
|
48
|
-
*/
|
49
|
-
set value(value) {
|
50
|
-
if (value !== this._value) {
|
51
|
-
this._value = Array.isArray(value) ? value : [value];
|
52
|
-
this.selectionDispatcher.notify(this.value, this.id);
|
53
|
-
}
|
54
|
-
}
|
55
|
-
get value() {
|
56
|
-
return this._value ?? this.defaultValue;
|
57
|
-
}
|
58
|
-
/**
|
59
|
-
* @ignore
|
60
|
-
*/
|
61
|
-
ngAfterContentInit() {
|
62
|
-
this.selectionDispatcher.notify(this.value, this.id);
|
63
|
-
this.keyManager = new FocusKeyManager(this.items).withHomeAndEnd();
|
64
|
-
if (this.orientation === 'horizontal') {
|
65
|
-
this.keyManager.withHorizontalOrientation(this.dir?.value || 'ltr');
|
66
|
-
}
|
67
|
-
else {
|
68
|
-
this.keyManager.withVerticalOrientation();
|
69
|
-
}
|
70
|
-
this.onValueChangeSubscription = merge(...this.items.map((item) => item.expandedChange)).subscribe(() => this.onValueChange.emit());
|
71
|
-
}
|
72
|
-
/**
|
73
|
-
* @ignore
|
74
|
-
*/
|
75
|
-
ngOnDestroy() {
|
76
|
-
this.openCloseAllActions.complete();
|
77
|
-
this.onValueChangeSubscription.unsubscribe();
|
78
|
-
}
|
79
|
-
/**
|
80
|
-
* @ignore
|
81
|
-
*/
|
82
|
-
handleKeydown(event) {
|
83
|
-
if (!this.keyManager.activeItem) {
|
84
|
-
this.keyManager.setFirstItemActive();
|
85
|
-
}
|
86
|
-
const activeItem = this.keyManager.activeItem;
|
87
|
-
if ((event.keyCode === ENTER || event.keyCode === SPACE) &&
|
88
|
-
!this.keyManager.isTyping() &&
|
89
|
-
activeItem &&
|
90
|
-
!activeItem.disabled) {
|
91
|
-
event.preventDefault();
|
92
|
-
activeItem.toggle();
|
93
|
-
}
|
94
|
-
else {
|
95
|
-
this.keyManager.onKeydown(event);
|
96
|
-
}
|
97
|
-
}
|
98
|
-
/** Opens all enabled accordion items in an accordion where multi is enabled.
|
99
|
-
* @ignore
|
100
|
-
*/
|
101
|
-
openAll() {
|
102
|
-
if (this.isMultiple) {
|
103
|
-
this.openCloseAllActions.next(true);
|
104
|
-
}
|
105
|
-
}
|
106
|
-
/** Closes all enabled accordion items.
|
107
|
-
* @ignore
|
108
|
-
*/
|
109
|
-
closeAll() {
|
110
|
-
this.openCloseAllActions.next(false);
|
111
|
-
}
|
112
|
-
/**
|
113
|
-
* @ignore
|
114
|
-
*/
|
115
|
-
setActiveItem(item) {
|
116
|
-
this.keyManager.setActiveItem(item);
|
117
|
-
}
|
118
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
119
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.1", type: RdxAccordionRootDirective, isStandalone: true, selector: "[rdxAccordionRoot]", inputs: { disabled: ["disabled", "disabled", booleanAttribute], orientation: "orientation", defaultValue: "defaultValue", type: "type", collapsible: "collapsible", value: "value" }, outputs: { onValueChange: "onValueChange" }, host: { listeners: { "keydown": "handleKeydown($event)" }, properties: { "attr.data-orientation": "orientation" } }, providers: [
|
120
|
-
{ provide: RdxAccordionRootToken, useExisting: RdxAccordionRootDirective },
|
121
|
-
{ provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }
|
122
|
-
], queries: [{ propertyName: "items", predicate: i0.forwardRef(() => RdxAccordionItemDirective), descendants: true }], ngImport: i0 }); }
|
123
|
-
}
|
124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionRootDirective, decorators: [{
|
125
|
-
type: Directive,
|
126
|
-
args: [{
|
127
|
-
selector: '[rdxAccordionRoot]',
|
128
|
-
standalone: true,
|
129
|
-
providers: [
|
130
|
-
{ provide: RdxAccordionRootToken, useExisting: RdxAccordionRootDirective },
|
131
|
-
{ provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }
|
132
|
-
],
|
133
|
-
host: {
|
134
|
-
'[attr.data-orientation]': 'orientation',
|
135
|
-
'(keydown)': 'handleKeydown($event)'
|
136
|
-
}
|
137
|
-
}]
|
138
|
-
}], propDecorators: { disabled: [{
|
139
|
-
type: Input,
|
140
|
-
args: [{ transform: booleanAttribute }]
|
141
|
-
}], orientation: [{
|
142
|
-
type: Input
|
143
|
-
}], items: [{
|
144
|
-
type: ContentChildren,
|
145
|
-
args: [forwardRef(() => RdxAccordionItemDirective), { descendants: true }]
|
146
|
-
}], defaultValue: [{
|
147
|
-
type: Input
|
148
|
-
}], type: [{
|
149
|
-
type: Input
|
150
|
-
}], collapsible: [{
|
151
|
-
type: Input
|
152
|
-
}], value: [{
|
153
|
-
type: Input
|
154
|
-
}], onValueChange: [{
|
155
|
-
type: Output
|
156
|
-
}] } });
|
157
|
-
|
158
|
-
class RdxAccordionTriggerDirective {
|
159
|
-
constructor() {
|
160
|
-
this.nativeElement = inject(ElementRef).nativeElement;
|
161
|
-
this.accordionRoot = inject(RdxAccordionRootDirective);
|
162
|
-
this.item = inject(RdxAccordionItemDirective);
|
163
|
-
}
|
164
|
-
/**
|
165
|
-
* Fires when trigger clicked
|
166
|
-
*/
|
167
|
-
onClick() {
|
168
|
-
if (!this.accordionRoot.collapsible && this.item.expanded)
|
169
|
-
return;
|
170
|
-
this.item.toggle();
|
171
|
-
this.accordionRoot.setActiveItem(this.item);
|
172
|
-
}
|
173
|
-
focus() {
|
174
|
-
this.nativeElement.focus();
|
175
|
-
}
|
176
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
177
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: RdxAccordionTriggerDirective, isStandalone: true, selector: "[rdxAccordionTrigger]", host: { listeners: { "click": "onClick()" }, properties: { "attr.role": "\"button\"", "attr.aria-expanded": "item.expanded", "attr.data-state": "item.dataState", "attr.data-disabled": "item.disabled", "attr.disabled": "item.disabled ? \"\" : null", "attr.data-orientation": "item.orientation" } }, ngImport: i0 }); }
|
178
|
-
}
|
179
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionTriggerDirective, decorators: [{
|
180
|
-
type: Directive,
|
181
|
-
args: [{
|
182
|
-
selector: '[rdxAccordionTrigger]',
|
183
|
-
standalone: true,
|
184
|
-
host: {
|
185
|
-
'[attr.role]': '"button"',
|
186
|
-
'[attr.aria-expanded]': 'item.expanded',
|
187
|
-
'[attr.data-state]': 'item.dataState',
|
188
|
-
'[attr.data-disabled]': 'item.disabled',
|
189
|
-
'[attr.disabled]': 'item.disabled ? "" : null',
|
190
|
-
'[attr.data-orientation]': 'item.orientation',
|
191
|
-
'(click)': 'onClick()'
|
192
|
-
}
|
193
|
-
}]
|
194
|
-
}] });
|
195
|
-
|
196
|
-
let nextId = 0;
|
197
|
-
class RdxAccordionItemDirective {
|
198
|
-
get dataState() {
|
199
|
-
return this.expanded ? 'open' : 'closed';
|
200
|
-
}
|
201
|
-
get orientation() {
|
202
|
-
return this.accordion.orientation;
|
203
|
-
}
|
204
|
-
/** Whether the AccordionItem is expanded. */
|
205
|
-
set expanded(expanded) {
|
206
|
-
// Only emit events and update the internal value if the value changes.
|
207
|
-
if (this._expanded !== expanded) {
|
208
|
-
this._expanded = expanded;
|
209
|
-
this.expandedChange.emit(expanded);
|
210
|
-
if (expanded) {
|
211
|
-
this.opened.emit();
|
212
|
-
/**
|
213
|
-
* In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,
|
214
|
-
* the name value is the id of the accordion.
|
215
|
-
*/
|
216
|
-
const accordionId = this.accordion ? this.accordion.id : this.value;
|
217
|
-
this.expansionDispatcher.notify(this.value, accordionId);
|
218
|
-
}
|
219
|
-
else {
|
220
|
-
this.closed.emit();
|
221
|
-
}
|
222
|
-
// Ensures that the animation will run when the value is set outside of an `@Input`.
|
223
|
-
// This includes cases like the open, close and toggle methods.
|
224
|
-
this.changeDetectorRef.markForCheck();
|
225
|
-
}
|
226
|
-
}
|
227
|
-
get expanded() {
|
228
|
-
return this._expanded;
|
229
|
-
}
|
230
|
-
set value(value) {
|
231
|
-
this._value = value;
|
232
|
-
}
|
233
|
-
get value() {
|
234
|
-
return this._value || this.id;
|
235
|
-
}
|
236
|
-
/** Whether the AccordionItem is disabled. */
|
237
|
-
set disabled(value) {
|
238
|
-
this._disabled = value;
|
239
|
-
}
|
240
|
-
get disabled() {
|
241
|
-
return this.accordion.disabled ?? this._disabled;
|
242
|
-
}
|
243
|
-
constructor() {
|
244
|
-
this.accordion = inject(RdxAccordionRootToken, { skipSelf: true });
|
245
|
-
this.changeDetectorRef = inject(ChangeDetectorRef);
|
246
|
-
this.expansionDispatcher = inject(UniqueSelectionDispatcher);
|
247
|
-
/**
|
248
|
-
* The unique AccordionItem id.
|
249
|
-
* @ignore
|
250
|
-
*/
|
251
|
-
this.id = `rdx-accordion-item-${nextId++}`;
|
252
|
-
this._expanded = false;
|
253
|
-
this._disabled = false;
|
254
|
-
/** Event emitted every time the AccordionItem is closed. */
|
255
|
-
this.closed = new EventEmitter();
|
256
|
-
/** Event emitted every time the AccordionItem is opened. */
|
257
|
-
this.opened = new EventEmitter();
|
258
|
-
/** Event emitted when the AccordionItem is destroyed. */
|
259
|
-
this.destroyed = new EventEmitter();
|
260
|
-
/**
|
261
|
-
* Emits whenever the expanded state of the accordion changes.
|
262
|
-
* Primarily used to facilitate two-way binding.
|
263
|
-
* @docs-private
|
264
|
-
*/
|
265
|
-
this.expandedChange = new EventEmitter();
|
266
|
-
/** Subscription to openAll/closeAll events. */
|
267
|
-
this.openCloseAllSubscription = Subscription.EMPTY;
|
268
|
-
this.removeUniqueSelectionListener = this.expansionDispatcher.listen((id, accordionId) => {
|
269
|
-
if (this.accordion.isMultiple) {
|
270
|
-
if (this.accordion.id === accordionId && id.includes(this.value)) {
|
271
|
-
this.expanded = true;
|
272
|
-
}
|
273
|
-
}
|
274
|
-
else {
|
275
|
-
this.expanded = this.accordion.id === accordionId && id.includes(this.value);
|
276
|
-
}
|
277
|
-
});
|
278
|
-
// When an accordion item is hosted in an accordion, subscribe to open/close events.
|
279
|
-
if (this.accordion) {
|
280
|
-
this.openCloseAllSubscription = this.subscribeToOpenCloseAllActions();
|
281
|
-
}
|
282
|
-
}
|
283
|
-
/** Emits an event for the accordion item being destroyed. */
|
284
|
-
ngOnDestroy() {
|
285
|
-
this.opened.complete();
|
286
|
-
this.closed.complete();
|
287
|
-
this.destroyed.emit();
|
288
|
-
this.destroyed.complete();
|
289
|
-
this.removeUniqueSelectionListener();
|
290
|
-
this.openCloseAllSubscription.unsubscribe();
|
291
|
-
}
|
292
|
-
focus() {
|
293
|
-
this.trigger.focus();
|
294
|
-
}
|
295
|
-
/** Toggles the expanded state of the accordion item. */
|
296
|
-
toggle() {
|
297
|
-
if (!this.disabled) {
|
298
|
-
this.expanded = !this.expanded;
|
299
|
-
}
|
300
|
-
}
|
301
|
-
/** Sets the expanded state of the accordion item to false. */
|
302
|
-
close() {
|
303
|
-
if (!this.disabled) {
|
304
|
-
this.expanded = false;
|
305
|
-
}
|
306
|
-
}
|
307
|
-
/** Sets the expanded state of the accordion item to true. */
|
308
|
-
open() {
|
309
|
-
if (!this.disabled) {
|
310
|
-
this.expanded = true;
|
311
|
-
}
|
312
|
-
}
|
313
|
-
subscribeToOpenCloseAllActions() {
|
314
|
-
return this.accordion.openCloseAllActions.subscribe((expanded) => {
|
315
|
-
// Only change expanded state if item is enabled
|
316
|
-
if (!this.disabled) {
|
317
|
-
this.expanded = expanded;
|
318
|
-
}
|
319
|
-
});
|
320
|
-
}
|
321
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
322
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.1", type: RdxAccordionItemDirective, isStandalone: true, selector: "[rdxAccordionItem]", inputs: { expanded: ["expanded", "expanded", booleanAttribute], value: "value", disabled: ["disabled", "disabled", booleanAttribute] }, outputs: { closed: "closed", opened: "opened", expandedChange: "expandedChange" }, host: { properties: { "attr.data-state": "dataState", "attr.data-disabled": "disabled", "attr.data-orientation": "orientation" } }, providers: [
|
323
|
-
{ provide: RdxAccordionRootToken, useValue: undefined }
|
324
|
-
], queries: [{ propertyName: "trigger", first: true, predicate: RdxAccordionTriggerDirective, descendants: true }], exportAs: ["rdxAccordionItem"], ngImport: i0 }); }
|
325
|
-
}
|
326
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionItemDirective, decorators: [{
|
327
|
-
type: Directive,
|
328
|
-
args: [{
|
329
|
-
selector: '[rdxAccordionItem]',
|
330
|
-
standalone: true,
|
331
|
-
exportAs: 'rdxAccordionItem',
|
332
|
-
host: {
|
333
|
-
'[attr.data-state]': 'dataState',
|
334
|
-
'[attr.data-disabled]': 'disabled',
|
335
|
-
'[attr.data-orientation]': 'orientation'
|
336
|
-
},
|
337
|
-
providers: [
|
338
|
-
{ provide: RdxAccordionRootToken, useValue: undefined }
|
339
|
-
]
|
340
|
-
}]
|
341
|
-
}], ctorParameters: () => [], propDecorators: { trigger: [{
|
342
|
-
type: ContentChild,
|
343
|
-
args: [RdxAccordionTriggerDirective, { descendants: true }]
|
344
|
-
}], expanded: [{
|
345
|
-
type: Input,
|
346
|
-
args: [{ transform: booleanAttribute }]
|
347
|
-
}], value: [{
|
348
|
-
type: Input
|
349
|
-
}], disabled: [{
|
350
|
-
type: Input,
|
351
|
-
args: [{ transform: booleanAttribute }]
|
352
|
-
}], closed: [{
|
353
|
-
type: Output
|
354
|
-
}], opened: [{
|
355
|
-
type: Output
|
356
|
-
}], expandedChange: [{
|
357
|
-
type: Output
|
358
|
-
}] } });
|
359
|
-
|
360
|
-
const RdxAccordionContentToken = new InjectionToken('RdxAccordionContentToken');
|
361
|
-
class RdxAccordionContentDirective {
|
362
|
-
constructor() {
|
363
|
-
this.item = inject(RdxAccordionItemDirective);
|
364
|
-
}
|
365
|
-
get style() {
|
366
|
-
if (this.item.orientation === 'horizontal') {
|
367
|
-
return { width: this.item.expanded ? 'var(--rdx-accordion-content-width)' : 0 };
|
368
|
-
}
|
369
|
-
return { height: this.item.expanded ? 'var(--rdx-accordion-content-height)' : 0 };
|
370
|
-
}
|
371
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
372
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: RdxAccordionContentDirective, isStandalone: true, selector: "[rdxAccordionContent]", host: { properties: { "attr.role": "\"region\"", "style": "style", "attr.data-state": "item.dataState", "attr.data-disabled": "item.disabled", "attr.data-orientation": "item.orientation" } }, exportAs: ["rdxAccordionContent"], ngImport: i0 }); }
|
373
|
-
}
|
374
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionContentDirective, decorators: [{
|
375
|
-
type: Directive,
|
376
|
-
args: [{
|
377
|
-
selector: '[rdxAccordionContent]',
|
378
|
-
standalone: true,
|
379
|
-
exportAs: 'rdxAccordionContent',
|
380
|
-
host: {
|
381
|
-
'[attr.role]': '"region"',
|
382
|
-
// todo need hide content after animation
|
383
|
-
// '[style.display]': 'item.expanded ? "" : "none"',
|
384
|
-
// '[attr.hidden]': 'hidden ? "" : null',
|
385
|
-
'[style]': 'style',
|
386
|
-
'[attr.data-state]': 'item.dataState',
|
387
|
-
'[attr.data-disabled]': 'item.disabled',
|
388
|
-
'[attr.data-orientation]': 'item.orientation'
|
389
|
-
}
|
390
|
-
}]
|
391
|
-
}] });
|
392
|
-
|
393
|
-
class RdxAccordionHeaderDirective {
|
394
|
-
constructor() {
|
395
|
-
this.item = inject(RdxAccordionItemDirective);
|
396
|
-
}
|
397
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
398
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: RdxAccordionHeaderDirective, isStandalone: true, selector: "[rdxAccordionHeader]", host: { properties: { "attr.data-state": "item.dataState", "attr.data-disabled": "item.disabled", "attr.data-orientation": "item.orientation" } }, ngImport: i0 }); }
|
399
|
-
}
|
400
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxAccordionHeaderDirective, decorators: [{
|
401
|
-
type: Directive,
|
402
|
-
args: [{
|
403
|
-
selector: '[rdxAccordionHeader]',
|
404
|
-
standalone: true,
|
405
|
-
host: {
|
406
|
-
'[attr.data-state]': 'item.dataState',
|
407
|
-
'[attr.data-disabled]': 'item.disabled',
|
408
|
-
'[attr.data-orientation]': 'item.orientation'
|
409
|
-
}
|
410
|
-
}]
|
411
|
-
}] });
|
412
|
-
|
413
|
-
/**
|
414
|
-
* Generated bundle index. Do not edit.
|
415
|
-
*/
|
416
|
-
|
417
|
-
export { RdxAccordionContentDirective, RdxAccordionContentToken, RdxAccordionHeaderDirective, RdxAccordionItemDirective, RdxAccordionRootDirective, RdxAccordionRootToken, RdxAccordionTriggerDirective };
|
418
|
-
//# sourceMappingURL=radix-ng-primitives-accordion.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"radix-ng-primitives-accordion.mjs","sources":["../../../packages/primitives/accordion/src/accordion-root.directive.ts","../../../packages/primitives/accordion/src/accordion-trigger.directive.ts","../../../packages/primitives/accordion/src/accordion-item.directive.ts","../../../packages/primitives/accordion/src/accordion-content.directive.ts","../../../packages/primitives/accordion/src/accordion-header.directive.ts","../../../packages/primitives/accordion/radix-ng-primitives-accordion.ts"],"sourcesContent":["import { FocusKeyManager } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { UniqueSelectionDispatcher } from '@angular/cdk/collections';\nimport { ENTER, SPACE } from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n booleanAttribute,\n ContentChildren,\n Directive,\n EventEmitter,\n forwardRef,\n inject,\n InjectionToken,\n Input,\n OnDestroy,\n Output,\n QueryList\n} from '@angular/core';\nimport { merge, Subject, Subscription } from 'rxjs';\nimport { RdxAccordionItemDirective } from './accordion-item.directive';\n\nexport type RdxAccordionType = 'single' | 'multiple';\nexport type RdxAccordionOrientation = 'horizontal' | 'vertical';\n\nexport const RdxAccordionRootToken = new InjectionToken<RdxAccordionRootDirective>('RdxAccordionRootDirective');\n\nlet nextId = 0;\n\n@Directive({\n selector: '[rdxAccordionRoot]',\n standalone: true,\n providers: [\n { provide: RdxAccordionRootToken, useExisting: RdxAccordionRootDirective },\n { provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }\n ],\n host: {\n '[attr.data-orientation]': 'orientation',\n '(keydown)': 'handleKeydown($event)'\n }\n})\nexport class RdxAccordionRootDirective implements AfterContentInit, OnDestroy {\n protected readonly selectionDispatcher = inject(UniqueSelectionDispatcher);\n protected readonly dir = inject(Directionality, { optional: true });\n\n protected keyManager: FocusKeyManager<RdxAccordionItemDirective>;\n\n readonly id: string = `rdx-accordion-${nextId++}`;\n\n readonly openCloseAllActions = new Subject<boolean>();\n\n get isMultiple(): boolean {\n return this.type === 'multiple';\n }\n\n /** Whether the Accordion is disabled. */\n @Input({ transform: booleanAttribute }) disabled: boolean;\n\n /**\n * The orientation of the accordion.\n */\n @Input() orientation: RdxAccordionOrientation = 'vertical';\n /**\n * @private\n * @ignore\n */\n @ContentChildren(forwardRef(() => RdxAccordionItemDirective), { descendants: true })\n items: QueryList<RdxAccordionItemDirective>;\n\n /**\n * The value of the item to expand when initially rendered and type is \"single\". Use when you do not need to control the state of the items.\n */\n @Input()\n set defaultValue(value: string[] | string) {\n if (value !== this._defaultValue) {\n this._defaultValue = Array.isArray(value) ? value : [value];\n\n this.selectionDispatcher.notify(this.defaultValue as unknown as string, this.id);\n }\n }\n\n get defaultValue(): string[] | string {\n return this._defaultValue ?? this.defaultValue;\n }\n\n /**\n * Determines whether one or multiple items can be opened at the same time.\n */\n @Input() type: RdxAccordionType = 'single';\n /**\n * @ignore\n */\n @Input() collapsible = true;\n /**\n * The controlled value of the item to expand\n */\n @Input()\n set value(value: string[] | string) {\n if (value !== this._value) {\n this._value = Array.isArray(value) ? value : [value];\n\n this.selectionDispatcher.notify(this.value as unknown as string, this.id);\n }\n }\n\n get value(): string[] | string {\n return this._value ?? this.defaultValue;\n }\n\n @Output() readonly onValueChange: EventEmitter<void> = new EventEmitter<void>();\n\n private _value?: string[];\n private _defaultValue: string[] | string;\n\n private onValueChangeSubscription: Subscription;\n\n /**\n * @ignore\n */\n ngAfterContentInit(): void {\n this.selectionDispatcher.notify(this.value as unknown as string, this.id);\n\n this.keyManager = new FocusKeyManager(this.items).withHomeAndEnd();\n\n if (this.orientation === 'horizontal') {\n this.keyManager.withHorizontalOrientation(this.dir?.value || 'ltr');\n } else {\n this.keyManager.withVerticalOrientation();\n }\n\n this.onValueChangeSubscription = merge(...this.items.map((item) => item.expandedChange)).subscribe(() =>\n this.onValueChange.emit()\n );\n }\n\n /**\n * @ignore\n */\n ngOnDestroy() {\n this.openCloseAllActions.complete();\n this.onValueChangeSubscription.unsubscribe();\n }\n\n /**\n * @ignore\n */\n handleKeydown(event: KeyboardEvent) {\n if (!this.keyManager.activeItem) {\n this.keyManager.setFirstItemActive();\n }\n\n const activeItem = this.keyManager.activeItem;\n\n if (\n (event.keyCode === ENTER || event.keyCode === SPACE) &&\n !this.keyManager.isTyping() &&\n activeItem &&\n !activeItem.disabled\n ) {\n event.preventDefault();\n activeItem.toggle();\n } else {\n this.keyManager.onKeydown(event);\n }\n }\n\n /** Opens all enabled accordion items in an accordion where multi is enabled.\n * @ignore\n */\n openAll(): void {\n if (this.isMultiple) {\n this.openCloseAllActions.next(true);\n }\n }\n\n /** Closes all enabled accordion items.\n * @ignore\n */\n closeAll(): void {\n this.openCloseAllActions.next(false);\n }\n\n /**\n * @ignore\n */\n setActiveItem(item: RdxAccordionItemDirective) {\n this.keyManager.setActiveItem(item);\n }\n}\n","import { Directive, ElementRef, inject } from '@angular/core';\nimport { RdxAccordionItemDirective } from './accordion-item.directive';\nimport { RdxAccordionRootDirective } from './accordion-root.directive';\n\n@Directive({\n selector: '[rdxAccordionTrigger]',\n standalone: true,\n host: {\n '[attr.role]': '\"button\"',\n '[attr.aria-expanded]': 'item.expanded',\n '[attr.data-state]': 'item.dataState',\n '[attr.data-disabled]': 'item.disabled',\n '[attr.disabled]': 'item.disabled ? \"\" : null',\n '[attr.data-orientation]': 'item.orientation',\n '(click)': 'onClick()'\n }\n})\nexport class RdxAccordionTriggerDirective {\n protected readonly nativeElement = inject(ElementRef).nativeElement;\n protected readonly accordionRoot = inject(RdxAccordionRootDirective);\n protected readonly item = inject(RdxAccordionItemDirective);\n\n /**\n * Fires when trigger clicked\n */\n onClick(): void {\n if (!this.accordionRoot.collapsible && this.item.expanded) return;\n\n this.item.toggle();\n\n this.accordionRoot.setActiveItem(this.item);\n }\n\n focus() {\n this.nativeElement.focus();\n }\n}\n","import { FocusableOption } from '@angular/cdk/a11y';\nimport { UniqueSelectionDispatcher } from '@angular/cdk/collections';\nimport {\n booleanAttribute,\n ChangeDetectorRef,\n ContentChild,\n Directive,\n EventEmitter,\n inject,\n Input,\n OnDestroy,\n Output\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { RdxAccordionOrientation, RdxAccordionRootToken } from './accordion-root.directive';\nimport { RdxAccordionTriggerDirective } from './accordion-trigger.directive';\n\nexport type RdxAccordionItemState = 'open' | 'closed';\n\nlet nextId = 0;\n\n@Directive({\n selector: '[rdxAccordionItem]',\n standalone: true,\n exportAs: 'rdxAccordionItem',\n host: {\n '[attr.data-state]': 'dataState',\n '[attr.data-disabled]': 'disabled',\n '[attr.data-orientation]': 'orientation'\n },\n providers: [\n { provide: RdxAccordionRootToken, useValue: undefined }]\n})\nexport class RdxAccordionItemDirective implements FocusableOption, OnDestroy {\n protected readonly accordion = inject(RdxAccordionRootToken, { skipSelf: true });\n protected readonly changeDetectorRef = inject(ChangeDetectorRef);\n protected readonly expansionDispatcher = inject(UniqueSelectionDispatcher);\n\n @ContentChild(RdxAccordionTriggerDirective, { descendants: true }) trigger: RdxAccordionTriggerDirective;\n\n get dataState(): RdxAccordionItemState {\n return this.expanded ? 'open' : 'closed';\n }\n\n /**\n * The unique AccordionItem id.\n * @ignore\n */\n readonly id: string = `rdx-accordion-item-${nextId++}`;\n\n get orientation(): RdxAccordionOrientation {\n return this.accordion.orientation;\n }\n\n /** Whether the AccordionItem is expanded. */\n @Input({ transform: booleanAttribute })\n set expanded(expanded: boolean) {\n // Only emit events and update the internal value if the value changes.\n if (this._expanded !== expanded) {\n this._expanded = expanded;\n this.expandedChange.emit(expanded);\n\n if (expanded) {\n this.opened.emit();\n /**\n * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,\n * the name value is the id of the accordion.\n */\n const accordionId = this.accordion ? this.accordion.id : this.value;\n this.expansionDispatcher.notify(this.value, accordionId);\n } else {\n this.closed.emit();\n }\n\n // Ensures that the animation will run when the value is set outside of an `@Input`.\n // This includes cases like the open, close and toggle methods.\n this.changeDetectorRef.markForCheck();\n }\n }\n\n get expanded(): boolean {\n return this._expanded;\n }\n\n private _expanded = false;\n\n @Input()\n set value(value: string) {\n this._value = value;\n }\n\n get value(): string {\n return this._value || this.id;\n }\n\n private _value?: string;\n\n /** Whether the AccordionItem is disabled. */\n @Input({ transform: booleanAttribute })\n set disabled(value: boolean) {\n this._disabled = value;\n }\n\n get disabled(): boolean {\n return this.accordion.disabled ?? this._disabled;\n }\n\n private _disabled = false;\n\n /** Event emitted every time the AccordionItem is closed. */\n @Output() readonly closed: EventEmitter<void> = new EventEmitter<void>();\n /** Event emitted every time the AccordionItem is opened. */\n @Output() readonly opened: EventEmitter<void> = new EventEmitter<void>();\n\n /** Event emitted when the AccordionItem is destroyed. */\n readonly destroyed: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * Emits whenever the expanded state of the accordion changes.\n * Primarily used to facilitate two-way binding.\n * @docs-private\n */\n @Output() readonly expandedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** Unregister function for expansionDispatcher. */\n private removeUniqueSelectionListener: () => void;\n\n /** Subscription to openAll/closeAll events. */\n private openCloseAllSubscription = Subscription.EMPTY;\n\n constructor() {\n this.removeUniqueSelectionListener = this.expansionDispatcher.listen((id: string, accordionId: string) => {\n if (this.accordion.isMultiple) {\n if (this.accordion.id === accordionId && id.includes(this.value)) {\n this.expanded = true;\n }\n } else {\n this.expanded = this.accordion.id === accordionId && id.includes(this.value);\n }\n });\n\n // When an accordion item is hosted in an accordion, subscribe to open/close events.\n if (this.accordion) {\n this.openCloseAllSubscription = this.subscribeToOpenCloseAllActions();\n }\n }\n\n /** Emits an event for the accordion item being destroyed. */\n ngOnDestroy() {\n this.opened.complete();\n this.closed.complete();\n this.destroyed.emit();\n this.destroyed.complete();\n this.removeUniqueSelectionListener();\n this.openCloseAllSubscription.unsubscribe();\n }\n\n focus(): void {\n this.trigger.focus();\n }\n\n /** Toggles the expanded state of the accordion item. */\n toggle(): void {\n if (!this.disabled) {\n this.expanded = !this.expanded;\n }\n }\n\n /** Sets the expanded state of the accordion item to false. */\n close(): void {\n if (!this.disabled) {\n this.expanded = false;\n }\n }\n\n /** Sets the expanded state of the accordion item to true. */\n open(): void {\n if (!this.disabled) {\n this.expanded = true;\n }\n }\n\n private subscribeToOpenCloseAllActions(): Subscription {\n return this.accordion.openCloseAllActions.subscribe((expanded) => {\n // Only change expanded state if item is enabled\n if (!this.disabled) {\n this.expanded = expanded;\n }\n });\n }\n}\n","import { Directive, inject, InjectionToken } from '@angular/core';\nimport { RdxAccordionItemDirective } from './accordion-item.directive';\n\nexport const RdxAccordionContentToken = new InjectionToken<RdxAccordionContentDirective>('RdxAccordionContentToken');\n\n@Directive({\n selector: '[rdxAccordionContent]',\n standalone: true,\n exportAs: 'rdxAccordionContent',\n host: {\n '[attr.role]': '\"region\"',\n // todo need hide content after animation\n // '[style.display]': 'item.expanded ? \"\" : \"none\"',\n // '[attr.hidden]': 'hidden ? \"\" : null',\n '[style]': 'style',\n '[attr.data-state]': 'item.dataState',\n '[attr.data-disabled]': 'item.disabled',\n '[attr.data-orientation]': 'item.orientation'\n }\n})\nexport class RdxAccordionContentDirective {\n protected readonly item = inject(RdxAccordionItemDirective);\n\n get style() {\n if (this.item.orientation === 'horizontal') {\n return { width: this.item.expanded ? 'var(--rdx-accordion-content-width)' : 0 };\n }\n\n return { height: this.item.expanded ? 'var(--rdx-accordion-content-height)' : 0 };\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { RdxAccordionItemDirective } from './accordion-item.directive';\n\n@Directive({\n selector: '[rdxAccordionHeader]',\n standalone: true,\n host: {\n '[attr.data-state]': 'item.dataState',\n '[attr.data-disabled]': 'item.disabled',\n '[attr.data-orientation]': 'item.orientation'\n }\n})\nexport class RdxAccordionHeaderDirective {\n protected readonly item = inject(RdxAccordionItemDirective);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["nextId"],"mappings":";;;;;;;;MAwBa,qBAAqB,GAAG,IAAI,cAAc,CAA4B,2BAA2B,EAAE;AAEhH,IAAIA,QAAM,GAAG,CAAC,CAAC;MAcF,yBAAyB,CAAA;AAZtC,IAAA,WAAA,GAAA;AAauB,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC;QACxD,IAAG,CAAA,GAAA,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAI3D,QAAA,IAAA,CAAA,EAAE,GAAW,CAAA,cAAA,EAAiBA,QAAM,EAAE,EAAE,CAAC;AAEzC,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,OAAO,EAAW,CAAC;AAStD;;AAEG;QACM,IAAW,CAAA,WAAA,GAA4B,UAAU,CAAC;AAwB3D;;AAEG;QACM,IAAI,CAAA,IAAA,GAAqB,QAAQ,CAAC;AAC3C;;AAEG;QACM,IAAW,CAAA,WAAA,GAAG,IAAI,CAAC;AAiBT,QAAA,IAAA,CAAA,aAAa,GAAuB,IAAI,YAAY,EAAQ,CAAC;AA+EnF,KAAA;AAzIG,IAAA,IAAI,UAAU,GAAA;AACV,QAAA,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC;KACnC;AAgB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,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,oBAAA,EAAA,eAAA,EAAA,uBAAA,EAAA,kBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAA3B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBATvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACF,wBAAA,mBAAmB,EAAE,gBAAgB;AACrC,wBAAA,sBAAsB,EAAE,eAAe;AACvC,wBAAA,yBAAyB,EAAE,kBAAkB;AAChD,qBAAA;AACJ,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
@@ -1,161 +0,0 @@
|
|
1
|
-
import * as i0 from '@angular/core';
|
2
|
-
import { Injectable, inject, Directive, Renderer2, ElementRef, Input, ViewContainerRef } from '@angular/core';
|
3
|
-
import * as i1 from '@angular/cdk/overlay';
|
4
|
-
import { TemplatePortal } from '@angular/cdk/portal';
|
5
|
-
import * as i1$1 from '@angular/cdk/a11y';
|
6
|
-
import { CdkTrapFocus } from '@angular/cdk/a11y';
|
7
|
-
|
8
|
-
class AlertDialogService {
|
9
|
-
constructor(overlay) {
|
10
|
-
this.overlay = overlay;
|
11
|
-
}
|
12
|
-
// eslint-disable-next-line
|
13
|
-
setDialogContent(viewContainerRef, template) {
|
14
|
-
this.dialogContent = { viewContainerRef, template };
|
15
|
-
}
|
16
|
-
open() {
|
17
|
-
if (!this.dialogContent) {
|
18
|
-
throw new Error('Dialog content is not set');
|
19
|
-
}
|
20
|
-
this.overlayRef = this.overlay.create({
|
21
|
-
hasBackdrop: true,
|
22
|
-
backdropClass: 'cdk-overlay-dark-backdrop',
|
23
|
-
positionStrategy: this.overlay.position().global().centerHorizontally().centerVertically()
|
24
|
-
});
|
25
|
-
const templatePortal = new TemplatePortal(this.dialogContent.template, this.dialogContent.viewContainerRef);
|
26
|
-
this.overlayRef.attach(templatePortal);
|
27
|
-
this.overlayRef.keydownEvents().subscribe((event) => {
|
28
|
-
if (event.key === 'Escape' || event.code === 'Escape') {
|
29
|
-
this.close();
|
30
|
-
}
|
31
|
-
});
|
32
|
-
this.overlayRef.backdropClick().subscribe(() => this.close());
|
33
|
-
}
|
34
|
-
close() {
|
35
|
-
if (this.overlayRef) {
|
36
|
-
this.overlayRef.dispose();
|
37
|
-
this.overlayRef = null;
|
38
|
-
}
|
39
|
-
}
|
40
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogService, deps: [{ token: i1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
41
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogService, providedIn: 'root' }); }
|
42
|
-
}
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogService, decorators: [{
|
44
|
-
type: Injectable,
|
45
|
-
args: [{
|
46
|
-
providedIn: 'root'
|
47
|
-
}]
|
48
|
-
}], ctorParameters: () => [{ type: i1.Overlay }] });
|
49
|
-
|
50
|
-
class AlertDialogCancelDirective {
|
51
|
-
constructor() {
|
52
|
-
this.alertDialogService = inject(AlertDialogService);
|
53
|
-
}
|
54
|
-
onClick() {
|
55
|
-
this.alertDialogService.close();
|
56
|
-
}
|
57
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogCancelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
58
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: AlertDialogCancelDirective, isStandalone: true, selector: "[rdxAlertDialogCancel]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
|
59
|
-
}
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogCancelDirective, decorators: [{
|
61
|
-
type: Directive,
|
62
|
-
args: [{
|
63
|
-
selector: '[rdxAlertDialogCancel]',
|
64
|
-
standalone: true,
|
65
|
-
host: {
|
66
|
-
'(click)': 'onClick()'
|
67
|
-
}
|
68
|
-
}]
|
69
|
-
}] });
|
70
|
-
|
71
|
-
class AlertDialogContentDirective {
|
72
|
-
constructor() {
|
73
|
-
this.renderer = inject(Renderer2);
|
74
|
-
this.elementRef = inject(ElementRef);
|
75
|
-
}
|
76
|
-
set maxWidth(value) {
|
77
|
-
this.renderer.setStyle(this.elementRef.nativeElement, 'maxWidth', value);
|
78
|
-
}
|
79
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
80
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: AlertDialogContentDirective, isStandalone: true, selector: "[rdxAlertDialogContent]", inputs: { maxWidth: "maxWidth" }, host: { properties: { "attr.data-state": "open", "attr.cdkTrapFocusAutoCapture": "true" } }, hostDirectives: [{ directive: i1$1.CdkTrapFocus }], ngImport: i0 }); }
|
81
|
-
}
|
82
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogContentDirective, decorators: [{
|
83
|
-
type: Directive,
|
84
|
-
args: [{
|
85
|
-
selector: '[rdxAlertDialogContent]',
|
86
|
-
hostDirectives: [
|
87
|
-
{
|
88
|
-
directive: CdkTrapFocus
|
89
|
-
}
|
90
|
-
],
|
91
|
-
standalone: true,
|
92
|
-
host: {
|
93
|
-
'[attr.data-state]': 'open',
|
94
|
-
'[attr.cdkTrapFocusAutoCapture]': 'true'
|
95
|
-
}
|
96
|
-
}]
|
97
|
-
}], propDecorators: { maxWidth: [{
|
98
|
-
type: Input
|
99
|
-
}] } });
|
100
|
-
|
101
|
-
class AlertDialogRootDirective {
|
102
|
-
constructor() {
|
103
|
-
this.viewContainerRef = inject(ViewContainerRef);
|
104
|
-
this.alertDialogService = inject(AlertDialogService);
|
105
|
-
}
|
106
|
-
// eslint-disable-next-line
|
107
|
-
set content(template) {
|
108
|
-
this.alertDialogService.setDialogContent(this.viewContainerRef, template);
|
109
|
-
}
|
110
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
111
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: AlertDialogRootDirective, isStandalone: true, selector: "[rdxAlertDialogRoot]", inputs: { content: "content" }, ngImport: i0 }); }
|
112
|
-
}
|
113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogRootDirective, decorators: [{
|
114
|
-
type: Directive,
|
115
|
-
args: [{
|
116
|
-
selector: '[rdxAlertDialogRoot]',
|
117
|
-
standalone: true
|
118
|
-
}]
|
119
|
-
}], propDecorators: { content: [{
|
120
|
-
type: Input
|
121
|
-
}] } });
|
122
|
-
|
123
|
-
class AlertDialogTitleDirective {
|
124
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
125
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: AlertDialogTitleDirective, isStandalone: true, selector: "[rdxAlertDialogTitle]", ngImport: i0 }); }
|
126
|
-
}
|
127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogTitleDirective, decorators: [{
|
128
|
-
type: Directive,
|
129
|
-
args: [{
|
130
|
-
selector: '[rdxAlertDialogTitle]',
|
131
|
-
standalone: true
|
132
|
-
}]
|
133
|
-
}] });
|
134
|
-
|
135
|
-
class AlertDialogTriggerDirective {
|
136
|
-
constructor() {
|
137
|
-
this.alertDialogService = inject(AlertDialogService);
|
138
|
-
}
|
139
|
-
handleClick() {
|
140
|
-
this.alertDialogService.open();
|
141
|
-
}
|
142
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
143
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.1", type: AlertDialogTriggerDirective, isStandalone: true, selector: "[rdxAlertDialogTrigger]", host: { listeners: { "click": "handleClick()" } }, ngImport: i0 }); }
|
144
|
-
}
|
145
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AlertDialogTriggerDirective, decorators: [{
|
146
|
-
type: Directive,
|
147
|
-
args: [{
|
148
|
-
selector: '[rdxAlertDialogTrigger]',
|
149
|
-
standalone: true,
|
150
|
-
host: {
|
151
|
-
'(click)': 'handleClick()'
|
152
|
-
}
|
153
|
-
}]
|
154
|
-
}] });
|
155
|
-
|
156
|
-
/**
|
157
|
-
* Generated bundle index. Do not edit.
|
158
|
-
*/
|
159
|
-
|
160
|
-
export { AlertDialogCancelDirective, AlertDialogContentDirective, AlertDialogRootDirective, AlertDialogService, AlertDialogTitleDirective, AlertDialogTriggerDirective };
|
161
|
-
//# sourceMappingURL=radix-ng-primitives-alert-dialog.mjs.map
|