shirkasoft-ui-components 1.3.7 → 1.3.9
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/README.md +38 -13
- package/fesm2022/shirkasoft-ui-components-button.mjs +2 -2
- package/fesm2022/shirkasoft-ui-components-button.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs +2 -2
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs +90 -9
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-loading.mjs +2 -2
- package/fesm2022/shirkasoft-ui-components-loading.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-modal.mjs +2 -2
- package/fesm2022/shirkasoft-ui-components-modal.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-notification.mjs +2 -2
- package/fesm2022/shirkasoft-ui-components-notification.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-price-input.mjs +2 -2
- package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-select.mjs +2 -2
- package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-table.mjs +198 -12
- package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tabs.mjs +7 -12
- package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tag.mjs +3 -3
- package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-text-field.mjs +2 -2
- package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-toggle.mjs +61 -24
- package/fesm2022/shirkasoft-ui-components-toggle.mjs.map +1 -1
- package/package.json +2 -2
- package/src/theme.css +80 -0
- package/types/shirkasoft-ui-components-date-picker.d.ts +24 -4
- package/types/shirkasoft-ui-components-table.d.ts +86 -9
- package/types/shirkasoft-ui-components-toggle.d.ts +7 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<a href="https://github.com/Ansem13/shirkasoft-ui-components/releases"><img src="https://img.shields.io/npm/v/shirkasoft-ui-components?style=flat&logo=npm&label=version" alt="npm version" /></a>
|
|
5
5
|
<a href="https://github.com/Ansem13/shirkasoft-ui-components/issues"><img src="https://img.shields.io/github/issues/Ansem13/shirkasoft-ui-components?style=flat&logo=github" alt="GitHub issues" /></a>
|
|
6
6
|
<a href="https://github.com/Ansem13/shirkasoft-ui-components"><img src="https://img.shields.io/badge/source-github-181717?style=flat&logo=github" alt="GitHub source" /></a>
|
|
7
|
-
<a href="https://
|
|
7
|
+
<a href="https://ui-library.shirkasoft.com/"><img src="https://img.shields.io/badge/showcase-online-10b981?style=flat&logo=githubpages" alt="Showcase" /></a>
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
10
|
<p align="center">
|
|
@@ -151,11 +151,12 @@ Switch or checkbox. Implements `ControlValueAccessor`.
|
|
|
151
151
|
/>
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
| Input
|
|
155
|
-
|
|
|
156
|
-
| `label`
|
|
157
|
-
| `mode`
|
|
158
|
-
| `checked`
|
|
154
|
+
| Input | Type | Default |
|
|
155
|
+
| ---------- | ------------------------ | ----------- |
|
|
156
|
+
| `label` | `string` | `''` |
|
|
157
|
+
| `mode` | `'toggle' \| 'checkbox'` | `'toggle'` |
|
|
158
|
+
| `checked` | `boolean` | `undefined` |
|
|
159
|
+
| `disabled` | `boolean` | `false` |
|
|
159
160
|
|
|
160
161
|
| Output | Type |
|
|
161
162
|
| --------------- | --------- |
|
|
@@ -393,6 +394,15 @@ interface RowAction {
|
|
|
393
394
|
isDisabled?: (rowData: any) => boolean;
|
|
394
395
|
}
|
|
395
396
|
|
|
397
|
+
interface BulkAction {
|
|
398
|
+
label: string;
|
|
399
|
+
icon?: string;
|
|
400
|
+
onClick: (selectedRows: any[]) => void;
|
|
401
|
+
class?: string;
|
|
402
|
+
isVisible?: (selectedRows: any[]) => boolean;
|
|
403
|
+
isDisabled?: (selectedRows: any[]) => boolean;
|
|
404
|
+
}
|
|
405
|
+
|
|
396
406
|
interface PageChangeEvent {
|
|
397
407
|
first: number;
|
|
398
408
|
rows: number;
|
|
@@ -426,14 +436,29 @@ interface FilterChangeEvent {
|
|
|
426
436
|
| `filters` | `{ label: string; value: string }[]` | `[]` |
|
|
427
437
|
| `activeFilter` | `string` | `''` |
|
|
428
438
|
| `customTemplates` | `{ [key: string]: any }` | `{}` |
|
|
439
|
+
| `selectable` | `boolean` | `false` |
|
|
440
|
+
| `dataKey` | `string` | `'id'` |
|
|
441
|
+
| `isRowSelectable` | `(row: any) => boolean` | `undefined` |
|
|
442
|
+
| `bulkActions` | `BulkAction[]` | `[]` |
|
|
443
|
+
| `selection` | `any[]` (two-way `[(selection)]`) | `[]` |
|
|
444
|
+
|
|
445
|
+
| Output | Type |
|
|
446
|
+
| ----------------- | ------------------- |
|
|
447
|
+
| `pageChange` | `PageChangeEvent` |
|
|
448
|
+
| `filterChange` | `FilterChangeEvent` |
|
|
449
|
+
| `searchChange` | `string` |
|
|
450
|
+
| `filterClick` | `string` |
|
|
451
|
+
| `refresh` | `void` |
|
|
452
|
+
| `selectionChange` | `any[]` |
|
|
453
|
+
|
|
454
|
+
**Row selection.** With `[selectable]="true"` a leading checkbox column is rendered. The header checkbox selects/deselects the rows of the current page (indeterminate when partially selected); selection persists across pages and is keyed by `dataKey`. While rows are selected, `bulkActions` appear in the header and receive the selected rows. In client mode, rows removed from `data` are dropped from the selection automatically (not while `loading` is true, nor while `data` is still empty before the first load); in server mode, reset it via `[(selection)]` or `clearSelection()`. The selection is independent of the global search and column filters: rows hidden by a filter stay selected and are passed to `bulkActions` too.
|
|
455
|
+
|
|
456
|
+
```html
|
|
457
|
+
<shk-table [data]="users()" [columns]="columns" [selectable]="true"
|
|
458
|
+
[bulkActions]="bulkActions" [(selection)]="selectedUsers" />
|
|
459
|
+
```
|
|
429
460
|
|
|
430
|
-
|
|
431
|
-
| -------------- | ------------------- |
|
|
432
|
-
| `pageChange` | `PageChangeEvent` |
|
|
433
|
-
| `filterChange` | `FilterChangeEvent` |
|
|
434
|
-
| `searchChange` | `string` |
|
|
435
|
-
| `filterClick` | `string` |
|
|
436
|
-
| `refresh` | `void` |
|
|
461
|
+
i18n keys used: `table.selected` (`{{count}}`), `table.selectAll`, `table.selectRow` (`{{index}}`), `table.clearSelection`.
|
|
437
462
|
|
|
438
463
|
---
|
|
439
464
|
|
|
@@ -93,7 +93,7 @@ class ButtonComponent {
|
|
|
93
93
|
}
|
|
94
94
|
<ng-content></ng-content>
|
|
95
95
|
</button>
|
|
96
|
-
`, isInline: true, styles: [":host{display:inline-block}.shk-button{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.5rem 1rem;border-radius:.5rem;border:1px solid transparent;font-size:.875rem;font-weight:500;line-height:1.25rem;cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,color .15s ease-in-out,box-shadow .15s ease-in-out,opacity .15s ease-in-out}.shk-button:focus-visible{outline:2px
|
|
96
|
+
`, isInline: true, styles: [":host{display:inline-block}.shk-button{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.5rem 1rem;border-radius:.5rem;border:1px solid transparent;font-size:.875rem;font-weight:500;line-height:1.25rem;cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,color .15s ease-in-out,box-shadow .15s ease-in-out,opacity .15s ease-in-out}.shk-button:focus-visible{outline:none;box-shadow:0 0 0 2px var(--shk-focus-offset, #fff),0 0 0 4px color-mix(in srgb,var(--shk-btn-accent, var(--shk-primary-500)) 55%,transparent)}:host-context(.dark) .shk-button:focus-visible{--shk-focus-offset: var(--shk-surface-50)}.shk-button:active:not(:disabled){transform:translateY(.5px)}.shk-button:disabled{opacity:.55;cursor:not-allowed}.shk-button-icon{width:1rem;height:1rem;flex-shrink:0}.shk-button-primary{--shk-btn-bg: var(--shk-primary-600);--shk-btn-color: #ffffff;--shk-btn-border: var(--shk-primary-600);--shk-btn-accent: var(--shk-primary-600)}.shk-button-secondary{--shk-btn-bg: var(--shk-surface-100);--shk-btn-color: var(--shk-surface-700);--shk-btn-border: var(--shk-surface-200);--shk-btn-accent: var(--shk-surface-600)}.shk-button-success{--shk-btn-bg: var(--shk-success-600);--shk-btn-color: #ffffff;--shk-btn-border: var(--shk-success-600);--shk-btn-accent: var(--shk-success-600)}.shk-button-info{--shk-btn-bg: var(--shk-info-600);--shk-btn-color: #ffffff;--shk-btn-border: var(--shk-info-600);--shk-btn-accent: var(--shk-info-600)}.shk-button-warning{--shk-btn-bg: var(--shk-warning-600);--shk-btn-color: #ffffff;--shk-btn-border: var(--shk-warning-600);--shk-btn-accent: var(--shk-warning-600)}.shk-button-danger{--shk-btn-bg: var(--shk-error-600);--shk-btn-color: #ffffff;--shk-btn-border: var(--shk-error-600);--shk-btn-accent: var(--shk-error-600)}.shk-button-help{--shk-btn-bg: var(--shk-primary-500);--shk-btn-color: #ffffff;--shk-btn-border: var(--shk-primary-500);--shk-btn-accent: var(--shk-primary-500)}.shk-button-contrast{--shk-btn-bg: var(--shk-surface-900);--shk-btn-color: var(--shk-surface-50);--shk-btn-border: var(--shk-surface-900);--shk-btn-accent: var(--shk-surface-900)}.shk-button{background-color:var(--shk-btn-bg);color:var(--shk-btn-color);border-color:var(--shk-btn-border);box-shadow:0 1px 2px #0000000d}.shk-button:hover:not(:disabled){background-color:color-mix(in srgb,var(--shk-btn-bg) 88%,#000000)}.shk-button-outlined,.shk-button-text{background-color:transparent;color:var(--shk-btn-accent);box-shadow:none}.shk-button-outlined{border-color:color-mix(in srgb,var(--shk-btn-accent) 45%,transparent)}:host-context(.dark) .shk-button-outlined,:host-context(.dark) .shk-button-text{--shk-btn-accent-dark: color-mix(in srgb, var(--shk-btn-accent) 65%, #ffffff);color:var(--shk-btn-accent-dark)}:host-context(.dark) .shk-button-outlined{border-color:color-mix(in srgb,var(--shk-btn-accent-dark) 40%,transparent)}.shk-button-text{border-color:transparent}.shk-button-text:hover:not(:disabled),.shk-button-outlined:hover:not(:disabled){background-color:color-mix(in srgb,var(--shk-btn-accent) 10%,transparent)}.shk-button-outlined:hover:not(:disabled){border-color:var(--shk-btn-accent)}.shk-button-raised{box-shadow:0 1px 2px #0000000f,0 4px 8px #0000001a}.shk-button-rounded{border-radius:9999px}.shk-button-sm{padding:.375rem .75rem;font-size:.8125rem}.shk-button-sm .shk-button-icon{width:.875rem;height:.875rem}.shk-button-lg{padding:.75rem 1.5rem;font-size:1rem}.shk-button-lg .shk-button-icon{width:1.25rem;height:1.25rem}.shk-button-icon-only{padding:.5rem}.shk-button-sm.shk-button-icon-only{padding:.375rem}.shk-button-lg.shk-button-icon-only{padding:.75rem}.shk-button-icon-right{flex-direction:row-reverse}.shk-button-icon-top{flex-direction:column}.shk-button-icon-bottom{flex-direction:column-reverse}.shk-button-loading .shk-button-spin{animation:shk-button-spin 1s linear infinite}@keyframes shk-button-spin{to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "component", type: LucideDynamicIcon, selector: "svg[lucideIcon]", inputs: ["lucideIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
97
97
|
}
|
|
98
98
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
99
99
|
type: Component,
|
|
@@ -137,7 +137,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
137
137
|
}
|
|
138
138
|
<ng-content></ng-content>
|
|
139
139
|
</button>
|
|
140
|
-
`, styles: [":host{display:inline-block}.shk-button{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.5rem 1rem;border-radius:.5rem;border:1px solid transparent;font-size:.875rem;font-weight:500;line-height:1.25rem;cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,color .15s ease-in-out,box-shadow .15s ease-in-out,opacity .15s ease-in-out}.shk-button:focus-visible{outline:2px
|
|
140
|
+
`, styles: [":host{display:inline-block}.shk-button{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.5rem 1rem;border-radius:.5rem;border:1px solid transparent;font-size:.875rem;font-weight:500;line-height:1.25rem;cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,color .15s ease-in-out,box-shadow .15s ease-in-out,opacity .15s ease-in-out}.shk-button:focus-visible{outline:none;box-shadow:0 0 0 2px var(--shk-focus-offset, #fff),0 0 0 4px color-mix(in srgb,var(--shk-btn-accent, var(--shk-primary-500)) 55%,transparent)}:host-context(.dark) .shk-button:focus-visible{--shk-focus-offset: var(--shk-surface-50)}.shk-button:active:not(:disabled){transform:translateY(.5px)}.shk-button:disabled{opacity:.55;cursor:not-allowed}.shk-button-icon{width:1rem;height:1rem;flex-shrink:0}.shk-button-primary{--shk-btn-bg: var(--shk-primary-600);--shk-btn-color: #ffffff;--shk-btn-border: var(--shk-primary-600);--shk-btn-accent: var(--shk-primary-600)}.shk-button-secondary{--shk-btn-bg: var(--shk-surface-100);--shk-btn-color: var(--shk-surface-700);--shk-btn-border: var(--shk-surface-200);--shk-btn-accent: var(--shk-surface-600)}.shk-button-success{--shk-btn-bg: var(--shk-success-600);--shk-btn-color: #ffffff;--shk-btn-border: var(--shk-success-600);--shk-btn-accent: var(--shk-success-600)}.shk-button-info{--shk-btn-bg: var(--shk-info-600);--shk-btn-color: #ffffff;--shk-btn-border: var(--shk-info-600);--shk-btn-accent: var(--shk-info-600)}.shk-button-warning{--shk-btn-bg: var(--shk-warning-600);--shk-btn-color: #ffffff;--shk-btn-border: var(--shk-warning-600);--shk-btn-accent: var(--shk-warning-600)}.shk-button-danger{--shk-btn-bg: var(--shk-error-600);--shk-btn-color: #ffffff;--shk-btn-border: var(--shk-error-600);--shk-btn-accent: var(--shk-error-600)}.shk-button-help{--shk-btn-bg: var(--shk-primary-500);--shk-btn-color: #ffffff;--shk-btn-border: var(--shk-primary-500);--shk-btn-accent: var(--shk-primary-500)}.shk-button-contrast{--shk-btn-bg: var(--shk-surface-900);--shk-btn-color: var(--shk-surface-50);--shk-btn-border: var(--shk-surface-900);--shk-btn-accent: var(--shk-surface-900)}.shk-button{background-color:var(--shk-btn-bg);color:var(--shk-btn-color);border-color:var(--shk-btn-border);box-shadow:0 1px 2px #0000000d}.shk-button:hover:not(:disabled){background-color:color-mix(in srgb,var(--shk-btn-bg) 88%,#000000)}.shk-button-outlined,.shk-button-text{background-color:transparent;color:var(--shk-btn-accent);box-shadow:none}.shk-button-outlined{border-color:color-mix(in srgb,var(--shk-btn-accent) 45%,transparent)}:host-context(.dark) .shk-button-outlined,:host-context(.dark) .shk-button-text{--shk-btn-accent-dark: color-mix(in srgb, var(--shk-btn-accent) 65%, #ffffff);color:var(--shk-btn-accent-dark)}:host-context(.dark) .shk-button-outlined{border-color:color-mix(in srgb,var(--shk-btn-accent-dark) 40%,transparent)}.shk-button-text{border-color:transparent}.shk-button-text:hover:not(:disabled),.shk-button-outlined:hover:not(:disabled){background-color:color-mix(in srgb,var(--shk-btn-accent) 10%,transparent)}.shk-button-outlined:hover:not(:disabled){border-color:var(--shk-btn-accent)}.shk-button-raised{box-shadow:0 1px 2px #0000000f,0 4px 8px #0000001a}.shk-button-rounded{border-radius:9999px}.shk-button-sm{padding:.375rem .75rem;font-size:.8125rem}.shk-button-sm .shk-button-icon{width:.875rem;height:.875rem}.shk-button-lg{padding:.75rem 1.5rem;font-size:1rem}.shk-button-lg .shk-button-icon{width:1.25rem;height:1.25rem}.shk-button-icon-only{padding:.5rem}.shk-button-sm.shk-button-icon-only{padding:.375rem}.shk-button-lg.shk-button-icon-only{padding:.75rem}.shk-button-icon-right{flex-direction:row-reverse}.shk-button-icon-top{flex-direction:column}.shk-button-icon-bottom{flex-direction:column-reverse}.shk-button-loading .shk-button-spin{animation:shk-button-spin 1s linear infinite}@keyframes shk-button-spin{to{transform:rotate(360deg)}}\n"] }]
|
|
141
141
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconPos: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPos", required: false }] }], severity: [{ type: i0.Input, args: [{ isSignal: true, alias: "severity", required: false }] }], outlined: [{ type: i0.Input, args: [{ isSignal: true, alias: "outlined", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], raised: [{ type: i0.Input, args: [{ isSignal: true, alias: "raised", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIcon", required: false }] }], loadingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingText", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], onClick: [{ type: i0.Output, args: ["onClick"] }] } });
|
|
142
142
|
|
|
143
143
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shirkasoft-ui-components-button.mjs","sources":["../../../projects/ui-components/button/button.component.ts","../../../projects/ui-components/button/shirkasoft-ui-components-button.ts"],"sourcesContent":["import { Component, computed, input, output, ChangeDetectionStrategy } from '@angular/core';\nimport { LucideDynamicIcon } from '@lucide/angular';\nimport { getIcon } from 'shirkasoft-ui-components/utils';\n\nexport type ButtonSeverity =\n 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'help' | 'contrast';\nexport type ButtonSize = 'small' | 'large';\nexport type ButtonIconPosition = 'left' | 'right' | 'top' | 'bottom';\n\n/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\n\n/** Generic button with icon, severity variants, loading state and sizes. */\n@Component({\n selector: 'shk-button',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [LucideDynamicIcon],\n template: `\n <button\n [attr.type]=\"type()\"\n class=\"shk-button\"\n [class.shk-button-primary]=\"severity() === 'primary' || !severity()\"\n [class.shk-button-secondary]=\"severity() === 'secondary'\"\n [class.shk-button-success]=\"severity() === 'success'\"\n [class.shk-button-info]=\"severity() === 'info'\"\n [class.shk-button-warning]=\"severity() === 'warning'\"\n [class.shk-button-danger]=\"severity() === 'danger'\"\n [class.shk-button-help]=\"severity() === 'help'\"\n [class.shk-button-contrast]=\"severity() === 'contrast'\"\n [class.shk-button-outlined]=\"outlined()\"\n [class.shk-button-text]=\"text()\"\n [class.shk-button-raised]=\"raised()\"\n [class.shk-button-rounded]=\"rounded()\"\n [class.shk-button-sm]=\"size() === 'small'\"\n [class.shk-button-lg]=\"size() === 'large'\"\n [class.shk-button-icon-right]=\"iconPos() === 'right'\"\n [class.shk-button-icon-top]=\"iconPos() === 'top'\"\n [class.shk-button-icon-bottom]=\"iconPos() === 'bottom'\"\n [class.shk-button-icon-only]=\"iconOnly()\"\n [class.shk-button-loading]=\"loading()\"\n [class]=\"styleClass()\"\n [style]=\"style()\"\n [disabled]=\"disabled() || loading()\"\n [attr.aria-label]=\"ariaLabel() || undefined\"\n [attr.title]=\"title() || undefined\"\n (click)=\"onClick.emit($event)\"\n >\n @if (loading()) {\n <svg [lucideIcon]=\"getIcon(loadingIcon())\" class=\"shk-button-icon shk-button-spin\"></svg>\n } @else if (icon()) {\n <svg [lucideIcon]=\"getIcon(icon())\" class=\"shk-button-icon\"></svg>\n }\n @if (label()) {\n <span>{{ loading() && loadingText() ? loadingText() : label() }}</span>\n }\n <ng-content></ng-content>\n </button>\n `,\n styles: [\n `\n :host {\n display: inline-block;\n }\n .shk-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n padding: 0.5rem 1rem;\n border-radius: 0.5rem;\n border: 1px solid transparent;\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.25rem;\n cursor: pointer;\n user-select: none;\n white-space: nowrap;\n transition:\n background-color 0.15s ease-in-out,\n border-color 0.15s ease-in-out,\n color 0.15s ease-in-out,\n box-shadow 0.15s ease-in-out,\n opacity 0.15s ease-in-out;\n }\n .shk-button:focus-visible {\n outline: 2px solid var(--shk-primary-400);\n outline-offset: 2px;\n }\n .shk-button:disabled {\n opacity: 0.55;\n cursor: not-allowed;\n }\n .shk-button-icon {\n width: 1rem;\n height: 1rem;\n flex-shrink: 0;\n }\n\n .shk-button-primary {\n --shk-btn-bg: var(--shk-primary-600);\n --shk-btn-color: #ffffff;\n --shk-btn-border: var(--shk-primary-600);\n }\n .shk-button-secondary {\n --shk-btn-bg: var(--shk-surface-100);\n --shk-btn-color: var(--shk-surface-700);\n --shk-btn-border: var(--shk-surface-200);\n }\n .shk-button-success {\n --shk-btn-bg: var(--shk-success-600);\n --shk-btn-color: #ffffff;\n --shk-btn-border: var(--shk-success-600);\n }\n .shk-button-info {\n --shk-btn-bg: var(--shk-info-600);\n --shk-btn-color: #ffffff;\n --shk-btn-border: var(--shk-info-600);\n }\n .shk-button-warning {\n --shk-btn-bg: var(--shk-warning-600);\n --shk-btn-color: #ffffff;\n --shk-btn-border: var(--shk-warning-600);\n }\n .shk-button-danger {\n --shk-btn-bg: var(--shk-error-600);\n --shk-btn-color: #ffffff;\n --shk-btn-border: var(--shk-error-600);\n }\n .shk-button-help {\n --shk-btn-bg: var(--shk-primary-500);\n --shk-btn-color: #ffffff;\n --shk-btn-border: var(--shk-primary-500);\n }\n .shk-button-contrast {\n --shk-btn-bg: var(--shk-surface-900);\n --shk-btn-color: var(--shk-surface-50);\n --shk-btn-border: var(--shk-surface-900);\n }\n\n .shk-button {\n background-color: var(--shk-btn-bg);\n color: var(--shk-btn-color);\n border-color: var(--shk-btn-border);\n }\n .shk-button:hover:not(:disabled) {\n background-color: color-mix(in srgb, var(--shk-btn-bg) 88%, #000000);\n }\n .shk-button-outlined,\n .shk-button-text {\n background-color: transparent;\n }\n .shk-button-outlined {\n border-color: var(--shk-btn-color);\n }\n .shk-button-text {\n border-color: transparent;\n }\n .shk-button-text:hover:not(:disabled),\n .shk-button-outlined:hover:not(:disabled) {\n background-color: color-mix(in srgb, var(--shk-btn-color) 12%, transparent);\n }\n .shk-button-raised {\n box-shadow:\n 0 1px 2px rgba(0, 0, 0, 0.06),\n 0 4px 8px rgba(0, 0, 0, 0.1);\n }\n .shk-button-rounded {\n border-radius: 9999px;\n }\n .shk-button-sm {\n padding: 0.375rem 0.75rem;\n font-size: 0.8125rem;\n }\n .shk-button-sm .shk-button-icon {\n width: 0.875rem;\n height: 0.875rem;\n }\n .shk-button-lg {\n padding: 0.75rem 1.5rem;\n font-size: 1rem;\n }\n .shk-button-lg .shk-button-icon {\n width: 1.25rem;\n height: 1.25rem;\n }\n .shk-button-icon-only {\n padding: 0.5rem;\n }\n .shk-button-sm.shk-button-icon-only {\n padding: 0.375rem;\n }\n .shk-button-lg.shk-button-icon-only {\n padding: 0.75rem;\n }\n .shk-button-icon-right {\n flex-direction: row-reverse;\n }\n .shk-button-icon-top {\n flex-direction: column;\n }\n .shk-button-icon-bottom {\n flex-direction: column-reverse;\n }\n .shk-button-loading .shk-button-spin {\n animation: shk-button-spin 1s linear infinite;\n }\n @keyframes shk-button-spin {\n to {\n transform: rotate(360deg);\n }\n }\n `,\n ],\n})\nexport class ButtonComponent {\n /** Text shown inside the button. */\n label = input<string>('');\n /** Optional leading lucide icon name or component. */\n icon = input<string | any>('');\n /** Position of the icon relative to the label. */\n iconPos = input<ButtonIconPosition>('left');\n /** Color variant. Defaults to 'primary'. */\n severity = input<ButtonSeverity>('primary');\n /** Transparent background with a colored border. */\n outlined = input<boolean>(false);\n /** Borderless button with a colored label. */\n text = input<boolean>(false);\n /** Adds a soft shadow. */\n raised = input<boolean>(false);\n /** Fully rounded corners (pill). */\n rounded = input<boolean>(false);\n /** Size variant. */\n size = input<ButtonSize | undefined>(undefined);\n /** Disables the button. */\n disabled = input<boolean>(false);\n /** Shows a spinner and disables the button. */\n loading = input<boolean>(false);\n /** Icon shown while loading. Defaults to 'refresh'. */\n loadingIcon = input<string>('refresh');\n /** Optional text shown instead of the label while loading. */\n loadingText = input<string>('');\n /** Native button type. */\n type = input<'button' | 'submit' | 'reset'>('button');\n /** Accessible label when the button is icon-only. */\n ariaLabel = input<string>('');\n /** Native title tooltip. */\n title = input<string>('');\n /** Inline styles applied to the button. */\n style = input<Record<string, string | number>>({});\n /** Extra CSS classes. */\n styleClass = input<string>('');\n\n /** Emitted on click with the original MouseEvent. */\n onClick = output<MouseEvent>();\n\n protected getIcon = getIcon;\n\n protected iconOnly = computed(() => !this.label() && !!this.icon());\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AASA;;;;AAIG;AAEH;MA2Ma,eAAe,CAAA;AA1M5B,IAAA,WAAA,GAAA;;AA4ME,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAe,EAAE,2EAAC;;AAE9B,QAAA,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A,EAAA;;;AC7DH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"shirkasoft-ui-components-button.mjs","sources":["../../../projects/ui-components/button/button.component.ts","../../../projects/ui-components/button/shirkasoft-ui-components-button.ts"],"sourcesContent":["import { Component, computed, input, output, ChangeDetectionStrategy } from '@angular/core';\nimport { LucideDynamicIcon } from '@lucide/angular';\nimport { getIcon } from 'shirkasoft-ui-components/utils';\n\nexport type ButtonSeverity =\n 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'help' | 'contrast';\nexport type ButtonSize = 'small' | 'large';\nexport type ButtonIconPosition = 'left' | 'right' | 'top' | 'bottom';\n\n/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\n\n/** Generic button with icon, severity variants, loading state and sizes. */\n@Component({\n selector: 'shk-button',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [LucideDynamicIcon],\n template: `\n <button\n [attr.type]=\"type()\"\n class=\"shk-button\"\n [class.shk-button-primary]=\"severity() === 'primary' || !severity()\"\n [class.shk-button-secondary]=\"severity() === 'secondary'\"\n [class.shk-button-success]=\"severity() === 'success'\"\n [class.shk-button-info]=\"severity() === 'info'\"\n [class.shk-button-warning]=\"severity() === 'warning'\"\n [class.shk-button-danger]=\"severity() === 'danger'\"\n [class.shk-button-help]=\"severity() === 'help'\"\n [class.shk-button-contrast]=\"severity() === 'contrast'\"\n [class.shk-button-outlined]=\"outlined()\"\n [class.shk-button-text]=\"text()\"\n [class.shk-button-raised]=\"raised()\"\n [class.shk-button-rounded]=\"rounded()\"\n [class.shk-button-sm]=\"size() === 'small'\"\n [class.shk-button-lg]=\"size() === 'large'\"\n [class.shk-button-icon-right]=\"iconPos() === 'right'\"\n [class.shk-button-icon-top]=\"iconPos() === 'top'\"\n [class.shk-button-icon-bottom]=\"iconPos() === 'bottom'\"\n [class.shk-button-icon-only]=\"iconOnly()\"\n [class.shk-button-loading]=\"loading()\"\n [class]=\"styleClass()\"\n [style]=\"style()\"\n [disabled]=\"disabled() || loading()\"\n [attr.aria-label]=\"ariaLabel() || undefined\"\n [attr.title]=\"title() || undefined\"\n (click)=\"onClick.emit($event)\"\n >\n @if (loading()) {\n <svg [lucideIcon]=\"getIcon(loadingIcon())\" class=\"shk-button-icon shk-button-spin\"></svg>\n } @else if (icon()) {\n <svg [lucideIcon]=\"getIcon(icon())\" class=\"shk-button-icon\"></svg>\n }\n @if (label()) {\n <span>{{ loading() && loadingText() ? loadingText() : label() }}</span>\n }\n <ng-content></ng-content>\n </button>\n `,\n styles: [\n `\n :host {\n display: inline-block;\n }\n .shk-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n padding: 0.5rem 1rem;\n border-radius: 0.5rem;\n border: 1px solid transparent;\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.25rem;\n cursor: pointer;\n user-select: none;\n white-space: nowrap;\n transition:\n background-color 0.15s ease-in-out,\n border-color 0.15s ease-in-out,\n color 0.15s ease-in-out,\n box-shadow 0.15s ease-in-out,\n opacity 0.15s ease-in-out;\n }\n .shk-button:focus-visible {\n outline: none;\n box-shadow:\n 0 0 0 2px var(--shk-focus-offset, #fff),\n 0 0 0 4px color-mix(in srgb, var(--shk-btn-accent, var(--shk-primary-500)) 55%, transparent);\n }\n :host-context(.dark) .shk-button:focus-visible {\n --shk-focus-offset: var(--shk-surface-50);\n }\n .shk-button:active:not(:disabled) {\n transform: translateY(0.5px);\n }\n .shk-button:disabled {\n opacity: 0.55;\n cursor: not-allowed;\n }\n .shk-button-icon {\n width: 1rem;\n height: 1rem;\n flex-shrink: 0;\n }\n\n .shk-button-primary {\n --shk-btn-bg: var(--shk-primary-600);\n --shk-btn-color: #ffffff;\n --shk-btn-border: var(--shk-primary-600);\n --shk-btn-accent: var(--shk-primary-600);\n }\n .shk-button-secondary {\n --shk-btn-bg: var(--shk-surface-100);\n --shk-btn-color: var(--shk-surface-700);\n --shk-btn-border: var(--shk-surface-200);\n --shk-btn-accent: var(--shk-surface-600);\n }\n .shk-button-success {\n --shk-btn-bg: var(--shk-success-600);\n --shk-btn-color: #ffffff;\n --shk-btn-border: var(--shk-success-600);\n --shk-btn-accent: var(--shk-success-600);\n }\n .shk-button-info {\n --shk-btn-bg: var(--shk-info-600);\n --shk-btn-color: #ffffff;\n --shk-btn-border: var(--shk-info-600);\n --shk-btn-accent: var(--shk-info-600);\n }\n .shk-button-warning {\n --shk-btn-bg: var(--shk-warning-600);\n --shk-btn-color: #ffffff;\n --shk-btn-border: var(--shk-warning-600);\n --shk-btn-accent: var(--shk-warning-600);\n }\n .shk-button-danger {\n --shk-btn-bg: var(--shk-error-600);\n --shk-btn-color: #ffffff;\n --shk-btn-border: var(--shk-error-600);\n --shk-btn-accent: var(--shk-error-600);\n }\n .shk-button-help {\n --shk-btn-bg: var(--shk-primary-500);\n --shk-btn-color: #ffffff;\n --shk-btn-border: var(--shk-primary-500);\n --shk-btn-accent: var(--shk-primary-500);\n }\n .shk-button-contrast {\n --shk-btn-bg: var(--shk-surface-900);\n --shk-btn-color: var(--shk-surface-50);\n --shk-btn-border: var(--shk-surface-900);\n --shk-btn-accent: var(--shk-surface-900);\n }\n\n .shk-button {\n background-color: var(--shk-btn-bg);\n color: var(--shk-btn-color);\n border-color: var(--shk-btn-border);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n }\n .shk-button:hover:not(:disabled) {\n background-color: color-mix(in srgb, var(--shk-btn-bg) 88%, #000000);\n }\n /* Outlined/text use the severity accent (not the solid text color, which\n is white for most severities and made them invisible on light bg). */\n .shk-button-outlined,\n .shk-button-text {\n background-color: transparent;\n color: var(--shk-btn-accent);\n box-shadow: none;\n }\n .shk-button-outlined {\n border-color: color-mix(in srgb, var(--shk-btn-accent) 45%, transparent);\n }\n /* Lighter accent on dark backgrounds to keep text contrast. */\n :host-context(.dark) .shk-button-outlined,\n :host-context(.dark) .shk-button-text {\n --shk-btn-accent-dark: color-mix(in srgb, var(--shk-btn-accent) 65%, #ffffff);\n color: var(--shk-btn-accent-dark);\n }\n :host-context(.dark) .shk-button-outlined {\n border-color: color-mix(in srgb, var(--shk-btn-accent-dark) 40%, transparent);\n }\n .shk-button-text {\n border-color: transparent;\n }\n .shk-button-text:hover:not(:disabled),\n .shk-button-outlined:hover:not(:disabled) {\n background-color: color-mix(in srgb, var(--shk-btn-accent) 10%, transparent);\n }\n .shk-button-outlined:hover:not(:disabled) {\n border-color: var(--shk-btn-accent);\n }\n .shk-button-raised {\n box-shadow:\n 0 1px 2px rgba(0, 0, 0, 0.06),\n 0 4px 8px rgba(0, 0, 0, 0.1);\n }\n .shk-button-rounded {\n border-radius: 9999px;\n }\n .shk-button-sm {\n padding: 0.375rem 0.75rem;\n font-size: 0.8125rem;\n }\n .shk-button-sm .shk-button-icon {\n width: 0.875rem;\n height: 0.875rem;\n }\n .shk-button-lg {\n padding: 0.75rem 1.5rem;\n font-size: 1rem;\n }\n .shk-button-lg .shk-button-icon {\n width: 1.25rem;\n height: 1.25rem;\n }\n .shk-button-icon-only {\n padding: 0.5rem;\n }\n .shk-button-sm.shk-button-icon-only {\n padding: 0.375rem;\n }\n .shk-button-lg.shk-button-icon-only {\n padding: 0.75rem;\n }\n .shk-button-icon-right {\n flex-direction: row-reverse;\n }\n .shk-button-icon-top {\n flex-direction: column;\n }\n .shk-button-icon-bottom {\n flex-direction: column-reverse;\n }\n .shk-button-loading .shk-button-spin {\n animation: shk-button-spin 1s linear infinite;\n }\n @keyframes shk-button-spin {\n to {\n transform: rotate(360deg);\n }\n }\n `,\n ],\n})\nexport class ButtonComponent {\n /** Text shown inside the button. */\n label = input<string>('');\n /** Optional leading lucide icon name or component. */\n icon = input<string | any>('');\n /** Position of the icon relative to the label. */\n iconPos = input<ButtonIconPosition>('left');\n /** Color variant. Defaults to 'primary'. */\n severity = input<ButtonSeverity>('primary');\n /** Transparent background with a colored border. */\n outlined = input<boolean>(false);\n /** Borderless button with a colored label. */\n text = input<boolean>(false);\n /** Adds a soft shadow. */\n raised = input<boolean>(false);\n /** Fully rounded corners (pill). */\n rounded = input<boolean>(false);\n /** Size variant. */\n size = input<ButtonSize | undefined>(undefined);\n /** Disables the button. */\n disabled = input<boolean>(false);\n /** Shows a spinner and disables the button. */\n loading = input<boolean>(false);\n /** Icon shown while loading. Defaults to 'refresh'. */\n loadingIcon = input<string>('refresh');\n /** Optional text shown instead of the label while loading. */\n loadingText = input<string>('');\n /** Native button type. */\n type = input<'button' | 'submit' | 'reset'>('button');\n /** Accessible label when the button is icon-only. */\n ariaLabel = input<string>('');\n /** Native title tooltip. */\n title = input<string>('');\n /** Inline styles applied to the button. */\n style = input<Record<string, string | number>>({});\n /** Extra CSS classes. */\n styleClass = input<string>('');\n\n /** Emitted on click with the original MouseEvent. */\n onClick = output<MouseEvent>();\n\n protected getIcon = getIcon;\n\n protected iconOnly = computed(() => !this.label() && !!this.icon());\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AASA;;;;AAIG;AAEH;MA4Oa,eAAe,CAAA;AA3O5B,IAAA,WAAA,GAAA;;AA6OE,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAe,EAAE,2EAAC;;AAE9B,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAqB,MAAM,8EAAC;;AAE3C,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAiB,SAAS,+EAAC;;AAE3C,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;;AAEhC,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAU,KAAK,2EAAC;;AAE5B,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAU,KAAK,6EAAC;;AAE9B,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAU,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,UAAA,EAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAtOhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,26HAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAzCS,iBAAiB,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAuOhB,eAAe,EAAA,UAAA,EAAA,CAAA;kBA3O3B,SAAS;+BACE,YAAY,EAAA,UAAA,EACV,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,iBAAiB,CAAC,EAAA,QAAA,EAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,26HAAA,CAAA,EAAA;;;AC7DH;;AAEG;;;;"}
|
|
@@ -72,11 +72,11 @@ class ConfirmDialogComponent {
|
|
|
72
72
|
this.resolveRef.set(null);
|
|
73
73
|
}
|
|
74
74
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ConfirmDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
75
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: ConfirmDialogComponent, isStandalone: true, selector: "shk-confirm-dialog", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, confirmLabel: { classPropertyName: "confirmLabel", publicName: "confirmLabel", isSignal: true, isRequired: false, transformFunction: null }, cancelLabel: { classPropertyName: "cancelLabel", publicName: "cancelLabel", isSignal: true, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, showCancel: { classPropertyName: "showCancel", publicName: "showCancel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, ngImport: i0, template: "@if (visible()) {\n <div\n class=\"fixed inset-0 bg-black/40 backdrop-blur-sm flex items-center justify-center z-[9999] p-4\"\n (click)=\"onCancel()\"\n >\n <div\n class=\"bg-white dark:[background-color:var(--shk-surface-100)] rounded-2xl shadow-2xl max-w-sm w-full
|
|
75
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: ConfirmDialogComponent, isStandalone: true, selector: "shk-confirm-dialog", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, confirmLabel: { classPropertyName: "confirmLabel", publicName: "confirmLabel", isSignal: true, isRequired: false, transformFunction: null }, cancelLabel: { classPropertyName: "cancelLabel", publicName: "cancelLabel", isSignal: true, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, showCancel: { classPropertyName: "showCancel", publicName: "showCancel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, ngImport: i0, template: "@if (visible()) {\n <div\n class=\"shk-dialog-backdrop fixed inset-0 bg-black/40 backdrop-blur-sm flex items-center justify-center z-[9999] p-4\"\n (click)=\"onCancel()\"\n >\n <div\n class=\"shk-dialog-panel bg-white dark:[background-color:var(--shk-surface-100)] rounded-2xl shadow-2xl max-w-sm w-full overflow-hidden\"\n (click)=\"$event.stopPropagation()\"\n >\n <div class=\"p-6\">\n <div class=\"flex items-start gap-4 mb-4\">\n <div\n class=\"w-12 h-12 rounded-full flex items-center justify-center shrink-0\"\n [ngClass]=\"{\n 'bg-red-50 dark:bg-red-900/30 text-red-600 dark:text-red-400': type() === 'danger',\n 'bg-blue-50 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400': type() === 'info',\n 'bg-amber-50 dark:bg-amber-900/30 text-amber-600 dark:text-amber-400': type() === 'warning',\n }\"\n >\n @if (type() === 'info') {\n <svg [lucideIcon]=\"getIcon('info')\" class=\"w-6 h-6\"></svg>\n } @else {\n <svg [lucideIcon]=\"getIcon('triangle-alert')\" class=\"w-6 h-6\"></svg>\n }\n </div>\n <div>\n <h3 class=\"text-lg font-bold _shk-text-surface-800 dark:[color:var(--shk-surface-800)]\">{{ title() }}</h3>\n <p class=\"_shk-text-surface-500 dark:[color:var(--shk-surface-400)] text-sm leading-relaxed mb-6\">{{ message() }}</p>\n </div>\n </div>\n <div class=\"flex gap-3\">\n @if (showCancel()) {\n <button\n type=\"button\"\n (click)=\"onCancel()\"\n [disabled]=\"loading()\"\n class=\"flex-1 px-4 py-2 text-sm font-semibold _shk-text-surface-600 dark:[color:var(--shk-surface-600)] _shk-bg-surface-100 dark:[background-color:var(--shk-surface-200)] hover:[background-color:var(--shk-surface-200)] dark:hover:[background-color:var(--shk-surface-300)] rounded-lg transition-colors flex items-center justify-center gap-2\"\n >\n <svg [lucideIcon]=\"getIcon('x')\" class=\"w-4 h-4\"></svg>\n {{ cancelLabel() }}\n </button>\n }\n <button\n type=\"button\"\n (click)=\"onConfirm()\"\n [disabled]=\"loading()\"\n class=\"flex-1 px-4 py-2 text-sm font-semibold text-white rounded-lg shadow-md transition-all flex items-center justify-center gap-2\"\n [class.bg-red-600]=\"type() === 'danger'\"\n [class.hover:bg-red-700]=\"type() === 'danger'\"\n [class.shadow-red-500/20]=\"type() === 'danger'\"\n [class.bg-primary-600]=\"type() === 'info'\"\n [class.hover:bg-primary-700]=\"type() === 'info'\"\n [class.shadow-primary-500/20]=\"type() === 'info'\"\n [class.bg-amber-600]=\"type() === 'warning'\"\n [class.hover:bg-amber-700]=\"type() === 'warning'\"\n [class.shadow-amber-500/20]=\"type() === 'warning'\"\n >\n @if (loading()) {\n <svg [lucideIcon]=\"getIcon('loader')\" class=\"w-4 h-4 animate-spin\"></svg>\n } @else if (type() === 'danger') {\n <svg [lucideIcon]=\"getIcon('trash-2')\" class=\"w-4 h-4\"></svg>\n }\n {{ loading() ? loadingText() : confirmLabel() }}\n </button>\n </div>\n </div>\n </div>\n </div>\n}\n", styles: [".shk-dialog-backdrop{animation:shk-dialog-fade .15s ease-out}.shk-dialog-panel{border:1px solid var(--shk-surface-200);box-shadow:0 24px 48px -12px #00000040,0 8px 16px -8px #0000001a;animation:shk-dialog-in .2s cubic-bezier(.21,1.02,.73,1)}:host-context(.dark) .shk-dialog-panel{box-shadow:0 24px 48px -12px #000000b3,0 8px 16px -8px #00000080}@keyframes shk-dialog-fade{0%{opacity:0}}@keyframes shk-dialog-in{0%{opacity:0;transform:translateY(8px) scale(.97)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: LucideDynamicIcon, selector: "svg[lucideIcon]", inputs: ["lucideIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
76
76
|
}
|
|
77
77
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
|
|
78
78
|
type: Component,
|
|
79
|
-
args: [{ selector: 'shk-confirm-dialog', standalone: true, imports: [CommonModule, LucideDynamicIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (visible()) {\n <div\n class=\"fixed inset-0 bg-black/40 backdrop-blur-sm flex items-center justify-center z-[9999] p-4\"\n (click)=\"onCancel()\"\n >\n <div\n class=\"bg-white dark:[background-color:var(--shk-surface-100)] rounded-2xl shadow-2xl max-w-sm w-full
|
|
79
|
+
args: [{ selector: 'shk-confirm-dialog', standalone: true, imports: [CommonModule, LucideDynamicIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (visible()) {\n <div\n class=\"shk-dialog-backdrop fixed inset-0 bg-black/40 backdrop-blur-sm flex items-center justify-center z-[9999] p-4\"\n (click)=\"onCancel()\"\n >\n <div\n class=\"shk-dialog-panel bg-white dark:[background-color:var(--shk-surface-100)] rounded-2xl shadow-2xl max-w-sm w-full overflow-hidden\"\n (click)=\"$event.stopPropagation()\"\n >\n <div class=\"p-6\">\n <div class=\"flex items-start gap-4 mb-4\">\n <div\n class=\"w-12 h-12 rounded-full flex items-center justify-center shrink-0\"\n [ngClass]=\"{\n 'bg-red-50 dark:bg-red-900/30 text-red-600 dark:text-red-400': type() === 'danger',\n 'bg-blue-50 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400': type() === 'info',\n 'bg-amber-50 dark:bg-amber-900/30 text-amber-600 dark:text-amber-400': type() === 'warning',\n }\"\n >\n @if (type() === 'info') {\n <svg [lucideIcon]=\"getIcon('info')\" class=\"w-6 h-6\"></svg>\n } @else {\n <svg [lucideIcon]=\"getIcon('triangle-alert')\" class=\"w-6 h-6\"></svg>\n }\n </div>\n <div>\n <h3 class=\"text-lg font-bold _shk-text-surface-800 dark:[color:var(--shk-surface-800)]\">{{ title() }}</h3>\n <p class=\"_shk-text-surface-500 dark:[color:var(--shk-surface-400)] text-sm leading-relaxed mb-6\">{{ message() }}</p>\n </div>\n </div>\n <div class=\"flex gap-3\">\n @if (showCancel()) {\n <button\n type=\"button\"\n (click)=\"onCancel()\"\n [disabled]=\"loading()\"\n class=\"flex-1 px-4 py-2 text-sm font-semibold _shk-text-surface-600 dark:[color:var(--shk-surface-600)] _shk-bg-surface-100 dark:[background-color:var(--shk-surface-200)] hover:[background-color:var(--shk-surface-200)] dark:hover:[background-color:var(--shk-surface-300)] rounded-lg transition-colors flex items-center justify-center gap-2\"\n >\n <svg [lucideIcon]=\"getIcon('x')\" class=\"w-4 h-4\"></svg>\n {{ cancelLabel() }}\n </button>\n }\n <button\n type=\"button\"\n (click)=\"onConfirm()\"\n [disabled]=\"loading()\"\n class=\"flex-1 px-4 py-2 text-sm font-semibold text-white rounded-lg shadow-md transition-all flex items-center justify-center gap-2\"\n [class.bg-red-600]=\"type() === 'danger'\"\n [class.hover:bg-red-700]=\"type() === 'danger'\"\n [class.shadow-red-500/20]=\"type() === 'danger'\"\n [class.bg-primary-600]=\"type() === 'info'\"\n [class.hover:bg-primary-700]=\"type() === 'info'\"\n [class.shadow-primary-500/20]=\"type() === 'info'\"\n [class.bg-amber-600]=\"type() === 'warning'\"\n [class.hover:bg-amber-700]=\"type() === 'warning'\"\n [class.shadow-amber-500/20]=\"type() === 'warning'\"\n >\n @if (loading()) {\n <svg [lucideIcon]=\"getIcon('loader')\" class=\"w-4 h-4 animate-spin\"></svg>\n } @else if (type() === 'danger') {\n <svg [lucideIcon]=\"getIcon('trash-2')\" class=\"w-4 h-4\"></svg>\n }\n {{ loading() ? loadingText() : confirmLabel() }}\n </button>\n </div>\n </div>\n </div>\n </div>\n}\n", styles: [".shk-dialog-backdrop{animation:shk-dialog-fade .15s ease-out}.shk-dialog-panel{border:1px solid var(--shk-surface-200);box-shadow:0 24px 48px -12px #00000040,0 8px 16px -8px #0000001a;animation:shk-dialog-in .2s cubic-bezier(.21,1.02,.73,1)}:host-context(.dark) .shk-dialog-panel{box-shadow:0 24px 48px -12px #000000b3,0 8px 16px -8px #00000080}@keyframes shk-dialog-fade{0%{opacity:0}}@keyframes shk-dialog-in{0%{opacity:0;transform:translateY(8px) scale(.97)}}\n"] }]
|
|
80
80
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], confirmLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmLabel", required: false }] }], cancelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelLabel", required: false }] }], loadingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingText", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], showCancel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCancel", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
81
81
|
|
|
82
82
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shirkasoft-ui-components-confirm-dialog.mjs","sources":["../../../projects/ui-components/confirm-dialog/confirm-dialog.component.ts","../../../projects/ui-components/confirm-dialog/confirm-dialog.component.html","../../../projects/ui-components/confirm-dialog/confirm-dialog.service.ts","../../../projects/ui-components/confirm-dialog/shirkasoft-ui-components-confirm-dialog.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, input, output, signal, OnDestroy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LucideDynamicIcon, LucideTriangleAlert } from '@lucide/angular';\nimport { getIcon as getIconFromCentral } from 'shirkasoft-ui-components/utils';\n\n/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\n\n/**\n * Confirmation dialog opened via `show()` which resolves a Promise<boolean>\n * with the user's choice.\n */\n@Component({\n selector: 'shk-confirm-dialog',\n standalone: true,\n imports: [CommonModule, LucideDynamicIcon],\n templateUrl: './confirm-dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ConfirmDialogComponent implements OnDestroy {\n protected getIcon = (name: any) => getIconFromCentral(name, LucideTriangleAlert);\n\n /** Title shown in the dialog header. */\n title = input<string>('Confirmar acción');\n /** Message body of the dialog. */\n message = input<string>('¿Está seguro de realizar esta acción?');\n /** Label of the confirm button. */\n confirmLabel = input<string>('Confirmar');\n /** Label of the cancel button. */\n cancelLabel = input<string>('Cancelar');\n /** Text shown on the confirm button while `loading` is true. */\n loadingText = input<string>('Procesando…');\n /** Visual style: 'danger', 'info' or 'warning'. */\n type = input<'danger' | 'info' | 'warning'>('danger');\n /** Shows a spinner and disables the confirm button. */\n loading = input<boolean>(false);\n /** Whether the cancel button is shown. */\n showCancel = input<boolean>(true);\n\n /** Controls dialog visibility. */\n visible = signal<boolean>(false);\n /** Resolver of the currently pending confirmation promise. */\n private resolveRef = signal<((value: boolean) => void) | null>(null);\n\n /** Emitted whenever the dialog is closed (confirm or cancel). */\n closed = output<void>();\n\n /** Opens the dialog and returns a promise resolving with the user choice. */\n show(): Promise<boolean> {\n this.visible.set(true);\n return new Promise((resolve) => {\n this.resolveRef.set(resolve);\n });\n }\n\n /** Resolves with `true` when the user confirms. */\n onConfirm() {\n this.visible.set(false);\n const resolve = this.resolveRef();\n if (resolve) {\n resolve(true);\n this.resolveRef.set(null);\n }\n this.closed.emit();\n }\n\n /** Resolves with `false` when the user cancels. */\n onCancel() {\n this.visible.set(false);\n const resolve = this.resolveRef();\n if (resolve) {\n resolve(false);\n this.resolveRef.set(null);\n }\n this.closed.emit();\n }\n\n /** Clears the pending resolver on destroy. */\n ngOnDestroy() {\n this.resolveRef.set(null);\n }\n}\n","@if (visible()) {\n <div\n class=\"fixed inset-0 bg-black/40 backdrop-blur-sm flex items-center justify-center z-[9999] p-4\"\n (click)=\"onCancel()\"\n >\n <div\n class=\"bg-white dark:[background-color:var(--shk-surface-100)] rounded-2xl shadow-2xl max-w-sm w-full animate-in fade-in zoom-in duration-200 overflow-hidden\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"h-1.5 w-full\"\n [class.bg-gradient-to-r]=\"type() !== 'warning'\"\n [class.from-red-400]=\"type() === 'danger'\"\n [class.to-red-600]=\"type() === 'danger'\"\n [class.from-blue-400]=\"type() === 'info'\"\n [class.to-blue-600]=\"type() === 'info'\"\n [class.bg-amber-400]=\"type() === 'warning'\"\n ></div>\n <div class=\"p-6\">\n <div class=\"flex items-start gap-4 mb-4\">\n <div\n class=\"w-12 h-12 rounded-full flex items-center justify-center shrink-0\"\n [ngClass]=\"{\n 'bg-red-50 dark:bg-red-900/30 text-red-600 dark:text-red-400': type() === 'danger',\n 'bg-blue-50 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400': type() === 'info',\n 'bg-amber-50 dark:bg-amber-900/30 text-amber-600 dark:text-amber-400': type() === 'warning',\n }\"\n >\n @if (type() === 'info') {\n <svg [lucideIcon]=\"getIcon('info')\" class=\"w-6 h-6\"></svg>\n } @else {\n <svg [lucideIcon]=\"getIcon('triangle-alert')\" class=\"w-6 h-6\"></svg>\n }\n </div>\n <div>\n <h3 class=\"text-lg font-bold _shk-text-surface-800 dark:[color:var(--shk-surface-800)]\">{{ title() }}</h3>\n <p class=\"_shk-text-surface-500 dark:[color:var(--shk-surface-400)] text-sm leading-relaxed mb-6\">{{ message() }}</p>\n </div>\n </div>\n <div class=\"flex gap-3\">\n @if (showCancel()) {\n <button\n type=\"button\"\n (click)=\"onCancel()\"\n [disabled]=\"loading()\"\n class=\"flex-1 px-4 py-2 text-sm font-semibold _shk-text-surface-600 dark:[color:var(--shk-surface-600)] _shk-bg-surface-100 dark:[background-color:var(--shk-surface-200)] hover:[background-color:var(--shk-surface-200)] dark:hover:[background-color:var(--shk-surface-300)] rounded-lg transition-colors flex items-center justify-center gap-2\"\n >\n <svg [lucideIcon]=\"getIcon('x')\" class=\"w-4 h-4\"></svg>\n {{ cancelLabel() }}\n </button>\n }\n <button\n type=\"button\"\n (click)=\"onConfirm()\"\n [disabled]=\"loading()\"\n class=\"flex-1 px-4 py-2 text-sm font-semibold text-white rounded-lg shadow-md transition-all flex items-center justify-center gap-2\"\n [class.bg-red-600]=\"type() === 'danger'\"\n [class.hover:bg-red-700]=\"type() === 'danger'\"\n [class.shadow-red-500/20]=\"type() === 'danger'\"\n [class.bg-primary-600]=\"type() === 'info'\"\n [class.hover:bg-primary-700]=\"type() === 'info'\"\n [class.shadow-primary-500/20]=\"type() === 'info'\"\n [class.bg-amber-600]=\"type() === 'warning'\"\n [class.hover:bg-amber-700]=\"type() === 'warning'\"\n [class.shadow-amber-500/20]=\"type() === 'warning'\"\n >\n @if (loading()) {\n <svg [lucideIcon]=\"getIcon('loader')\" class=\"w-4 h-4 animate-spin\"></svg>\n } @else if (type() === 'danger') {\n <svg [lucideIcon]=\"getIcon('trash-2')\" class=\"w-4 h-4\"></svg>\n }\n {{ loading() ? loadingText() : confirmLabel() }}\n </button>\n </div>\n </div>\n </div>\n </div>\n}\n","import {\n Injectable,\n ComponentRef,\n ApplicationRef,\n createComponent,\n EnvironmentInjector,\n DestroyRef,\n inject,\n} from '@angular/core';\nimport { ConfirmDialogComponent } from './confirm-dialog.component';\n\n/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\n\n/** Options for opening a confirmation dialog. */\nexport interface ConfirmConfig {\n title?: string;\n message: string;\n confirmLabel?: string;\n cancelLabel?: string;\n loadingText?: string;\n type?: 'danger' | 'info' | 'warning';\n showCancel?: boolean;\n loading?: boolean;\n}\n\n/**\n * Programmatically opens the confirmation dialog and resolves a Promise\n * with the user's decision (true = confirm, false = cancel).\n */\n@Injectable({ providedIn: 'root' })\nexport class ConfirmDialogService {\n /** Reference to the currently open dialog, if any. */\n private dialogRef: ComponentRef<ConfirmDialogComponent> | null = null;\n\n private destroyRef = inject(DestroyRef);\n private appRef = inject(ApplicationRef);\n private injector = inject(EnvironmentInjector);\n\n constructor() {\n this.destroyRef.onDestroy(() => this.cleanupDialog());\n }\n\n /**\n * Opens a confirmation dialog with the given configuration and returns a\n * promise resolving with the user's choice.\n */\n async confirm(config: ConfirmConfig): Promise<boolean> {\n if (this.dialogRef) this.cleanupDialog();\n\n this.dialogRef = createComponent(ConfirmDialogComponent, {\n environmentInjector: this.injector,\n });\n\n this.dialogRef.setInput('title', config.title ?? 'Confirmar acción');\n this.dialogRef.setInput('message', config.message);\n this.dialogRef.setInput('confirmLabel', config.confirmLabel ?? 'Confirmar');\n this.dialogRef.setInput('cancelLabel', config.cancelLabel ?? 'Cancelar');\n this.dialogRef.setInput('loadingText', config.loadingText ?? 'Procesando…');\n this.dialogRef.setInput('type', config.type ?? 'danger');\n this.dialogRef.setInput('showCancel', config.showCancel ?? true);\n this.dialogRef.setInput('loading', config.loading ?? false);\n\n document.body.appendChild(this.dialogRef.location.nativeElement);\n this.appRef.attachView(this.dialogRef.hostView);\n try {\n return await this.dialogRef.instance.show();\n } finally {\n this.cleanupDialog();\n }\n }\n\n /** Detaches and destroys the mounted dialog if present. */\n private cleanupDialog(): void {\n if (this.dialogRef) {\n this.appRef.detachView(this.dialogRef.hostView);\n this.dialogRef.destroy();\n this.dialogRef = null;\n }\n }\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["getIconFromCentral"],"mappings":";;;;;;;AAKA;;;;AAIG;AAEH;;;AAGG;MAQU,sBAAsB,CAAA;AAPnC,IAAA,WAAA,GAAA;AAQY,QAAA,IAAA,CAAA,OAAO,GAAG,CAAC,IAAS,KAAKA,OAAkB,CAAC,IAAI,EAAE,mBAAmB,CAAC;;AAGhF,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,kBAAkB,4EAAC;;AAEzC,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAS,uCAAuC,8EAAC;;AAEhE,QAAA,IAAA,CA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CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC;QAChE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;AAC/C,QAAA,IAAI;YACF,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE;QAC7C;gBAAU;YACR,IAAI,CAAC,aAAa,EAAE;QACtB;IACF;;IAGQ,aAAa,GAAA;AACnB,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;AAC/C,YAAA,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE;AACxB,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI;QACvB;IACF;+GAhDW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAApB,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,oBAAoB,cADP,MAAM,EAAA,CAAA,CAAA;;4FACnB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACjClC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"shirkasoft-ui-components-confirm-dialog.mjs","sources":["../../../projects/ui-components/confirm-dialog/confirm-dialog.component.ts","../../../projects/ui-components/confirm-dialog/confirm-dialog.component.html","../../../projects/ui-components/confirm-dialog/confirm-dialog.service.ts","../../../projects/ui-components/confirm-dialog/shirkasoft-ui-components-confirm-dialog.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, input, output, signal, OnDestroy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LucideDynamicIcon, LucideTriangleAlert } from '@lucide/angular';\nimport { getIcon as getIconFromCentral } from 'shirkasoft-ui-components/utils';\n\n/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\n\n/**\n * Confirmation dialog opened via `show()` which resolves a Promise<boolean>\n * with the user's choice.\n */\n@Component({\n selector: 'shk-confirm-dialog',\n standalone: true,\n imports: [CommonModule, LucideDynamicIcon],\n templateUrl: './confirm-dialog.component.html',\n styles: [\n `\n /* Own enter animation (the animate-in/zoom-in utilities used before\n need a Tailwind plugin that isn't part of the library). */\n .shk-dialog-backdrop {\n animation: shk-dialog-fade 0.15s ease-out;\n }\n .shk-dialog-panel {\n border: 1px solid var(--shk-surface-200);\n box-shadow:\n 0 24px 48px -12px rgba(0, 0, 0, 0.25),\n 0 8px 16px -8px rgba(0, 0, 0, 0.1);\n animation: shk-dialog-in 0.2s cubic-bezier(0.21, 1.02, 0.73, 1);\n }\n :host-context(.dark) .shk-dialog-panel {\n box-shadow:\n 0 24px 48px -12px rgba(0, 0, 0, 0.7),\n 0 8px 16px -8px rgba(0, 0, 0, 0.5);\n }\n @keyframes shk-dialog-fade {\n from {\n opacity: 0;\n }\n }\n @keyframes shk-dialog-in {\n from {\n opacity: 0;\n transform: translateY(8px) scale(0.97);\n }\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ConfirmDialogComponent implements OnDestroy {\n protected getIcon = (name: any) => getIconFromCentral(name, LucideTriangleAlert);\n\n /** Title shown in the dialog header. */\n title = input<string>('Confirmar acción');\n /** Message body of the dialog. */\n message = input<string>('¿Está seguro de realizar esta acción?');\n /** Label of the confirm button. */\n confirmLabel = input<string>('Confirmar');\n /** Label of the cancel button. */\n cancelLabel = input<string>('Cancelar');\n /** Text shown on the confirm button while `loading` is true. */\n loadingText = input<string>('Procesando…');\n /** Visual style: 'danger', 'info' or 'warning'. */\n type = input<'danger' | 'info' | 'warning'>('danger');\n /** Shows a spinner and disables the confirm button. */\n loading = input<boolean>(false);\n /** Whether the cancel button is shown. */\n showCancel = input<boolean>(true);\n\n /** Controls dialog visibility. */\n visible = signal<boolean>(false);\n /** Resolver of the currently pending confirmation promise. */\n private resolveRef = signal<((value: boolean) => void) | null>(null);\n\n /** Emitted whenever the dialog is closed (confirm or cancel). */\n closed = output<void>();\n\n /** Opens the dialog and returns a promise resolving with the user choice. */\n show(): Promise<boolean> {\n this.visible.set(true);\n return new Promise((resolve) => {\n this.resolveRef.set(resolve);\n });\n }\n\n /** Resolves with `true` when the user confirms. */\n onConfirm() {\n this.visible.set(false);\n const resolve = this.resolveRef();\n if (resolve) {\n resolve(true);\n this.resolveRef.set(null);\n }\n this.closed.emit();\n }\n\n /** Resolves with `false` when the user cancels. */\n onCancel() {\n this.visible.set(false);\n const resolve = this.resolveRef();\n if (resolve) {\n resolve(false);\n this.resolveRef.set(null);\n }\n this.closed.emit();\n }\n\n /** Clears the pending resolver on destroy. */\n ngOnDestroy() {\n this.resolveRef.set(null);\n }\n}\n","@if (visible()) {\n <div\n class=\"shk-dialog-backdrop fixed inset-0 bg-black/40 backdrop-blur-sm flex items-center justify-center z-[9999] p-4\"\n (click)=\"onCancel()\"\n >\n <div\n class=\"shk-dialog-panel bg-white dark:[background-color:var(--shk-surface-100)] rounded-2xl shadow-2xl max-w-sm w-full overflow-hidden\"\n (click)=\"$event.stopPropagation()\"\n >\n <div class=\"p-6\">\n <div class=\"flex items-start gap-4 mb-4\">\n <div\n class=\"w-12 h-12 rounded-full flex items-center justify-center shrink-0\"\n [ngClass]=\"{\n 'bg-red-50 dark:bg-red-900/30 text-red-600 dark:text-red-400': type() === 'danger',\n 'bg-blue-50 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400': type() === 'info',\n 'bg-amber-50 dark:bg-amber-900/30 text-amber-600 dark:text-amber-400': type() === 'warning',\n }\"\n >\n @if (type() === 'info') {\n <svg [lucideIcon]=\"getIcon('info')\" class=\"w-6 h-6\"></svg>\n } @else {\n <svg [lucideIcon]=\"getIcon('triangle-alert')\" class=\"w-6 h-6\"></svg>\n }\n </div>\n <div>\n <h3 class=\"text-lg font-bold _shk-text-surface-800 dark:[color:var(--shk-surface-800)]\">{{ title() }}</h3>\n <p class=\"_shk-text-surface-500 dark:[color:var(--shk-surface-400)] text-sm leading-relaxed mb-6\">{{ message() }}</p>\n </div>\n </div>\n <div class=\"flex gap-3\">\n @if (showCancel()) {\n <button\n type=\"button\"\n (click)=\"onCancel()\"\n [disabled]=\"loading()\"\n class=\"flex-1 px-4 py-2 text-sm font-semibold _shk-text-surface-600 dark:[color:var(--shk-surface-600)] _shk-bg-surface-100 dark:[background-color:var(--shk-surface-200)] hover:[background-color:var(--shk-surface-200)] dark:hover:[background-color:var(--shk-surface-300)] rounded-lg transition-colors flex items-center justify-center gap-2\"\n >\n <svg [lucideIcon]=\"getIcon('x')\" class=\"w-4 h-4\"></svg>\n {{ cancelLabel() }}\n </button>\n }\n <button\n type=\"button\"\n (click)=\"onConfirm()\"\n [disabled]=\"loading()\"\n class=\"flex-1 px-4 py-2 text-sm font-semibold text-white rounded-lg shadow-md transition-all flex items-center justify-center gap-2\"\n [class.bg-red-600]=\"type() === 'danger'\"\n [class.hover:bg-red-700]=\"type() === 'danger'\"\n [class.shadow-red-500/20]=\"type() === 'danger'\"\n [class.bg-primary-600]=\"type() === 'info'\"\n [class.hover:bg-primary-700]=\"type() === 'info'\"\n [class.shadow-primary-500/20]=\"type() === 'info'\"\n [class.bg-amber-600]=\"type() === 'warning'\"\n [class.hover:bg-amber-700]=\"type() === 'warning'\"\n [class.shadow-amber-500/20]=\"type() === 'warning'\"\n >\n @if (loading()) {\n <svg [lucideIcon]=\"getIcon('loader')\" class=\"w-4 h-4 animate-spin\"></svg>\n } @else if (type() === 'danger') {\n <svg [lucideIcon]=\"getIcon('trash-2')\" class=\"w-4 h-4\"></svg>\n }\n {{ loading() ? loadingText() : confirmLabel() }}\n </button>\n </div>\n </div>\n </div>\n </div>\n}\n","import {\n Injectable,\n ComponentRef,\n ApplicationRef,\n createComponent,\n EnvironmentInjector,\n DestroyRef,\n inject,\n} from '@angular/core';\nimport { ConfirmDialogComponent } from './confirm-dialog.component';\n\n/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\n\n/** Options for opening a confirmation dialog. */\nexport interface ConfirmConfig {\n title?: string;\n message: string;\n confirmLabel?: string;\n cancelLabel?: string;\n loadingText?: string;\n type?: 'danger' | 'info' | 'warning';\n showCancel?: boolean;\n loading?: boolean;\n}\n\n/**\n * Programmatically opens the confirmation dialog and resolves a Promise\n * with the user's decision (true = confirm, false = cancel).\n */\n@Injectable({ providedIn: 'root' })\nexport class ConfirmDialogService {\n /** Reference to the currently open dialog, if any. */\n private dialogRef: ComponentRef<ConfirmDialogComponent> | null = null;\n\n private destroyRef = inject(DestroyRef);\n private appRef = inject(ApplicationRef);\n private injector = inject(EnvironmentInjector);\n\n constructor() {\n this.destroyRef.onDestroy(() => this.cleanupDialog());\n }\n\n /**\n * Opens a confirmation dialog with the given configuration and returns a\n * promise resolving with the user's choice.\n */\n async confirm(config: ConfirmConfig): Promise<boolean> {\n if (this.dialogRef) this.cleanupDialog();\n\n this.dialogRef = createComponent(ConfirmDialogComponent, {\n environmentInjector: this.injector,\n });\n\n this.dialogRef.setInput('title', config.title ?? 'Confirmar acción');\n this.dialogRef.setInput('message', config.message);\n this.dialogRef.setInput('confirmLabel', config.confirmLabel ?? 'Confirmar');\n this.dialogRef.setInput('cancelLabel', config.cancelLabel ?? 'Cancelar');\n this.dialogRef.setInput('loadingText', config.loadingText ?? 'Procesando…');\n this.dialogRef.setInput('type', config.type ?? 'danger');\n this.dialogRef.setInput('showCancel', config.showCancel ?? true);\n this.dialogRef.setInput('loading', config.loading ?? false);\n\n document.body.appendChild(this.dialogRef.location.nativeElement);\n this.appRef.attachView(this.dialogRef.hostView);\n try {\n return await this.dialogRef.instance.show();\n } finally {\n this.cleanupDialog();\n }\n }\n\n /** Detaches and destroys the mounted dialog if present. */\n private cleanupDialog(): void {\n if (this.dialogRef) {\n this.appRef.detachView(this.dialogRef.hostView);\n this.dialogRef.destroy();\n this.dialogRef = null;\n }\n }\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["getIconFromCentral"],"mappings":";;;;;;;AAKA;;;;AAIG;AAEH;;;AAGG;MAwCU,sBAAsB,CAAA;AAvCnC,IAAA,WAAA,GAAA;AAwCY,QAAA,IAAA,CAAA,OAAO,GAAG,CAAC,IAAS,KAAKA,OAAkB,CAAC,IAAI,EAAE,mBAAmB,CAAC;;AAGhF,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,kBAAkB,4EAAC;;AAEzC,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAS,uCAAuC,8EAAC;;AAEhE,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAS,WAAW,mFAAC;;AAEzC,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,UAAU,kFAAC;;AAEvC,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,aAAa,kFAAC;;AAE1C,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAgC,QAAQ,2EAAC;;AAErD,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAU,KAAK,8EAAC;;AAE/B,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAU,IAAI,iFAAC;;AAGjC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAU,KAAK,8EAAC;;AAExB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAoC,IAAI,iFAAC;;QAGpE,IAAA,CAAA,MAAM,GAAG,MAAM,EAAQ;AAoCxB,IAAA;;IAjCC,IAAI,GAAA;AACF,QAAA,IAAI,CAAC,OAAO,CAAC,G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