lib-pajakio-v2 1.0.23 → 1.0.25
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/AGENTS.md +174 -0
- package/dist/lib-pajakio-v2.common.js +154 -116
- package/dist/lib-pajakio-v2.common.js.map +1 -1
- package/dist/lib-pajakio-v2.umd.js +154 -116
- package/dist/lib-pajakio-v2.umd.js.map +1 -1
- package/dist/lib-pajakio-v2.umd.min.js +1 -1
- package/dist/lib-pajakio-v2.umd.min.js.map +1 -1
- package/docs/specs/README.md +77 -0
- package/docs/specs/base-and-icons.md +154 -0
- package/docs/specs/date-picker.md +131 -0
- package/docs/specs/dropdowns.md +192 -0
- package/docs/specs/feedback-overlays.md +133 -0
- package/docs/specs/forms.md +286 -0
- package/docs/specs/navigation-layout.md +173 -0
- package/docs/specs/table-and-tabs.md +93 -0
- package/package.json +1 -1
- package/src/components/DatePicker/index.vue +10 -1
- package/src/components/SideNav/index.vue +41 -1
package/AGENTS.md
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Panduan Library Component Pajak.io
|
|
2
|
+
|
|
3
|
+
Dokumen ini menjelaskan cara memakai `lib-pajakio-v2`, daftar component yang diekspor, teknologi yang dipakai, dan syarat minimal agar library bisa digunakan di project lain.
|
|
4
|
+
|
|
5
|
+
## Ringkasan
|
|
6
|
+
|
|
7
|
+
`lib-pajakio-v2` adalah library UI berbasis Vue untuk aplikasi Pajak.io/Fintax. Entry point library berada di `src/install.js` dan mengekspor named component dari `src/components/index.js`.
|
|
8
|
+
|
|
9
|
+
Package:
|
|
10
|
+
|
|
11
|
+
- Nama package: `lib-pajakio-v2`
|
|
12
|
+
- Versi saat dokumen dibuat: `1.0.24`
|
|
13
|
+
- Main bundle: `dist/lib-pajakio-v2.common.js`
|
|
14
|
+
- Style bundle: `dist/lib-pajakio-v2.css`
|
|
15
|
+
|
|
16
|
+
## Bahasa dan teknologi
|
|
17
|
+
|
|
18
|
+
Library ini memakai:
|
|
19
|
+
|
|
20
|
+
- JavaScript
|
|
21
|
+
- Vue Single File Component (`.vue`)
|
|
22
|
+
- Vue 3
|
|
23
|
+
- SCSS/Sass
|
|
24
|
+
- HTML template Vue
|
|
25
|
+
- CSS utility class lokal dari `src/assets/style`
|
|
26
|
+
|
|
27
|
+
Build tool yang tersedia:
|
|
28
|
+
|
|
29
|
+
- Vue CLI untuk build library (`npm run build-library`)
|
|
30
|
+
- Vite untuk development/build aplikasi demo (`npm run dev`, `npm run build:vite`)
|
|
31
|
+
|
|
32
|
+
## Syarat penggunaan di project lain
|
|
33
|
+
|
|
34
|
+
Project yang memakai library ini sebaiknya memenuhi syarat berikut:
|
|
35
|
+
|
|
36
|
+
- Menggunakan Vue 3.
|
|
37
|
+
- Menggunakan bundler yang mendukung Vue SFC dan CSS import, misalnya Vite atau Vue CLI.
|
|
38
|
+
- Meng-install dependency runtime yang dibutuhkan component:
|
|
39
|
+
- `vue`
|
|
40
|
+
- `vue-router` jika memakai component yang memakai `<router-link>` atau `$route`, seperti `DashboardFooter` dan sebagian alur `DashboardHeader`.
|
|
41
|
+
- `js-cookie` jika memakai `DashboardHeader` dengan fitur session/logout.
|
|
42
|
+
- Mengimpor CSS library agar styling component aktif.
|
|
43
|
+
- Memastikan alias `@` di project consumer tidak bentrok bila memakai source component langsung. Untuk penggunaan normal dari package, gunakan bundle `dist`.
|
|
44
|
+
- Menyediakan data props dengan shape yang sesuai. Beberapa component masih mengakses property object secara langsung, jadi nilai `null`/shape berbeda bisa memicu error.
|
|
45
|
+
|
|
46
|
+
## Instalasi dan penggunaan
|
|
47
|
+
|
|
48
|
+
Install package dari registry/private registry yang digunakan project:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npm install lib-pajakio-v2
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Import component yang dibutuhkan:
|
|
55
|
+
|
|
56
|
+
```js
|
|
57
|
+
import { BaseButton, FormInput, DatePicker } from "lib-pajakio-v2";
|
|
58
|
+
import "lib-pajakio-v2/dist/lib-pajakio-v2.css";
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Contoh pemakaian di Vue:
|
|
62
|
+
|
|
63
|
+
```vue
|
|
64
|
+
<template>
|
|
65
|
+
<form-input v-model="name" placeholder="Nama wajib pajak">
|
|
66
|
+
<template #label>
|
|
67
|
+
<typo-text variant="body-1-bold">Nama</typo-text>
|
|
68
|
+
</template>
|
|
69
|
+
</form-input>
|
|
70
|
+
|
|
71
|
+
<base-button variant="primary" icon-left="save">
|
|
72
|
+
Simpan
|
|
73
|
+
</base-button>
|
|
74
|
+
</template>
|
|
75
|
+
|
|
76
|
+
<script>
|
|
77
|
+
import { BaseButton, FormInput, TypoText } from "lib-pajakio-v2";
|
|
78
|
+
import "lib-pajakio-v2/dist/lib-pajakio-v2.css";
|
|
79
|
+
|
|
80
|
+
export default {
|
|
81
|
+
components: { BaseButton, FormInput, TypoText },
|
|
82
|
+
data() {
|
|
83
|
+
return { name: "" };
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
</script>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Library ini belum menyediakan plugin installer global (`app.use(...)`). Cara paling aman adalah import named component dan register di component/page yang membutuhkan.
|
|
90
|
+
|
|
91
|
+
## Development library
|
|
92
|
+
|
|
93
|
+
Install dependency:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npm install
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Jalankan demo Vue CLI:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
npm run serve
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Jalankan demo Vite:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
npm run dev
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Build library:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
npm run build-library
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Component yang tersedia
|
|
118
|
+
|
|
119
|
+
Named export dari `src/components/index.js`:
|
|
120
|
+
|
|
121
|
+
- `AnimatedIconLogo`
|
|
122
|
+
- `BaseButton`
|
|
123
|
+
- `BaseIcon`
|
|
124
|
+
- `BaseTable`
|
|
125
|
+
- `Breadcrumbs`
|
|
126
|
+
- `DashboardFooter`
|
|
127
|
+
- `DashboardHeader`
|
|
128
|
+
- `DatePicker`
|
|
129
|
+
- `Dropdown`
|
|
130
|
+
- `DropdownCheckbox`
|
|
131
|
+
- `DropdownCompany`
|
|
132
|
+
- `DropdownMultipleTag`
|
|
133
|
+
- `DropdownSearchList`
|
|
134
|
+
- `DropdownSelect`
|
|
135
|
+
- `ExpansionPanel`
|
|
136
|
+
- `FormCheckbox`
|
|
137
|
+
- `FormGroupCheckbox`
|
|
138
|
+
- `FormInput`
|
|
139
|
+
- `FormInputTag`
|
|
140
|
+
- `FormRadio`
|
|
141
|
+
- `FormSwitch`
|
|
142
|
+
- `FormTextarea`
|
|
143
|
+
- `FormWysiwyg`
|
|
144
|
+
- `LoadingIcon`
|
|
145
|
+
- `ModalDialog`
|
|
146
|
+
- `SideNav`
|
|
147
|
+
- `Snackbar`
|
|
148
|
+
- `Stepper`
|
|
149
|
+
- `TablePagination`
|
|
150
|
+
- `Tabmenu`
|
|
151
|
+
- `TypoText`
|
|
152
|
+
|
|
153
|
+
Ada juga banyak component SVG icon di `src/components/Icons/*`. Icon individual tidak diekspor satu per satu dari package utama, tetapi digunakan melalui `BaseIcon` dengan prop `iconName`.
|
|
154
|
+
|
|
155
|
+
## Struktur dokumentasi component
|
|
156
|
+
|
|
157
|
+
Detail component, props, events, slots, dan contoh penggunaan ada di:
|
|
158
|
+
|
|
159
|
+
- `docs/specs/README.md`
|
|
160
|
+
- `docs/specs/base-and-icons.md`
|
|
161
|
+
- `docs/specs/forms.md`
|
|
162
|
+
- `docs/specs/dropdowns.md`
|
|
163
|
+
- `docs/specs/date-picker.md`
|
|
164
|
+
- `docs/specs/navigation-layout.md`
|
|
165
|
+
- `docs/specs/feedback-overlays.md`
|
|
166
|
+
- `docs/specs/table-and-tabs.md`
|
|
167
|
+
|
|
168
|
+
## Catatan integrasi penting
|
|
169
|
+
|
|
170
|
+
- Mayoritas input memakai kontrak `v-model` Vue 3, yaitu prop `modelValue` dan event `update:modelValue`.
|
|
171
|
+
- Beberapa component memakai event custom seperti `clickPage`, `changeSize`, `actionMenu`, `handleClose`, atau `actionRoute`.
|
|
172
|
+
- Component `FormInput`, `FormTextarea`, `FormInputTag`, dan `FormWysiwyg` menerima slot `label`.
|
|
173
|
+
- Component `Dropdown`, `DropdownCheckbox`, `DropdownCompany`, `ModalDialog`, `ExpansionPanel`, dan `Snackbar` mengandalkan slot untuk isi yang fleksibel.
|
|
174
|
+
- `DashboardHeader` melakukan redirect logout dan membaca cookie `pajakio`; pakai component ini hanya bila aplikasi consumer memang punya flow session yang kompatibel.
|