{"id":17366739,"url":"https://github.com/criar-art/up-window-angular","last_synced_at":"2025-08-02T14:31:24.775Z","repository":{"id":257826046,"uuid":"872388561","full_name":"criar-art/up-window-angular","owner":"criar-art","description":"UpWindow is an Angular library designed to create dynamic, customizable modals and window-based components for web applications.","archived":false,"fork":false,"pushed_at":"2024-10-24T09:39:09.000Z","size":3124,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-10-25T07:24:56.468Z","etag":null,"topics":["angular","component","hacktoberfest","modal","window"],"latest_commit_sha":null,"homepage":"https://up-window-angular.web.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/criar-art.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-14T10:57:47.000Z","updated_at":"2024-10-24T09:39:12.000Z","dependencies_parsed_at":"2024-10-26T10:50:46.800Z","dependency_job_id":null,"html_url":"https://github.com/criar-art/up-window-angular","commit_stats":{"total_commits":161,"total_committers":1,"mean_commits":161.0,"dds":0.0,"last_synced_commit":"4d9520d9943d01dbd4c8c3b1daffae7502edb2f7"},"previous_names":["criar-art/up-window-angular"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/criar-art%2Fup-window-angular","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/criar-art%2Fup-window-angular/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/criar-art%2Fup-window-angular/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/criar-art%2Fup-window-angular/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/criar-art","download_url":"https://codeload.github.com/criar-art/up-window-angular/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228480083,"owners_count":17926866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","component","hacktoberfest","modal","window"],"created_at":"2024-10-15T22:04:35.506Z","updated_at":"2024-12-06T14:41:40.892Z","avatar_url":"https://github.com/criar-art.png","language":"TypeScript","funding_links":[],"categories":["Third Party Components"],"sub_categories":["Modals"],"readme":"# up-window-angular\n\nAn Angular library designed to create dynamic, customizable windows and window-based components for web applications. With a simple and intuitive API, UpWindow enables developers to easily integrate responsive windows, popups, floating windows, and drawers into their projects. It provides full control over window size, position, animations, and behavior, offering a flexible solution for creating engaging user interfaces.\n\n## Install\n\n```bash\nnpm install up-window-angular\n```\n\n### Usage Example\n\n```typescript\nimport { Component } from '@angular/core';\nimport { signal, WritableSignal } from 'signals';\nimport UpWindowAngularModule from 'up-window-angular';\n\n@Component({\n  selector: 'app-window-example',\n  templateUrl: './window-example.component.html',\n})\nexport class WindowExampleComponent {\n  isWindowOpenExample: WritableSignal\u003cboolean\u003e = signal(false);\n\n  openWindowExample() {\n    this.isWindowOpenExample.set(true);\n  }\n}\n```\n\n### HTML Template\n\n```html\n\u003cbutton class=\"button-window-example\" type=\"button\" (click)=\"openWindowExample()\"\u003e\n  Open Window Example\n\u003c/button\u003e\n\n\u003cup-window-angular\n  [isOpen]=\"isWindowOpenExample\"\n  title=\"Window Title\"\n  subtitle=\"This is the subtitle of the window.\"\n\u003e\n  Window Example content!\n\u003c/up-window-angular\u003e\n```\n\n### Component Setup\n\n- In the `WindowExampleComponent`, a `WritableSignal\u003cboolean\u003e` named `isWindowOpenExample` is defined, initialized to `false`.\n- The `openWindowExample` method sets `isWindowOpenExample` to `true`, which opens the window.\n\n### Inputs\n\n- **`@Input() title!: string;`**\n   - Example: Set the title of the window.\n   ```html\n   \u003cup-window-angular title=\"My Custom Title\" /\u003e\n   ```\n\n- **`@Input() subtitle!: string;`**\n   - Example: Set the subtitle of the window.\n   ```html\n   \u003cup-window-angular subtitle=\"This is a custom subtitle\" /\u003e\n   ```\n\n- **`@Input() class: string | undefined;`**\n   - Example: Add custom CSS classes.\n   ```html\n   \u003cup-window-angular class=\"custom-window-class\" /\u003e\n   ```\n\n- **`@Input() isOpen: WritableSignal\u003cboolean\u003e = signal(false);`**\n   - Example: Control the visibility of the window.\n   ```typescript\n   this.isWindowOpenExample.set(true); // Opens the window\n   ```\n\n- **`@Input() animation: string = 'fade';`**\n   - Example: Set a different animation type.\n   ```html\n   \u003cup-window-angular animation=\"slide\" /\u003e\n   ```\n\n- **`@Input() restrictMode: boolean = false;`**\n   - Example: Enable restricted mode.\n   ```html\n   \u003cup-window-angular restrictMode=\"true\" /\u003e\n   ```\n\n- **`@Input() fullScreen: boolean = false;`**\n   - Example: Enable fullscreen mode for the window.\n   ```html\n   \u003cup-window-angular [fullScreen]=\"true\" /\u003e\n   ```\n\n- **`@Input() drawer: 'left' | 'right' | 'top' | 'bottom' = 'left';`**\n   - Example: Set the position of the drawer when in drawer mode.\n   ```html\n   \u003cup-window-angular drawer=\"right\" /\u003e\n   ```\n\n- **`@Input() confirmText: string = 'Confirm';`**\n   - Example: Customize the confirm button text.\n   ```html\n   \u003cup-window-angular confirmText=\"Agree\" /\u003e\n   ```\n\n- **`@Input() cancelText: string = 'Cancel';`**\n   - Example: Customize the cancel button text.\n   ```html\n   \u003cup-window-angular cancelText=\"Dismiss\" /\u003e\n   ```\n\n- **`@Input() confirmType: string = 'primary';`**\n   - Example: Set the style of the confirm button.\n   ```html\n   \u003cup-window-angular confirmType=\"success\" /\u003e\n   ```\n\n- **`@Input() cancelType: string = 'default';`**\n   - Example: Set the style of the cancel button.\n   ```html\n   \u003cup-window-angular cancelType=\"danger\" /\u003e\n   ```\n\n- **`@Input() buttonAlignment: 'start' | 'end' | 'center' = 'end';`**\n   - Example: Align the buttons to the center.\n   ```html\n   \u003cup-window-angular buttonAlignment=\"center\" /\u003e\n   ```\n\n- **`@Input() onConfirmClick: () =\u003e void = () =\u003e this.onConfirm();`**\n   - Example: Custom confirm action.\n   ```typescript\n   onConfirm() {\n     console.log('Confirmed!');\n   }\n   ```\n\n- **`@Input() onCancelClick: () =\u003e void = () =\u003e this.onCancel();`**\n   - Example: Custom cancel action.\n   ```typescript\n   onCancel() {\n     console.log('Cancelled!');\n   }\n   ```\n\n- **`@Input() hiddenActions: boolean = false;`**\n   - Example: Control the visibility of action buttons (confirm and cancel). When set to `true`, the action buttons will not be displayed.\n   ```html\n   \u003cup-window-angular [hiddenActions]=\"true\" /\u003e\n   ```\n\n- **`@Input() blur: boolean = false;`**\n   - Example: Enable blur effect for the window.\n   ```html\n   \u003cup-window-angular [blur]=\"true\" /\u003e\n   ```\n\n- **`@Input() grayscale: boolean = false;`**\n   - Example: Enable grayscale effect for the window.\n   ```html\n   \u003cup-window-angular [grayscale]=\"true\" /\u003e\n   ```\n\n### Outputs\n\n- **`@Output() confirm = new EventEmitter\u003cvoid\u003e();`**\n   - Example: Emit an event when confirm is clicked.\n   ```typescript\n   this.confirm.subscribe(() =\u003e {\n     console.log('Confirmed action triggered');\n   });\n   ```\n\n- **`@Output() cancel = new EventEmitter\u003cvoid\u003e();`**\n   - Example: Emit an event when cancel is clicked.\n   ```typescript\n   this.cancel.subscribe(() =\u003e {\n     console.log('Cancel action triggered');\n   });\n   ```\n\n### ng-content for Custom Footer\n\nYou can project custom content into the footer of the `up-window-angular` component using `ng-template`. This allows for more flexible designs in your window. Here’s how to use it:\n\n#### Example of Custom Footer\n\n```html\n\u003cup-window-angular\n  [isOpen]=\"isWindowOpenExample\"\n  title=\"Window Title\"\n  subtitle=\"This is the subtitle of the window.\"\n\u003e\n  Window Example content!\n\n  \u003cng-template footer\u003e\n    \u003cbutton class=\"custom-btn\" (click)=\"isWindowOpenExample.set(false)\"\u003e\n      Close\n    \u003c/button\u003e\n    \u003cspan\u003eCustom footer content!\u003c/span\u003e\n  \u003c/ng-template\u003e\n\u003c/up-window-angular\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcriar-art%2Fup-window-angular","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcriar-art%2Fup-window-angular","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcriar-art%2Fup-window-angular/lists"}