pdm-ui-kit 1.0.0 → 1.1.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/calendar/calendar.module.d.ts +1 -1
- package/calendar/date-picker.component.d.ts +2 -2
- package/command/command.component.d.ts +1 -1
- package/command/command.module.d.ts +1 -1
- package/context-menu/context-menu.component.d.ts +1 -1
- package/data-table/data-table.component.d.ts +1 -1
- package/data-table/draggable-table.component.d.ts +1 -1
- package/data-table/table.component.d.ts +1 -1
- package/drawer/drawer.module.d.ts +1 -1
- package/dropdown-menu/dropdown-menu.component.d.ts +1 -1
- package/empty/empty.module.d.ts +2 -2
- package/esm2020/calendar/calendar.module.mjs +2 -2
- package/esm2020/calendar/date-picker.component.mjs +4 -4
- package/esm2020/combobox/combobox.component.mjs +2 -2
- package/esm2020/command/command.component.mjs +2 -2
- package/esm2020/command/command.module.mjs +2 -2
- package/esm2020/context-menu/context-menu.component.mjs +2 -2
- package/esm2020/data-table/data-table.component.mjs +1 -1
- package/esm2020/data-table/draggable-table.component.mjs +1 -1
- package/esm2020/data-table/table.component.mjs +2 -2
- package/esm2020/dialog/dialog.component.mjs +3 -3
- package/esm2020/drawer/drawer.component.mjs +2 -2
- package/esm2020/drawer/drawer.module.mjs +2 -2
- package/esm2020/drawer/sheet.component.mjs +1 -1
- package/esm2020/dropdown-menu/dropdown-menu.component.mjs +3 -3
- package/esm2020/empty/empty.component.mjs +2 -2
- package/esm2020/empty/empty.module.mjs +3 -3
- package/esm2020/hover-card/hover-card.component.mjs +2 -2
- package/esm2020/input/input-group.component.mjs +1 -1
- package/esm2020/input/input-password.component.mjs +1 -1
- package/esm2020/input/input.module.mjs +2 -2
- package/esm2020/menubar/menubar.component.mjs +2 -2
- package/esm2020/native-select/native-select.component.mjs +1 -1
- package/esm2020/native-select/native-select.module.mjs +2 -2
- package/esm2020/pagination/pagination.component.mjs +3 -3
- package/esm2020/pagination/pagination.module.mjs +3 -3
- package/esm2020/popover/popover.component.mjs +2 -2
- package/esm2020/select/select.component.mjs +4 -4
- package/esm2020/select/select.module.mjs +2 -2
- package/esm2020/sonner/sonner.component.mjs +1 -1
- package/esm2020/sonner/sonner.module.mjs +2 -2
- package/esm2020/src/accordion/accordion.component.mjs +42 -0
- package/esm2020/src/accordion/accordion.module.mjs +21 -0
- package/esm2020/src/accordion/pdm-ui-kit-src-accordion.mjs +5 -0
- package/esm2020/src/accordion/public-api.mjs +3 -0
- package/esm2020/src/alert/alert-dialog.component.mjs +87 -0
- package/esm2020/src/alert/alert.component.mjs +35 -0
- package/esm2020/src/alert/alert.module.mjs +25 -0
- package/esm2020/src/alert/pdm-ui-kit-src-alert.mjs +5 -0
- package/esm2020/src/alert/public-api.mjs +4 -0
- package/esm2020/src/aspect-ratio/aspect-ratio.component.mjs +31 -0
- package/esm2020/src/aspect-ratio/aspect-ratio.module.mjs +21 -0
- package/esm2020/src/aspect-ratio/pdm-ui-kit-src-aspect-ratio.mjs +5 -0
- package/esm2020/src/aspect-ratio/public-api.mjs +3 -0
- package/esm2020/src/avatar/avatar.component.mjs +46 -0
- package/esm2020/src/avatar/avatar.module.mjs +21 -0
- package/esm2020/src/avatar/pdm-ui-kit-src-avatar.mjs +5 -0
- package/esm2020/src/avatar/public-api.mjs +3 -0
- package/esm2020/src/badge/badge.component.mjs +23 -0
- package/esm2020/src/badge/badge.module.mjs +21 -0
- package/esm2020/src/badge/pdm-ui-kit-src-badge.mjs +5 -0
- package/esm2020/src/badge/public-api.mjs +3 -0
- package/esm2020/src/breadcrumb/breadcrumb.component.mjs +62 -0
- package/esm2020/src/breadcrumb/breadcrumb.module.mjs +21 -0
- package/esm2020/src/breadcrumb/pdm-ui-kit-src-breadcrumb.mjs +5 -0
- package/esm2020/src/breadcrumb/public-api.mjs +3 -0
- package/esm2020/src/button/button-group.component.mjs +236 -0
- package/esm2020/src/button/button.component.mjs +114 -0
- package/esm2020/src/button/button.module.mjs +25 -0
- package/esm2020/src/button/pdm-ui-kit-src-button.mjs +5 -0
- package/esm2020/src/button/public-api.mjs +4 -0
- package/esm2020/src/calendar/calendar.component.mjs +529 -0
- package/esm2020/src/calendar/calendar.module.mjs +22 -0
- package/esm2020/src/calendar/date-picker.component.mjs +362 -0
- package/esm2020/src/calendar/pdm-ui-kit-src-calendar.mjs +5 -0
- package/esm2020/src/calendar/public-api.mjs +4 -0
- package/esm2020/src/card/card.component.mjs +48 -0
- package/esm2020/src/card/card.module.mjs +21 -0
- package/esm2020/src/card/pdm-ui-kit-src-card.mjs +5 -0
- package/esm2020/src/card/public-api.mjs +3 -0
- package/esm2020/src/carousel/carousel.component.mjs +102 -0
- package/esm2020/src/carousel/carousel.module.mjs +21 -0
- package/esm2020/src/carousel/pdm-ui-kit-src-carousel.mjs +5 -0
- package/esm2020/src/carousel/public-api.mjs +3 -0
- package/esm2020/src/chart/chart.component.mjs +177 -0
- package/esm2020/src/chart/chart.module.mjs +21 -0
- package/esm2020/src/chart/pdm-ui-kit-src-chart.mjs +5 -0
- package/esm2020/src/chart/public-api.mjs +3 -0
- package/esm2020/src/checkbox/checkbox.component.mjs +47 -0
- package/esm2020/src/checkbox/checkbox.module.mjs +21 -0
- package/esm2020/src/checkbox/pdm-ui-kit-src-checkbox.mjs +5 -0
- package/esm2020/src/checkbox/public-api.mjs +3 -0
- package/esm2020/src/collapsible/collapsible.component.mjs +43 -0
- package/esm2020/src/collapsible/collapsible.module.mjs +21 -0
- package/esm2020/src/collapsible/pdm-ui-kit-src-collapsible.mjs +5 -0
- package/esm2020/src/collapsible/public-api.mjs +3 -0
- package/esm2020/src/combobox/combobox.component.mjs +173 -0
- package/esm2020/src/combobox/combobox.module.mjs +22 -0
- package/esm2020/src/combobox/pdm-ui-kit-src-combobox.mjs +5 -0
- package/esm2020/src/combobox/public-api.mjs +3 -0
- package/esm2020/src/command/command.component.mjs +75 -0
- package/esm2020/src/command/command.module.mjs +20 -0
- package/esm2020/src/command/pdm-ui-kit-src-command.mjs +5 -0
- package/esm2020/src/command/public-api.mjs +3 -0
- package/esm2020/src/context-menu/context-menu.component.mjs +165 -0
- package/esm2020/src/context-menu/context-menu.module.mjs +22 -0
- package/esm2020/src/context-menu/pdm-ui-kit-src-context-menu.mjs +5 -0
- package/esm2020/src/context-menu/public-api.mjs +3 -0
- package/esm2020/src/data-table/data-table.component.mjs +299 -0
- package/esm2020/src/data-table/data-table.module.mjs +29 -0
- package/esm2020/src/data-table/draggable-table.component.mjs +300 -0
- package/esm2020/src/data-table/pdm-ui-kit-src-data-table.mjs +5 -0
- package/esm2020/src/data-table/public-api.mjs +5 -0
- package/esm2020/src/data-table/table.component.mjs +182 -0
- package/esm2020/src/dialog/dialog.component.mjs +265 -0
- package/esm2020/src/dialog/dialog.module.mjs +21 -0
- package/esm2020/src/dialog/pdm-ui-kit-src-dialog.mjs +5 -0
- package/esm2020/src/dialog/public-api.mjs +3 -0
- package/esm2020/src/drawer/drawer.component.mjs +217 -0
- package/esm2020/src/drawer/drawer.module.mjs +21 -0
- package/esm2020/src/drawer/pdm-ui-kit-src-drawer.mjs +5 -0
- package/esm2020/src/drawer/public-api.mjs +4 -0
- package/esm2020/src/drawer/sheet.component.mjs +116 -0
- package/esm2020/src/dropdown-menu/dropdown-menu.component.mjs +192 -0
- package/esm2020/src/dropdown-menu/dropdown-menu.module.mjs +22 -0
- package/esm2020/src/dropdown-menu/pdm-ui-kit-src-dropdown-menu.mjs +5 -0
- package/esm2020/src/dropdown-menu/public-api.mjs +3 -0
- package/esm2020/src/empty/empty.component.mjs +58 -0
- package/esm2020/src/empty/empty.module.mjs +21 -0
- package/esm2020/src/empty/pdm-ui-kit-src-empty.mjs +5 -0
- package/esm2020/src/empty/public-api.mjs +3 -0
- package/esm2020/src/field/field.component.mjs +64 -0
- package/esm2020/src/field/field.module.mjs +21 -0
- package/esm2020/src/field/pdm-ui-kit-src-field.mjs +5 -0
- package/esm2020/src/field/public-api.mjs +3 -0
- package/esm2020/src/hover-card/hover-card.component.mjs +205 -0
- package/esm2020/src/hover-card/hover-card.module.mjs +22 -0
- package/esm2020/src/hover-card/pdm-ui-kit-src-hover-card.mjs +5 -0
- package/esm2020/src/hover-card/public-api.mjs +3 -0
- package/esm2020/src/icon/icon.component.mjs +144 -0
- package/esm2020/src/icon/icon.module.mjs +21 -0
- package/esm2020/src/icon/pdm-ui-kit-src-icon.mjs +5 -0
- package/esm2020/src/icon/public-api.mjs +3 -0
- package/esm2020/src/input/input-group.component.mjs +63 -0
- package/esm2020/src/input/input-otp.component.mjs +144 -0
- package/esm2020/src/input/input-password.component.mjs +78 -0
- package/esm2020/src/input/input.component.mjs +71 -0
- package/esm2020/src/input/input.module.mjs +38 -0
- package/esm2020/src/input/pdm-ui-kit-src-input.mjs +5 -0
- package/esm2020/src/input/public-api.mjs +7 -0
- package/esm2020/src/input/textarea.component.mjs +59 -0
- package/esm2020/src/item/item.component.mjs +23 -0
- package/esm2020/src/item/item.module.mjs +21 -0
- package/esm2020/src/item/pdm-ui-kit-src-item.mjs +5 -0
- package/esm2020/src/item/public-api.mjs +3 -0
- package/esm2020/src/kbd/kbd.component.mjs +17 -0
- package/esm2020/src/kbd/kbd.module.mjs +21 -0
- package/esm2020/src/kbd/pdm-ui-kit-src-kbd.mjs +5 -0
- package/esm2020/src/kbd/public-api.mjs +3 -0
- package/esm2020/src/label/label.component.mjs +23 -0
- package/esm2020/src/label/label.module.mjs +21 -0
- package/esm2020/src/label/pdm-ui-kit-src-label.mjs +5 -0
- package/esm2020/src/label/public-api.mjs +3 -0
- package/esm2020/src/menubar/menubar.component.mjs +144 -0
- package/esm2020/src/menubar/menubar.module.mjs +22 -0
- package/esm2020/src/menubar/pdm-ui-kit-src-menubar.mjs +5 -0
- package/esm2020/src/menubar/public-api.mjs +3 -0
- package/esm2020/src/native-select/native-select.component.mjs +42 -0
- package/esm2020/src/native-select/native-select.module.mjs +20 -0
- package/esm2020/src/native-select/pdm-ui-kit-src-native-select.mjs +5 -0
- package/esm2020/src/native-select/public-api.mjs +3 -0
- package/esm2020/src/navigation-menu/navigation-menu.component.mjs +42 -0
- package/esm2020/src/navigation-menu/navigation-menu.module.mjs +21 -0
- package/esm2020/src/navigation-menu/pdm-ui-kit-src-navigation-menu.mjs +5 -0
- package/esm2020/src/navigation-menu/public-api.mjs +3 -0
- package/esm2020/src/overlay/create-flexible-position-strategy.mjs +54 -0
- package/esm2020/src/overlay/pdm-outside-click.directive.mjs +86 -0
- package/esm2020/src/overlay/pdm-outside-click.module.mjs +18 -0
- package/esm2020/src/overlay/pdm-overlay-options.mjs +2 -0
- package/esm2020/src/overlay/pdm-ui-kit-src-overlay.mjs +5 -0
- package/esm2020/src/overlay/public-api.mjs +6 -0
- package/esm2020/src/overlay/z-index-helper.mjs +69 -0
- package/esm2020/src/pagination/pagination.component.mjs +72 -0
- package/esm2020/src/pagination/pagination.module.mjs +21 -0
- package/esm2020/src/pagination/pdm-ui-kit-src-pagination.mjs +5 -0
- package/esm2020/src/pagination/public-api.mjs +3 -0
- package/esm2020/src/popover/pdm-ui-kit-src-popover.mjs +5 -0
- package/esm2020/src/popover/popover.component.mjs +162 -0
- package/esm2020/src/popover/popover.module.mjs +22 -0
- package/esm2020/src/popover/public-api.mjs +3 -0
- package/esm2020/src/progress/pdm-ui-kit-src-progress.mjs +5 -0
- package/esm2020/src/progress/progress.component.mjs +33 -0
- package/esm2020/src/progress/progress.module.mjs +21 -0
- package/esm2020/src/progress/public-api.mjs +3 -0
- package/esm2020/src/radio-group/pdm-ui-kit-src-radio-group.mjs +5 -0
- package/esm2020/src/radio-group/public-api.mjs +3 -0
- package/esm2020/src/radio-group/radio-group.component.mjs +38 -0
- package/esm2020/src/radio-group/radio-group.module.mjs +21 -0
- package/esm2020/src/scroll-area/pdm-ui-kit-src-scroll-area.mjs +5 -0
- package/esm2020/src/scroll-area/public-api.mjs +3 -0
- package/esm2020/src/scroll-area/scroll-area.component.mjs +20 -0
- package/esm2020/src/scroll-area/scroll-area.module.mjs +21 -0
- package/esm2020/src/select/pdm-ui-kit-src-select.mjs +5 -0
- package/esm2020/src/select/public-api.mjs +4 -0
- package/esm2020/src/select/select-option.directive.mjs +55 -0
- package/esm2020/src/select/select.component.mjs +164 -0
- package/esm2020/src/select/select.module.mjs +22 -0
- package/esm2020/src/separator/pdm-ui-kit-src-separator.mjs +5 -0
- package/esm2020/src/separator/public-api.mjs +3 -0
- package/esm2020/src/separator/separator.component.mjs +26 -0
- package/esm2020/src/separator/separator.module.mjs +21 -0
- package/esm2020/src/sidebar/pdm-ui-kit-src-sidebar.mjs +5 -0
- package/esm2020/src/sidebar/public-api.mjs +3 -0
- package/esm2020/src/sidebar/sidebar.component.mjs +67 -0
- package/esm2020/src/sidebar/sidebar.module.mjs +21 -0
- package/esm2020/src/skeleton/pdm-ui-kit-src-skeleton.mjs +5 -0
- package/esm2020/src/skeleton/public-api.mjs +3 -0
- package/esm2020/src/skeleton/skeleton.component.mjs +17 -0
- package/esm2020/src/skeleton/skeleton.module.mjs +21 -0
- package/esm2020/src/slider/pdm-ui-kit-src-slider.mjs +5 -0
- package/esm2020/src/slider/public-api.mjs +3 -0
- package/esm2020/src/slider/slider.component.mjs +46 -0
- package/esm2020/src/slider/slider.module.mjs +21 -0
- package/esm2020/src/sonner/pdm-ui-kit-src-sonner.mjs +5 -0
- package/esm2020/src/sonner/public-api.mjs +3 -0
- package/esm2020/src/sonner/sonner.component.mjs +39 -0
- package/esm2020/src/sonner/sonner.module.mjs +20 -0
- package/esm2020/src/spinner/pdm-ui-kit-src-spinner.mjs +5 -0
- package/esm2020/src/spinner/public-api.mjs +3 -0
- package/esm2020/src/spinner/spinner.component.mjs +20 -0
- package/esm2020/src/spinner/spinner.module.mjs +21 -0
- package/esm2020/src/switch/pdm-ui-kit-src-switch.mjs +5 -0
- package/esm2020/src/switch/public-api.mjs +3 -0
- package/esm2020/src/switch/switch.component.mjs +58 -0
- package/esm2020/src/switch/switch.module.mjs +21 -0
- package/esm2020/src/tabs/pdm-ui-kit-src-tabs.mjs +5 -0
- package/esm2020/src/tabs/public-api.mjs +3 -0
- package/esm2020/src/tabs/tabs.component.mjs +34 -0
- package/esm2020/src/tabs/tabs.module.mjs +21 -0
- package/esm2020/src/toggle/pdm-ui-kit-src-toggle.mjs +5 -0
- package/esm2020/src/toggle/public-api.mjs +4 -0
- package/esm2020/src/toggle/toggle-group.component.mjs +31 -0
- package/esm2020/src/toggle/toggle.component.mjs +41 -0
- package/esm2020/src/toggle/toggle.module.mjs +25 -0
- package/esm2020/src/tooltip/pdm-ui-kit-src-tooltip.mjs +5 -0
- package/esm2020/src/tooltip/public-api.mjs +3 -0
- package/esm2020/src/tooltip/tooltip.component.mjs +176 -0
- package/esm2020/src/tooltip/tooltip.module.mjs +22 -0
- package/esm2020/src/utils/pdm-ui-kit-src-utils.mjs +5 -0
- package/esm2020/src/utils/public-api.mjs +3 -0
- package/esm2020/src/utils/responsive.mjs +143 -0
- package/esm2020/src/utils/z-index.mjs +90 -0
- package/esm2020/tooltip/tooltip.component.mjs +2 -2
- package/fesm2015/pdm-ui-kit-src-accordion.mjs +68 -0
- package/fesm2015/pdm-ui-kit-src-accordion.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-alert.mjs +147 -0
- package/fesm2015/pdm-ui-kit-src-alert.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-aspect-ratio.mjs +56 -0
- package/fesm2015/pdm-ui-kit-src-aspect-ratio.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-avatar.mjs +71 -0
- package/fesm2015/pdm-ui-kit-src-avatar.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-badge.mjs +48 -0
- package/fesm2015/pdm-ui-kit-src-badge.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-breadcrumb.mjs +87 -0
- package/fesm2015/pdm-ui-kit-src-breadcrumb.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-button.mjs +376 -0
- package/fesm2015/pdm-ui-kit-src-button.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-calendar.mjs +912 -0
- package/fesm2015/pdm-ui-kit-src-calendar.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-card.mjs +73 -0
- package/fesm2015/pdm-ui-kit-src-card.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-carousel.mjs +127 -0
- package/fesm2015/pdm-ui-kit-src-carousel.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-chart.mjs +203 -0
- package/fesm2015/pdm-ui-kit-src-chart.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-checkbox.mjs +72 -0
- package/fesm2015/pdm-ui-kit-src-checkbox.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-collapsible.mjs +68 -0
- package/fesm2015/pdm-ui-kit-src-collapsible.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-combobox.mjs +200 -0
- package/fesm2015/pdm-ui-kit-src-combobox.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-command.mjs +100 -0
- package/fesm2015/pdm-ui-kit-src-command.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-context-menu.mjs +191 -0
- package/fesm2015/pdm-ui-kit-src-context-menu.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-data-table.mjs +806 -0
- package/fesm2015/pdm-ui-kit-src-data-table.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-dialog.mjs +289 -0
- package/fesm2015/pdm-ui-kit-src-dialog.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-drawer.mjs +354 -0
- package/fesm2015/pdm-ui-kit-src-drawer.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-dropdown-menu.mjs +212 -0
- package/fesm2015/pdm-ui-kit-src-dropdown-menu.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-empty.mjs +83 -0
- package/fesm2015/pdm-ui-kit-src-empty.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-field.mjs +89 -0
- package/fesm2015/pdm-ui-kit-src-field.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-hover-card.mjs +231 -0
- package/fesm2015/pdm-ui-kit-src-hover-card.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-icon.mjs +172 -0
- package/fesm2015/pdm-ui-kit-src-icon.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-input.mjs +443 -0
- package/fesm2015/pdm-ui-kit-src-input.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-item.mjs +48 -0
- package/fesm2015/pdm-ui-kit-src-item.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-kbd.mjs +42 -0
- package/fesm2015/pdm-ui-kit-src-kbd.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-label.mjs +48 -0
- package/fesm2015/pdm-ui-kit-src-label.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-menubar.mjs +170 -0
- package/fesm2015/pdm-ui-kit-src-menubar.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-native-select.mjs +66 -0
- package/fesm2015/pdm-ui-kit-src-native-select.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-navigation-menu.mjs +67 -0
- package/fesm2015/pdm-ui-kit-src-navigation-menu.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-overlay.mjs +225 -0
- package/fesm2015/pdm-ui-kit-src-overlay.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-pagination.mjs +97 -0
- package/fesm2015/pdm-ui-kit-src-pagination.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-popover.mjs +189 -0
- package/fesm2015/pdm-ui-kit-src-popover.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-progress.mjs +58 -0
- package/fesm2015/pdm-ui-kit-src-progress.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-radio-group.mjs +63 -0
- package/fesm2015/pdm-ui-kit-src-radio-group.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-scroll-area.mjs +45 -0
- package/fesm2015/pdm-ui-kit-src-scroll-area.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-select.mjs +238 -0
- package/fesm2015/pdm-ui-kit-src-select.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-separator.mjs +51 -0
- package/fesm2015/pdm-ui-kit-src-separator.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-sidebar.mjs +92 -0
- package/fesm2015/pdm-ui-kit-src-sidebar.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-skeleton.mjs +42 -0
- package/fesm2015/pdm-ui-kit-src-skeleton.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-slider.mjs +71 -0
- package/fesm2015/pdm-ui-kit-src-slider.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-sonner.mjs +63 -0
- package/fesm2015/pdm-ui-kit-src-sonner.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-spinner.mjs +45 -0
- package/fesm2015/pdm-ui-kit-src-spinner.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-switch.mjs +83 -0
- package/fesm2015/pdm-ui-kit-src-switch.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-tabs.mjs +59 -0
- package/fesm2015/pdm-ui-kit-src-tabs.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-toggle.mjs +97 -0
- package/fesm2015/pdm-ui-kit-src-toggle.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-tooltip.mjs +202 -0
- package/fesm2015/pdm-ui-kit-src-tooltip.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit-src-utils.mjs +239 -0
- package/fesm2015/pdm-ui-kit-src-utils.mjs.map +1 -0
- package/fesm2015/pdm-ui-kit.mjs +1019 -1009
- package/fesm2015/pdm-ui-kit.mjs.map +1 -1
- package/fesm2020/pdm-ui-kit-src-accordion.mjs +67 -0
- package/fesm2020/pdm-ui-kit-src-accordion.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-alert.mjs +147 -0
- package/fesm2020/pdm-ui-kit-src-alert.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-aspect-ratio.mjs +56 -0
- package/fesm2020/pdm-ui-kit-src-aspect-ratio.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-avatar.mjs +71 -0
- package/fesm2020/pdm-ui-kit-src-avatar.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-badge.mjs +48 -0
- package/fesm2020/pdm-ui-kit-src-badge.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-breadcrumb.mjs +87 -0
- package/fesm2020/pdm-ui-kit-src-breadcrumb.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-button.mjs +375 -0
- package/fesm2020/pdm-ui-kit-src-button.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-calendar.mjs +911 -0
- package/fesm2020/pdm-ui-kit-src-calendar.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-card.mjs +73 -0
- package/fesm2020/pdm-ui-kit-src-card.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-carousel.mjs +127 -0
- package/fesm2020/pdm-ui-kit-src-carousel.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-chart.mjs +202 -0
- package/fesm2020/pdm-ui-kit-src-chart.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-checkbox.mjs +72 -0
- package/fesm2020/pdm-ui-kit-src-checkbox.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-collapsible.mjs +68 -0
- package/fesm2020/pdm-ui-kit-src-collapsible.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-combobox.mjs +199 -0
- package/fesm2020/pdm-ui-kit-src-combobox.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-command.mjs +99 -0
- package/fesm2020/pdm-ui-kit-src-command.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-context-menu.mjs +191 -0
- package/fesm2020/pdm-ui-kit-src-context-menu.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-data-table.mjs +805 -0
- package/fesm2020/pdm-ui-kit-src-data-table.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-dialog.mjs +289 -0
- package/fesm2020/pdm-ui-kit-src-dialog.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-drawer.mjs +354 -0
- package/fesm2020/pdm-ui-kit-src-drawer.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-dropdown-menu.mjs +218 -0
- package/fesm2020/pdm-ui-kit-src-dropdown-menu.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-empty.mjs +83 -0
- package/fesm2020/pdm-ui-kit-src-empty.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-field.mjs +89 -0
- package/fesm2020/pdm-ui-kit-src-field.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-hover-card.mjs +231 -0
- package/fesm2020/pdm-ui-kit-src-hover-card.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-icon.mjs +169 -0
- package/fesm2020/pdm-ui-kit-src-icon.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-input.mjs +441 -0
- package/fesm2020/pdm-ui-kit-src-input.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-item.mjs +48 -0
- package/fesm2020/pdm-ui-kit-src-item.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-kbd.mjs +42 -0
- package/fesm2020/pdm-ui-kit-src-kbd.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-label.mjs +48 -0
- package/fesm2020/pdm-ui-kit-src-label.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-menubar.mjs +170 -0
- package/fesm2020/pdm-ui-kit-src-menubar.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-native-select.mjs +66 -0
- package/fesm2020/pdm-ui-kit-src-native-select.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-navigation-menu.mjs +67 -0
- package/fesm2020/pdm-ui-kit-src-navigation-menu.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-overlay.mjs +229 -0
- package/fesm2020/pdm-ui-kit-src-overlay.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-pagination.mjs +97 -0
- package/fesm2020/pdm-ui-kit-src-pagination.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-popover.mjs +188 -0
- package/fesm2020/pdm-ui-kit-src-popover.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-progress.mjs +58 -0
- package/fesm2020/pdm-ui-kit-src-progress.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-radio-group.mjs +63 -0
- package/fesm2020/pdm-ui-kit-src-radio-group.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-scroll-area.mjs +45 -0
- package/fesm2020/pdm-ui-kit-src-scroll-area.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-select.mjs +241 -0
- package/fesm2020/pdm-ui-kit-src-select.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-separator.mjs +51 -0
- package/fesm2020/pdm-ui-kit-src-separator.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-sidebar.mjs +92 -0
- package/fesm2020/pdm-ui-kit-src-sidebar.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-skeleton.mjs +42 -0
- package/fesm2020/pdm-ui-kit-src-skeleton.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-slider.mjs +71 -0
- package/fesm2020/pdm-ui-kit-src-slider.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-sonner.mjs +63 -0
- package/fesm2020/pdm-ui-kit-src-sonner.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-spinner.mjs +45 -0
- package/fesm2020/pdm-ui-kit-src-spinner.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-switch.mjs +83 -0
- package/fesm2020/pdm-ui-kit-src-switch.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-tabs.mjs +59 -0
- package/fesm2020/pdm-ui-kit-src-tabs.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-toggle.mjs +97 -0
- package/fesm2020/pdm-ui-kit-src-toggle.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-tooltip.mjs +202 -0
- package/fesm2020/pdm-ui-kit-src-tooltip.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit-src-utils.mjs +239 -0
- package/fesm2020/pdm-ui-kit-src-utils.mjs.map +1 -0
- package/fesm2020/pdm-ui-kit.mjs +1022 -1012
- package/fesm2020/pdm-ui-kit.mjs.map +1 -1
- package/input/input-password.component.d.ts +1 -1
- package/input/input.module.d.ts +1 -1
- package/menubar/menubar.component.d.ts +1 -1
- package/native-select/native-select.module.d.ts +1 -1
- package/package.json +703 -115
- package/pagination/pagination.component.d.ts +1 -1
- package/pagination/pagination.module.d.ts +2 -2
- package/select/select.component.d.ts +1 -1
- package/select/select.module.d.ts +1 -1
- package/sonner/sonner.module.d.ts +1 -1
- package/src/accordion/accordion.component.d.ts +19 -0
- package/src/accordion/accordion.module.d.ts +8 -0
- package/src/accordion/index.d.ts +5 -0
- package/src/accordion/public-api.d.ts +2 -0
- package/src/alert/alert-dialog.component.d.ts +29 -0
- package/src/alert/alert.component.d.ts +13 -0
- package/src/alert/alert.module.d.ts +9 -0
- package/src/alert/index.d.ts +5 -0
- package/src/alert/public-api.d.ts +3 -0
- package/src/aspect-ratio/aspect-ratio.component.d.ts +10 -0
- package/src/aspect-ratio/aspect-ratio.module.d.ts +8 -0
- package/src/aspect-ratio/index.d.ts +5 -0
- package/src/aspect-ratio/public-api.d.ts +2 -0
- package/src/avatar/avatar.component.d.ts +20 -0
- package/src/avatar/avatar.module.d.ts +8 -0
- package/src/avatar/index.d.ts +5 -0
- package/src/avatar/public-api.d.ts +2 -0
- package/src/badge/badge.component.d.ts +9 -0
- package/src/badge/badge.module.d.ts +8 -0
- package/src/badge/index.d.ts +5 -0
- package/src/badge/public-api.d.ts +2 -0
- package/src/breadcrumb/breadcrumb.component.d.ts +32 -0
- package/src/breadcrumb/breadcrumb.module.d.ts +8 -0
- package/src/breadcrumb/index.d.ts +5 -0
- package/src/breadcrumb/public-api.d.ts +2 -0
- package/src/button/button-group.component.d.ts +19 -0
- package/src/button/button.component.d.ts +29 -0
- package/src/button/button.module.d.ts +9 -0
- package/src/button/index.d.ts +5 -0
- package/src/button/public-api.d.ts +3 -0
- package/src/calendar/calendar.component.d.ts +149 -0
- package/src/calendar/calendar.module.d.ts +11 -0
- package/src/calendar/date-picker.component.d.ts +89 -0
- package/src/calendar/index.d.ts +5 -0
- package/src/calendar/public-api.d.ts +3 -0
- package/src/card/card.component.d.ts +37 -0
- package/src/card/card.module.d.ts +8 -0
- package/src/card/index.d.ts +5 -0
- package/src/card/public-api.d.ts +2 -0
- package/src/carousel/carousel.component.d.ts +28 -0
- package/src/carousel/carousel.module.d.ts +8 -0
- package/src/carousel/index.d.ts +5 -0
- package/src/carousel/public-api.d.ts +2 -0
- package/src/chart/chart.component.d.ts +44 -0
- package/src/chart/chart.module.d.ts +8 -0
- package/src/chart/index.d.ts +5 -0
- package/src/chart/public-api.d.ts +2 -0
- package/src/checkbox/checkbox.component.d.ts +17 -0
- package/src/checkbox/checkbox.module.d.ts +8 -0
- package/src/checkbox/index.d.ts +5 -0
- package/src/checkbox/public-api.d.ts +2 -0
- package/src/collapsible/collapsible.component.d.ts +14 -0
- package/src/collapsible/collapsible.module.d.ts +8 -0
- package/src/collapsible/index.d.ts +5 -0
- package/src/collapsible/public-api.d.ts +2 -0
- package/src/combobox/combobox.component.d.ts +35 -0
- package/src/combobox/combobox.module.d.ts +9 -0
- package/src/combobox/index.d.ts +5 -0
- package/src/combobox/public-api.d.ts +2 -0
- package/src/command/command.component.d.ts +33 -0
- package/src/command/command.module.d.ts +9 -0
- package/src/command/index.d.ts +5 -0
- package/src/command/public-api.d.ts +2 -0
- package/src/context-menu/context-menu.component.d.ts +38 -0
- package/src/context-menu/context-menu.module.d.ts +9 -0
- package/src/context-menu/index.d.ts +5 -0
- package/src/context-menu/public-api.d.ts +2 -0
- package/src/data-table/data-table.component.d.ts +200 -0
- package/src/data-table/data-table.module.d.ts +10 -0
- package/src/data-table/draggable-table.component.d.ts +74 -0
- package/src/data-table/index.d.ts +5 -0
- package/src/data-table/public-api.d.ts +4 -0
- package/src/data-table/table.component.d.ts +55 -0
- package/src/dialog/dialog.component.d.ts +72 -0
- package/src/dialog/dialog.module.d.ts +8 -0
- package/src/dialog/index.d.ts +5 -0
- package/src/dialog/public-api.d.ts +2 -0
- package/src/drawer/drawer.component.d.ts +96 -0
- package/src/drawer/drawer.module.d.ts +10 -0
- package/src/drawer/index.d.ts +5 -0
- package/src/drawer/public-api.d.ts +3 -0
- package/src/drawer/sheet.component.d.ts +46 -0
- package/src/dropdown-menu/dropdown-menu.component.d.ts +61 -0
- package/src/dropdown-menu/dropdown-menu.module.d.ts +9 -0
- package/src/dropdown-menu/index.d.ts +5 -0
- package/src/dropdown-menu/public-api.d.ts +2 -0
- package/src/empty/empty.component.d.ts +19 -0
- package/src/empty/empty.module.d.ts +10 -0
- package/src/empty/index.d.ts +5 -0
- package/src/empty/public-api.d.ts +2 -0
- package/src/field/field.component.d.ts +23 -0
- package/src/field/field.module.d.ts +8 -0
- package/src/field/index.d.ts +5 -0
- package/src/field/public-api.d.ts +2 -0
- package/src/hover-card/hover-card.component.d.ts +37 -0
- package/src/hover-card/hover-card.module.d.ts +9 -0
- package/src/hover-card/index.d.ts +5 -0
- package/src/hover-card/public-api.d.ts +2 -0
- package/src/icon/icon.component.d.ts +28 -0
- package/src/icon/icon.module.d.ts +8 -0
- package/src/icon/index.d.ts +5 -0
- package/src/icon/public-api.d.ts +2 -0
- package/src/input/index.d.ts +5 -0
- package/src/input/input-group.component.d.ts +22 -0
- package/src/input/input-otp.component.d.ts +26 -0
- package/src/input/input-password.component.d.ts +28 -0
- package/src/input/input.component.d.ts +27 -0
- package/src/input/input.module.d.ts +13 -0
- package/src/input/public-api.d.ts +6 -0
- package/src/input/textarea.component.d.ts +21 -0
- package/src/item/index.d.ts +5 -0
- package/src/item/item.component.d.ts +8 -0
- package/src/item/item.module.d.ts +8 -0
- package/src/item/public-api.d.ts +2 -0
- package/src/kbd/index.d.ts +5 -0
- package/src/kbd/kbd.component.d.ts +6 -0
- package/src/kbd/kbd.module.d.ts +8 -0
- package/src/kbd/public-api.d.ts +2 -0
- package/src/label/index.d.ts +5 -0
- package/src/label/label.component.d.ts +8 -0
- package/src/label/label.module.d.ts +8 -0
- package/src/label/public-api.d.ts +2 -0
- package/src/menubar/index.d.ts +5 -0
- package/src/menubar/menubar.component.d.ts +34 -0
- package/src/menubar/menubar.module.d.ts +9 -0
- package/src/menubar/public-api.d.ts +2 -0
- package/src/native-select/index.d.ts +5 -0
- package/src/native-select/native-select.component.d.ts +20 -0
- package/src/native-select/native-select.module.d.ts +9 -0
- package/src/native-select/public-api.d.ts +2 -0
- package/src/navigation-menu/index.d.ts +5 -0
- package/src/navigation-menu/navigation-menu.component.d.ts +33 -0
- package/src/navigation-menu/navigation-menu.module.d.ts +8 -0
- package/src/navigation-menu/public-api.d.ts +2 -0
- package/src/overlay/create-flexible-position-strategy.d.ts +15 -0
- package/src/overlay/index.d.ts +5 -0
- package/src/overlay/pdm-outside-click.directive.d.ts +40 -0
- package/src/overlay/pdm-outside-click.module.d.ts +8 -0
- package/src/overlay/pdm-overlay-options.d.ts +21 -0
- package/src/overlay/public-api.d.ts +5 -0
- package/src/overlay/z-index-helper.d.ts +36 -0
- package/src/pagination/index.d.ts +5 -0
- package/src/pagination/pagination.component.d.ts +21 -0
- package/src/pagination/pagination.module.d.ts +10 -0
- package/src/pagination/public-api.d.ts +2 -0
- package/src/popover/index.d.ts +5 -0
- package/src/popover/popover.component.d.ts +32 -0
- package/src/popover/popover.module.d.ts +9 -0
- package/src/popover/public-api.d.ts +2 -0
- package/src/progress/index.d.ts +5 -0
- package/src/progress/progress.component.d.ts +10 -0
- package/src/progress/progress.module.d.ts +8 -0
- package/src/progress/public-api.d.ts +2 -0
- package/src/radio-group/index.d.ts +5 -0
- package/src/radio-group/public-api.d.ts +2 -0
- package/src/radio-group/radio-group.component.d.ts +19 -0
- package/src/radio-group/radio-group.module.d.ts +8 -0
- package/src/scroll-area/index.d.ts +5 -0
- package/src/scroll-area/public-api.d.ts +2 -0
- package/src/scroll-area/scroll-area.component.d.ts +7 -0
- package/src/scroll-area/scroll-area.module.d.ts +8 -0
- package/src/select/index.d.ts +5 -0
- package/src/select/public-api.d.ts +3 -0
- package/src/select/select-option.directive.d.ts +34 -0
- package/src/select/select.component.d.ts +55 -0
- package/src/select/select.module.d.ts +11 -0
- package/src/separator/index.d.ts +5 -0
- package/src/separator/public-api.d.ts +2 -0
- package/src/separator/separator.component.d.ts +9 -0
- package/src/separator/separator.module.d.ts +8 -0
- package/src/sidebar/index.d.ts +5 -0
- package/src/sidebar/public-api.d.ts +2 -0
- package/src/sidebar/sidebar.component.d.ts +45 -0
- package/src/sidebar/sidebar.module.d.ts +8 -0
- package/src/skeleton/index.d.ts +5 -0
- package/src/skeleton/public-api.d.ts +2 -0
- package/src/skeleton/skeleton.component.d.ts +6 -0
- package/src/skeleton/skeleton.module.d.ts +8 -0
- package/src/slider/index.d.ts +5 -0
- package/src/slider/public-api.d.ts +2 -0
- package/src/slider/slider.component.d.ts +15 -0
- package/src/slider/slider.module.d.ts +8 -0
- package/src/sonner/index.d.ts +5 -0
- package/src/sonner/public-api.d.ts +2 -0
- package/src/sonner/sonner.component.d.ts +13 -0
- package/src/sonner/sonner.module.d.ts +9 -0
- package/src/spinner/index.d.ts +5 -0
- package/src/spinner/public-api.d.ts +2 -0
- package/src/spinner/spinner.component.d.ts +7 -0
- package/src/spinner/spinner.module.d.ts +8 -0
- package/src/switch/index.d.ts +5 -0
- package/src/switch/public-api.d.ts +2 -0
- package/src/switch/switch.component.d.ts +18 -0
- package/src/switch/switch.module.d.ts +8 -0
- package/src/tabs/index.d.ts +5 -0
- package/src/tabs/public-api.d.ts +2 -0
- package/src/tabs/tabs.component.d.ts +18 -0
- package/src/tabs/tabs.module.d.ts +8 -0
- package/src/toggle/index.d.ts +5 -0
- package/src/toggle/public-api.d.ts +3 -0
- package/src/toggle/toggle-group.component.d.ts +16 -0
- package/src/toggle/toggle.component.d.ts +14 -0
- package/src/toggle/toggle.module.d.ts +9 -0
- package/src/tooltip/index.d.ts +5 -0
- package/src/tooltip/public-api.d.ts +2 -0
- package/src/tooltip/tooltip.component.d.ts +28 -0
- package/src/tooltip/tooltip.module.d.ts +9 -0
- package/src/utils/index.d.ts +5 -0
- package/src/utils/public-api.d.ts +2 -0
- package/src/utils/responsive.d.ts +107 -0
- package/src/utils/z-index.d.ts +69 -0
- package/accordion/index.d.ts +0 -2
- package/accordion/index.mjs +0 -2
- package/alert/index.d.ts +0 -3
- package/alert/index.mjs +0 -3
- package/aspect-ratio/index.d.ts +0 -2
- package/aspect-ratio/index.mjs +0 -2
- package/avatar/index.d.ts +0 -2
- package/avatar/index.mjs +0 -2
- package/badge/index.d.ts +0 -2
- package/badge/index.mjs +0 -2
- package/breadcrumb/index.d.ts +0 -2
- package/breadcrumb/index.mjs +0 -2
- package/button/index.d.ts +0 -3
- package/button/index.mjs +0 -3
- package/calendar/index.d.ts +0 -3
- package/calendar/index.mjs +0 -3
- package/card/index.d.ts +0 -2
- package/card/index.mjs +0 -2
- package/carousel/index.d.ts +0 -2
- package/carousel/index.mjs +0 -2
- package/chart/index.d.ts +0 -2
- package/chart/index.mjs +0 -2
- package/checkbox/index.d.ts +0 -2
- package/checkbox/index.mjs +0 -2
- package/collapsible/index.d.ts +0 -2
- package/collapsible/index.mjs +0 -2
- package/combobox/index.d.ts +0 -2
- package/combobox/index.mjs +0 -2
- package/command/index.d.ts +0 -2
- package/command/index.mjs +0 -2
- package/context-menu/index.d.ts +0 -2
- package/context-menu/index.mjs +0 -2
- package/data-table/index.d.ts +0 -4
- package/data-table/index.mjs +0 -4
- package/dialog/index.d.ts +0 -2
- package/dialog/index.mjs +0 -2
- package/drawer/index.d.ts +0 -3
- package/drawer/index.mjs +0 -3
- package/dropdown-menu/index.d.ts +0 -2
- package/dropdown-menu/index.mjs +0 -2
- package/empty/index.d.ts +0 -2
- package/empty/index.mjs +0 -2
- package/field/index.d.ts +0 -2
- package/field/index.mjs +0 -2
- package/hover-card/index.d.ts +0 -2
- package/hover-card/index.mjs +0 -2
- package/icon/index.d.ts +0 -2
- package/icon/index.mjs +0 -2
- package/input/index.d.ts +0 -6
- package/input/index.mjs +0 -6
- package/item/index.d.ts +0 -2
- package/item/index.mjs +0 -2
- package/kbd/index.d.ts +0 -2
- package/kbd/index.mjs +0 -2
- package/label/index.d.ts +0 -2
- package/label/index.mjs +0 -2
- package/menubar/index.d.ts +0 -2
- package/menubar/index.mjs +0 -2
- package/native-select/index.d.ts +0 -2
- package/native-select/index.mjs +0 -2
- package/navigation-menu/index.d.ts +0 -2
- package/navigation-menu/index.mjs +0 -2
- package/overlay/index.d.ts +0 -8
- package/overlay/index.mjs +0 -8
- package/pagination/index.d.ts +0 -2
- package/pagination/index.mjs +0 -2
- package/popover/index.d.ts +0 -2
- package/popover/index.mjs +0 -2
- package/progress/index.d.ts +0 -2
- package/progress/index.mjs +0 -2
- package/radio-group/index.d.ts +0 -2
- package/radio-group/index.mjs +0 -2
- package/scroll-area/index.d.ts +0 -2
- package/scroll-area/index.mjs +0 -2
- package/select/index.d.ts +0 -3
- package/select/index.mjs +0 -3
- package/separator/index.d.ts +0 -2
- package/separator/index.mjs +0 -2
- package/sidebar/index.d.ts +0 -2
- package/sidebar/index.mjs +0 -2
- package/skeleton/index.d.ts +0 -2
- package/skeleton/index.mjs +0 -2
- package/slider/index.d.ts +0 -2
- package/slider/index.mjs +0 -2
- package/sonner/index.d.ts +0 -2
- package/sonner/index.mjs +0 -2
- package/spinner/index.d.ts +0 -2
- package/spinner/index.mjs +0 -2
- package/switch/index.d.ts +0 -2
- package/switch/index.mjs +0 -2
- package/tabs/index.d.ts +0 -2
- package/tabs/index.mjs +0 -2
- package/toggle/index.d.ts +0 -3
- package/toggle/index.mjs +0 -3
- package/tooltip/index.d.ts +0 -2
- package/tooltip/index.mjs +0 -2
- package/utils/index.d.ts +0 -3
- package/utils/index.mjs +0 -3
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, ViewChild, HostListener, NgModule } from '@angular/core';
|
|
3
|
+
import { TemplatePortal } from '@angular/cdk/portal';
|
|
4
|
+
import { mergeOverlayPanelClass, OVERLAY_BASE_Z_INDEX } from 'pdm-ui-kit/src/overlay';
|
|
5
|
+
import * as i1 from '@angular/cdk/overlay';
|
|
6
|
+
import { OverlayModule } from '@angular/cdk/overlay';
|
|
7
|
+
import * as i2 from '@angular/common';
|
|
8
|
+
import { CommonModule } from '@angular/common';
|
|
9
|
+
|
|
10
|
+
class PdmComboboxComponent {
|
|
11
|
+
constructor(overlay, viewContainerRef, elementRef, cdr) {
|
|
12
|
+
this.overlay = overlay;
|
|
13
|
+
this.viewContainerRef = viewContainerRef;
|
|
14
|
+
this.elementRef = elementRef;
|
|
15
|
+
this.cdr = cdr;
|
|
16
|
+
this.open = false;
|
|
17
|
+
this.placeholder = "Select framework...";
|
|
18
|
+
this.searchPlaceholder = "Search framework";
|
|
19
|
+
this.className = "";
|
|
20
|
+
this.options = [
|
|
21
|
+
"Next.js",
|
|
22
|
+
"SvelteKit",
|
|
23
|
+
"Nuxt.js",
|
|
24
|
+
"Remix",
|
|
25
|
+
"Astro",
|
|
26
|
+
];
|
|
27
|
+
this.value = "";
|
|
28
|
+
this.width = 200;
|
|
29
|
+
this.panelClassName = "";
|
|
30
|
+
this.openChange = new EventEmitter();
|
|
31
|
+
this.valueChange = new EventEmitter();
|
|
32
|
+
this.overlayRef = null;
|
|
33
|
+
this.outsideClickSub = null;
|
|
34
|
+
}
|
|
35
|
+
ngOnDestroy() {
|
|
36
|
+
this.destroyOverlay();
|
|
37
|
+
}
|
|
38
|
+
get selectedLabel() {
|
|
39
|
+
return this.value || this.placeholder;
|
|
40
|
+
}
|
|
41
|
+
toggle() {
|
|
42
|
+
if (this.open) {
|
|
43
|
+
this.close();
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
this.openPanel();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
select(option) {
|
|
50
|
+
this.valueChange.emit(option);
|
|
51
|
+
this.value = option;
|
|
52
|
+
this.close();
|
|
53
|
+
}
|
|
54
|
+
onEscape() {
|
|
55
|
+
if (this.open) {
|
|
56
|
+
this.close();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
openPanel() {
|
|
60
|
+
var _a;
|
|
61
|
+
if (this.overlayRef)
|
|
62
|
+
return;
|
|
63
|
+
const triggerEl = (_a = this.triggerRef) === null || _a === void 0 ? void 0 : _a.nativeElement;
|
|
64
|
+
if (!triggerEl)
|
|
65
|
+
return;
|
|
66
|
+
this.open = true;
|
|
67
|
+
this.openChange.emit(true);
|
|
68
|
+
this.cdr.markForCheck();
|
|
69
|
+
const positionStrategy = this.overlay
|
|
70
|
+
.position()
|
|
71
|
+
.flexibleConnectedTo(triggerEl)
|
|
72
|
+
.withPositions(this.getPositionConfigs())
|
|
73
|
+
.withFlexibleDimensions(false)
|
|
74
|
+
.withPush(true);
|
|
75
|
+
const panelClass = mergeOverlayPanelClass(OVERLAY_BASE_Z_INDEX, this.panelClassName);
|
|
76
|
+
this.overlayRef = this.overlay.create({
|
|
77
|
+
positionStrategy,
|
|
78
|
+
panelClass,
|
|
79
|
+
});
|
|
80
|
+
const portal = new TemplatePortal(this.panelTemplateRef, this.viewContainerRef);
|
|
81
|
+
this.overlayRef.attach(portal);
|
|
82
|
+
// Close on click outside
|
|
83
|
+
this.outsideClickSub = this.overlayRef
|
|
84
|
+
.outsidePointerEvents()
|
|
85
|
+
.subscribe(() => {
|
|
86
|
+
this.close();
|
|
87
|
+
});
|
|
88
|
+
this.cdr.markForCheck();
|
|
89
|
+
}
|
|
90
|
+
close() {
|
|
91
|
+
if (!this.overlayRef)
|
|
92
|
+
return;
|
|
93
|
+
this.open = false;
|
|
94
|
+
this.openChange.emit(false);
|
|
95
|
+
this.cdr.markForCheck();
|
|
96
|
+
this.destroyOverlay();
|
|
97
|
+
}
|
|
98
|
+
destroyOverlay() {
|
|
99
|
+
if (this.outsideClickSub) {
|
|
100
|
+
this.outsideClickSub.unsubscribe();
|
|
101
|
+
this.outsideClickSub = null;
|
|
102
|
+
}
|
|
103
|
+
if (this.overlayRef) {
|
|
104
|
+
this.overlayRef.detach();
|
|
105
|
+
this.overlayRef.dispose();
|
|
106
|
+
this.overlayRef = null;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
getPositionConfigs() {
|
|
110
|
+
return [
|
|
111
|
+
{
|
|
112
|
+
originX: "start",
|
|
113
|
+
originY: "bottom",
|
|
114
|
+
overlayX: "start",
|
|
115
|
+
overlayY: "top",
|
|
116
|
+
offsetY: 4,
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
originX: "start",
|
|
120
|
+
originY: "top",
|
|
121
|
+
overlayX: "start",
|
|
122
|
+
overlayY: "bottom",
|
|
123
|
+
offsetY: -4,
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
originX: "end",
|
|
127
|
+
originY: "bottom",
|
|
128
|
+
overlayX: "end",
|
|
129
|
+
overlayY: "top",
|
|
130
|
+
offsetY: 4,
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
originX: "start",
|
|
134
|
+
originY: "bottom",
|
|
135
|
+
overlayX: "end",
|
|
136
|
+
overlayY: "top",
|
|
137
|
+
offsetY: 4,
|
|
138
|
+
},
|
|
139
|
+
];
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
PdmComboboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmComboboxComponent, deps: [{ token: i1.Overlay }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
143
|
+
PdmComboboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmComboboxComponent, selector: "pdm-combobox", inputs: { open: "open", placeholder: "placeholder", searchPlaceholder: "searchPlaceholder", className: "className", options: "options", value: "value", width: "width", panelClassName: "panelClassName" }, outputs: { openChange: "openChange", valueChange: "valueChange" }, host: { listeners: { "document:keydown.escape": "onEscape()" } }, viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["triggerEl"], descendants: true }, { propertyName: "panelTemplateRef", first: true, predicate: ["panelTemplate"], descendants: true }], ngImport: i0, template: "<div [ngClass]=\"['flex flex-col gap-1', className]\" [style.width.px]=\"width\">\n <button\n #triggerEl\n type=\"button\"\n class=\"flex h-9 w-full appearance-none box-border items-center justify-between gap-2 rounded-md border border-solid border-input bg-background px-3 py-2 text-sm shadow-sm\"\n [attr.aria-expanded]=\"open\"\n [attr.aria-haspopup]=\"'listbox'\"\n (click)=\"toggle()\"\n >\n <span\n class=\"min-w-0 flex-1 truncate text-left text-sm font-medium text-foreground\"\n >{{ selectedLabel }}</span\n >\n <svg\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4 text-foreground\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M7 15L12 20L17 15\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n ></path>\n <path\n d=\"M17 9L12 4L7 9\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n ></path>\n </svg>\n </button>\n\n <!-- Template for CDK Overlay -->\n <ng-template #panelTemplate>\n <div\n class=\"w-full rounded-md border border-solid border-border bg-popover p-0 text-popover-foreground shadow-md\"\n >\n <div class=\"flex items-center gap-2 border-b border-border px-3 py-2\">\n <svg\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4 text-muted-foreground\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n cx=\"11\"\n cy=\"11\"\n r=\"7\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n ></circle>\n <path\n d=\"M20 20L16.6 16.6\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n ></path>\n </svg>\n <div class=\"flex-1 py-2 text-sm text-muted-foreground\">\n {{ searchPlaceholder }}\n </div>\n </div>\n\n <div class=\"p-1\">\n <button\n *ngFor=\"let option of options\"\n type=\"button\"\n class=\"flex w-full appearance-none box-border items-center gap-2 rounded-sm border-0 bg-transparent px-2 py-1.5 text-left text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground\"\n [ngClass]=\"option === value ? 'bg-accent text-accent-foreground' : ''\"\n role=\"option\"\n [attr.aria-selected]=\"option === value\"\n (click)=\"select(option)\"\n >\n <span class=\"min-w-0 flex-1 truncate\">{{ option }}</span>\n <svg\n *ngIf=\"option === value\"\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4 text-foreground\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5 12.5L9.2 16.7L19 7\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n ></path>\n </svg>\n </button>\n </div>\n </div>\n </ng-template>\n</div>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmComboboxComponent, decorators: [{
|
|
145
|
+
type: Component,
|
|
146
|
+
args: [{ selector: "pdm-combobox", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [ngClass]=\"['flex flex-col gap-1', className]\" [style.width.px]=\"width\">\n <button\n #triggerEl\n type=\"button\"\n class=\"flex h-9 w-full appearance-none box-border items-center justify-between gap-2 rounded-md border border-solid border-input bg-background px-3 py-2 text-sm shadow-sm\"\n [attr.aria-expanded]=\"open\"\n [attr.aria-haspopup]=\"'listbox'\"\n (click)=\"toggle()\"\n >\n <span\n class=\"min-w-0 flex-1 truncate text-left text-sm font-medium text-foreground\"\n >{{ selectedLabel }}</span\n >\n <svg\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4 text-foreground\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M7 15L12 20L17 15\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n ></path>\n <path\n d=\"M17 9L12 4L7 9\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n ></path>\n </svg>\n </button>\n\n <!-- Template for CDK Overlay -->\n <ng-template #panelTemplate>\n <div\n class=\"w-full rounded-md border border-solid border-border bg-popover p-0 text-popover-foreground shadow-md\"\n >\n <div class=\"flex items-center gap-2 border-b border-border px-3 py-2\">\n <svg\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4 text-muted-foreground\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n cx=\"11\"\n cy=\"11\"\n r=\"7\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n ></circle>\n <path\n d=\"M20 20L16.6 16.6\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n ></path>\n </svg>\n <div class=\"flex-1 py-2 text-sm text-muted-foreground\">\n {{ searchPlaceholder }}\n </div>\n </div>\n\n <div class=\"p-1\">\n <button\n *ngFor=\"let option of options\"\n type=\"button\"\n class=\"flex w-full appearance-none box-border items-center gap-2 rounded-sm border-0 bg-transparent px-2 py-1.5 text-left text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground\"\n [ngClass]=\"option === value ? 'bg-accent text-accent-foreground' : ''\"\n role=\"option\"\n [attr.aria-selected]=\"option === value\"\n (click)=\"select(option)\"\n >\n <span class=\"min-w-0 flex-1 truncate\">{{ option }}</span>\n <svg\n *ngIf=\"option === value\"\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4 text-foreground\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5 12.5L9.2 16.7L19 7\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n ></path>\n </svg>\n </button>\n </div>\n </div>\n </ng-template>\n</div>\n", styles: [":host{display:block}\n"] }]
|
|
147
|
+
}], ctorParameters: function () { return [{ type: i1.Overlay }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { open: [{
|
|
148
|
+
type: Input
|
|
149
|
+
}], placeholder: [{
|
|
150
|
+
type: Input
|
|
151
|
+
}], searchPlaceholder: [{
|
|
152
|
+
type: Input
|
|
153
|
+
}], className: [{
|
|
154
|
+
type: Input
|
|
155
|
+
}], options: [{
|
|
156
|
+
type: Input
|
|
157
|
+
}], value: [{
|
|
158
|
+
type: Input
|
|
159
|
+
}], width: [{
|
|
160
|
+
type: Input
|
|
161
|
+
}], panelClassName: [{
|
|
162
|
+
type: Input
|
|
163
|
+
}], openChange: [{
|
|
164
|
+
type: Output
|
|
165
|
+
}], valueChange: [{
|
|
166
|
+
type: Output
|
|
167
|
+
}], triggerRef: [{
|
|
168
|
+
type: ViewChild,
|
|
169
|
+
args: ["triggerEl"]
|
|
170
|
+
}], panelTemplateRef: [{
|
|
171
|
+
type: ViewChild,
|
|
172
|
+
args: ["panelTemplate"]
|
|
173
|
+
}], onEscape: [{
|
|
174
|
+
type: HostListener,
|
|
175
|
+
args: ["document:keydown.escape"]
|
|
176
|
+
}] } });
|
|
177
|
+
|
|
178
|
+
const COMPONENTS = [
|
|
179
|
+
PdmComboboxComponent,
|
|
180
|
+
];
|
|
181
|
+
class PdmComboboxModule {
|
|
182
|
+
}
|
|
183
|
+
PdmComboboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmComboboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
184
|
+
PdmComboboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: PdmComboboxModule, declarations: [PdmComboboxComponent], imports: [CommonModule, OverlayModule], exports: [PdmComboboxComponent] });
|
|
185
|
+
PdmComboboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmComboboxModule, imports: [CommonModule, OverlayModule] });
|
|
186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmComboboxModule, decorators: [{
|
|
187
|
+
type: NgModule,
|
|
188
|
+
args: [{
|
|
189
|
+
imports: [CommonModule, OverlayModule],
|
|
190
|
+
declarations: COMPONENTS,
|
|
191
|
+
exports: COMPONENTS
|
|
192
|
+
}]
|
|
193
|
+
}] });
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Generated bundle index. Do not edit.
|
|
197
|
+
*/
|
|
198
|
+
|
|
199
|
+
export { PdmComboboxComponent, PdmComboboxModule };
|
|
200
|
+
//# sourceMappingURL=pdm-ui-kit-src-combobox.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdm-ui-kit-src-combobox.mjs","sources":["../../../src/combobox/combobox.component.ts","../../../src/combobox/combobox.component.html","../../../src/combobox/combobox.module.ts","../../../src/combobox/pdm-ui-kit-src-combobox.ts"],"sourcesContent":["import {\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tEventEmitter,\n\tHostListener,\n\tInput,\n\tOnDestroy,\n\tOutput,\n\tViewChild,\n\tViewContainerRef,\n} from \"@angular/core\";\nimport { Overlay, OverlayRef, ConnectedPosition } from \"@angular/cdk/overlay\";\nimport { TemplatePortal } from \"@angular/cdk/portal\";\nimport {\n\tmergeOverlayPanelClass,\n\tOVERLAY_BASE_Z_INDEX,\n} from \"pdm-ui-kit/src/overlay\";\n\n@Component({\n\tselector: \"pdm-combobox\",\n\ttemplateUrl: \"./combobox.component.html\",\n\tstyles: [\":host { display: block; }\"],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PdmComboboxComponent implements OnDestroy {\n\t@Input() open = false;\n\t@Input() placeholder = \"Select framework...\";\n\t@Input() searchPlaceholder = \"Search framework\";\n\t@Input() className = \"\";\n\t@Input() options: string[] = [\n\t\t\"Next.js\",\n\t\t\"SvelteKit\",\n\t\t\"Nuxt.js\",\n\t\t\"Remix\",\n\t\t\"Astro\",\n\t];\n\t@Input() value = \"\";\n\t@Input() width = 200;\n\t@Input() panelClassName = \"\";\n\n\t@Output() openChange = new EventEmitter<boolean>();\n\t@Output() valueChange = new EventEmitter<string>();\n\n\t@ViewChild(\"triggerEl\") triggerRef?: ElementRef<HTMLElement>;\n\t@ViewChild(\"panelTemplate\") panelTemplateRef: any;\n\n\tprivate overlayRef: OverlayRef | null = null;\n\tprivate outsideClickSub: any = null;\n\n\tconstructor(\n\t\tprivate readonly overlay: Overlay,\n\t\tprivate readonly viewContainerRef: ViewContainerRef,\n\t\tprivate readonly elementRef: ElementRef<HTMLElement>,\n\t\tprivate readonly cdr: ChangeDetectorRef,\n\t) {}\n\n\tngOnDestroy(): void {\n\t\tthis.destroyOverlay();\n\t}\n\n\tget selectedLabel(): string {\n\t\treturn this.value || this.placeholder;\n\t}\n\n\ttoggle(): void {\n\t\tif (this.open) {\n\t\t\tthis.close();\n\t\t} else {\n\t\t\tthis.openPanel();\n\t\t}\n\t}\n\n\tselect(option: string): void {\n\t\tthis.valueChange.emit(option);\n\t\tthis.value = option;\n\t\tthis.close();\n\t}\n\n\t@HostListener(\"document:keydown.escape\")\n\tonEscape(): void {\n\t\tif (this.open) {\n\t\t\tthis.close();\n\t\t}\n\t}\n\n\tprivate openPanel(): void {\n\t\tif (this.overlayRef) return;\n\n\t\tconst triggerEl = this.triggerRef?.nativeElement;\n\t\tif (!triggerEl) return;\n\n\t\tthis.open = true;\n\t\tthis.openChange.emit(true);\n\t\tthis.cdr.markForCheck();\n\n\t\tconst positionStrategy = this.overlay\n\t\t\t.position()\n\t\t\t.flexibleConnectedTo(triggerEl)\n\t\t\t.withPositions(this.getPositionConfigs())\n\t\t\t.withFlexibleDimensions(false)\n\t\t\t.withPush(true);\n\n\t\tconst panelClass = mergeOverlayPanelClass(\n\t\t\tOVERLAY_BASE_Z_INDEX,\n\t\t\tthis.panelClassName,\n\t\t);\n\n\t\tthis.overlayRef = this.overlay.create({\n\t\t\tpositionStrategy,\n\t\t\tpanelClass,\n\t\t});\n\n\t\tconst portal = new TemplatePortal(\n\t\t\tthis.panelTemplateRef,\n\t\t\tthis.viewContainerRef,\n\t\t);\n\t\tthis.overlayRef.attach(portal);\n\n\t\t// Close on click outside\n\t\tthis.outsideClickSub = this.overlayRef\n\t\t\t.outsidePointerEvents()\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.close();\n\t\t\t});\n\n\t\tthis.cdr.markForCheck();\n\t}\n\n\tprivate close(): void {\n\t\tif (!this.overlayRef) return;\n\n\t\tthis.open = false;\n\t\tthis.openChange.emit(false);\n\t\tthis.cdr.markForCheck();\n\t\tthis.destroyOverlay();\n\t}\n\n\tprivate destroyOverlay(): void {\n\t\tif (this.outsideClickSub) {\n\t\t\tthis.outsideClickSub.unsubscribe();\n\t\t\tthis.outsideClickSub = null;\n\t\t}\n\t\tif (this.overlayRef) {\n\t\t\tthis.overlayRef.detach();\n\t\t\tthis.overlayRef.dispose();\n\t\t\tthis.overlayRef = null;\n\t\t}\n\t}\n\n\tprivate getPositionConfigs(): ConnectedPosition[] {\n\t\treturn [\n\t\t\t{\n\t\t\t\toriginX: \"start\",\n\t\t\t\toriginY: \"bottom\",\n\t\t\t\toverlayX: \"start\",\n\t\t\t\toverlayY: \"top\",\n\t\t\t\toffsetY: 4,\n\t\t\t},\n\t\t\t{\n\t\t\t\toriginX: \"start\",\n\t\t\t\toriginY: \"top\",\n\t\t\t\toverlayX: \"start\",\n\t\t\t\toverlayY: \"bottom\",\n\t\t\t\toffsetY: -4,\n\t\t\t},\n\t\t\t{\n\t\t\t\toriginX: \"end\",\n\t\t\t\toriginY: \"bottom\",\n\t\t\t\toverlayX: \"end\",\n\t\t\t\toverlayY: \"top\",\n\t\t\t\toffsetY: 4,\n\t\t\t},\n\t\t\t{\n\t\t\t\toriginX: \"start\",\n\t\t\t\toriginY: \"bottom\",\n\t\t\t\toverlayX: \"end\",\n\t\t\t\toverlayY: \"top\",\n\t\t\t\toffsetY: 4,\n\t\t\t},\n\t\t];\n\t}\n}\n","<div [ngClass]=\"['flex flex-col gap-1', className]\" [style.width.px]=\"width\">\n <button\n #triggerEl\n type=\"button\"\n class=\"flex h-9 w-full appearance-none box-border items-center justify-between gap-2 rounded-md border border-solid border-input bg-background px-3 py-2 text-sm shadow-sm\"\n [attr.aria-expanded]=\"open\"\n [attr.aria-haspopup]=\"'listbox'\"\n (click)=\"toggle()\"\n >\n <span\n class=\"min-w-0 flex-1 truncate text-left text-sm font-medium text-foreground\"\n >{{ selectedLabel }}</span\n >\n <svg\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4 text-foreground\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M7 15L12 20L17 15\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n ></path>\n <path\n d=\"M17 9L12 4L7 9\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n ></path>\n </svg>\n </button>\n\n <!-- Template for CDK Overlay -->\n <ng-template #panelTemplate>\n <div\n class=\"w-full rounded-md border border-solid border-border bg-popover p-0 text-popover-foreground shadow-md\"\n >\n <div class=\"flex items-center gap-2 border-b border-border px-3 py-2\">\n <svg\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4 text-muted-foreground\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n cx=\"11\"\n cy=\"11\"\n r=\"7\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n ></circle>\n <path\n d=\"M20 20L16.6 16.6\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n ></path>\n </svg>\n <div class=\"flex-1 py-2 text-sm text-muted-foreground\">\n {{ searchPlaceholder }}\n </div>\n </div>\n\n <div class=\"p-1\">\n <button\n *ngFor=\"let option of options\"\n type=\"button\"\n class=\"flex w-full appearance-none box-border items-center gap-2 rounded-sm border-0 bg-transparent px-2 py-1.5 text-left text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground\"\n [ngClass]=\"option === value ? 'bg-accent text-accent-foreground' : ''\"\n role=\"option\"\n [attr.aria-selected]=\"option === value\"\n (click)=\"select(option)\"\n >\n <span class=\"min-w-0 flex-1 truncate\">{{ option }}</span>\n <svg\n *ngIf=\"option === value\"\n viewBox=\"0 0 24 24\"\n class=\"h-4 w-4 text-foreground\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5 12.5L9.2 16.7L19 7\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n ></path>\n </svg>\n </button>\n </div>\n </div>\n </ng-template>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { PdmComboboxComponent } from './combobox.component';\n\nconst COMPONENTS = [\n PdmComboboxComponent,\n];\n\n@NgModule({\n imports: [CommonModule, OverlayModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class PdmComboboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MA0Ba,oBAAoB,CAAA;AAyBhC,IAAA,WAAA,CACkB,OAAgB,EAChB,gBAAkC,EAClC,UAAmC,EACnC,GAAsB,EAAA;AAHtB,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAS;AAChB,QAAA,IAAgB,CAAA,gBAAA,GAAhB,gBAAgB,CAAkB;AAClC,QAAA,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;AACnC,QAAA,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;AA5B/B,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK,CAAC;AACb,QAAA,IAAW,CAAA,WAAA,GAAG,qBAAqB,CAAC;AACpC,QAAA,IAAiB,CAAA,iBAAA,GAAG,kBAAkB,CAAC;AACvC,QAAA,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;QACf,IAAA,CAAA,OAAO,GAAa;YAC5B,SAAS;YACT,WAAW;YACX,SAAS;YACT,OAAO;YACP,OAAO;SACP,CAAC;AACO,QAAA,IAAK,CAAA,KAAA,GAAG,EAAE,CAAC;AACX,QAAA,IAAK,CAAA,KAAA,GAAG,GAAG,CAAC;AACZ,QAAA,IAAc,CAAA,cAAA,GAAG,EAAE,CAAC;AAEnB,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,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
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i2 from 'pdm-ui-kit/src/icon';
|
|
6
|
+
import { PdmIconModule } from 'pdm-ui-kit/src/icon';
|
|
7
|
+
|
|
8
|
+
class PdmCommandComponent {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.open = true;
|
|
11
|
+
this.hintLabel = 'Press';
|
|
12
|
+
this.hintKey = 'J';
|
|
13
|
+
this.placeholder = 'Type a command or search...';
|
|
14
|
+
this.emptyMessage = 'No results found.';
|
|
15
|
+
this.items = [
|
|
16
|
+
{ label: 'Calendar', value: 'calendar', group: 'Suggestions', icon: 'calendar' },
|
|
17
|
+
{ label: 'Search emoji', value: 'emoji', group: 'Suggestions', icon: 'smile' },
|
|
18
|
+
{ label: 'Calculator', value: 'calculator', group: 'Suggestions', icon: 'calculator', disabled: true },
|
|
19
|
+
{ label: 'Profile', value: 'profile', group: 'Settings', icon: 'user', shortcut: '⌘P' },
|
|
20
|
+
{ label: 'Billing', value: 'billing', group: 'Settings', icon: 'credit-card', shortcut: '⌘B' },
|
|
21
|
+
{ label: 'Settings', value: 'settings', group: 'Settings', icon: 'settings', shortcut: '⌘S' }
|
|
22
|
+
];
|
|
23
|
+
this.className = '';
|
|
24
|
+
this.itemSelect = new EventEmitter();
|
|
25
|
+
this.openChange = new EventEmitter();
|
|
26
|
+
this.query = '';
|
|
27
|
+
}
|
|
28
|
+
get filteredItems() {
|
|
29
|
+
const q = this.query.toLowerCase().trim();
|
|
30
|
+
if (!q)
|
|
31
|
+
return this.items;
|
|
32
|
+
return this.items.filter((item) => item.label.toLowerCase().includes(q));
|
|
33
|
+
}
|
|
34
|
+
get groupedItems() {
|
|
35
|
+
var _a;
|
|
36
|
+
const map = new Map();
|
|
37
|
+
for (const item of this.filteredItems) {
|
|
38
|
+
const key = item.group || '';
|
|
39
|
+
const arr = (_a = map.get(key)) !== null && _a !== void 0 ? _a : [];
|
|
40
|
+
arr.push(item);
|
|
41
|
+
map.set(key, arr);
|
|
42
|
+
}
|
|
43
|
+
return Array.from(map.entries()).map(([name, items]) => ({ name, items }));
|
|
44
|
+
}
|
|
45
|
+
onQueryChange(event) {
|
|
46
|
+
this.query = event.target.value;
|
|
47
|
+
}
|
|
48
|
+
toggleOpen() {
|
|
49
|
+
this.openChange.emit(!this.open);
|
|
50
|
+
}
|
|
51
|
+
select(value) {
|
|
52
|
+
this.itemSelect.emit(value);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
PdmCommandComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmCommandComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
56
|
+
PdmCommandComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmCommandComponent, selector: "pdm-command", inputs: { open: "open", hintLabel: "hintLabel", hintKey: "hintKey", placeholder: "placeholder", emptyMessage: "emptyMessage", items: "items", className: "className" }, outputs: { itemSelect: "itemSelect", openChange: "openChange" }, ngImport: i0, template: "<div [ngClass]=\"['w-full', className]\">\n <div *ngIf=\"!open\" class=\"flex items-center gap-1\">\n <span class=\"text-sm font-medium text-muted-foreground\">{{\n hintLabel\n }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-5 appearance-none box-border items-center gap-0.5 rounded-sm border border-solid border-border bg-muted px-1.5\"\n (click)=\"toggleOpen()\"\n >\n <pdm-icon\n name=\"command\"\n [size]=\"12\"\n className=\"text-muted-foreground\"\n [decorative]=\"true\"\n ></pdm-icon>\n <span class=\"text-xs text-muted-foreground\">{{ hintKey }}</span>\n </button>\n </div>\n\n <section\n *ngIf=\"open\"\n class=\"flex w-full flex-col overflow-hidden rounded-lg border border-solid border-border bg-popover text-popover-foreground shadow-md\"\n >\n <div class=\"flex items-center gap-2 border-b border-border px-3\">\n <pdm-icon\n name=\"search\"\n [size]=\"16\"\n className=\"text-muted-foreground\"\n [decorative]=\"true\"\n ></pdm-icon>\n <input\n type=\"text\"\n [placeholder]=\"placeholder\"\n [value]=\"query\"\n (input)=\"onQueryChange($event)\"\n class=\"h-10 w-full appearance-none box-border bg-transparent py-3 text-sm text-foreground outline-none placeholder:text-muted-foreground\"\n />\n </div>\n\n <div class=\"max-h-[50vh] overflow-y-auto p-1 md:max-h-72\">\n <ng-container *ngFor=\"let group of groupedItems; let groupIndex = index\">\n <div\n *ngIf=\"group.name\"\n class=\"px-2 py-1.5 text-xs text-muted-foreground\"\n >\n {{ group.name }}\n </div>\n <button\n *ngFor=\"let item of group.items\"\n type=\"button\"\n [disabled]=\"item.disabled\"\n class=\"flex w-full appearance-none box-border items-center gap-2 rounded-sm border-0 bg-transparent px-2 py-1.5 text-left text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground\"\n [ngClass]=\"[\n item.disabled ? 'opacity-50' : '',\n item.label === 'Calendar' ? 'bg-accent text-accent-foreground' : '',\n ]\"\n (click)=\"select(item.value)\"\n >\n <span\n class=\"inline-flex h-4 w-4 items-center justify-center text-foreground\"\n >\n <pdm-icon\n *ngIf=\"item.icon\"\n [name]=\"item.icon\"\n [size]=\"16\"\n [decorative]=\"true\"\n ></pdm-icon>\n </span>\n <span class=\"min-w-0 flex-1 text-foreground\">{{ item.label }}</span>\n <span *ngIf=\"item.shortcut\" class=\"text-xs text-muted-foreground\">{{\n item.shortcut\n }}</span>\n </button>\n <div\n *ngIf=\"groupIndex === 0 && groupedItems.length > 1\"\n class=\"my-1 border-t border-border\"\n ></div>\n </ng-container>\n\n <p\n *ngIf=\"filteredItems.length === 0\"\n class=\"m-0 py-6 text-center text-sm text-muted-foreground\"\n >\n {{ emptyMessage }}\n </p>\n </div>\n </section>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.PdmIconComponent, selector: "pdm-icon", inputs: ["name", "library", "assetUrl", "size", "strokeWidth", "className", "ariaLabel", "decorative"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmCommandComponent, decorators: [{
|
|
58
|
+
type: Component,
|
|
59
|
+
args: [{ selector: 'pdm-command', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [ngClass]=\"['w-full', className]\">\n <div *ngIf=\"!open\" class=\"flex items-center gap-1\">\n <span class=\"text-sm font-medium text-muted-foreground\">{{\n hintLabel\n }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-5 appearance-none box-border items-center gap-0.5 rounded-sm border border-solid border-border bg-muted px-1.5\"\n (click)=\"toggleOpen()\"\n >\n <pdm-icon\n name=\"command\"\n [size]=\"12\"\n className=\"text-muted-foreground\"\n [decorative]=\"true\"\n ></pdm-icon>\n <span class=\"text-xs text-muted-foreground\">{{ hintKey }}</span>\n </button>\n </div>\n\n <section\n *ngIf=\"open\"\n class=\"flex w-full flex-col overflow-hidden rounded-lg border border-solid border-border bg-popover text-popover-foreground shadow-md\"\n >\n <div class=\"flex items-center gap-2 border-b border-border px-3\">\n <pdm-icon\n name=\"search\"\n [size]=\"16\"\n className=\"text-muted-foreground\"\n [decorative]=\"true\"\n ></pdm-icon>\n <input\n type=\"text\"\n [placeholder]=\"placeholder\"\n [value]=\"query\"\n (input)=\"onQueryChange($event)\"\n class=\"h-10 w-full appearance-none box-border bg-transparent py-3 text-sm text-foreground outline-none placeholder:text-muted-foreground\"\n />\n </div>\n\n <div class=\"max-h-[50vh] overflow-y-auto p-1 md:max-h-72\">\n <ng-container *ngFor=\"let group of groupedItems; let groupIndex = index\">\n <div\n *ngIf=\"group.name\"\n class=\"px-2 py-1.5 text-xs text-muted-foreground\"\n >\n {{ group.name }}\n </div>\n <button\n *ngFor=\"let item of group.items\"\n type=\"button\"\n [disabled]=\"item.disabled\"\n class=\"flex w-full appearance-none box-border items-center gap-2 rounded-sm border-0 bg-transparent px-2 py-1.5 text-left text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground\"\n [ngClass]=\"[\n item.disabled ? 'opacity-50' : '',\n item.label === 'Calendar' ? 'bg-accent text-accent-foreground' : '',\n ]\"\n (click)=\"select(item.value)\"\n >\n <span\n class=\"inline-flex h-4 w-4 items-center justify-center text-foreground\"\n >\n <pdm-icon\n *ngIf=\"item.icon\"\n [name]=\"item.icon\"\n [size]=\"16\"\n [decorative]=\"true\"\n ></pdm-icon>\n </span>\n <span class=\"min-w-0 flex-1 text-foreground\">{{ item.label }}</span>\n <span *ngIf=\"item.shortcut\" class=\"text-xs text-muted-foreground\">{{\n item.shortcut\n }}</span>\n </button>\n <div\n *ngIf=\"groupIndex === 0 && groupedItems.length > 1\"\n class=\"my-1 border-t border-border\"\n ></div>\n </ng-container>\n\n <p\n *ngIf=\"filteredItems.length === 0\"\n class=\"m-0 py-6 text-center text-sm text-muted-foreground\"\n >\n {{ emptyMessage }}\n </p>\n </div>\n </section>\n</div>\n" }]
|
|
60
|
+
}], propDecorators: { open: [{
|
|
61
|
+
type: Input
|
|
62
|
+
}], hintLabel: [{
|
|
63
|
+
type: Input
|
|
64
|
+
}], hintKey: [{
|
|
65
|
+
type: Input
|
|
66
|
+
}], placeholder: [{
|
|
67
|
+
type: Input
|
|
68
|
+
}], emptyMessage: [{
|
|
69
|
+
type: Input
|
|
70
|
+
}], items: [{
|
|
71
|
+
type: Input
|
|
72
|
+
}], className: [{
|
|
73
|
+
type: Input
|
|
74
|
+
}], itemSelect: [{
|
|
75
|
+
type: Output
|
|
76
|
+
}], openChange: [{
|
|
77
|
+
type: Output
|
|
78
|
+
}] } });
|
|
79
|
+
|
|
80
|
+
const COMPONENTS = [PdmCommandComponent];
|
|
81
|
+
class PdmCommandModule {
|
|
82
|
+
}
|
|
83
|
+
PdmCommandModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmCommandModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
84
|
+
PdmCommandModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: PdmCommandModule, declarations: [PdmCommandComponent], imports: [CommonModule, PdmIconModule], exports: [PdmCommandComponent] });
|
|
85
|
+
PdmCommandModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmCommandModule, imports: [CommonModule, PdmIconModule] });
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmCommandModule, decorators: [{
|
|
87
|
+
type: NgModule,
|
|
88
|
+
args: [{
|
|
89
|
+
imports: [CommonModule, PdmIconModule],
|
|
90
|
+
declarations: COMPONENTS,
|
|
91
|
+
exports: COMPONENTS,
|
|
92
|
+
}]
|
|
93
|
+
}] });
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Generated bundle index. Do not edit.
|
|
97
|
+
*/
|
|
98
|
+
|
|
99
|
+
export { PdmCommandComponent, PdmCommandModule };
|
|
100
|
+
//# sourceMappingURL=pdm-ui-kit-src-command.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdm-ui-kit-src-command.mjs","sources":["../../../src/command/command.component.ts","../../../src/command/command.component.html","../../../src/command/command.module.ts","../../../src/command/pdm-ui-kit-src-command.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\nimport type { PdmIconName } from 'pdm-ui-kit/src/icon';\n\nexport interface PdmCommandItem {\n label: string;\n value: string;\n group?: string;\n icon?: PdmIconName;\n shortcut?: string;\n disabled?: boolean;\n}\n\n@Component({\n selector: 'pdm-command',\n templateUrl: './command.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PdmCommandComponent {\n @Input() open = true;\n @Input() hintLabel = 'Press';\n @Input() hintKey = 'J';\n @Input() placeholder = 'Type a command or search...';\n @Input() emptyMessage = 'No results found.';\n @Input() items: PdmCommandItem[] = [\n { label: 'Calendar', value: 'calendar', group: 'Suggestions', icon: 'calendar' },\n { label: 'Search emoji', value: 'emoji', group: 'Suggestions', icon: 'smile' },\n { label: 'Calculator', value: 'calculator', group: 'Suggestions', icon: 'calculator', disabled: true },\n { label: 'Profile', value: 'profile', group: 'Settings', icon: 'user', shortcut: '⌘P' },\n { label: 'Billing', value: 'billing', group: 'Settings', icon: 'credit-card', shortcut: '⌘B' },\n { label: 'Settings', value: 'settings', group: 'Settings', icon: 'settings', shortcut: '⌘S' }\n ];\n @Input() className = '';\n\n @Output() itemSelect = new EventEmitter<string>();\n @Output() openChange = new EventEmitter<boolean>();\n\n query = '';\n\n get filteredItems(): PdmCommandItem[] {\n const q = this.query.toLowerCase().trim();\n if (!q) return this.items;\n return this.items.filter((item) => item.label.toLowerCase().includes(q));\n }\n\n get groupedItems(): { name: string; items: PdmCommandItem[] }[] {\n const map = new Map<string, PdmCommandItem[]>();\n for (const item of this.filteredItems) {\n const key = item.group || '';\n const arr = map.get(key) ?? [];\n arr.push(item);\n map.set(key, arr);\n }\n return Array.from(map.entries()).map(([name, items]) => ({ name, items }));\n }\n\n onQueryChange(event: Event): void {\n this.query = (event.target as HTMLInputElement).value;\n }\n\n toggleOpen(): void {\n this.openChange.emit(!this.open);\n }\n\n select(value: string): void {\n this.itemSelect.emit(value);\n }\n}\n","<div [ngClass]=\"['w-full', className]\">\n <div *ngIf=\"!open\" class=\"flex items-center gap-1\">\n <span class=\"text-sm font-medium text-muted-foreground\">{{\n hintLabel\n }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-5 appearance-none box-border items-center gap-0.5 rounded-sm border border-solid border-border bg-muted px-1.5\"\n (click)=\"toggleOpen()\"\n >\n <pdm-icon\n name=\"command\"\n [size]=\"12\"\n className=\"text-muted-foreground\"\n [decorative]=\"true\"\n ></pdm-icon>\n <span class=\"text-xs text-muted-foreground\">{{ hintKey }}</span>\n </button>\n </div>\n\n <section\n *ngIf=\"open\"\n class=\"flex w-full flex-col overflow-hidden rounded-lg border border-solid border-border bg-popover text-popover-foreground shadow-md\"\n >\n <div class=\"flex items-center gap-2 border-b border-border px-3\">\n <pdm-icon\n name=\"search\"\n [size]=\"16\"\n className=\"text-muted-foreground\"\n [decorative]=\"true\"\n ></pdm-icon>\n <input\n type=\"text\"\n [placeholder]=\"placeholder\"\n [value]=\"query\"\n (input)=\"onQueryChange($event)\"\n class=\"h-10 w-full appearance-none box-border bg-transparent py-3 text-sm text-foreground outline-none placeholder:text-muted-foreground\"\n />\n </div>\n\n <div class=\"max-h-[50vh] overflow-y-auto p-1 md:max-h-72\">\n <ng-container *ngFor=\"let group of groupedItems; let groupIndex = index\">\n <div\n *ngIf=\"group.name\"\n class=\"px-2 py-1.5 text-xs text-muted-foreground\"\n >\n {{ group.name }}\n </div>\n <button\n *ngFor=\"let item of group.items\"\n type=\"button\"\n [disabled]=\"item.disabled\"\n class=\"flex w-full appearance-none box-border items-center gap-2 rounded-sm border-0 bg-transparent px-2 py-1.5 text-left text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground\"\n [ngClass]=\"[\n item.disabled ? 'opacity-50' : '',\n item.label === 'Calendar' ? 'bg-accent text-accent-foreground' : '',\n ]\"\n (click)=\"select(item.value)\"\n >\n <span\n class=\"inline-flex h-4 w-4 items-center justify-center text-foreground\"\n >\n <pdm-icon\n *ngIf=\"item.icon\"\n [name]=\"item.icon\"\n [size]=\"16\"\n [decorative]=\"true\"\n ></pdm-icon>\n </span>\n <span class=\"min-w-0 flex-1 text-foreground\">{{ item.label }}</span>\n <span *ngIf=\"item.shortcut\" class=\"text-xs text-muted-foreground\">{{\n item.shortcut\n }}</span>\n </button>\n <div\n *ngIf=\"groupIndex === 0 && groupedItems.length > 1\"\n class=\"my-1 border-t border-border\"\n ></div>\n </ng-container>\n\n <p\n *ngIf=\"filteredItems.length === 0\"\n class=\"m-0 py-6 text-center text-sm text-muted-foreground\"\n >\n {{ emptyMessage }}\n </p>\n </div>\n </section>\n</div>\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { PdmIconModule } from \"pdm-ui-kit/src/icon\";\nimport { PdmCommandComponent } from \"./command.component\";\n\nconst COMPONENTS = [PdmCommandComponent];\n\n@NgModule({\n\timports: [CommonModule, PdmIconModule],\n\tdeclarations: COMPONENTS,\n\texports: COMPONENTS,\n})\nexport class PdmCommandModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAiBa,mBAAmB,CAAA;AALhC,IAAA,WAAA,GAAA;AAMW,QAAA,IAAI,CAAA,IAAA,GAAG,IAAI,CAAC;AACZ,QAAA,IAAS,CAAA,SAAA,GAAG,OAAO,CAAC;AACpB,QAAA,IAAO,CAAA,OAAA,GAAG,GAAG,CAAC;AACd,QAAA,IAAW,CAAA,WAAA,GAAG,6BAA6B,CAAC;AAC5C,QAAA,IAAY,CAAA,YAAA,GAAG,mBAAmB,CAAC;QACnC,IAAA,CAAA,KAAK,GAAqB;AACjC,YAAA,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,EAAE;AAChF,YAAA,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE;AAC9E,YAAA,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EA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AA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAhB,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,iBAPT,mBAAmB,CAAA,EAAA,OAAA,EAAA,CAG5B,YAAY,EAAE,aAAa,aAHlB,mBAAmB,CAAA,EAAA,CAAA,CAAA;8GAO1B,gBAAgB,EAAA,OAAA,EAAA,CAJlB,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;2FAIzB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;AACtC,oBAAA,YAAY,EAAE,UAAU;AACxB,oBAAA,OAAO,EAAE,UAAU;iBACnB,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, ViewChild, HostListener, NgModule } from '@angular/core';
|
|
3
|
+
import { TemplatePortal } from '@angular/cdk/portal';
|
|
4
|
+
import { mergeOverlayPanelClass, OVERLAY_BASE_Z_INDEX } from 'pdm-ui-kit/src/overlay';
|
|
5
|
+
import * as i1 from '@angular/cdk/overlay';
|
|
6
|
+
import { OverlayModule } from '@angular/cdk/overlay';
|
|
7
|
+
import * as i2 from '@angular/common';
|
|
8
|
+
import { CommonModule } from '@angular/common';
|
|
9
|
+
|
|
10
|
+
class PdmContextMenuComponent {
|
|
11
|
+
constructor(overlay, viewContainerRef, _elementRef, cdr) {
|
|
12
|
+
this.overlay = overlay;
|
|
13
|
+
this.viewContainerRef = viewContainerRef;
|
|
14
|
+
this._elementRef = _elementRef;
|
|
15
|
+
this.cdr = cdr;
|
|
16
|
+
this.items = [
|
|
17
|
+
{ type: "item", label: "Back", value: "back", inset: true, shortcut: "⌘[" },
|
|
18
|
+
{
|
|
19
|
+
type: "item",
|
|
20
|
+
label: "Forward",
|
|
21
|
+
value: "forward",
|
|
22
|
+
inset: true,
|
|
23
|
+
shortcut: "⌘]",
|
|
24
|
+
disabled: true,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
type: "item",
|
|
28
|
+
label: "Reload",
|
|
29
|
+
value: "reload",
|
|
30
|
+
inset: true,
|
|
31
|
+
shortcut: "⌘R",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: "item",
|
|
35
|
+
label: "More Tools",
|
|
36
|
+
value: "more-tools",
|
|
37
|
+
inset: true,
|
|
38
|
+
showChevron: true,
|
|
39
|
+
},
|
|
40
|
+
{ type: "separator" },
|
|
41
|
+
{
|
|
42
|
+
type: "item",
|
|
43
|
+
label: "Show Bookmarks Bar",
|
|
44
|
+
value: "show-bookmarks",
|
|
45
|
+
checked: true,
|
|
46
|
+
},
|
|
47
|
+
{ type: "item", label: "Show Full URLs", value: "show-urls", inset: true },
|
|
48
|
+
{ type: "separator" },
|
|
49
|
+
{ type: "label", label: "People" },
|
|
50
|
+
{ type: "separator" },
|
|
51
|
+
{ type: "item", label: "Pedro Duarte", value: "pedro", selectedDot: true },
|
|
52
|
+
{ type: "item", label: "Colm Tuite", value: "colm", inset: true },
|
|
53
|
+
];
|
|
54
|
+
this.className = "";
|
|
55
|
+
this.triggerLabel = "Right click here";
|
|
56
|
+
this.width = 300;
|
|
57
|
+
this.height = 150;
|
|
58
|
+
this.panelClassName = "";
|
|
59
|
+
this.itemSelect = new EventEmitter();
|
|
60
|
+
this.open = false;
|
|
61
|
+
this.x = 0;
|
|
62
|
+
this.y = 0;
|
|
63
|
+
this.overlayRef = null;
|
|
64
|
+
this.outsideClickSub = null;
|
|
65
|
+
}
|
|
66
|
+
ngOnInit() { }
|
|
67
|
+
ngOnDestroy() {
|
|
68
|
+
this.destroyOverlay();
|
|
69
|
+
}
|
|
70
|
+
onContextMenu(event) {
|
|
71
|
+
event.preventDefault();
|
|
72
|
+
event.stopPropagation();
|
|
73
|
+
this.x = event.clientX;
|
|
74
|
+
this.y = event.clientY;
|
|
75
|
+
this.open = true;
|
|
76
|
+
this.cdr.markForCheck();
|
|
77
|
+
this.createOverlay();
|
|
78
|
+
}
|
|
79
|
+
select(item) {
|
|
80
|
+
if (item.disabled ||
|
|
81
|
+
item.type === "separator" ||
|
|
82
|
+
item.type === "label" ||
|
|
83
|
+
!item.value)
|
|
84
|
+
return;
|
|
85
|
+
this.itemSelect.emit(item.value);
|
|
86
|
+
this.open = false;
|
|
87
|
+
this.cdr.markForCheck();
|
|
88
|
+
this.destroyOverlay();
|
|
89
|
+
}
|
|
90
|
+
onDocumentClick(event) {
|
|
91
|
+
if (this.open && event.type === "click") {
|
|
92
|
+
// Don't close on click inside the menu
|
|
93
|
+
if (this.overlayRef &&
|
|
94
|
+
this.overlayRef.overlayElement.contains(event.target)) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
this.close();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
createOverlay() {
|
|
101
|
+
this.destroyOverlay();
|
|
102
|
+
// Create global position strategy at cursor position
|
|
103
|
+
const positionStrategy = this.overlay
|
|
104
|
+
.position()
|
|
105
|
+
.global()
|
|
106
|
+
.left(`${this.x}px`)
|
|
107
|
+
.top(`${this.y}px`);
|
|
108
|
+
const panelClass = mergeOverlayPanelClass(OVERLAY_BASE_Z_INDEX, this.panelClassName);
|
|
109
|
+
this.overlayRef = this.overlay.create({
|
|
110
|
+
positionStrategy,
|
|
111
|
+
panelClass,
|
|
112
|
+
});
|
|
113
|
+
const portal = new TemplatePortal(this.menuTemplateRef, this.viewContainerRef);
|
|
114
|
+
this.overlayRef.attach(portal);
|
|
115
|
+
// Close on click outside
|
|
116
|
+
this.outsideClickSub = this.overlayRef
|
|
117
|
+
.outsidePointerEvents()
|
|
118
|
+
.subscribe(() => {
|
|
119
|
+
this.close();
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
close() {
|
|
123
|
+
this.open = false;
|
|
124
|
+
this.cdr.markForCheck();
|
|
125
|
+
this.destroyOverlay();
|
|
126
|
+
}
|
|
127
|
+
destroyOverlay() {
|
|
128
|
+
if (this.outsideClickSub) {
|
|
129
|
+
this.outsideClickSub.unsubscribe();
|
|
130
|
+
this.outsideClickSub = null;
|
|
131
|
+
}
|
|
132
|
+
if (this.overlayRef) {
|
|
133
|
+
this.overlayRef.detach();
|
|
134
|
+
this.overlayRef.dispose();
|
|
135
|
+
this.overlayRef = null;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
PdmContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmContextMenuComponent, deps: [{ token: i1.Overlay }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
140
|
+
PdmContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmContextMenuComponent, selector: "pdm-context-menu", inputs: { items: "items", className: "className", triggerLabel: "triggerLabel", width: "width", height: "height", panelClassName: "panelClassName" }, outputs: { itemSelect: "itemSelect" }, host: { listeners: { "document:keydown.escape": "onDocumentClick()", "document:click": "onDocumentClick()" } }, viewQueries: [{ propertyName: "menuTemplateRef", first: true, predicate: ["menuTemplate"], descendants: true }], ngImport: i0, template: "<div\n class=\"relative\"\n [ngClass]=\"className\"\n (contextmenu)=\"onContextMenu($event)\"\n>\n <div\n class=\"flex items-center justify-center rounded-md border border-solid border-dashed border-border\"\n [style.width.px]=\"width\"\n [style.height.px]=\"height\"\n >\n <span class=\"text-sm font-medium text-foreground\">{{ triggerLabel }}</span>\n </div>\n\n <!-- Template for CDK Overlay -->\n <ng-template #menuTemplate>\n <div\n class=\"min-w-48 max-w-xs rounded-md border border-solid border-border bg-popover p-1 text-popover-foreground shadow-md sm:min-w-52\"\n >\n <div>\n <ng-container *ngFor=\"let item of items\">\n <div\n *ngIf=\"item.type === 'separator'\"\n class=\"-mx-1 my-1 h-px bg-muted\"\n ></div>\n\n <div\n *ngIf=\"item.type === 'label'\"\n class=\"px-2 py-1.5 text-sm font-semibold text-foreground\"\n >\n {{ item.label }}\n </div>\n\n <button\n *ngIf=\"!item.type || item.type === 'item'\"\n type=\"button\"\n [disabled]=\"item.disabled\"\n class=\"relative flex w-full appearance-none box-border cursor-default select-none items-center rounded-sm border-0 bg-transparent py-1.5 pr-2 text-left text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground disabled:pointer-events-none disabled:opacity-50\"\n [ngClass]=\"item.inset ? 'pl-8' : 'px-2'\"\n (click)=\"select(item)\"\n >\n <span\n class=\"mr-2 inline-flex w-4 shrink-0 items-center justify-center text-foreground\"\n >\n <svg\n *ngIf=\"item.checked\"\n viewBox=\"0 0 24 24\"\n class=\"h-3.5 w-3.5\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5 12.5L9.2 16.7L19 7\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n ></path>\n </svg>\n <span\n *ngIf=\"item.selectedDot\"\n class=\"h-2 w-2 rounded-full bg-foreground\"\n ></span>\n </span>\n <span class=\"min-w-0 flex-1 truncate text-foreground\">{{\n item.label\n }}</span>\n <span *ngIf=\"item.shortcut\" class=\"text-xs text-muted-foreground\">{{\n item.shortcut\n }}</span>\n <svg\n *ngIf=\"item.showChevron\"\n viewBox=\"0 0 24 24\"\n class=\"h-3.5 w-3.5 text-muted-foreground\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M9 6L15 12L9 18\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n ></path>\n </svg>\n </button>\n </ng-container>\n </div>\n </div>\n </ng-template>\n</div>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmContextMenuComponent, decorators: [{
|
|
142
|
+
type: Component,
|
|
143
|
+
args: [{ selector: "pdm-context-menu", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"relative\"\n [ngClass]=\"className\"\n (contextmenu)=\"onContextMenu($event)\"\n>\n <div\n class=\"flex items-center justify-center rounded-md border border-solid border-dashed border-border\"\n [style.width.px]=\"width\"\n [style.height.px]=\"height\"\n >\n <span class=\"text-sm font-medium text-foreground\">{{ triggerLabel }}</span>\n </div>\n\n <!-- Template for CDK Overlay -->\n <ng-template #menuTemplate>\n <div\n class=\"min-w-48 max-w-xs rounded-md border border-solid border-border bg-popover p-1 text-popover-foreground shadow-md sm:min-w-52\"\n >\n <div>\n <ng-container *ngFor=\"let item of items\">\n <div\n *ngIf=\"item.type === 'separator'\"\n class=\"-mx-1 my-1 h-px bg-muted\"\n ></div>\n\n <div\n *ngIf=\"item.type === 'label'\"\n class=\"px-2 py-1.5 text-sm font-semibold text-foreground\"\n >\n {{ item.label }}\n </div>\n\n <button\n *ngIf=\"!item.type || item.type === 'item'\"\n type=\"button\"\n [disabled]=\"item.disabled\"\n class=\"relative flex w-full appearance-none box-border cursor-default select-none items-center rounded-sm border-0 bg-transparent py-1.5 pr-2 text-left text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground disabled:pointer-events-none disabled:opacity-50\"\n [ngClass]=\"item.inset ? 'pl-8' : 'px-2'\"\n (click)=\"select(item)\"\n >\n <span\n class=\"mr-2 inline-flex w-4 shrink-0 items-center justify-center text-foreground\"\n >\n <svg\n *ngIf=\"item.checked\"\n viewBox=\"0 0 24 24\"\n class=\"h-3.5 w-3.5\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5 12.5L9.2 16.7L19 7\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n ></path>\n </svg>\n <span\n *ngIf=\"item.selectedDot\"\n class=\"h-2 w-2 rounded-full bg-foreground\"\n ></span>\n </span>\n <span class=\"min-w-0 flex-1 truncate text-foreground\">{{\n item.label\n }}</span>\n <span *ngIf=\"item.shortcut\" class=\"text-xs text-muted-foreground\">{{\n item.shortcut\n }}</span>\n <svg\n *ngIf=\"item.showChevron\"\n viewBox=\"0 0 24 24\"\n class=\"h-3.5 w-3.5 text-muted-foreground\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M9 6L15 12L9 18\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n ></path>\n </svg>\n </button>\n </ng-container>\n </div>\n </div>\n </ng-template>\n</div>\n", styles: [":host{display:block}\n"] }]
|
|
144
|
+
}], ctorParameters: function () { return [{ type: i1.Overlay }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { items: [{
|
|
145
|
+
type: Input
|
|
146
|
+
}], className: [{
|
|
147
|
+
type: Input
|
|
148
|
+
}], triggerLabel: [{
|
|
149
|
+
type: Input
|
|
150
|
+
}], width: [{
|
|
151
|
+
type: Input
|
|
152
|
+
}], height: [{
|
|
153
|
+
type: Input
|
|
154
|
+
}], panelClassName: [{
|
|
155
|
+
type: Input
|
|
156
|
+
}], itemSelect: [{
|
|
157
|
+
type: Output
|
|
158
|
+
}], menuTemplateRef: [{
|
|
159
|
+
type: ViewChild,
|
|
160
|
+
args: ["menuTemplate"]
|
|
161
|
+
}], onDocumentClick: [{
|
|
162
|
+
type: HostListener,
|
|
163
|
+
args: ["document:keydown.escape"]
|
|
164
|
+
}, {
|
|
165
|
+
type: HostListener,
|
|
166
|
+
args: ["document:click"]
|
|
167
|
+
}] } });
|
|
168
|
+
|
|
169
|
+
const COMPONENTS = [
|
|
170
|
+
PdmContextMenuComponent,
|
|
171
|
+
];
|
|
172
|
+
class PdmContextMenuModule {
|
|
173
|
+
}
|
|
174
|
+
PdmContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
175
|
+
PdmContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: PdmContextMenuModule, declarations: [PdmContextMenuComponent], imports: [CommonModule, OverlayModule], exports: [PdmContextMenuComponent] });
|
|
176
|
+
PdmContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmContextMenuModule, imports: [CommonModule, OverlayModule] });
|
|
177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmContextMenuModule, decorators: [{
|
|
178
|
+
type: NgModule,
|
|
179
|
+
args: [{
|
|
180
|
+
imports: [CommonModule, OverlayModule],
|
|
181
|
+
declarations: COMPONENTS,
|
|
182
|
+
exports: COMPONENTS
|
|
183
|
+
}]
|
|
184
|
+
}] });
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Generated bundle index. Do not edit.
|
|
188
|
+
*/
|
|
189
|
+
|
|
190
|
+
export { PdmContextMenuComponent, PdmContextMenuModule };
|
|
191
|
+
//# sourceMappingURL=pdm-ui-kit-src-context-menu.mjs.map
|