pdm-ui-kit 0.1.3 → 0.1.5
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/package.json +20 -13
- package/dist/corelusa-pdm-ui-kit/README.md +0 -79
- package/dist/corelusa-pdm-ui-kit/esm2020/corelusa-pdm-ui-kit.mjs +0 -5
- package/dist/corelusa-pdm-ui-kit/esm2020/lib/components/field/field.component.mjs +0 -52
- package/dist/corelusa-pdm-ui-kit/esm2020/lib/components/input/input.component.mjs +0 -65
- package/dist/corelusa-pdm-ui-kit/esm2020/lib/components/input-group/input-group.component.mjs +0 -54
- package/dist/corelusa-pdm-ui-kit/esm2020/lib/components/input-password/input-password.component.mjs +0 -72
- package/dist/corelusa-pdm-ui-kit/fesm2015/corelusa-pdm-ui-kit.mjs +0 -2959
- package/dist/corelusa-pdm-ui-kit/fesm2015/corelusa-pdm-ui-kit.mjs.map +0 -1
- package/dist/corelusa-pdm-ui-kit/fesm2020/corelusa-pdm-ui-kit.mjs +0 -2954
- package/dist/corelusa-pdm-ui-kit/fesm2020/corelusa-pdm-ui-kit.mjs.map +0 -1
- package/dist/corelusa-pdm-ui-kit/index.d.ts +0 -5
- package/dist/corelusa-pdm-ui-kit/lib/components/field/field.component.d.ts +0 -18
- package/dist/corelusa-pdm-ui-kit/lib/components/input-group/input-group.component.d.ts +0 -19
- package/dist/corelusa-pdm-ui-kit/package.json +0 -47
- package/dist/pdm-ui-kit/README.md +0 -128
- package/dist/pdm-ui-kit/esm2020/lib/components/accordion/accordion.component.mjs +0 -42
- package/dist/pdm-ui-kit/esm2020/lib/components/alert/alert.component.mjs +0 -35
- package/dist/pdm-ui-kit/esm2020/lib/components/alert-dialog/alert-dialog.component.mjs +0 -69
- package/dist/pdm-ui-kit/esm2020/lib/components/aspect-ratio/aspect-ratio.component.mjs +0 -31
- package/dist/pdm-ui-kit/esm2020/lib/components/avatar/avatar.component.mjs +0 -46
- package/dist/pdm-ui-kit/esm2020/lib/components/badge/badge.component.mjs +0 -23
- package/dist/pdm-ui-kit/esm2020/lib/components/breadcrumb/breadcrumb.component.mjs +0 -29
- package/dist/pdm-ui-kit/esm2020/lib/components/button/button.component.mjs +0 -82
- package/dist/pdm-ui-kit/esm2020/lib/components/button-group/button-group.component.mjs +0 -23
- package/dist/pdm-ui-kit/esm2020/lib/components/calendar/calendar.component.mjs +0 -71
- package/dist/pdm-ui-kit/esm2020/lib/components/card/card.component.mjs +0 -65
- package/dist/pdm-ui-kit/esm2020/lib/components/carousel/carousel.component.mjs +0 -97
- package/dist/pdm-ui-kit/esm2020/lib/components/chart/chart.component.mjs +0 -174
- package/dist/pdm-ui-kit/esm2020/lib/components/checkbox/checkbox.component.mjs +0 -47
- package/dist/pdm-ui-kit/esm2020/lib/components/collapsible/collapsible.component.mjs +0 -43
- package/dist/pdm-ui-kit/esm2020/lib/components/combobox/combobox.component.mjs +0 -51
- package/dist/pdm-ui-kit/esm2020/lib/components/command/command.component.mjs +0 -75
- package/dist/pdm-ui-kit/esm2020/lib/components/context-menu/context-menu.component.mjs +0 -78
- package/dist/pdm-ui-kit/esm2020/lib/components/data-table/data-table.component.mjs +0 -89
- package/dist/pdm-ui-kit/esm2020/lib/components/date-picker/date-picker.component.mjs +0 -63
- package/dist/pdm-ui-kit/esm2020/lib/components/dialog/dialog.component.mjs +0 -90
- package/dist/pdm-ui-kit/esm2020/lib/components/drawer/drawer.component.mjs +0 -72
- package/dist/pdm-ui-kit/esm2020/lib/components/dropdown-menu/dropdown-menu.component.mjs +0 -120
- package/dist/pdm-ui-kit/esm2020/lib/components/empty/empty.component.mjs +0 -58
- package/dist/pdm-ui-kit/esm2020/lib/components/hover-card/hover-card.component.mjs +0 -44
- package/dist/pdm-ui-kit/esm2020/lib/components/icon/icon.component.mjs +0 -94
- package/dist/pdm-ui-kit/esm2020/lib/components/input-otp/input-otp.component.mjs +0 -140
- package/dist/pdm-ui-kit/esm2020/lib/components/item/item.component.mjs +0 -23
- package/dist/pdm-ui-kit/esm2020/lib/components/kbd/kbd.component.mjs +0 -17
- package/dist/pdm-ui-kit/esm2020/lib/components/label/label.component.mjs +0 -23
- package/dist/pdm-ui-kit/esm2020/lib/components/menubar/menubar.component.mjs +0 -31
- package/dist/pdm-ui-kit/esm2020/lib/components/native-select/native-select.component.mjs +0 -42
- package/dist/pdm-ui-kit/esm2020/lib/components/navigation-menu/navigation-menu.component.mjs +0 -20
- package/dist/pdm-ui-kit/esm2020/lib/components/pagination/pagination.component.mjs +0 -47
- package/dist/pdm-ui-kit/esm2020/lib/components/popover/popover.component.mjs +0 -58
- package/dist/pdm-ui-kit/esm2020/lib/components/progress/progress.component.mjs +0 -33
- package/dist/pdm-ui-kit/esm2020/lib/components/radio-group/radio-group.component.mjs +0 -38
- package/dist/pdm-ui-kit/esm2020/lib/components/scroll-area/scroll-area.component.mjs +0 -20
- package/dist/pdm-ui-kit/esm2020/lib/components/select/select.component.mjs +0 -38
- package/dist/pdm-ui-kit/esm2020/lib/components/separator/separator.component.mjs +0 -26
- package/dist/pdm-ui-kit/esm2020/lib/components/sheet/sheet.component.mjs +0 -39
- package/dist/pdm-ui-kit/esm2020/lib/components/sidebar/sidebar.component.mjs +0 -20
- package/dist/pdm-ui-kit/esm2020/lib/components/skeleton/skeleton.component.mjs +0 -17
- package/dist/pdm-ui-kit/esm2020/lib/components/slider/slider.component.mjs +0 -46
- package/dist/pdm-ui-kit/esm2020/lib/components/sonner/sonner.component.mjs +0 -39
- package/dist/pdm-ui-kit/esm2020/lib/components/spinner/spinner.component.mjs +0 -20
- package/dist/pdm-ui-kit/esm2020/lib/components/switch/switch.component.mjs +0 -35
- package/dist/pdm-ui-kit/esm2020/lib/components/table/table.component.mjs +0 -17
- package/dist/pdm-ui-kit/esm2020/lib/components/tabs/tabs.component.mjs +0 -31
- package/dist/pdm-ui-kit/esm2020/lib/components/textarea/textarea.component.mjs +0 -59
- package/dist/pdm-ui-kit/esm2020/lib/components/toggle/toggle.component.mjs +0 -41
- package/dist/pdm-ui-kit/esm2020/lib/components/toggle-group/toggle-group.component.mjs +0 -31
- package/dist/pdm-ui-kit/esm2020/lib/components/tooltip/tooltip.component.mjs +0 -33
- package/dist/pdm-ui-kit/esm2020/lib/pdm-ui-kit.module.mjs +0 -245
- package/dist/pdm-ui-kit/esm2020/public-api.mjs +0 -59
- package/dist/pdm-ui-kit/lib/components/accordion/accordion.component.d.ts +0 -19
- package/dist/pdm-ui-kit/lib/components/alert/alert.component.d.ts +0 -13
- package/dist/pdm-ui-kit/lib/components/alert-dialog/alert-dialog.component.d.ts +0 -21
- package/dist/pdm-ui-kit/lib/components/aspect-ratio/aspect-ratio.component.d.ts +0 -10
- package/dist/pdm-ui-kit/lib/components/avatar/avatar.component.d.ts +0 -20
- package/dist/pdm-ui-kit/lib/components/badge/badge.component.d.ts +0 -9
- package/dist/pdm-ui-kit/lib/components/breadcrumb/breadcrumb.component.d.ts +0 -10
- package/dist/pdm-ui-kit/lib/components/button/button.component.d.ts +0 -24
- package/dist/pdm-ui-kit/lib/components/button-group/button-group.component.d.ts +0 -9
- package/dist/pdm-ui-kit/lib/components/calendar/calendar.component.d.ts +0 -28
- package/dist/pdm-ui-kit/lib/components/card/card.component.d.ts +0 -24
- package/dist/pdm-ui-kit/lib/components/carousel/carousel.component.d.ts +0 -25
- package/dist/pdm-ui-kit/lib/components/chart/chart.component.d.ts +0 -41
- package/dist/pdm-ui-kit/lib/components/checkbox/checkbox.component.d.ts +0 -17
- package/dist/pdm-ui-kit/lib/components/collapsible/collapsible.component.d.ts +0 -14
- package/dist/pdm-ui-kit/lib/components/combobox/combobox.component.d.ts +0 -18
- package/dist/pdm-ui-kit/lib/components/command/command.component.d.ts +0 -33
- package/dist/pdm-ui-kit/lib/components/context-menu/context-menu.component.d.ts +0 -26
- package/dist/pdm-ui-kit/lib/components/data-table/data-table.component.d.ts +0 -36
- package/dist/pdm-ui-kit/lib/components/date-picker/date-picker.component.d.ts +0 -23
- package/dist/pdm-ui-kit/lib/components/dialog/dialog.component.d.ts +0 -30
- package/dist/pdm-ui-kit/lib/components/drawer/drawer.component.d.ts +0 -27
- package/dist/pdm-ui-kit/lib/components/dropdown-menu/dropdown-menu.component.d.ts +0 -34
- package/dist/pdm-ui-kit/lib/components/empty/empty.component.d.ts +0 -19
- package/dist/pdm-ui-kit/lib/components/hover-card/hover-card.component.d.ts +0 -14
- package/dist/pdm-ui-kit/lib/components/icon/icon.component.d.ts +0 -18
- package/dist/pdm-ui-kit/lib/components/input/input.component.d.ts +0 -23
- package/dist/pdm-ui-kit/lib/components/input-otp/input-otp.component.d.ts +0 -26
- package/dist/pdm-ui-kit/lib/components/input-password/input-password.component.d.ts +0 -25
- package/dist/pdm-ui-kit/lib/components/item/item.component.d.ts +0 -8
- package/dist/pdm-ui-kit/lib/components/kbd/kbd.component.d.ts +0 -6
- package/dist/pdm-ui-kit/lib/components/label/label.component.d.ts +0 -8
- package/dist/pdm-ui-kit/lib/components/menubar/menubar.component.d.ts +0 -17
- package/dist/pdm-ui-kit/lib/components/native-select/native-select.component.d.ts +0 -20
- package/dist/pdm-ui-kit/lib/components/navigation-menu/navigation-menu.component.d.ts +0 -12
- package/dist/pdm-ui-kit/lib/components/pagination/pagination.component.d.ts +0 -13
- package/dist/pdm-ui-kit/lib/components/popover/popover.component.d.ts +0 -17
- package/dist/pdm-ui-kit/lib/components/progress/progress.component.d.ts +0 -10
- package/dist/pdm-ui-kit/lib/components/radio-group/radio-group.component.d.ts +0 -19
- package/dist/pdm-ui-kit/lib/components/scroll-area/scroll-area.component.d.ts +0 -7
- package/dist/pdm-ui-kit/lib/components/select/select.component.d.ts +0 -19
- package/dist/pdm-ui-kit/lib/components/separator/separator.component.d.ts +0 -9
- package/dist/pdm-ui-kit/lib/components/sheet/sheet.component.d.ts +0 -13
- package/dist/pdm-ui-kit/lib/components/sidebar/sidebar.component.d.ts +0 -7
- package/dist/pdm-ui-kit/lib/components/skeleton/skeleton.component.d.ts +0 -6
- package/dist/pdm-ui-kit/lib/components/slider/slider.component.d.ts +0 -15
- package/dist/pdm-ui-kit/lib/components/sonner/sonner.component.d.ts +0 -13
- package/dist/pdm-ui-kit/lib/components/spinner/spinner.component.d.ts +0 -7
- package/dist/pdm-ui-kit/lib/components/switch/switch.component.d.ts +0 -13
- package/dist/pdm-ui-kit/lib/components/table/table.component.d.ts +0 -6
- package/dist/pdm-ui-kit/lib/components/tabs/tabs.component.d.ts +0 -16
- package/dist/pdm-ui-kit/lib/components/textarea/textarea.component.d.ts +0 -21
- package/dist/pdm-ui-kit/lib/components/toggle/toggle.component.d.ts +0 -14
- package/dist/pdm-ui-kit/lib/components/toggle-group/toggle-group.component.d.ts +0 -16
- package/dist/pdm-ui-kit/lib/components/tooltip/tooltip.component.d.ts +0 -10
- package/dist/pdm-ui-kit/lib/pdm-ui-kit.module.d.ts +0 -64
- package/dist/pdm-ui-kit/package.json +0 -44
- package/dist/pdm-ui-kit/public-api.d.ts +0 -58
- package/ng-package.json +0 -8
- package/pdm-ui-kit-0.1.1.tgz +0 -0
- package/pdm-ui-kit-0.1.2.tgz +0 -0
- package/pdm-ui-kit-0.1.3.tgz +0 -0
- package/src/lib/components/accordion/accordion.component.html +0 -34
- package/src/lib/components/accordion/accordion.component.ts +0 -38
- package/src/lib/components/alert/alert.component.html +0 -52
- package/src/lib/components/alert/alert.component.ts +0 -25
- package/src/lib/components/alert-dialog/alert-dialog.component.html +0 -41
- package/src/lib/components/alert-dialog/alert-dialog.component.ts +0 -45
- package/src/lib/components/aspect-ratio/aspect-ratio.component.html +0 -11
- package/src/lib/components/aspect-ratio/aspect-ratio.component.ts +0 -18
- package/src/lib/components/avatar/avatar.component.html +0 -21
- package/src/lib/components/avatar/avatar.component.ts +0 -32
- package/src/lib/components/badge/badge.component.html +0 -28
- package/src/lib/components/badge/badge.component.ts +0 -23
- package/src/lib/components/breadcrumb/breadcrumb.component.html +0 -39
- package/src/lib/components/breadcrumb/breadcrumb.component.ts +0 -26
- package/src/lib/components/button/button.component.html +0 -15
- package/src/lib/components/button/button.component.ts +0 -84
- package/src/lib/components/button-group/button-group.component.html +0 -39
- package/src/lib/components/button-group/button-group.component.ts +0 -15
- package/src/lib/components/calendar/calendar.component.html +0 -73
- package/src/lib/components/calendar/calendar.component.ts +0 -78
- package/src/lib/components/card/card.component.html +0 -77
- package/src/lib/components/card/card.component.ts +0 -39
- package/src/lib/components/carousel/carousel.component.html +0 -86
- package/src/lib/components/carousel/carousel.component.ts +0 -100
- package/src/lib/components/chart/chart.component.html +0 -143
- package/src/lib/components/chart/chart.component.ts +0 -147
- package/src/lib/components/checkbox/checkbox.component.html +0 -38
- package/src/lib/components/checkbox/checkbox.component.ts +0 -32
- package/src/lib/components/collapsible/collapsible.component.html +0 -26
- package/src/lib/components/collapsible/collapsible.component.ts +0 -29
- package/src/lib/components/combobox/combobox.component.html +0 -42
- package/src/lib/components/combobox/combobox.component.ts +0 -32
- package/src/lib/components/command/command.component.html +0 -55
- package/src/lib/components/command/command.component.ts +0 -67
- package/src/lib/components/context-menu/context-menu.component.html +0 -47
- package/src/lib/components/context-menu/context-menu.component.ts +0 -67
- package/src/lib/components/data-table/data-table.component.html +0 -63
- package/src/lib/components/data-table/data-table.component.ts +0 -78
- package/src/lib/components/date-picker/date-picker.component.html +0 -38
- package/src/lib/components/date-picker/date-picker.component.ts +0 -38
- package/src/lib/components/dialog/dialog.component.html +0 -78
- package/src/lib/components/dialog/dialog.component.ts +0 -55
- package/src/lib/components/drawer/drawer.component.html +0 -56
- package/src/lib/components/drawer/drawer.component.ts +0 -43
- package/src/lib/components/dropdown-menu/dropdown-menu.component.html +0 -56
- package/src/lib/components/dropdown-menu/dropdown-menu.component.ts +0 -126
- package/src/lib/components/empty/empty.component.html +0 -29
- package/src/lib/components/empty/empty.component.ts +0 -35
- package/src/lib/components/field/field.component.html +0 -26
- package/src/lib/components/field/field.component.ts +0 -42
- package/src/lib/components/hover-card/hover-card.component.html +0 -24
- package/src/lib/components/hover-card/hover-card.component.ts +0 -36
- package/src/lib/components/icon/icon.component.html +0 -286
- package/src/lib/components/icon/icon.component.ts +0 -133
- package/src/lib/components/input/input.component.html +0 -25
- package/src/lib/components/input/input.component.ts +0 -33
- package/src/lib/components/input-group/input-group.component.html +0 -59
- package/src/lib/components/input-group/input-group.component.ts +0 -32
- package/src/lib/components/input-otp/input-otp.component.html +0 -25
- package/src/lib/components/input-otp/input-otp.component.ts +0 -146
- package/src/lib/components/input-password/input-password.component.html +0 -66
- package/src/lib/components/input-password/input-password.component.ts +0 -46
- package/src/lib/components/item/item.component.html +0 -10
- package/src/lib/components/item/item.component.ts +0 -12
- package/src/lib/components/kbd/kbd.component.html +0 -3
- package/src/lib/components/kbd/kbd.component.ts +0 -10
- package/src/lib/components/label/label.component.html +0 -7
- package/src/lib/components/label/label.component.ts +0 -12
- package/src/lib/components/menubar/menubar.component.html +0 -16
- package/src/lib/components/menubar/menubar.component.ts +0 -29
- package/src/lib/components/native-select/native-select.component.html +0 -17
- package/src/lib/components/native-select/native-select.component.ts +0 -28
- package/src/lib/components/navigation-menu/navigation-menu.component.html +0 -15
- package/src/lib/components/navigation-menu/navigation-menu.component.ts +0 -17
- package/src/lib/components/pagination/pagination.component.html +0 -30
- package/src/lib/components/pagination/pagination.component.ts +0 -37
- package/src/lib/components/popover/popover.component.html +0 -6
- package/src/lib/components/popover/popover.component.ts +0 -40
- package/src/lib/components/progress/progress.component.html +0 -9
- package/src/lib/components/progress/progress.component.ts +0 -20
- package/src/lib/components/radio-group/radio-group.component.html +0 -25
- package/src/lib/components/radio-group/radio-group.component.ts +0 -30
- package/src/lib/components/scroll-area/scroll-area.component.html +0 -5
- package/src/lib/components/scroll-area/scroll-area.component.ts +0 -11
- package/src/lib/components/select/select.component.html +0 -14
- package/src/lib/components/select/select.component.ts +0 -27
- package/src/lib/components/separator/separator.component.html +0 -5
- package/src/lib/components/separator/separator.component.ts +0 -16
- package/src/lib/components/sheet/sheet.component.html +0 -10
- package/src/lib/components/sheet/sheet.component.ts +0 -28
- package/src/lib/components/sidebar/sidebar.component.html +0 -3
- package/src/lib/components/sidebar/sidebar.component.ts +0 -11
- package/src/lib/components/skeleton/skeleton.component.html +0 -1
- package/src/lib/components/skeleton/skeleton.component.ts +0 -10
- package/src/lib/components/slider/slider.component.html +0 -15
- package/src/lib/components/slider/slider.component.ts +0 -31
- package/src/lib/components/sonner/sonner.component.html +0 -10
- package/src/lib/components/sonner/sonner.component.ts +0 -25
- package/src/lib/components/spinner/spinner.component.html +0 -6
- package/src/lib/components/spinner/spinner.component.ts +0 -11
- package/src/lib/components/switch/switch.component.html +0 -14
- package/src/lib/components/switch/switch.component.ts +0 -20
- package/src/lib/components/table/table.component.html +0 -5
- package/src/lib/components/table/table.component.ts +0 -10
- package/src/lib/components/tabs/tabs.component.html +0 -21
- package/src/lib/components/tabs/tabs.component.ts +0 -26
- package/src/lib/components/textarea/textarea.component.html +0 -21
- package/src/lib/components/textarea/textarea.component.ts +0 -28
- package/src/lib/components/toggle/toggle.component.html +0 -16
- package/src/lib/components/toggle/toggle.component.ts +0 -29
- package/src/lib/components/toggle-group/toggle-group.component.html +0 -17
- package/src/lib/components/toggle-group/toggle-group.component.ts +0 -26
- package/src/lib/components/tooltip/tooltip.component.html +0 -6
- package/src/lib/components/tooltip/tooltip.component.ts +0 -20
- package/src/lib/pdm-ui-kit.module.ts +0 -126
- package/src/public-api.ts +0 -58
- package/tsconfig.json +0 -30
- package/tsconfig.lib.json +0 -17
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/accordion/accordion.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/alert/alert.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/alert-dialog/alert-dialog.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/aspect-ratio/aspect-ratio.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/avatar/avatar.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/badge/badge.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/breadcrumb/breadcrumb.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/button/button.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/button-group/button-group.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/calendar/calendar.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/card/card.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/carousel/carousel.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/chart/chart.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/checkbox/checkbox.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/collapsible/collapsible.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/combobox/combobox.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/command/command.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/context-menu/context-menu.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/data-table/data-table.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/date-picker/date-picker.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/dialog/dialog.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/drawer/drawer.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/dropdown-menu/dropdown-menu.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/empty/empty.component.mjs +0 -0
- /package/{dist/pdm-ui-kit/esm2020 → esm2020}/lib/components/field/field.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/hover-card/hover-card.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/icon/icon.component.mjs +0 -0
- /package/{dist/pdm-ui-kit/esm2020 → esm2020}/lib/components/input/input.component.mjs +0 -0
- /package/{dist/pdm-ui-kit/esm2020 → esm2020}/lib/components/input-group/input-group.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/input-otp/input-otp.component.mjs +0 -0
- /package/{dist/pdm-ui-kit/esm2020 → esm2020}/lib/components/input-password/input-password.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/item/item.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/kbd/kbd.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/label/label.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/menubar/menubar.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/native-select/native-select.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/navigation-menu/navigation-menu.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/pagination/pagination.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/popover/popover.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/progress/progress.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/radio-group/radio-group.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/scroll-area/scroll-area.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/select/select.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/separator/separator.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/sheet/sheet.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/sidebar/sidebar.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/skeleton/skeleton.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/slider/slider.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/sonner/sonner.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/spinner/spinner.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/switch/switch.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/table/table.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/tabs/tabs.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/textarea/textarea.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/toggle/toggle.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/toggle-group/toggle-group.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/components/tooltip/tooltip.component.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/lib/pdm-ui-kit.module.mjs +0 -0
- /package/{dist/pdm-ui-kit/esm2020 → esm2020}/pdm-ui-kit.mjs +0 -0
- /package/{dist/corelusa-pdm-ui-kit/esm2020 → esm2020}/public-api.mjs +0 -0
- /package/{dist/pdm-ui-kit/fesm2015 → fesm2015}/pdm-ui-kit.mjs +0 -0
- /package/{dist/pdm-ui-kit/fesm2015 → fesm2015}/pdm-ui-kit.mjs.map +0 -0
- /package/{dist/pdm-ui-kit/fesm2020 → fesm2020}/pdm-ui-kit.mjs +0 -0
- /package/{dist/pdm-ui-kit/fesm2020 → fesm2020}/pdm-ui-kit.mjs.map +0 -0
- /package/{dist/pdm-ui-kit/index.d.ts → index.d.ts} +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/accordion/accordion.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/alert/alert.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/alert-dialog/alert-dialog.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/aspect-ratio/aspect-ratio.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/avatar/avatar.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/badge/badge.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/breadcrumb/breadcrumb.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/button/button.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/button-group/button-group.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/calendar/calendar.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/card/card.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/carousel/carousel.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/chart/chart.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/checkbox/checkbox.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/collapsible/collapsible.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/combobox/combobox.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/command/command.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/context-menu/context-menu.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/data-table/data-table.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/date-picker/date-picker.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/dialog/dialog.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/drawer/drawer.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/dropdown-menu/dropdown-menu.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/empty/empty.component.d.ts +0 -0
- /package/{dist/pdm-ui-kit/lib → lib}/components/field/field.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/hover-card/hover-card.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/icon/icon.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/input/input.component.d.ts +0 -0
- /package/{dist/pdm-ui-kit/lib → lib}/components/input-group/input-group.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/input-otp/input-otp.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/input-password/input-password.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/item/item.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/kbd/kbd.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/label/label.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/menubar/menubar.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/native-select/native-select.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/navigation-menu/navigation-menu.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/pagination/pagination.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/popover/popover.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/progress/progress.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/radio-group/radio-group.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/scroll-area/scroll-area.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/select/select.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/separator/separator.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/sheet/sheet.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/sidebar/sidebar.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/skeleton/skeleton.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/slider/slider.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/sonner/sonner.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/spinner/spinner.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/switch/switch.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/table/table.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/tabs/tabs.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/textarea/textarea.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/toggle/toggle.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/toggle-group/toggle-group.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/components/tooltip/tooltip.component.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/lib → lib}/pdm-ui-kit.module.d.ts +0 -0
- /package/{dist/corelusa-pdm-ui-kit/public-api.d.ts → public-api.d.ts} +0 -0
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
export type PdmAlertVariant = 'default' | 'title-only' | 'destructive';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'pdm-alert',
|
|
7
|
-
templateUrl: './alert.component.html',
|
|
8
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
9
|
-
})
|
|
10
|
-
export class PdmAlertComponent {
|
|
11
|
-
@Input() variant: PdmAlertVariant = 'default';
|
|
12
|
-
@Input() title = 'Success! Your changes have been saved';
|
|
13
|
-
@Input() description = 'This is an alert with icon, title and description.';
|
|
14
|
-
@Input() details: string[] = [];
|
|
15
|
-
@Input() className = '';
|
|
16
|
-
|
|
17
|
-
get isDestructive(): boolean {
|
|
18
|
-
return this.variant === 'destructive';
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
get isTitleOnly(): boolean {
|
|
22
|
-
return this.variant === 'title-only';
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<button
|
|
2
|
-
*ngIf="showTrigger && !open"
|
|
3
|
-
type="button"
|
|
4
|
-
class="inline-flex h-9 items-center justify-center rounded-[8px] border border-[#e5e5e5] bg-[#f5f5f5] px-4 py-2 text-[14px] font-medium leading-5 text-[#0a0a0a] shadow-[0px_1px_2px_0px_rgba(0,0,0,0.1)]"
|
|
5
|
-
(click)="onTriggerClick()"
|
|
6
|
-
>
|
|
7
|
-
{{ triggerText }}
|
|
8
|
-
</button>
|
|
9
|
-
|
|
10
|
-
<div *ngIf="open" class="fixed inset-0 z-50 flex items-center justify-center p-5">
|
|
11
|
-
<div class="absolute inset-0 bg-[rgba(0,0,0,0.3)]" (click)="onCancel()"></div>
|
|
12
|
-
<section
|
|
13
|
-
role="alertdialog"
|
|
14
|
-
aria-modal="true"
|
|
15
|
-
[ngClass]="[
|
|
16
|
-
'relative z-10 w-full max-w-[552px] rounded-[10px] border border-[#e5e5e5] bg-white p-6 text-[#0a0a0a] shadow-[0px_10px_15px_0px_rgba(0,0,0,0.1),0px_4px_6px_0px_rgba(0,0,0,0.1)]',
|
|
17
|
-
className
|
|
18
|
-
]"
|
|
19
|
-
>
|
|
20
|
-
<div class="flex flex-col gap-2">
|
|
21
|
-
<h2 class="text-[18px] font-semibold leading-7 tracking-normal">{{ title }}</h2>
|
|
22
|
-
<p *ngIf="description" class="text-[14px] font-normal leading-5 text-[#737373]">{{ description }}</p>
|
|
23
|
-
</div>
|
|
24
|
-
<div class="mt-4 flex items-center justify-end gap-2">
|
|
25
|
-
<button
|
|
26
|
-
type="button"
|
|
27
|
-
class="inline-flex h-9 items-center justify-center rounded-[10px] border border-[#e5e5e5] bg-white px-4 py-2 text-[14px] font-medium leading-5 text-[#0a0a0a] shadow-[0px_1px_2px_0px_rgba(0,0,0,0.1)]"
|
|
28
|
-
(click)="onCancel()"
|
|
29
|
-
>
|
|
30
|
-
{{ cancelText }}
|
|
31
|
-
</button>
|
|
32
|
-
<button
|
|
33
|
-
type="button"
|
|
34
|
-
class="inline-flex h-9 items-center justify-center rounded-[10px] bg-[#171717] px-4 py-2 text-[14px] font-medium leading-5 text-[#fafafa] shadow-[0px_1px_2px_0px_rgba(0,0,0,0.1)]"
|
|
35
|
-
(click)="onConfirm()"
|
|
36
|
-
>
|
|
37
|
-
{{ confirmText }}
|
|
38
|
-
</button>
|
|
39
|
-
</div>
|
|
40
|
-
</section>
|
|
41
|
-
</div>
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, EventEmitter, HostListener, Input, Output } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'pdm-alert-dialog',
|
|
5
|
-
templateUrl: './alert-dialog.component.html',
|
|
6
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
7
|
-
})
|
|
8
|
-
export class PdmAlertDialogComponent {
|
|
9
|
-
@Input() open = false;
|
|
10
|
-
@Input() showTrigger = false;
|
|
11
|
-
@Input() triggerText = 'Show dialog';
|
|
12
|
-
@Input() title = 'Are you absolutely sure?';
|
|
13
|
-
@Input() description = '';
|
|
14
|
-
@Input() confirmText = 'Continue';
|
|
15
|
-
@Input() cancelText = 'Cancel';
|
|
16
|
-
@Input() className = '';
|
|
17
|
-
|
|
18
|
-
@Output() openChange = new EventEmitter<boolean>();
|
|
19
|
-
@Output() confirm = new EventEmitter<void>();
|
|
20
|
-
@Output() cancel = new EventEmitter<void>();
|
|
21
|
-
|
|
22
|
-
onTriggerClick(): void {
|
|
23
|
-
this.open = true;
|
|
24
|
-
this.openChange.emit(true);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
onCancel(): void {
|
|
28
|
-
this.cancel.emit();
|
|
29
|
-
this.open = false;
|
|
30
|
-
this.openChange.emit(false);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
onConfirm(): void {
|
|
34
|
-
this.confirm.emit();
|
|
35
|
-
this.open = false;
|
|
36
|
-
this.openChange.emit(false);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@HostListener('document:keydown.escape')
|
|
40
|
-
onEsc(): void {
|
|
41
|
-
if (this.open) {
|
|
42
|
-
this.onCancel();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<div class="relative w-full" [ngClass]="className" [style.paddingTop]="paddingTop">
|
|
2
|
-
<div class="absolute inset-0 overflow-hidden rounded-[10px]">
|
|
3
|
-
<img
|
|
4
|
-
*ngIf="imageSrc"
|
|
5
|
-
[src]="imageSrc"
|
|
6
|
-
[alt]="imageAlt"
|
|
7
|
-
class="pointer-events-none h-full w-full rounded-[10px] object-cover"
|
|
8
|
-
/>
|
|
9
|
-
<ng-content></ng-content>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'pdm-aspect-ratio',
|
|
5
|
-
templateUrl: './aspect-ratio.component.html',
|
|
6
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
7
|
-
})
|
|
8
|
-
export class PdmAspectRatioComponent {
|
|
9
|
-
@Input() ratio = 16 / 9;
|
|
10
|
-
@Input() imageSrc = '';
|
|
11
|
-
@Input() imageAlt = '';
|
|
12
|
-
@Input() className = '';
|
|
13
|
-
|
|
14
|
-
get paddingTop(): string {
|
|
15
|
-
if (!this.ratio || this.ratio <= 0) return '56.25%';
|
|
16
|
-
return (100 / this.ratio).toFixed(4) + '%';
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<div *ngIf="!isGroup" [ngClass]="['relative flex shrink-0 overflow-hidden', radiusClass, sizeClasses[size], className]">
|
|
2
|
-
<img *ngIf="src" [src]="src" [alt]="alt" [ngClass]="['aspect-square h-full w-full object-cover', radiusClass]" />
|
|
3
|
-
<div
|
|
4
|
-
*ngIf="!src"
|
|
5
|
-
[ngClass]="['flex h-full w-full items-center justify-center bg-[hsl(var(--muted))] text-xs text-[hsl(var(--muted-foreground))]', radiusClass]"
|
|
6
|
-
>
|
|
7
|
-
{{ fallback }}
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
<div *ngIf="isGroup" [ngClass]="['inline-flex items-center pr-2', className]">
|
|
12
|
-
<div
|
|
13
|
-
*ngFor="let groupSrc of groupSources; let i = index"
|
|
14
|
-
[ngClass]="[
|
|
15
|
-
'relative h-8 w-8 shrink-0 overflow-hidden rounded-full',
|
|
16
|
-
i > 0 ? '-mr-2 border border-[#e5e5e5]' : '-mr-2'
|
|
17
|
-
]"
|
|
18
|
-
>
|
|
19
|
-
<img [src]="groupSrc" [alt]="alt + ' ' + (i + 1)" class="h-full w-full rounded-full object-cover" />
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
export type PdmAvatarShape = 'circle' | 'square';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'pdm-avatar',
|
|
7
|
-
templateUrl: './avatar.component.html',
|
|
8
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
9
|
-
})
|
|
10
|
-
export class PdmAvatarComponent {
|
|
11
|
-
@Input() src = '';
|
|
12
|
-
@Input() alt = 'Avatar';
|
|
13
|
-
@Input() fallback = 'U';
|
|
14
|
-
@Input() shape: PdmAvatarShape = 'circle';
|
|
15
|
-
@Input() size: 'sm' | 'md' | 'lg' = 'md';
|
|
16
|
-
@Input() groupSources: string[] = [];
|
|
17
|
-
@Input() className = '';
|
|
18
|
-
|
|
19
|
-
readonly sizeClasses = {
|
|
20
|
-
sm: 'h-8 w-8',
|
|
21
|
-
md: 'h-10 w-10',
|
|
22
|
-
lg: 'h-12 w-12'
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
get isGroup(): boolean {
|
|
26
|
-
return this.groupSources.length > 0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
get radiusClass(): string {
|
|
30
|
-
return this.shape === 'square' ? 'rounded-[8px]' : 'rounded-full';
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<span
|
|
2
|
-
[ngClass]="[
|
|
3
|
-
'inline-flex items-center justify-center text-center align-middle',
|
|
4
|
-
variant === 'default' ? 'h-[22px] rounded-[10px] bg-[#171717] px-[10px] py-[2px] text-[12px] font-medium leading-4 text-[#fafafa]' : '',
|
|
5
|
-
variant === 'secondary' ? 'h-[22px] rounded-[10px] bg-[#f5f5f5] px-[10px] py-[2px] text-[12px] font-medium leading-4 text-[#0a0a0a]' : '',
|
|
6
|
-
variant === 'destructive' ? 'h-[22px] rounded-[10px] bg-[#dc2626] px-[10px] py-[2px] text-[12px] font-medium leading-4 text-[rgba(255,255,255,0.95)]' : '',
|
|
7
|
-
variant === 'outline' ? 'h-[22px] rounded-[10px] border border-[#e5e5e5] px-[10px] py-[2px] text-[12px] font-medium leading-4 text-[#0a0a0a]' : '',
|
|
8
|
-
variant === 'icon' ? 'h-[22px] gap-1 rounded-[10px] bg-[#171717] px-[10px] py-[2px] text-[12px] font-medium leading-4 text-[#fafafa]' : '',
|
|
9
|
-
variant === 'number' ? 'h-5 min-w-[20px] rounded-full bg-[#171717] px-[6px] py-[2px] text-[12px] font-medium leading-4 text-[#fafafa]' : '',
|
|
10
|
-
variant === 'destructive-number' ? 'h-5 min-w-[20px] rounded-full bg-[#dc2626] px-[6px] py-[2px] text-[12px] font-medium leading-4 text-[rgba(255,255,255,0.95)]' : '',
|
|
11
|
-
variant === 'secondary-number' ? 'h-5 min-w-[20px] rounded-full border border-[#e5e5e5] px-1 py-[2px] text-[12px] font-medium leading-4 text-[#0a0a0a]' : '',
|
|
12
|
-
className
|
|
13
|
-
]"
|
|
14
|
-
>
|
|
15
|
-
<svg
|
|
16
|
-
*ngIf="variant === 'icon'"
|
|
17
|
-
viewBox="0 0 24 24"
|
|
18
|
-
class="h-4 w-4"
|
|
19
|
-
fill="none"
|
|
20
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
21
|
-
aria-hidden="true"
|
|
22
|
-
>
|
|
23
|
-
<circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="1.5"></circle>
|
|
24
|
-
<path d="M8.5 12.5L10.8 14.8L15.8 9.8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
25
|
-
</svg>
|
|
26
|
-
<span [ngClass]="[variant === 'secondary-number' ? 'font-mono' : '']">{{ text }}</span>
|
|
27
|
-
</span>
|
|
28
|
-
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
export type PdmBadgeVariant =
|
|
4
|
-
| 'default'
|
|
5
|
-
| 'secondary'
|
|
6
|
-
| 'destructive'
|
|
7
|
-
| 'outline'
|
|
8
|
-
| 'icon'
|
|
9
|
-
| 'number'
|
|
10
|
-
| 'destructive-number'
|
|
11
|
-
| 'secondary-number';
|
|
12
|
-
|
|
13
|
-
@Component({
|
|
14
|
-
selector: 'pdm-badge',
|
|
15
|
-
templateUrl: './badge.component.html',
|
|
16
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
17
|
-
})
|
|
18
|
-
export class PdmBadgeComponent {
|
|
19
|
-
@Input() variant: PdmBadgeVariant = 'default';
|
|
20
|
-
@Input() text = 'Badge';
|
|
21
|
-
@Input() className = '';
|
|
22
|
-
}
|
|
23
|
-
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<nav
|
|
2
|
-
aria-label="breadcrumb"
|
|
3
|
-
[ngClass]="['inline-flex items-center gap-[6px] text-[14px] leading-5', className]"
|
|
4
|
-
>
|
|
5
|
-
<ng-container *ngFor="let item of renderedItems; let i = index; let last = last">
|
|
6
|
-
<span [ngClass]="[last ? 'text-[#0a0a0a]' : 'text-[#737373]']">{{ item }}</span>
|
|
7
|
-
|
|
8
|
-
<ng-container *ngIf="!last">
|
|
9
|
-
<span class="inline-flex h-6 w-6 items-center justify-center text-[#737373]" aria-hidden="true">
|
|
10
|
-
<svg
|
|
11
|
-
*ngIf="mode === 'custom-separator' && item !== '...'"
|
|
12
|
-
viewBox="0 0 24 24"
|
|
13
|
-
class="h-4 w-4"
|
|
14
|
-
fill="none"
|
|
15
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
16
|
-
>
|
|
17
|
-
<path d="M8 20L16 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" />
|
|
18
|
-
</svg>
|
|
19
|
-
<svg
|
|
20
|
-
*ngIf="(mode !== 'custom-separator' && item !== '...') || item === '...'"
|
|
21
|
-
viewBox="0 0 24 24"
|
|
22
|
-
class="h-4 w-4"
|
|
23
|
-
fill="none"
|
|
24
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
25
|
-
>
|
|
26
|
-
<path d="M9 6L15 12L9 18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
|
27
|
-
</svg>
|
|
28
|
-
</span>
|
|
29
|
-
</ng-container>
|
|
30
|
-
|
|
31
|
-
<ng-container *ngIf="mode === 'dropdown' && i === 1 && item !== '...' && !last">
|
|
32
|
-
<span class="-ml-2 inline-flex h-6 w-6 items-center justify-center text-[#737373]" aria-hidden="true">
|
|
33
|
-
<svg viewBox="0 0 24 24" class="h-4 w-4" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
34
|
-
<path d="M7 10L12 15L17 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
|
35
|
-
</svg>
|
|
36
|
-
</span>
|
|
37
|
-
</ng-container>
|
|
38
|
-
</ng-container>
|
|
39
|
-
</nav>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
export type PdmBreadcrumbMode =
|
|
4
|
-
| 'custom-separator'
|
|
5
|
-
| 'dropdown'
|
|
6
|
-
| 'collapsed'
|
|
7
|
-
| 'link-component'
|
|
8
|
-
| 'responsive';
|
|
9
|
-
|
|
10
|
-
@Component({
|
|
11
|
-
selector: 'pdm-breadcrumb',
|
|
12
|
-
templateUrl: './breadcrumb.component.html',
|
|
13
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
14
|
-
})
|
|
15
|
-
export class PdmBreadcrumbComponent {
|
|
16
|
-
@Input() mode: PdmBreadcrumbMode = 'link-component';
|
|
17
|
-
@Input() items: string[] = ['Home', 'Components', 'Breadcrumb'];
|
|
18
|
-
@Input() className = '';
|
|
19
|
-
|
|
20
|
-
get renderedItems(): string[] {
|
|
21
|
-
if ((this.mode === 'collapsed' || this.mode === 'responsive') && this.items.length > 3) {
|
|
22
|
-
return [this.items[0], '...', this.items[this.items.length - 2], this.items[this.items.length - 1]];
|
|
23
|
-
}
|
|
24
|
-
return this.items;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<button
|
|
2
|
-
[type]="type"
|
|
3
|
-
[disabled]="isDisabled"
|
|
4
|
-
[attr.aria-busy]="loading"
|
|
5
|
-
[ngClass]="rootClasses"
|
|
6
|
-
(click)="onClick($event)"
|
|
7
|
-
>
|
|
8
|
-
<span
|
|
9
|
-
*ngIf="loading"
|
|
10
|
-
class="inline-block h-4 w-4 animate-spin rounded-full border-2 border-current border-r-transparent"
|
|
11
|
-
aria-hidden="true"
|
|
12
|
-
></span>
|
|
13
|
-
<ng-content select="[pdmButtonIcon]" *ngIf="variant === 'with-icon' || variant === 'icon' || variant === 'icon-circle' || variant === 'rounded'"></ng-content>
|
|
14
|
-
<ng-content></ng-content>
|
|
15
|
-
</button>
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
export type PdmButtonVariant =
|
|
4
|
-
| 'default'
|
|
5
|
-
| 'primary'
|
|
6
|
-
| 'destructive'
|
|
7
|
-
| 'outline'
|
|
8
|
-
| 'subtle'
|
|
9
|
-
| 'secondary'
|
|
10
|
-
| 'ghost'
|
|
11
|
-
| 'link'
|
|
12
|
-
| 'with-icon'
|
|
13
|
-
| 'icon'
|
|
14
|
-
| 'icon-circle'
|
|
15
|
-
| 'rounded'
|
|
16
|
-
| 'loading';
|
|
17
|
-
export type PdmButtonState = 'default' | 'hover';
|
|
18
|
-
export type PdmButtonSize = 'small' | 'default' | 'large';
|
|
19
|
-
|
|
20
|
-
@Component({
|
|
21
|
-
selector: 'pdm-button',
|
|
22
|
-
templateUrl: './button.component.html',
|
|
23
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
24
|
-
})
|
|
25
|
-
export class PdmButtonComponent {
|
|
26
|
-
@Input() type: 'button' | 'submit' | 'reset' = 'button';
|
|
27
|
-
@Input() variant: PdmButtonVariant = 'default';
|
|
28
|
-
@Input() state: PdmButtonState = 'default';
|
|
29
|
-
@Input() size: PdmButtonSize = 'default';
|
|
30
|
-
@Input() disabled = false;
|
|
31
|
-
@Input() loading = false;
|
|
32
|
-
@Input() className = '';
|
|
33
|
-
|
|
34
|
-
@Output() pressed = new EventEmitter<MouseEvent>();
|
|
35
|
-
|
|
36
|
-
readonly toneClassMap: Record<PdmButtonVariant, { default: string; hover: string }> = {
|
|
37
|
-
default: { default: 'bg-primary text-primary-foreground', hover: 'bg-primary text-primary-foreground opacity-90' },
|
|
38
|
-
primary: { default: 'bg-primary text-primary-foreground', hover: 'bg-primary text-primary-foreground opacity-90' },
|
|
39
|
-
destructive: { default: 'bg-destructive text-background', hover: 'bg-destructive text-background opacity-90' },
|
|
40
|
-
outline: { default: 'border border-border bg-background text-foreground', hover: 'border border-border bg-accent text-accent-foreground' },
|
|
41
|
-
subtle: { default: 'bg-secondary text-secondary-foreground', hover: 'bg-accent text-accent-foreground' },
|
|
42
|
-
secondary: { default: 'bg-secondary text-secondary-foreground', hover: 'bg-accent text-accent-foreground' },
|
|
43
|
-
ghost: { default: 'bg-transparent text-foreground', hover: 'bg-accent text-accent-foreground' },
|
|
44
|
-
link: { default: 'bg-transparent text-primary', hover: 'bg-transparent text-primary' },
|
|
45
|
-
'with-icon': { default: 'bg-primary text-primary-foreground', hover: 'bg-primary text-primary-foreground opacity-90' },
|
|
46
|
-
icon: { default: 'border border-border bg-background text-foreground', hover: 'border border-border bg-accent text-accent-foreground' },
|
|
47
|
-
'icon-circle': { default: 'border border-border bg-background text-foreground', hover: 'border border-border bg-accent text-accent-foreground' },
|
|
48
|
-
rounded: { default: 'border border-border bg-background text-foreground', hover: 'border border-border bg-accent text-accent-foreground' },
|
|
49
|
-
loading: { default: 'bg-primary text-primary-foreground opacity-70', hover: 'bg-primary text-primary-foreground opacity-70' }
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
get isDisabled(): boolean {
|
|
53
|
-
return this.disabled || this.loading || this.variant === 'loading';
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
get rootClasses(): string[] {
|
|
57
|
-
const currentState = this.state === 'hover' ? 'hover' : 'default';
|
|
58
|
-
const toneClass = this.toneClassMap[this.variant][currentState];
|
|
59
|
-
|
|
60
|
-
return [
|
|
61
|
-
'inline-flex items-center justify-center gap-2 rounded-[6px] border border-transparent text-[14px] font-medium leading-6 transition-colors outline-none focus:outline-none focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50',
|
|
62
|
-
this.variant === 'link' ? 'px-4 py-2 h-9' : '',
|
|
63
|
-
this.variant === 'icon' ? 'h-8 w-8 p-2' : '',
|
|
64
|
-
this.variant === 'icon-circle' ? 'h-10 w-10 rounded-[96px] p-3' : '',
|
|
65
|
-
this.variant === 'rounded' ? 'h-9 w-9 rounded-full p-0' : '',
|
|
66
|
-
this.variant !== 'icon' && this.variant !== 'icon-circle' && this.variant !== 'rounded'
|
|
67
|
-
? this.size === 'small'
|
|
68
|
-
? 'h-8 px-3'
|
|
69
|
-
: this.size === 'large'
|
|
70
|
-
? 'h-10 px-5'
|
|
71
|
-
: 'h-9 px-4'
|
|
72
|
-
: '',
|
|
73
|
-
this.variant === 'link' && this.state === 'hover' ? 'underline [text-decoration-skip-ink:none]' : '',
|
|
74
|
-
toneClass,
|
|
75
|
-
this.className
|
|
76
|
-
];
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
onClick(event: MouseEvent): void {
|
|
80
|
-
if (!this.isDisabled) {
|
|
81
|
-
this.pressed.emit(event);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<div [ngClass]="['inline-flex items-center gap-2', className]">
|
|
2
|
-
<ng-container [ngSwitch]="variant">
|
|
3
|
-
<ng-container *ngSwitchCase="'orientation'">
|
|
4
|
-
<div class="inline-flex flex-col overflow-hidden rounded-[8px] border border-[#e5e5e5] bg-white shadow-[0px_1px_2px_0px_rgba(0,0,0,0.1)]">
|
|
5
|
-
<button type="button" class="inline-flex h-9 w-9 items-center justify-center border-b border-[#e5e5e5] text-[#0a0a0a]">+</button>
|
|
6
|
-
<button type="button" class="inline-flex h-9 w-9 items-center justify-center text-[#0a0a0a]">-</button>
|
|
7
|
-
</div>
|
|
8
|
-
</ng-container>
|
|
9
|
-
|
|
10
|
-
<ng-container *ngSwitchCase="'separator'">
|
|
11
|
-
<div class="inline-flex overflow-hidden rounded-[8px] border border-[#e5e5e5] bg-[#f5f5f5] shadow-[0px_1px_2px_0px_rgba(0,0,0,0.1)]">
|
|
12
|
-
<button type="button" class="inline-flex h-8 items-center justify-center border-r border-[#e5e5e5] px-3 text-[14px] font-medium leading-5 text-[#0a0a0a]">Copy</button>
|
|
13
|
-
<button type="button" class="inline-flex h-8 items-center justify-center px-3 text-[14px] font-medium leading-5 text-[#0a0a0a]">Paste</button>
|
|
14
|
-
</div>
|
|
15
|
-
</ng-container>
|
|
16
|
-
|
|
17
|
-
<ng-container *ngSwitchCase="'nested'">
|
|
18
|
-
<div class="inline-flex overflow-hidden rounded-[8px] border border-[#e5e5e5] bg-white shadow-[0px_1px_2px_0px_rgba(0,0,0,0.1)]">
|
|
19
|
-
<button *ngFor="let item of ['1', '2', '3', '4', '5']; let last = last" type="button" [ngClass]="['inline-flex h-8 items-center justify-center px-3 text-[14px] font-medium leading-5 text-[#0a0a0a]', !last ? 'border-r border-[#e5e5e5]' : '']">{{ item }}</button>
|
|
20
|
-
</div>
|
|
21
|
-
<div class="inline-flex overflow-hidden rounded-[8px] border border-[#e5e5e5] bg-white shadow-[0px_1px_2px_0px_rgba(0,0,0,0.1)]">
|
|
22
|
-
<button type="button" class="inline-flex h-8 w-8 items-center justify-center border-r border-[#e5e5e5] text-[#0a0a0a]">←</button>
|
|
23
|
-
<button type="button" class="inline-flex h-8 w-8 items-center justify-center text-[#0a0a0a]">→</button>
|
|
24
|
-
</div>
|
|
25
|
-
</ng-container>
|
|
26
|
-
|
|
27
|
-
<ng-container *ngSwitchDefault>
|
|
28
|
-
<div class="inline-flex h-9 w-9 items-center justify-center overflow-hidden rounded-[8px] border border-[#e5e5e5] bg-white shadow-[0px_1px_2px_0px_rgba(0,0,0,0.1)] text-[#0a0a0a]">←</div>
|
|
29
|
-
<div class="inline-flex overflow-hidden rounded-[8px] border border-[#e5e5e5] bg-white shadow-[0px_1px_2px_0px_rgba(0,0,0,0.1)]">
|
|
30
|
-
<button *ngFor="let item of items; let last = last" type="button" [ngClass]="['inline-flex h-9 items-center justify-center px-4 text-[14px] font-medium leading-5 text-[#0a0a0a]', !last ? 'border-r border-[#e5e5e5]' : '']">{{ item }}</button>
|
|
31
|
-
</div>
|
|
32
|
-
<div class="inline-flex overflow-hidden rounded-[8px] border border-[#e5e5e5] bg-white shadow-[0px_1px_2px_0px_rgba(0,0,0,0.1)]">
|
|
33
|
-
<button type="button" class="inline-flex h-9 items-center justify-center border-r border-[#e5e5e5] px-4 text-[14px] font-medium leading-5 text-[#0a0a0a]">Snooze</button>
|
|
34
|
-
<button type="button" class="inline-flex h-9 w-9 items-center justify-center text-[#0a0a0a]">…</button>
|
|
35
|
-
</div>
|
|
36
|
-
</ng-container>
|
|
37
|
-
</ng-container>
|
|
38
|
-
</div>
|
|
39
|
-
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
export type PdmButtonGroupVariant = 'default' | 'orientation' | 'separator' | 'nested';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'pdm-button-group',
|
|
7
|
-
templateUrl: './button-group.component.html',
|
|
8
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
9
|
-
})
|
|
10
|
-
export class PdmButtonGroupComponent {
|
|
11
|
-
@Input() variant: PdmButtonGroupVariant = 'default';
|
|
12
|
-
@Input() items: string[] = ['Archive', 'Report'];
|
|
13
|
-
@Input() className = '';
|
|
14
|
-
}
|
|
15
|
-
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
<section
|
|
2
|
-
[ngClass]="[
|
|
3
|
-
'rounded-[10px] border border-[#e5e5e5] bg-white p-3 shadow-[0px_1px_3px_0px_rgba(0,0,0,0.1)]',
|
|
4
|
-
mode === 'range' ? 'w-[488px]' : 'w-[250px]',
|
|
5
|
-
className
|
|
6
|
-
]"
|
|
7
|
-
>
|
|
8
|
-
<div [ngClass]="['grid gap-4', mode === 'range' ? 'grid-cols-2' : 'grid-cols-1']">
|
|
9
|
-
<div class="space-y-4">
|
|
10
|
-
<header class="flex items-center justify-between">
|
|
11
|
-
<button type="button" class="inline-flex h-8 w-8 items-center justify-center rounded-[6px] text-[#0a0a0a]">‹</button>
|
|
12
|
-
<div [ngClass]="['flex items-center justify-center gap-1', mode === 'range' ? 'w-full' : 'w-[160px]']">
|
|
13
|
-
<ng-container *ngIf="mode === 'single'; else monthText">
|
|
14
|
-
<span class="inline-flex h-8 items-center rounded-[8px] border border-[#e5e5e5] px-2 text-[14px] font-medium leading-5 text-[#0a0a0a] shadow-[0px_1px_2px_0px_rgba(0,0,0,0.1)]">Jun</span>
|
|
15
|
-
<span class="inline-flex h-8 items-center rounded-[8px] border border-[#e5e5e5] px-2 text-[14px] font-medium leading-5 text-[#0a0a0a] shadow-[0px_1px_2px_0px_rgba(0,0,0,0.1)]">2025</span>
|
|
16
|
-
</ng-container>
|
|
17
|
-
<ng-template #monthText>
|
|
18
|
-
<span class="text-[28px] text-[14px] font-medium leading-5 text-[#0a0a0a]">{{ leftMonthName }} {{ year }}</span>
|
|
19
|
-
</ng-template>
|
|
20
|
-
</div>
|
|
21
|
-
<button type="button" class="inline-flex h-8 w-8 items-center justify-center rounded-[6px] text-[#0a0a0a]">{{ mode === 'range' ? '' : '›' }}</button>
|
|
22
|
-
</header>
|
|
23
|
-
|
|
24
|
-
<div>
|
|
25
|
-
<div class="grid grid-cols-7">
|
|
26
|
-
<span *ngFor="let day of weekdays" class="inline-flex h-[21px] items-center justify-center text-[12px] font-normal leading-4 text-[#737373]">{{ day }}</span>
|
|
27
|
-
</div>
|
|
28
|
-
<div class="mt-2 grid grid-cols-7 gap-y-2">
|
|
29
|
-
<button
|
|
30
|
-
*ngFor="let cell of leftCells"
|
|
31
|
-
type="button"
|
|
32
|
-
[ngClass]="[
|
|
33
|
-
'inline-flex h-8 w-8 items-center justify-center rounded-[8px] text-[14px] font-normal leading-5',
|
|
34
|
-
cell.outside ? 'text-[#0a0a0a] opacity-50' : 'text-[#0a0a0a]',
|
|
35
|
-
cell.inRange ? 'bg-[#f5f5f5]' : '',
|
|
36
|
-
cell.selected ? 'bg-[#171717] text-[#fafafa]' : ''
|
|
37
|
-
]"
|
|
38
|
-
>
|
|
39
|
-
{{ cell.day }}
|
|
40
|
-
</button>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
<div *ngIf="mode === 'range'" class="space-y-4">
|
|
46
|
-
<header class="flex items-center justify-between">
|
|
47
|
-
<span class="text-[14px] font-medium leading-5 text-[#0a0a0a]">{{ rightMonthName }} {{ month === 12 ? year + 1 : year }}</span>
|
|
48
|
-
<button type="button" class="inline-flex h-8 w-8 items-center justify-center rounded-[6px] text-[#0a0a0a]">›</button>
|
|
49
|
-
</header>
|
|
50
|
-
|
|
51
|
-
<div>
|
|
52
|
-
<div class="grid grid-cols-7">
|
|
53
|
-
<span *ngFor="let day of weekdays" class="inline-flex h-[21px] items-center justify-center text-[12px] font-normal leading-4 text-[#737373]">{{ day }}</span>
|
|
54
|
-
</div>
|
|
55
|
-
<div class="mt-2 grid grid-cols-7 gap-y-2">
|
|
56
|
-
<button
|
|
57
|
-
*ngFor="let cell of rightCells"
|
|
58
|
-
type="button"
|
|
59
|
-
[ngClass]="[
|
|
60
|
-
'inline-flex h-8 w-8 items-center justify-center rounded-[8px] text-[14px] font-normal leading-5',
|
|
61
|
-
cell.outside ? 'text-[#0a0a0a] opacity-50' : 'text-[#0a0a0a]',
|
|
62
|
-
cell.inRange ? 'bg-[#f5f5f5]' : '',
|
|
63
|
-
cell.selected ? 'bg-[#171717] text-[#fafafa]' : ''
|
|
64
|
-
]"
|
|
65
|
-
>
|
|
66
|
-
{{ cell.day }}
|
|
67
|
-
</button>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
</section>
|
|
73
|
-
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
export type PdmCalendarMode = 'single' | 'range';
|
|
4
|
-
|
|
5
|
-
interface CalendarCell {
|
|
6
|
-
date: Date;
|
|
7
|
-
day: number;
|
|
8
|
-
outside: boolean;
|
|
9
|
-
selected: boolean;
|
|
10
|
-
inRange: boolean;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@Component({
|
|
14
|
-
selector: 'pdm-calendar',
|
|
15
|
-
templateUrl: './calendar.component.html',
|
|
16
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
17
|
-
})
|
|
18
|
-
export class PdmCalendarComponent {
|
|
19
|
-
@Input() mode: PdmCalendarMode = 'single';
|
|
20
|
-
@Input() month = 6;
|
|
21
|
-
@Input() year = 2025;
|
|
22
|
-
@Input() selectedDay = 25;
|
|
23
|
-
@Input() rangeStartDay = 25;
|
|
24
|
-
@Input() rangeEndDay = 9;
|
|
25
|
-
@Input() className = '';
|
|
26
|
-
|
|
27
|
-
readonly weekdays = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
|
|
28
|
-
|
|
29
|
-
get leftMonthName(): string {
|
|
30
|
-
return this.monthName(this.month - 1);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
get rightMonthName(): string {
|
|
34
|
-
const rightMonth = this.month % 12;
|
|
35
|
-
return this.monthName(rightMonth);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
get leftCells(): CalendarCell[] {
|
|
39
|
-
return this.buildMonthCells(this.year, this.month - 1, this.selectedDay, this.mode === 'range' ? this.rangeStartDay : undefined, this.mode === 'range' ? 31 : undefined);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
get rightCells(): CalendarCell[] {
|
|
43
|
-
const rightMonth = this.month % 12;
|
|
44
|
-
const rightYear = this.month === 12 ? this.year + 1 : this.year;
|
|
45
|
-
return this.buildMonthCells(rightYear, rightMonth, this.mode === 'range' ? this.rangeEndDay : undefined, 1, this.mode === 'range' ? this.rangeEndDay : undefined);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
private monthName(monthIndex: number): string {
|
|
49
|
-
const safe = ((monthIndex % 12) + 12) % 12;
|
|
50
|
-
return new Date(this.year, safe, 1).toLocaleString('en-US', { month: 'long' });
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
private buildMonthCells(
|
|
54
|
-
year: number,
|
|
55
|
-
monthIndex: number,
|
|
56
|
-
selectedDay?: number,
|
|
57
|
-
rangeStartDay?: number,
|
|
58
|
-
rangeEndDay?: number
|
|
59
|
-
): CalendarCell[] {
|
|
60
|
-
const firstDay = new Date(year, monthIndex, 1);
|
|
61
|
-
const startWeekday = firstDay.getDay();
|
|
62
|
-
const daysInMonth = new Date(year, monthIndex + 1, 0).getDate();
|
|
63
|
-
const cells: CalendarCell[] = [];
|
|
64
|
-
|
|
65
|
-
for (let i = 0; i < 42; i += 1) {
|
|
66
|
-
const dayNumber = i - startWeekday + 1;
|
|
67
|
-
const date = new Date(year, monthIndex, dayNumber);
|
|
68
|
-
const outside = dayNumber < 1 || dayNumber > daysInMonth;
|
|
69
|
-
const day = date.getDate();
|
|
70
|
-
const selected = !outside && !!selectedDay && day === selectedDay;
|
|
71
|
-
const inRange = !outside && !!rangeStartDay && !!rangeEndDay && day >= rangeStartDay && day <= rangeEndDay;
|
|
72
|
-
cells.push({ date, day, outside, selected, inRange });
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return cells;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|