@danarakca/keu-ui 0.0.1 → 1.1.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 CHANGED
@@ -1,63 +1,208 @@
1
- # KeuUi
1
+ # Danarakca Design System
2
2
 
3
- This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.
3
+ > **Keu Design System** - Shared UI components library
4
4
 
5
- ## Code scaffolding
5
+ [![npm version](https://img.shields.io/npm/v/danarakca-design-system.svg)](https://www.npmjs.com/package/danarakca-design-system)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
7
 
7
- Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
8
+ ## 📦 Instalasi
8
9
 
9
10
  ```bash
10
- ng generate component component-name
11
+ npm install danarakca-design-system
11
12
  ```
12
13
 
13
- For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
14
-
15
- ```bash
16
- ng generate --help
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
- ## Building
58
+ ### 2. Setup Styles
20
59
 
21
- To build the library, run:
60
+ Import theme di `styles.scss`:
22
61
 
23
- ```bash
24
- ng build keu-ui
62
+ ```scss
63
+ @use 'danarakca-design-system/styles/keu-ui.theme';
25
64
  ```
26
65
 
27
- This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
28
-
29
- ### Publishing the Library
30
-
31
- Once the project is built, you can publish your library by following these steps:
32
-
33
- 1. Navigate to the `dist` directory:
34
- ```bash
35
- cd dist/keu-ui
36
- ```
37
-
38
- 2. Run the `npm publish` command to publish your library to the npm registry:
39
- ```bash
40
- npm publish
41
- ```
42
-
43
- ## Running unit tests
44
-
45
- To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
46
-
47
- ```bash
48
- ng test
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
- ## Running end-to-end tests
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
- For end-to-end (e2e) testing, run:
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
- ```bash
56
- ng e2e
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
- Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
202
+ ## 📄 License
203
+
204
+ MIT License - CORE APBN Team
60
205
 
61
- ## Additional Resources
206
+ ---
62
207
 
63
- For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
208
+ **Built with ❤️ by CORE APBN Team**