@danarakca/keu-ui 0.0.1 → 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/README.md +187 -42
- package/fesm2022/danarakca-keu-ui.mjs +2 -2
- package/fesm2022/danarakca-keu-ui.mjs.map +1 -1
- package/package.json +5 -4
- package/src/lib/keu-ui.theme.scss +36 -0
package/README.md
CHANGED
|
@@ -1,63 +1,208 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Danarakca Design System
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **Keu Design System** - Shared UI components library
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/danarakca-design-system)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
## 📦 Instalasi
|
|
8
9
|
|
|
9
10
|
```bash
|
|
10
|
-
|
|
11
|
+
npm install danarakca-design-system
|
|
11
12
|
```
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
## 🚀 Quick Start
|
|
15
|
+
|
|
16
|
+
### 1. Import Komponen (Standalone Components)
|
|
17
|
+
|
|
18
|
+
Semua komponen adalah **standalone components**, jadi bisa langsung diimport tanpa perlu NgModule.
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
// app.component.ts
|
|
22
|
+
import { Component } from '@angular/core';
|
|
23
|
+
import { KeuButtonComponent, KeuInputComponent, KeuAlertComponent } from 'danarakca-design-system';
|
|
24
|
+
|
|
25
|
+
@Component({
|
|
26
|
+
selector: 'app-root',
|
|
27
|
+
standalone: true,
|
|
28
|
+
imports: [
|
|
29
|
+
KeuButtonComponent,
|
|
30
|
+
KeuInputComponent,
|
|
31
|
+
KeuAlertComponent
|
|
32
|
+
],
|
|
33
|
+
template: `
|
|
34
|
+
<keu-alert variant="success" [dismissible]="true">
|
|
35
|
+
Welcome to Danarakca Design System!
|
|
36
|
+
</keu-alert>
|
|
37
|
+
|
|
38
|
+
<keu-input
|
|
39
|
+
label="Username"
|
|
40
|
+
placeholder="Enter your username"
|
|
41
|
+
[(ngModel)]="username">
|
|
42
|
+
</keu-input>
|
|
43
|
+
|
|
44
|
+
<keu-button variant="primary" size="md" (click)="handleClick()">
|
|
45
|
+
Submit
|
|
46
|
+
</keu-button>
|
|
47
|
+
`
|
|
48
|
+
})
|
|
49
|
+
export class AppComponent {
|
|
50
|
+
username = '';
|
|
51
|
+
|
|
52
|
+
handleClick() {
|
|
53
|
+
console.log('Button clicked!', this.username);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
17
56
|
```
|
|
18
57
|
|
|
19
|
-
|
|
58
|
+
### 2. Setup Styles
|
|
20
59
|
|
|
21
|
-
|
|
60
|
+
Import theme di `styles.scss`:
|
|
22
61
|
|
|
23
|
-
```
|
|
24
|
-
|
|
62
|
+
```scss
|
|
63
|
+
@use 'danarakca-design-system/styles/keu-ui.theme';
|
|
25
64
|
```
|
|
26
65
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
###
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
66
|
+
## 📚 Komponen yang Tersedia
|
|
67
|
+
|
|
68
|
+
### Form Components
|
|
69
|
+
- ✅ `KeuInputComponent` - Text input field
|
|
70
|
+
- ✅ `KeuTextareaComponent` - Multi-line text input
|
|
71
|
+
- ✅ `KeuSelectComponent` - Select dropdown
|
|
72
|
+
- ✅ `KeuCheckboxComponent` - Checkbox input
|
|
73
|
+
- ✅ `KeuRadioComponent` - Radio button
|
|
74
|
+
- ✅ `KeuToggleComponent` - Toggle switch
|
|
75
|
+
- ✅ `KeuSliderComponent` - Range slider
|
|
76
|
+
- ✅ `KeuDatepickerComponent` - Date picker
|
|
77
|
+
- ✅ `KeuRichtextComponent` - Rich text editor (CKEditor)
|
|
78
|
+
- ✅ `KeuAutocompleteComponent` - Autocomplete input
|
|
79
|
+
- ✅ `KeuTreeSelectComponent` - Tree select dropdown
|
|
80
|
+
- ✅ `KeuRatingComponent` - Star rating
|
|
81
|
+
|
|
82
|
+
### Button & Navigation
|
|
83
|
+
- ✅ `KeuButtonComponent` - Button
|
|
84
|
+
- ✅ `KeuButtonGroupComponent` - Button group
|
|
85
|
+
- ✅ `KeuLinkComponent` - Link/Anchor
|
|
86
|
+
- ✅ `KeuBreadcrumbComponent` - Breadcrumb navigation
|
|
87
|
+
- ✅ `KeuPaginationComponent` - Pagination
|
|
88
|
+
- ✅ `KeuTabsComponent` - Tabs navigation
|
|
89
|
+
- ✅ `KeuDropdownComponent` - Dropdown menu
|
|
90
|
+
|
|
91
|
+
### Data Display
|
|
92
|
+
- ✅ `KeuTableComponent` - Data table with sorting
|
|
93
|
+
- ✅ `KeuBadgeComponent` - Badge/label
|
|
94
|
+
- ✅ `KeuChipComponent` - Chip/tag
|
|
95
|
+
- ✅ `KeuAvatarComponent` - User avatar
|
|
96
|
+
- ✅ `KeuAvatarGroupComponent` - Avatar group
|
|
97
|
+
- ✅ `KeuProgressBarComponent` - Progress bar
|
|
98
|
+
- ✅ `KeuProgressCircleComponent` - Circular progress
|
|
99
|
+
- ✅ `KeuTooltipComponent` - Tooltip
|
|
100
|
+
|
|
101
|
+
### Feedback & Overlay
|
|
102
|
+
- ✅ `KeuAlertComponent` - Alert message
|
|
103
|
+
- ✅ `KeuModalComponent` - Modal dialog
|
|
104
|
+
- ✅ `KeuSidebarComponent` - Sidebar panel
|
|
105
|
+
|
|
106
|
+
### Layout
|
|
107
|
+
- ✅ `KeuContainerDirective` - Container
|
|
108
|
+
- ✅ `KeuRowDirective` - Grid row
|
|
109
|
+
- ✅ `KeuColDirective` - Grid column
|
|
110
|
+
- ✅ `KeuDividerComponent` - Divider line
|
|
111
|
+
- ✅ `KeuIconComponent` - Icon (Tabler Icons)
|
|
112
|
+
|
|
113
|
+
## 💡 Contoh Penggunaan
|
|
114
|
+
|
|
115
|
+
### Button dengan Icon
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
import { KeuButtonComponent } from 'danarakca-design-system';
|
|
119
|
+
|
|
120
|
+
@Component({
|
|
121
|
+
template: `
|
|
122
|
+
<keu-button
|
|
123
|
+
variant="primary"
|
|
124
|
+
size="md"
|
|
125
|
+
icon="ti-plus"
|
|
126
|
+
(click)="addItem()">
|
|
127
|
+
Add New Item
|
|
128
|
+
</keu-button>
|
|
129
|
+
`
|
|
130
|
+
})
|
|
49
131
|
```
|
|
50
132
|
|
|
51
|
-
|
|
133
|
+
### Form Input dengan Validasi
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
import { KeuInputComponent } from 'danarakca-design-system';
|
|
137
|
+
|
|
138
|
+
@Component({
|
|
139
|
+
template: `
|
|
140
|
+
<keu-input
|
|
141
|
+
label="Email"
|
|
142
|
+
type="email"
|
|
143
|
+
placeholder="your@email.com"
|
|
144
|
+
[state]="emailValid ? 'default' : 'error'"
|
|
145
|
+
helperText="Please enter a valid email"
|
|
146
|
+
[(ngModel)]="email">
|
|
147
|
+
</keu-input>
|
|
148
|
+
`
|
|
149
|
+
})
|
|
150
|
+
```
|
|
52
151
|
|
|
53
|
-
|
|
152
|
+
### Data Table
|
|
153
|
+
|
|
154
|
+
```typescript
|
|
155
|
+
import { KeuTableComponent, KeuColumnDef } from 'danarakca-design-system';
|
|
156
|
+
|
|
157
|
+
@Component({
|
|
158
|
+
template: `
|
|
159
|
+
<keu-table
|
|
160
|
+
[data]="users"
|
|
161
|
+
[columns]="columns"
|
|
162
|
+
[sortable]="true"
|
|
163
|
+
(sortChange)="onSort($event)">
|
|
164
|
+
</keu-table>
|
|
165
|
+
`
|
|
166
|
+
})
|
|
167
|
+
export class UsersComponent {
|
|
168
|
+
columns: KeuColumnDef[] = [
|
|
169
|
+
{ key: 'name', header: 'Name' },
|
|
170
|
+
{ key: 'email', header: 'Email' },
|
|
171
|
+
{ key: 'role', header: 'Role' }
|
|
172
|
+
];
|
|
173
|
+
|
|
174
|
+
users = [
|
|
175
|
+
{ name: 'John Doe', email: 'john@example.com', role: 'Admin' },
|
|
176
|
+
{ name: 'Jane Smith', email: 'jane@example.com', role: 'User' }
|
|
177
|
+
];
|
|
178
|
+
}
|
|
179
|
+
```
|
|
54
180
|
|
|
55
|
-
|
|
56
|
-
|
|
181
|
+
### Modal Dialog
|
|
182
|
+
|
|
183
|
+
```typescript
|
|
184
|
+
import { KeuModalComponent } from 'danarakca-design-system';
|
|
185
|
+
|
|
186
|
+
@Component({
|
|
187
|
+
template: `
|
|
188
|
+
<keu-modal
|
|
189
|
+
[(visible)]="showModal"
|
|
190
|
+
title="Confirm Delete"
|
|
191
|
+
variant="danger"
|
|
192
|
+
okText="Delete"
|
|
193
|
+
cancelText="Cancel"
|
|
194
|
+
(ok)="handleDelete()"
|
|
195
|
+
(cancel)="showModal = false">
|
|
196
|
+
Are you sure you want to delete this item?
|
|
197
|
+
</keu-modal>
|
|
198
|
+
`
|
|
199
|
+
})
|
|
57
200
|
```
|
|
58
201
|
|
|
59
|
-
|
|
202
|
+
## 📄 License
|
|
203
|
+
|
|
204
|
+
MIT License - CORE APBN Team
|
|
60
205
|
|
|
61
|
-
|
|
206
|
+
---
|
|
62
207
|
|
|
63
|
-
|
|
208
|
+
**Built with ❤️ by CORE APBN Team**
|
|
@@ -6371,11 +6371,11 @@ class KeuAlertComponent {
|
|
|
6371
6371
|
this.dismissed.emit();
|
|
6372
6372
|
}
|
|
6373
6373
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KeuAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6374
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: KeuAlertComponent, isStandalone: true, selector: "keu-alert", inputs: { variant: "variant", title: "title", content: "content", dismissible: "dismissible" }, outputs: { dismissed: "dismissed" }, ngImport: i0, template: "<div [class]=\"hostClasses\" *ngIf=\"visible\" role=\"alert\">\n <!-- Icon -->\n <span class=\"keu-alert__icon\">\n <!-- Info/check circle for default & success -->\n <svg\n *ngIf=\"variant === 'default' || variant === 'success'\"\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"\n fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z\"\n fill=\"currentColor\" opacity=\"0.15\"\n />\n <path\n d=\"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z\"\n stroke=\"currentColor\" stroke-width=\"1.5\"\n />\n <path\n d=\"M7 10l2 2 4-4\"\n stroke=\"currentColor\" stroke-width=\"1.5\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"\n />\n </svg>\n\n <!-- Warning triangle for warning & danger -->\n <svg\n *ngIf=\"variant === 'warning' || variant === 'danger'\"\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"\n fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8.57 3.22 1.52 15.26A1.67 1.67 0 0 0 2.95 17.75h14.1a1.67 1.67 0 0 0 1.43-2.49L11.43 3.22a1.67 1.67 0 0 0-2.86 0Z\"\n fill=\"currentColor\" opacity=\"0.15\"\n />\n <path\n d=\"M8.57 3.22 1.52 15.26A1.67 1.67 0 0 0 2.95 17.75h14.1a1.67 1.67 0 0 0 1.43-2.49L11.43 3.22a1.67 1.67 0 0 0-2.86 0Z\"\n stroke=\"currentColor\" stroke-width=\"1.5\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"\n />\n <path d=\"M10 8v3\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"/>\n <circle cx=\"10\" cy=\"14\" r=\"0.75\" fill=\"currentColor\"/>\n </svg>\n </span>\n\n <!-- Body -->\n <div class=\"keu-alert__body\">\n <span class=\"keu-alert__title\" *ngIf=\"title\">{{ title }}</span>\n <span class=\"keu-alert__content\" *ngIf=\"content\">{{ content }}</span>\n <ng-content></ng-content>\n </div>\n\n <!-- Close button -->\n <button\n *ngIf=\"dismissible\"\n class=\"keu-alert__close\"\n (click)=\"dismiss()\"\n aria-label=\"Tutup\"\n type=\"button\"\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 4L4 12M4 4l8 8\" stroke=\"currentColor\" stroke-width=\"1.5\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n</div>\n", styles: [".keu-alert{display:flex;align-items:flex-start;gap:10px;padding:14px 16px;border-radius:8px;font-family:var(--keu-font-family);border:1px solid transparent;transition:opacity .2s,transform .2s}.keu-alert__icon{display:inline-flex;flex-shrink:0;margin-top:1px}.keu-alert__body{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}.keu-alert__title{font-size:14px;font-weight:600;line-height:22px}.keu-alert__content{font-size:13px;font-weight:400;line-height:20px}.keu-alert__close{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:28px;height:28px;margin:-4px -6px -4px 0;padding:0;border:none;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s,opacity .15s;opacity:.6}.keu-alert__close:hover{opacity:1;background:#0000000f}.keu-alert--default{background:#ebf5ff;border-color:#bfdbfe}.keu-alert--default .keu-alert__icon{color:#1d71b8}.keu-alert--default .keu-alert__title{color:#1d4e89}.keu-alert--default .keu-alert__content{color:#2a6db5}.keu-alert--default .keu-alert__close{color:#1d4e89}.keu-alert--warning{background:#fff8eb;border-color:#fde68a}.keu-alert--warning .keu-alert__icon{color:#d97706}.keu-alert--warning .keu-alert__title{color:#b45309}.keu-alert--warning .keu-alert__content{color:#d97706}.keu-alert--warning .keu-alert__close{color:#b45309}.keu-alert--danger{background:#fef2f2;border-color:#fecaca}.keu-alert--danger .keu-alert__icon{color:#dc2626}.keu-alert--danger .keu-alert__title{color:#991b1b}.keu-alert--danger .keu-alert__content{color:#dc2626}.keu-alert--danger .keu-alert__close{color:#991b1b}.keu-alert--success{background:#ecfdf5;border-color:#a7f3d0}.keu-alert--success .keu-alert__icon{color:#059669}.keu-alert--success .keu-alert__title{color:#065f46}.keu-alert--success .keu-alert__content{color:#059669}.keu-alert--success .keu-alert__close{color:#065f46}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
6374
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: KeuAlertComponent, isStandalone: true, selector: "keu-alert", inputs: { variant: "variant", title: "title", content: "content", dismissible: "dismissible" }, outputs: { dismissed: "dismissed" }, ngImport: i0, template: "<div [class]=\"hostClasses\" *ngIf=\"visible\" role=\"alert\">\n <!-- Icon -->\n <span class=\"keu-alert__icon\">\n <!-- Info/check circle for default & success -->\n <svg\n *ngIf=\"variant === 'default' || variant === 'success'\"\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"\n fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z\"\n fill=\"currentColor\" opacity=\"0.15\"\n />\n <path\n d=\"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z\"\n stroke=\"currentColor\" stroke-width=\"1.5\"\n />\n <path\n d=\"M7 10l2 2 4-4\"\n stroke=\"currentColor\" stroke-width=\"1.5\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"\n />\n </svg>\n\n <!-- Warning triangle for warning & danger -->\n <svg\n *ngIf=\"variant === 'warning' || variant === 'danger'\"\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"\n fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8.57 3.22 1.52 15.26A1.67 1.67 0 0 0 2.95 17.75h14.1a1.67 1.67 0 0 0 1.43-2.49L11.43 3.22a1.67 1.67 0 0 0-2.86 0Z\"\n fill=\"currentColor\" opacity=\"0.15\"\n />\n <path\n d=\"M8.57 3.22 1.52 15.26A1.67 1.67 0 0 0 2.95 17.75h14.1a1.67 1.67 0 0 0 1.43-2.49L11.43 3.22a1.67 1.67 0 0 0-2.86 0Z\"\n stroke=\"currentColor\" stroke-width=\"1.5\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"\n />\n <path d=\"M10 8v3\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"/>\n <circle cx=\"10\" cy=\"14\" r=\"0.75\" fill=\"currentColor\"/>\n </svg>\n </span>\n\n <!-- Body -->\n <div class=\"keu-alert__body\">\n <span class=\"keu-alert__title\" *ngIf=\"title\">{{ title }}</span>\n <span class=\"keu-alert__content\" *ngIf=\"content\">{{ content }}</span>\n <ng-content></ng-content>\n </div>\n\n <!-- Close button -->\n <button\n *ngIf=\"dismissible\"\n class=\"keu-alert__close\"\n (click)=\"dismiss()\"\n aria-label=\"Tutup\"\n type=\"button\"\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 4L4 12M4 4l8 8\" stroke=\"currentColor\" stroke-width=\"1.5\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n</div>\n", styles: [".keu-alert{display:flex;align-items:flex-start;gap:10px;padding:14px 16px;border-radius:8px;font-family:var(--keu-font-family);border:1px solid transparent;transition:opacity .2s,transform .2s}.keu-alert__icon{display:inline-flex;flex-shrink:0;margin-top:1px}.keu-alert__body{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}.keu-alert__title{font-size:14px;font-weight:600;line-height:22px}.keu-alert__content{font-size:13px;font-weight:400;line-height:20px}.keu-alert button{font-family:inherit}.keu-alert__close{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:28px;height:28px;margin:-4px -6px -4px 0;padding:0;border:none;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s,opacity .15s;opacity:.6}.keu-alert__close:hover{opacity:1;background:#0000000f}.keu-alert--default{background:#ebf5ff;border-color:#bfdbfe}.keu-alert--default .keu-alert__icon{color:#1d71b8}.keu-alert--default .keu-alert__title{color:#1d4e89}.keu-alert--default .keu-alert__content{color:#2a6db5}.keu-alert--default .keu-alert__close{color:#1d4e89}.keu-alert--warning{background:#fff8eb;border-color:#fde68a}.keu-alert--warning .keu-alert__icon{color:#d97706}.keu-alert--warning .keu-alert__title{color:#b45309}.keu-alert--warning .keu-alert__content{color:#d97706}.keu-alert--warning .keu-alert__close{color:#b45309}.keu-alert--danger{background:#fef2f2;border-color:#fecaca}.keu-alert--danger .keu-alert__icon{color:#dc2626}.keu-alert--danger .keu-alert__title{color:#991b1b}.keu-alert--danger .keu-alert__content{color:#dc2626}.keu-alert--danger .keu-alert__close{color:#991b1b}.keu-alert--success{background:#ecfdf5;border-color:#a7f3d0}.keu-alert--success .keu-alert__icon{color:#059669}.keu-alert--success .keu-alert__title{color:#065f46}.keu-alert--success .keu-alert__content{color:#059669}.keu-alert--success .keu-alert__close{color:#065f46}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
6375
6375
|
}
|
|
6376
6376
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KeuAlertComponent, decorators: [{
|
|
6377
6377
|
type: Component,
|
|
6378
|
-
args: [{ selector: 'keu-alert', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div [class]=\"hostClasses\" *ngIf=\"visible\" role=\"alert\">\n <!-- Icon -->\n <span class=\"keu-alert__icon\">\n <!-- Info/check circle for default & success -->\n <svg\n *ngIf=\"variant === 'default' || variant === 'success'\"\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"\n fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z\"\n fill=\"currentColor\" opacity=\"0.15\"\n />\n <path\n d=\"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z\"\n stroke=\"currentColor\" stroke-width=\"1.5\"\n />\n <path\n d=\"M7 10l2 2 4-4\"\n stroke=\"currentColor\" stroke-width=\"1.5\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"\n />\n </svg>\n\n <!-- Warning triangle for warning & danger -->\n <svg\n *ngIf=\"variant === 'warning' || variant === 'danger'\"\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"\n fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8.57 3.22 1.52 15.26A1.67 1.67 0 0 0 2.95 17.75h14.1a1.67 1.67 0 0 0 1.43-2.49L11.43 3.22a1.67 1.67 0 0 0-2.86 0Z\"\n fill=\"currentColor\" opacity=\"0.15\"\n />\n <path\n d=\"M8.57 3.22 1.52 15.26A1.67 1.67 0 0 0 2.95 17.75h14.1a1.67 1.67 0 0 0 1.43-2.49L11.43 3.22a1.67 1.67 0 0 0-2.86 0Z\"\n stroke=\"currentColor\" stroke-width=\"1.5\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"\n />\n <path d=\"M10 8v3\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"/>\n <circle cx=\"10\" cy=\"14\" r=\"0.75\" fill=\"currentColor\"/>\n </svg>\n </span>\n\n <!-- Body -->\n <div class=\"keu-alert__body\">\n <span class=\"keu-alert__title\" *ngIf=\"title\">{{ title }}</span>\n <span class=\"keu-alert__content\" *ngIf=\"content\">{{ content }}</span>\n <ng-content></ng-content>\n </div>\n\n <!-- Close button -->\n <button\n *ngIf=\"dismissible\"\n class=\"keu-alert__close\"\n (click)=\"dismiss()\"\n aria-label=\"Tutup\"\n type=\"button\"\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 4L4 12M4 4l8 8\" stroke=\"currentColor\" stroke-width=\"1.5\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n</div>\n", styles: [".keu-alert{display:flex;align-items:flex-start;gap:10px;padding:14px 16px;border-radius:8px;font-family:var(--keu-font-family);border:1px solid transparent;transition:opacity .2s,transform .2s}.keu-alert__icon{display:inline-flex;flex-shrink:0;margin-top:1px}.keu-alert__body{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}.keu-alert__title{font-size:14px;font-weight:600;line-height:22px}.keu-alert__content{font-size:13px;font-weight:400;line-height:20px}.keu-alert__close{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:28px;height:28px;margin:-4px -6px -4px 0;padding:0;border:none;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s,opacity .15s;opacity:.6}.keu-alert__close:hover{opacity:1;background:#0000000f}.keu-alert--default{background:#ebf5ff;border-color:#bfdbfe}.keu-alert--default .keu-alert__icon{color:#1d71b8}.keu-alert--default .keu-alert__title{color:#1d4e89}.keu-alert--default .keu-alert__content{color:#2a6db5}.keu-alert--default .keu-alert__close{color:#1d4e89}.keu-alert--warning{background:#fff8eb;border-color:#fde68a}.keu-alert--warning .keu-alert__icon{color:#d97706}.keu-alert--warning .keu-alert__title{color:#b45309}.keu-alert--warning .keu-alert__content{color:#d97706}.keu-alert--warning .keu-alert__close{color:#b45309}.keu-alert--danger{background:#fef2f2;border-color:#fecaca}.keu-alert--danger .keu-alert__icon{color:#dc2626}.keu-alert--danger .keu-alert__title{color:#991b1b}.keu-alert--danger .keu-alert__content{color:#dc2626}.keu-alert--danger .keu-alert__close{color:#991b1b}.keu-alert--success{background:#ecfdf5;border-color:#a7f3d0}.keu-alert--success .keu-alert__icon{color:#059669}.keu-alert--success .keu-alert__title{color:#065f46}.keu-alert--success .keu-alert__content{color:#059669}.keu-alert--success .keu-alert__close{color:#065f46}\n"] }]
|
|
6378
|
+
args: [{ selector: 'keu-alert', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div [class]=\"hostClasses\" *ngIf=\"visible\" role=\"alert\">\n <!-- Icon -->\n <span class=\"keu-alert__icon\">\n <!-- Info/check circle for default & success -->\n <svg\n *ngIf=\"variant === 'default' || variant === 'success'\"\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"\n fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z\"\n fill=\"currentColor\" opacity=\"0.15\"\n />\n <path\n d=\"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z\"\n stroke=\"currentColor\" stroke-width=\"1.5\"\n />\n <path\n d=\"M7 10l2 2 4-4\"\n stroke=\"currentColor\" stroke-width=\"1.5\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"\n />\n </svg>\n\n <!-- Warning triangle for warning & danger -->\n <svg\n *ngIf=\"variant === 'warning' || variant === 'danger'\"\n width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"\n fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8.57 3.22 1.52 15.26A1.67 1.67 0 0 0 2.95 17.75h14.1a1.67 1.67 0 0 0 1.43-2.49L11.43 3.22a1.67 1.67 0 0 0-2.86 0Z\"\n fill=\"currentColor\" opacity=\"0.15\"\n />\n <path\n d=\"M8.57 3.22 1.52 15.26A1.67 1.67 0 0 0 2.95 17.75h14.1a1.67 1.67 0 0 0 1.43-2.49L11.43 3.22a1.67 1.67 0 0 0-2.86 0Z\"\n stroke=\"currentColor\" stroke-width=\"1.5\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"\n />\n <path d=\"M10 8v3\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"/>\n <circle cx=\"10\" cy=\"14\" r=\"0.75\" fill=\"currentColor\"/>\n </svg>\n </span>\n\n <!-- Body -->\n <div class=\"keu-alert__body\">\n <span class=\"keu-alert__title\" *ngIf=\"title\">{{ title }}</span>\n <span class=\"keu-alert__content\" *ngIf=\"content\">{{ content }}</span>\n <ng-content></ng-content>\n </div>\n\n <!-- Close button -->\n <button\n *ngIf=\"dismissible\"\n class=\"keu-alert__close\"\n (click)=\"dismiss()\"\n aria-label=\"Tutup\"\n type=\"button\"\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 4L4 12M4 4l8 8\" stroke=\"currentColor\" stroke-width=\"1.5\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n</div>\n", styles: [".keu-alert{display:flex;align-items:flex-start;gap:10px;padding:14px 16px;border-radius:8px;font-family:var(--keu-font-family);border:1px solid transparent;transition:opacity .2s,transform .2s}.keu-alert__icon{display:inline-flex;flex-shrink:0;margin-top:1px}.keu-alert__body{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}.keu-alert__title{font-size:14px;font-weight:600;line-height:22px}.keu-alert__content{font-size:13px;font-weight:400;line-height:20px}.keu-alert button{font-family:inherit}.keu-alert__close{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:28px;height:28px;margin:-4px -6px -4px 0;padding:0;border:none;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s,opacity .15s;opacity:.6}.keu-alert__close:hover{opacity:1;background:#0000000f}.keu-alert--default{background:#ebf5ff;border-color:#bfdbfe}.keu-alert--default .keu-alert__icon{color:#1d71b8}.keu-alert--default .keu-alert__title{color:#1d4e89}.keu-alert--default .keu-alert__content{color:#2a6db5}.keu-alert--default .keu-alert__close{color:#1d4e89}.keu-alert--warning{background:#fff8eb;border-color:#fde68a}.keu-alert--warning .keu-alert__icon{color:#d97706}.keu-alert--warning .keu-alert__title{color:#b45309}.keu-alert--warning .keu-alert__content{color:#d97706}.keu-alert--warning .keu-alert__close{color:#b45309}.keu-alert--danger{background:#fef2f2;border-color:#fecaca}.keu-alert--danger .keu-alert__icon{color:#dc2626}.keu-alert--danger .keu-alert__title{color:#991b1b}.keu-alert--danger .keu-alert__content{color:#dc2626}.keu-alert--danger .keu-alert__close{color:#991b1b}.keu-alert--success{background:#ecfdf5;border-color:#a7f3d0}.keu-alert--success .keu-alert__icon{color:#059669}.keu-alert--success .keu-alert__title{color:#065f46}.keu-alert--success .keu-alert__content{color:#059669}.keu-alert--success .keu-alert__close{color:#065f46}\n"] }]
|
|
6379
6379
|
}], propDecorators: { variant: [{
|
|
6380
6380
|
type: Input
|
|
6381
6381
|
}], title: [{
|