hopesf-angular-dev-utils 1.0.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/LICENSE +21 -0
- package/README.md +60 -0
- package/esm2022/hopesf-angular-dev-utils.mjs +5 -0
- package/esm2022/lib/components/button/button.component.mjs +68 -0
- package/esm2022/lib/components/card/card.component.mjs +78 -0
- package/esm2022/lib/components/input/input.component.mjs +141 -0
- package/esm2022/lib/components/modal/modal.component.mjs +102 -0
- package/esm2022/lib/components/spinner/spinner.component.mjs +44 -0
- package/esm2022/lib/components/table/table.component.mjs +240 -0
- package/esm2022/lib/models/types.mjs +2 -0
- package/esm2022/lib/services/modal.service.mjs +102 -0
- package/esm2022/public-api.mjs +15 -0
- package/fesm2022/hopesf-angular-dev-utils.mjs +765 -0
- package/fesm2022/hopesf-angular-dev-utils.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/button/button.component.d.ts +16 -0
- package/lib/components/card/card.component.d.ts +12 -0
- package/lib/components/input/input.component.d.ts +27 -0
- package/lib/components/modal/modal.component.d.ts +17 -0
- package/lib/components/spinner/spinner.component.d.ts +11 -0
- package/lib/components/table/table.component.d.ts +29 -0
- package/lib/models/types.d.ts +27 -0
- package/lib/services/modal.service.d.ts +21 -0
- package/package.json +49 -0
- package/public-api.d.ts +8 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hopesf-angular-dev-utils.mjs","sources":["../../../src/lib/components/button/button.component.ts","../../../src/lib/components/input/input.component.ts","../../../src/lib/components/card/card.component.ts","../../../src/lib/components/modal/modal.component.ts","../../../src/lib/components/table/table.component.ts","../../../src/lib/components/spinner/spinner.component.ts","../../../src/lib/services/modal.service.ts","../../../src/public-api.ts","../../../src/hopesf-angular-dev-utils.ts"],"sourcesContent":["import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ButtonVariant, ButtonSize } from '../../models/types';\n\n@Component({\n selector: 'adu-button',\n standalone: true,\n imports: [CommonModule],\n template: `\n <button\n [type]=\"type\"\n [disabled]=\"disabled || loading\"\n [class]=\"buttonClasses\"\n (click)=\"handleClick($event)\"\n >\n <span *ngIf=\"loading\" class=\"adu-button-spinner\"></span>\n <ng-content></ng-content>\n </button>\n `,\n styles: [`\n .adu-button {\n @apply inline-flex items-center justify-center gap-2 font-medium rounded-lg transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed;\n }\n\n /* Variants */\n .adu-button-primary {\n @apply bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500;\n }\n\n .adu-button-secondary {\n @apply bg-gray-600 text-white hover:bg-gray-700 focus:ring-gray-500;\n }\n\n .adu-button-success {\n @apply bg-green-600 text-white hover:bg-green-700 focus:ring-green-500;\n }\n\n .adu-button-danger {\n @apply bg-red-600 text-white hover:bg-red-700 focus:ring-red-500;\n }\n\n .adu-button-warning {\n @apply bg-yellow-500 text-white hover:bg-yellow-600 focus:ring-yellow-500;\n }\n\n .adu-button-ghost {\n @apply bg-transparent text-gray-700 hover:bg-gray-100 focus:ring-gray-500 border border-gray-300;\n }\n\n /* Sizes */\n .adu-button-sm {\n @apply px-3 py-1.5 text-sm;\n }\n\n .adu-button-md {\n @apply px-4 py-2 text-base;\n }\n\n .adu-button-lg {\n @apply px-6 py-3 text-lg;\n }\n\n /* Loading Spinner */\n .adu-button-spinner {\n @apply inline-block w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin;\n }\n `]\n})\nexport class ButtonComponent {\n @Input() variant: ButtonVariant = 'primary';\n @Input() size: ButtonSize = 'md';\n @Input() type: 'button' | 'submit' | 'reset' = 'button';\n @Input() disabled = false;\n @Input() loading = false;\n @Input() fullWidth = false;\n\n @Output() clicked = new EventEmitter<MouseEvent>();\n\n get buttonClasses(): string {\n const classes = ['adu-button', `adu-button-${this.variant}`, `adu-button-${this.size}`];\n \n if (this.fullWidth) {\n classes.push('w-full');\n }\n\n return classes.join(' ');\n }\n\n handleClick(event: MouseEvent): void {\n if (!this.disabled && !this.loading) {\n this.clicked.emit(event);\n }\n }\n}\n","import { Component, Input, forwardRef } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { InputType, InputSize } from '../../models/types';\n\n@Component({\n selector: 'adu-input',\n standalone: true,\n imports: [CommonModule],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => InputComponent),\n multi: true\n }\n ],\n template: `\n <div class=\"adu-input-wrapper\">\n <label *ngIf=\"label\" [for]=\"id\" class=\"adu-input-label\">\n {{ label }}\n <span *ngIf=\"required\" class=\"text-red-500\">*</span>\n </label>\n \n <div class=\"relative\">\n <input\n [id]=\"id\"\n [type]=\"type\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [value]=\"value\"\n [class]=\"inputClasses\"\n (input)=\"onInputChange($event)\"\n (blur)=\"onTouched()\"\n />\n <span *ngIf=\"icon\" class=\"adu-input-icon\">{{ icon }}</span>\n </div>\n\n <p *ngIf=\"error\" class=\"adu-input-error\">{{ error }}</p>\n <p *ngIf=\"hint && !error\" class=\"adu-input-hint\">{{ hint }}</p>\n </div>\n `,\n styles: [`\n .adu-input-wrapper {\n @apply w-full;\n }\n\n .adu-input-label {\n @apply block text-sm font-medium text-gray-700 mb-1;\n }\n\n .adu-input {\n @apply w-full rounded-lg border border-gray-300 bg-white text-gray-900 transition-colors duration-200;\n @apply focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent;\n @apply disabled:bg-gray-100 disabled:cursor-not-allowed;\n @apply placeholder:text-gray-400;\n }\n\n .adu-input-sm {\n @apply px-3 py-1.5 text-sm;\n }\n\n .adu-input-md {\n @apply px-4 py-2 text-base;\n }\n\n .adu-input-lg {\n @apply px-5 py-3 text-lg;\n }\n\n .adu-input-error-state {\n @apply border-red-500 focus:ring-red-500;\n }\n\n .adu-input-icon {\n @apply absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 pointer-events-none;\n }\n\n .adu-input-error {\n @apply mt-1 text-sm text-red-600;\n }\n\n .adu-input-hint {\n @apply mt-1 text-sm text-gray-500;\n }\n `]\n})\nexport class InputComponent implements ControlValueAccessor {\n @Input() id = `adu-input-${Math.random().toString(36).substr(2, 9)}`;\n @Input() label = '';\n @Input() type: InputType = 'text';\n @Input() placeholder = '';\n @Input() size: InputSize = 'md';\n @Input() disabled = false;\n @Input() readonly = false;\n @Input() required = false;\n @Input() error = '';\n @Input() hint = '';\n @Input() icon = '';\n\n value = '';\n onChange: (value: string) => void = () => {};\n onTouched: () => void = () => {};\n\n get inputClasses(): string {\n const classes = ['adu-input', `adu-input-${this.size}`];\n \n if (this.error) {\n classes.push('adu-input-error-state');\n }\n\n if (this.icon) {\n classes.push('pr-10');\n }\n\n return classes.join(' ');\n }\n\n onInputChange(event: Event): void {\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n this.onChange(this.value);\n }\n\n writeValue(value: string): void {\n this.value = value || '';\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n}\n","import { Component, Input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'adu-card',\n standalone: true,\n imports: [CommonModule],\n template: `\n <div [class]=\"cardClasses\">\n <div *ngIf=\"hasHeader\" class=\"adu-card-header\">\n <ng-content select=\"[card-header]\"></ng-content>\n </div>\n \n <div class=\"adu-card-body\">\n <ng-content></ng-content>\n </div>\n \n <div *ngIf=\"hasFooter\" class=\"adu-card-footer\">\n <ng-content select=\"[card-footer]\"></ng-content>\n </div>\n </div>\n `,\n styles: [`\n .adu-card {\n @apply bg-white rounded-lg border border-gray-200 overflow-hidden transition-shadow duration-200;\n }\n\n .adu-card-hoverable:hover {\n @apply shadow-lg;\n }\n\n .adu-card-shadow-sm {\n @apply shadow-sm;\n }\n\n .adu-card-shadow-md {\n @apply shadow-md;\n }\n\n .adu-card-shadow-lg {\n @apply shadow-lg;\n }\n\n .adu-card-shadow-xl {\n @apply shadow-xl;\n }\n\n .adu-card-header {\n @apply px-6 py-4 border-b border-gray-200 bg-gray-50;\n }\n\n .adu-card-body {\n @apply px-6 py-4;\n }\n\n .adu-card-body-compact {\n @apply px-4 py-3;\n }\n\n .adu-card-body-spacious {\n @apply px-8 py-6;\n }\n\n .adu-card-footer {\n @apply px-6 py-4 border-t border-gray-200 bg-gray-50;\n }\n `]\n})\nexport class CardComponent {\n @Input() shadow: 'none' | 'sm' | 'md' | 'lg' | 'xl' = 'sm';\n @Input() hoverable = false;\n @Input() padding: 'compact' | 'normal' | 'spacious' = 'normal';\n @Input() hasHeader = false;\n @Input() hasFooter = false;\n\n get cardClasses(): string {\n const classes = ['adu-card'];\n\n if (this.shadow !== 'none') {\n classes.push(`adu-card-shadow-${this.shadow}`);\n }\n\n if (this.hoverable) {\n classes.push('adu-card-hoverable');\n }\n\n return classes.join(' ');\n }\n\n get bodyClasses(): string {\n const classes = ['adu-card-body'];\n\n if (this.padding === 'compact') {\n classes.push('adu-card-body-compact');\n } else if (this.padding === 'spacious') {\n classes.push('adu-card-body-spacious');\n }\n\n return classes.join(' ');\n }\n}\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'adu-modal',\n standalone: true,\n imports: [CommonModule],\n template: `\n <div class=\"adu-modal-wrapper\" *ngIf=\"isOpen\" (click)=\"onBackdropClick()\">\n <div [class]=\"modalClasses\" (click)=\"$event.stopPropagation()\">\n <button \n *ngIf=\"showCloseButton\"\n class=\"adu-modal-close\" \n (click)=\"close()\"\n aria-label=\"Close modal\"\n >\n ×\n </button>\n\n <div *ngIf=\"title\" class=\"adu-modal-title\">\n {{ title }}\n </div>\n\n <div class=\"adu-modal-body\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"hasFooter\" class=\"adu-modal-footer\">\n <ng-content select=\"[modal-footer]\"></ng-content>\n </div>\n </div>\n </div>\n `,\n styles: [`\n .adu-modal-wrapper {\n @apply fixed inset-0 z-50 flex items-center justify-center p-4 bg-black bg-opacity-50 animate-fadeIn;\n }\n\n .adu-modal-content {\n @apply relative bg-white rounded-lg shadow-xl animate-slideUp max-h-[90vh] overflow-y-auto;\n }\n\n .adu-modal-sm {\n @apply w-full max-w-sm;\n }\n\n .adu-modal-md {\n @apply w-full max-w-md;\n }\n\n .adu-modal-lg {\n @apply w-full max-w-2xl;\n }\n\n .adu-modal-xl {\n @apply w-full max-w-4xl;\n }\n\n .adu-modal-full {\n @apply w-full h-full max-w-none rounded-none;\n }\n\n .adu-modal-close {\n @apply absolute top-4 right-4 text-gray-400 hover:text-gray-600 text-3xl font-light leading-none transition-colors;\n @apply w-8 h-8 flex items-center justify-center;\n }\n\n .adu-modal-title {\n @apply px-6 py-4 text-xl font-semibold text-gray-900 border-b border-gray-200;\n }\n\n .adu-modal-body {\n @apply px-6 py-4;\n }\n\n .adu-modal-footer {\n @apply px-6 py-4 border-t border-gray-200 bg-gray-50 flex justify-end gap-2;\n }\n\n @keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n\n @keyframes slideUp {\n from {\n opacity: 0;\n transform: translateY(20px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n .animate-fadeIn {\n animation: fadeIn 0.2s ease-out;\n }\n\n .animate-slideUp {\n animation: slideUp 0.3s ease-out;\n }\n `]\n})\nexport class ModalComponent {\n @Input() isOpen = false;\n @Input() title = '';\n @Input() size: 'sm' | 'md' | 'lg' | 'xl' | 'full' = 'md';\n @Input() closeOnBackdrop = true;\n @Input() showCloseButton = true;\n @Input() hasFooter = false;\n\n @Output() isOpenChange = new EventEmitter<boolean>();\n @Output() closed = new EventEmitter<void>();\n\n get modalClasses(): string {\n return ['adu-modal-content', `adu-modal-${this.size}`].join(' ');\n }\n\n close(): void {\n this.isOpen = false;\n this.isOpenChange.emit(false);\n this.closed.emit();\n }\n\n onBackdropClick(): void {\n if (this.closeOnBackdrop) {\n this.close();\n }\n }\n}\n","import { Component, Input, Output, EventEmitter, ContentChild, TemplateRef } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TableColumn, TableConfig } from '../../models/types';\n\n@Component({\n selector: 'adu-table',\n standalone: true,\n imports: [CommonModule],\n template: `\n <div class=\"adu-table-container\">\n <table class=\"adu-table\" [class.adu-table-striped]=\"config.striped\" [class.adu-table-hoverable]=\"config.hoverable\">\n <thead class=\"adu-table-header\">\n <tr>\n <th \n *ngFor=\"let column of columns\"\n [style.width]=\"column.width\"\n [class.adu-table-sortable]=\"column.sortable && config.sortable\"\n (click)=\"onSort(column)\"\n class=\"adu-table-th\"\n >\n <div class=\"flex items-center justify-between\">\n <span>{{ column.label }}</span>\n <span *ngIf=\"column.sortable && config.sortable\" class=\"adu-table-sort-icon\">\n <span *ngIf=\"sortColumn === column.key\">\n {{ sortDirection === 'asc' ? '↑' : '↓' }}\n </span>\n <span *ngIf=\"sortColumn !== column.key\" class=\"text-gray-300\">↕</span>\n </span>\n </div>\n </th>\n </tr>\n </thead>\n <tbody class=\"adu-table-body\">\n <tr *ngFor=\"let row of paginatedData; let i = index\" class=\"adu-table-row\">\n <td *ngFor=\"let column of columns\" class=\"adu-table-td\">\n <ng-container *ngIf=\"cellTemplate; else defaultCell\">\n <ng-container *ngTemplateOutlet=\"cellTemplate; context: { $implicit: row, column: column }\"></ng-container>\n </ng-container>\n <ng-template #defaultCell>\n {{ getCellValue(row, column) }}\n </ng-template>\n </td>\n </tr>\n <tr *ngIf=\"paginatedData.length === 0\" class=\"adu-table-empty\">\n <td [attr.colspan]=\"columns.length\" class=\"text-center py-8 text-gray-500\">\n <ng-content select=\"[empty-state]\"></ng-content>\n <span *ngIf=\"!hasEmptyState\">No data available</span>\n </td>\n </tr>\n </tbody>\n </table>\n\n <!-- Pagination -->\n <div *ngIf=\"config.pageable && totalPages > 1\" class=\"adu-table-pagination\">\n <button \n class=\"adu-pagination-btn\" \n [disabled]=\"currentPage === 1\"\n (click)=\"goToPage(currentPage - 1)\"\n >\n Previous\n </button>\n\n <div class=\"adu-pagination-info\">\n Page {{ currentPage }} of {{ totalPages }}\n </div>\n\n <button \n class=\"adu-pagination-btn\"\n [disabled]=\"currentPage === totalPages\"\n (click)=\"goToPage(currentPage + 1)\"\n >\n Next\n </button>\n </div>\n </div>\n `,\n styles: [`\n .adu-table-container {\n @apply w-full overflow-x-auto bg-white rounded-lg border border-gray-200;\n }\n\n .adu-table {\n @apply w-full border-collapse;\n }\n\n .adu-table-header {\n @apply bg-gray-50 border-b border-gray-200;\n }\n\n .adu-table-th {\n @apply px-6 py-3 text-left text-xs font-medium text-gray-700 uppercase tracking-wider;\n }\n\n .adu-table-sortable {\n @apply cursor-pointer hover:bg-gray-100 transition-colors;\n }\n\n .adu-table-sort-icon {\n @apply ml-2 inline-block;\n }\n\n .adu-table-body {\n @apply divide-y divide-gray-200;\n }\n\n .adu-table-row {\n @apply transition-colors;\n }\n\n .adu-table-striped .adu-table-row:nth-child(even) {\n @apply bg-gray-50;\n }\n\n .adu-table-hoverable .adu-table-row:hover {\n @apply bg-blue-50;\n }\n\n .adu-table-td {\n @apply px-6 py-4 text-sm text-gray-900;\n }\n\n .adu-table-empty {\n @apply bg-gray-50;\n }\n\n .adu-table-pagination {\n @apply flex items-center justify-between px-6 py-3 border-t border-gray-200 bg-gray-50;\n }\n\n .adu-pagination-btn {\n @apply px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md;\n @apply hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors;\n }\n\n .adu-pagination-info {\n @apply text-sm text-gray-700;\n }\n `]\n})\nexport class TableComponent<T = any> {\n @Input() data: T[] = [];\n @Input() columns: TableColumn<T>[] = [];\n @Input() config: TableConfig = {\n sortable: true,\n pageable: true,\n pageSize: 10,\n striped: true,\n hoverable: true\n };\n\n @ContentChild('cellTemplate') cellTemplate?: TemplateRef<any>;\n @Output() rowClicked = new EventEmitter<T>();\n @Output() sortChanged = new EventEmitter<{ column: string; direction: 'asc' | 'desc' }>();\n\n sortColumn = '';\n sortDirection: 'asc' | 'desc' = 'asc';\n currentPage = 1;\n hasEmptyState = false;\n\n ngOnInit() {\n this.config = { ...this.getDefaultConfig(), ...this.config };\n }\n\n get sortedData(): T[] {\n if (!this.config.sortable || !this.sortColumn) {\n return this.data;\n }\n\n return [...this.data].sort((a, b) => {\n const aVal = this.getNestedValue(a, this.sortColumn);\n const bVal = this.getNestedValue(b, this.sortColumn);\n\n if (aVal < bVal) return this.sortDirection === 'asc' ? -1 : 1;\n if (aVal > bVal) return this.sortDirection === 'asc' ? 1 : -1;\n return 0;\n });\n }\n\n get paginatedData(): T[] {\n if (!this.config.pageable) {\n return this.sortedData;\n }\n\n const start = (this.currentPage - 1) * (this.config.pageSize || 10);\n const end = start + (this.config.pageSize || 10);\n return this.sortedData.slice(start, end);\n }\n\n get totalPages(): number {\n return Math.ceil(this.data.length / (this.config.pageSize || 10));\n }\n\n onSort(column: TableColumn<T>): void {\n if (!column.sortable || !this.config.sortable) return;\n\n if (this.sortColumn === column.key) {\n this.sortDirection = this.sortDirection === 'asc' ? 'desc' : 'asc';\n } else {\n this.sortColumn = column.key;\n this.sortDirection = 'asc';\n }\n\n this.sortChanged.emit({ column: column.key, direction: this.sortDirection });\n }\n\n goToPage(page: number): void {\n if (page >= 1 && page <= this.totalPages) {\n this.currentPage = page;\n }\n }\n\n getCellValue(row: T, column: TableColumn<T>): any {\n if (column.cellTemplate) {\n return column.cellTemplate(row);\n }\n return this.getNestedValue(row, column.key);\n }\n\n private getNestedValue(obj: any, path: string): any {\n return path.split('.').reduce((current, prop) => current?.[prop], obj);\n }\n\n private getDefaultConfig(): TableConfig {\n return {\n sortable: true,\n pageable: true,\n pageSize: 10,\n striped: true,\n hoverable: true\n };\n }\n}\n","import { Component, Input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SpinnerSize, SpinnerColor } from '../../models/types';\n\n@Component({\n selector: 'adu-spinner',\n standalone: true,\n imports: [CommonModule],\n template: `\n <div *ngIf=\"overlay\" class=\"adu-spinner-overlay\">\n <div [class]=\"spinnerClasses\"></div>\n <p *ngIf=\"message\" class=\"adu-spinner-message\">{{ message }}</p>\n </div>\n\n <div *ngIf=\"!overlay\" [class]=\"spinnerClasses\"></div>\n `,\n styles: [`\n .adu-spinner {\n @apply inline-block border-4 border-t-transparent rounded-full animate-spin;\n }\n\n .adu-spinner-sm {\n @apply w-4 h-4 border-2;\n }\n\n .adu-spinner-md {\n @apply w-8 h-8 border-4;\n }\n\n .adu-spinner-lg {\n @apply w-12 h-12 border-4;\n }\n\n .adu-spinner-primary {\n @apply border-blue-600 border-t-transparent;\n }\n\n .adu-spinner-secondary {\n @apply border-gray-600 border-t-transparent;\n }\n\n .adu-spinner-white {\n @apply border-white border-t-transparent;\n }\n\n .adu-spinner-overlay {\n @apply fixed inset-0 bg-black bg-opacity-50 flex flex-col items-center justify-center z-50;\n }\n\n .adu-spinner-message {\n @apply mt-4 text-white text-lg font-medium;\n }\n `]\n})\nexport class SpinnerComponent {\n @Input() size: SpinnerSize = 'md';\n @Input() color: SpinnerColor = 'primary';\n @Input() overlay = false;\n @Input() message = '';\n\n get spinnerClasses(): string {\n return ['adu-spinner', `adu-spinner-${this.size}`, `adu-spinner-${this.color}`].join(' ');\n }\n}\n","import { Injectable, ComponentRef, ApplicationRef, createComponent, EnvironmentInjector, Type } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { ModalConfig } from '../models/types';\n\nexport interface ModalRef<T = any> {\n close: (result?: T) => void;\n afterClosed: () => Subject<T | undefined>;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ModalService {\n private modalComponentRef: ComponentRef<any> | null = null;\n private closeSubject = new Subject<any>();\n\n constructor(\n private appRef: ApplicationRef,\n private injector: EnvironmentInjector\n ) { }\n\n open<T, R = any>(component: Type<T>, config: ModalConfig = {}): ModalRef<R> {\n // Close existing modal if any\n if (this.modalComponentRef) {\n this.close();\n }\n\n // Create modal wrapper\n const modalWrapper = document.createElement('div');\n modalWrapper.className = this.getModalWrapperClasses(config);\n\n // Create backdrop\n const backdrop = document.createElement('div');\n backdrop.className = 'adu-modal-backdrop';\n if (config.closeOnBackdrop !== false) {\n backdrop.onclick = () => this.close();\n }\n\n // Create modal content\n const modalContent = document.createElement('div');\n modalContent.className = this.getModalContentClasses(config);\n modalContent.onclick = (e) => e.stopPropagation();\n\n // Create close button if needed\n if (config.showCloseButton !== false) {\n const closeBtn = document.createElement('button');\n closeBtn.className = 'adu-modal-close';\n closeBtn.innerHTML = '×';\n closeBtn.onclick = () => this.close();\n modalContent.appendChild(closeBtn);\n }\n\n // Add title if provided\n if (config.title) {\n const titleEl = document.createElement('div');\n titleEl.className = 'adu-modal-title';\n titleEl.textContent = config.title;\n modalContent.appendChild(titleEl);\n }\n\n // Create component container\n const componentContainer = document.createElement('div');\n componentContainer.className = 'adu-modal-body';\n modalContent.appendChild(componentContainer);\n\n // Assemble modal\n modalWrapper.appendChild(backdrop);\n modalWrapper.appendChild(modalContent);\n document.body.appendChild(modalWrapper);\n\n // Create and attach component\n this.modalComponentRef = createComponent(component, {\n environmentInjector: this.injector,\n hostElement: componentContainer\n });\n\n this.appRef.attachView(this.modalComponentRef.hostView);\n\n // Handle ESC key\n if (config.closeOnEscape !== false) {\n const escHandler = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n this.close();\n document.removeEventListener('keydown', escHandler);\n }\n };\n document.addEventListener('keydown', escHandler);\n }\n\n return {\n close: (result?: R) => this.close(result),\n afterClosed: () => this.closeSubject as Subject<R | undefined>\n };\n }\n\n close(result?: any): void {\n if (this.modalComponentRef) {\n this.appRef.detachView(this.modalComponentRef.hostView);\n this.modalComponentRef.destroy();\n this.modalComponentRef = null;\n\n // Remove modal from DOM\n const modals = document.querySelectorAll('.adu-modal-wrapper');\n modals.forEach(modal => modal.remove());\n\n this.closeSubject.next(result);\n this.closeSubject.complete();\n this.closeSubject = new Subject<any>();\n }\n }\n\n private getModalWrapperClasses(config: ModalConfig): string {\n return 'adu-modal-wrapper';\n }\n\n private getModalContentClasses(config: ModalConfig): string {\n const size = config.size || 'md';\n return `adu-modal-content adu-modal-${size}`;\n }\n}\n","/*\n * Public API Surface of angular-dev-utils\n */\n\n// Components\nexport * from './lib/components/button/button.component';\nexport * from './lib/components/input/input.component';\nexport * from './lib/components/card/card.component';\nexport * from './lib/components/modal/modal.component';\nexport * from './lib/components/table/table.component';\nexport * from './lib/components/spinner/spinner.component';\n\n// Services\nexport * from './lib/services/modal.service';\n\n// Models & Types\nexport * from './lib/models/types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAoEa,eAAe,CAAA;AAhE5B,IAAA,WAAA,GAAA;QAiEW,IAAA,CAAA,OAAO,GAAkB,SAAS;QAClC,IAAA,CAAA,IAAI,GAAe,IAAI;QACvB,IAAA,CAAA,IAAI,GAAkC,QAAQ;QAC9C,IAAA,CAAA,QAAQ,GAAG,KAAK;QAChB,IAAA,CAAA,OAAO,GAAG,KAAK;QACf,IAAA,CAAA,SAAS,GAAG,KAAK;AAEhB,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,YAAY,EAAc;AAiBnD,IAAA;AAfC,IAAA,IAAI,aAAa,GAAA;AACf,QAAA,MAAM,OAAO,GAAG,CAAC,YAAY,EAAE,cAAc,IAAI,CAAC,OAAO,CAAA,CAAE,EAAE,CAAA,WAAA,EAAc,IAAI,CAAC,IAAI,CAAA,CAAE,CAAC;AAEvF,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAClB,YAAA,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC;QACxB;AAEA,QAAA,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,C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,IAAI,OAAO,EAAO;QACxC;IACF;AAEQ,IAAA,sBAAsB,CAAC,MAAmB,EAAA;AAChD,QAAA,OAAO,mBAAmB;IAC5B;AAEQ,IAAA,sBAAsB,CAAC,MAAmB,EAAA;AAChD,QAAA,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,IAAI;QAChC,OAAO,CAAA,4BAAA,EAA+B,IAAI,CAAA,CAAE;IAC9C;+GA1GW,YAAY,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,cAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAZ,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cAFX,MAAM,EAAA,CAAA,CAAA;;4FAEP,YAAY,EAAA,UAAA,EAAA,CAAA;kBAHxB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACXD;;AAEG;AAEH;;ACJA;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { ButtonVariant, ButtonSize } from '../../models/types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ButtonComponent {
|
|
5
|
+
variant: ButtonVariant;
|
|
6
|
+
size: ButtonSize;
|
|
7
|
+
type: 'button' | 'submit' | 'reset';
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
loading: boolean;
|
|
10
|
+
fullWidth: boolean;
|
|
11
|
+
clicked: EventEmitter<MouseEvent>;
|
|
12
|
+
get buttonClasses(): string;
|
|
13
|
+
handleClick(event: MouseEvent): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "adu-button", never, { "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "type": { "alias": "type"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; }, { "clicked": "clicked"; }, never, ["*"], true, never>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CardComponent {
|
|
3
|
+
shadow: 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
hoverable: boolean;
|
|
5
|
+
padding: 'compact' | 'normal' | 'spacious';
|
|
6
|
+
hasHeader: boolean;
|
|
7
|
+
hasFooter: boolean;
|
|
8
|
+
get cardClasses(): string;
|
|
9
|
+
get bodyClasses(): string;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CardComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CardComponent, "adu-card", never, { "shadow": { "alias": "shadow"; "required": false; }; "hoverable": { "alias": "hoverable"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; "hasHeader": { "alias": "hasHeader"; "required": false; }; "hasFooter": { "alias": "hasFooter"; "required": false; }; }, {}, never, ["[card-header]", "*", "[card-footer]"], true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
2
|
+
import { InputType, InputSize } from '../../models/types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class InputComponent implements ControlValueAccessor {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
type: InputType;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
size: InputSize;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
readonly: boolean;
|
|
12
|
+
required: boolean;
|
|
13
|
+
error: string;
|
|
14
|
+
hint: string;
|
|
15
|
+
icon: string;
|
|
16
|
+
value: string;
|
|
17
|
+
onChange: (value: string) => void;
|
|
18
|
+
onTouched: () => void;
|
|
19
|
+
get inputClasses(): string;
|
|
20
|
+
onInputChange(event: Event): void;
|
|
21
|
+
writeValue(value: string): void;
|
|
22
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
23
|
+
registerOnTouched(fn: () => void): void;
|
|
24
|
+
setDisabledState(isDisabled: boolean): void;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "adu-input", never, { "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; "type": { "alias": "type"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "required": { "alias": "required"; "required": false; }; "error": { "alias": "error"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; }, {}, never, never, true, never>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ModalComponent {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
title: string;
|
|
6
|
+
size: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
7
|
+
closeOnBackdrop: boolean;
|
|
8
|
+
showCloseButton: boolean;
|
|
9
|
+
hasFooter: boolean;
|
|
10
|
+
isOpenChange: EventEmitter<boolean>;
|
|
11
|
+
closed: EventEmitter<void>;
|
|
12
|
+
get modalClasses(): string;
|
|
13
|
+
close(): void;
|
|
14
|
+
onBackdropClick(): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "adu-modal", never, { "isOpen": { "alias": "isOpen"; "required": false; }; "title": { "alias": "title"; "required": false; }; "size": { "alias": "size"; "required": false; }; "closeOnBackdrop": { "alias": "closeOnBackdrop"; "required": false; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; }; "hasFooter": { "alias": "hasFooter"; "required": false; }; }, { "isOpenChange": "isOpenChange"; "closed": "closed"; }, never, ["*", "[modal-footer]"], true, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SpinnerSize, SpinnerColor } from '../../models/types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SpinnerComponent {
|
|
4
|
+
size: SpinnerSize;
|
|
5
|
+
color: SpinnerColor;
|
|
6
|
+
overlay: boolean;
|
|
7
|
+
message: string;
|
|
8
|
+
get spinnerClasses(): string;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpinnerComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpinnerComponent, "adu-spinner", never, { "size": { "alias": "size"; "required": false; }; "color": { "alias": "color"; "required": false; }; "overlay": { "alias": "overlay"; "required": false; }; "message": { "alias": "message"; "required": false; }; }, {}, never, never, true, never>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
|
+
import { TableColumn, TableConfig } from '../../models/types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class TableComponent<T = any> {
|
|
5
|
+
data: T[];
|
|
6
|
+
columns: TableColumn<T>[];
|
|
7
|
+
config: TableConfig;
|
|
8
|
+
cellTemplate?: TemplateRef<any>;
|
|
9
|
+
rowClicked: EventEmitter<T>;
|
|
10
|
+
sortChanged: EventEmitter<{
|
|
11
|
+
column: string;
|
|
12
|
+
direction: 'asc' | 'desc';
|
|
13
|
+
}>;
|
|
14
|
+
sortColumn: string;
|
|
15
|
+
sortDirection: 'asc' | 'desc';
|
|
16
|
+
currentPage: number;
|
|
17
|
+
hasEmptyState: boolean;
|
|
18
|
+
ngOnInit(): void;
|
|
19
|
+
get sortedData(): T[];
|
|
20
|
+
get paginatedData(): T[];
|
|
21
|
+
get totalPages(): number;
|
|
22
|
+
onSort(column: TableColumn<T>): void;
|
|
23
|
+
goToPage(page: number): void;
|
|
24
|
+
getCellValue(row: T, column: TableColumn<T>): any;
|
|
25
|
+
private getNestedValue;
|
|
26
|
+
private getDefaultConfig;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any>, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "adu-table", never, { "data": { "alias": "data"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, { "rowClicked": "rowClicked"; "sortChanged": "sortChanged"; }, ["cellTemplate"], ["[empty-state]"], true, never>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'ghost';
|
|
2
|
+
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export type InputType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
|
|
4
|
+
export type InputSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
export interface TableColumn<T = any> {
|
|
6
|
+
key: string;
|
|
7
|
+
label: string;
|
|
8
|
+
sortable?: boolean;
|
|
9
|
+
width?: string;
|
|
10
|
+
cellTemplate?: (row: T) => string;
|
|
11
|
+
}
|
|
12
|
+
export interface TableConfig {
|
|
13
|
+
sortable?: boolean;
|
|
14
|
+
pageable?: boolean;
|
|
15
|
+
pageSize?: number;
|
|
16
|
+
striped?: boolean;
|
|
17
|
+
hoverable?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface ModalConfig {
|
|
20
|
+
title?: string;
|
|
21
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
22
|
+
closeOnBackdrop?: boolean;
|
|
23
|
+
closeOnEscape?: boolean;
|
|
24
|
+
showCloseButton?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export type SpinnerSize = 'sm' | 'md' | 'lg';
|
|
27
|
+
export type SpinnerColor = 'primary' | 'secondary' | 'white';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ApplicationRef, EnvironmentInjector, Type } from '@angular/core';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import { ModalConfig } from '../models/types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface ModalRef<T = any> {
|
|
6
|
+
close: (result?: T) => void;
|
|
7
|
+
afterClosed: () => Subject<T | undefined>;
|
|
8
|
+
}
|
|
9
|
+
export declare class ModalService {
|
|
10
|
+
private appRef;
|
|
11
|
+
private injector;
|
|
12
|
+
private modalComponentRef;
|
|
13
|
+
private closeSubject;
|
|
14
|
+
constructor(appRef: ApplicationRef, injector: EnvironmentInjector);
|
|
15
|
+
open<T, R = any>(component: Type<T>, config?: ModalConfig): ModalRef<R>;
|
|
16
|
+
close(result?: any): void;
|
|
17
|
+
private getModalWrapperClasses;
|
|
18
|
+
private getModalContentClasses;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
|
|
20
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ModalService>;
|
|
21
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hopesf-angular-dev-utils",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Modern Angular UI component library with Tailwind CSS styling",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"angular",
|
|
7
|
+
"components",
|
|
8
|
+
"ui",
|
|
9
|
+
"tailwind",
|
|
10
|
+
"library",
|
|
11
|
+
"standalone"
|
|
12
|
+
],
|
|
13
|
+
"author": "hopesf",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/hopesf/Dev-Utils.git"
|
|
18
|
+
},
|
|
19
|
+
"homepage": "https://github.com/hopesf/Dev-Utils#readme",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/hopesf/Dev-Utils/issues"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"private": false,
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"@angular/common": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0",
|
|
29
|
+
"@angular/core": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0",
|
|
30
|
+
"@angular/forms": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"tslib": "^2.3.0"
|
|
34
|
+
},
|
|
35
|
+
"module": "fesm2022/hopesf-angular-dev-utils.mjs",
|
|
36
|
+
"typings": "index.d.ts",
|
|
37
|
+
"exports": {
|
|
38
|
+
"./package.json": {
|
|
39
|
+
"default": "./package.json"
|
|
40
|
+
},
|
|
41
|
+
".": {
|
|
42
|
+
"types": "./index.d.ts",
|
|
43
|
+
"esm2022": "./esm2022/hopesf-angular-dev-utils.mjs",
|
|
44
|
+
"esm": "./esm2022/hopesf-angular-dev-utils.mjs",
|
|
45
|
+
"default": "./fesm2022/hopesf-angular-dev-utils.mjs"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"sideEffects": false
|
|
49
|
+
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './lib/components/button/button.component';
|
|
2
|
+
export * from './lib/components/input/input.component';
|
|
3
|
+
export * from './lib/components/card/card.component';
|
|
4
|
+
export * from './lib/components/modal/modal.component';
|
|
5
|
+
export * from './lib/components/table/table.component';
|
|
6
|
+
export * from './lib/components/spinner/spinner.component';
|
|
7
|
+
export * from './lib/services/modal.service';
|
|
8
|
+
export * from './lib/models/types';
|