@talentlytica/prodigy 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 +115 -0
- package/dist/components/ActionIcon/ActionIcon.d.ts +6 -0
- package/dist/components/Alert/Alert.d.ts +5 -0
- package/dist/components/Anchor/Anchor.d.ts +6 -0
- package/dist/components/AppShell/AppShell.d.ts +7 -0
- package/dist/components/Avatar/Avatar.d.ts +5 -0
- package/dist/components/Badge/Badge.d.ts +16 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +5 -0
- package/dist/components/Burger/Burger.d.ts +6 -0
- package/dist/components/Button/Button.d.ts +20 -0
- package/dist/components/Card/Card.d.ts +6 -0
- package/dist/components/Checkbox/Checkbox.d.ts +5 -0
- package/dist/components/Divider/Divider.d.ts +4 -0
- package/dist/components/Indicator/Indicator.d.ts +5 -0
- package/dist/components/Menu/Menu.d.ts +6 -0
- package/dist/components/Modal/Modal.d.ts +6 -0
- package/dist/components/NavLink/NavLink.d.ts +6 -0
- package/dist/components/NumberInput/NumberInput.d.ts +5 -0
- package/dist/components/Pagination/Pagination.d.ts +5 -0
- package/dist/components/Paper/Paper.d.ts +5 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts +5 -0
- package/dist/components/Progress/Progress.d.ts +5 -0
- package/dist/components/Radio/Radio.d.ts +5 -0
- package/dist/components/Select/Select.d.ts +6 -0
- package/dist/components/Switch/Switch.d.ts +6 -0
- package/dist/components/Table/Table.d.ts +9 -0
- package/dist/components/Tabs/Tabs.d.ts +6 -0
- package/dist/components/TextInput/TextInput.d.ts +6 -0
- package/dist/components/Textarea/Textarea.d.ts +5 -0
- package/dist/components/ThemeIcon/ThemeIcon.d.ts +5 -0
- package/dist/components/Tooltip/Tooltip.d.ts +5 -0
- package/dist/components/index.d.ts +31 -0
- package/dist/components/primitives.d.ts +23 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +191 -0
- package/dist/theme.d.ts +1 -0
- package/dist/themes/index.d.ts +2 -0
- package/dist/themes/kelola.d.ts +148 -0
- package/package.json +64 -0
package/README.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# talentlytica-prodigy
|
|
2
|
+
|
|
3
|
+
Design system **Talentlytica Prodigy** — berbasis **Mantine v9** dengan **tema Kelola Apps**. Package **pnpm** (library ESM + type declarations); dokumentasi komponen berjalan di **Storybook 10**.
|
|
4
|
+
|
|
5
|
+
**Satu tema (Kelola), satu layer komponen.** Token hidup di `src/themes/kelola.ts`; komponen (`src/components`) tinggal re-export Mantine dengan default terkunci di theme.
|
|
6
|
+
|
|
7
|
+
> Audit sumber: [`../design-system-kelola.md`](../design-system-kelola.md) (Kelola). Arsip audit Integro (fase testing awal): [`../design-system.md`](../design-system.md).
|
|
8
|
+
|
|
9
|
+
## Menjalankan
|
|
10
|
+
|
|
11
|
+
**Prasyarat: Node.js ≥ 20.19 atau ≥ 22.12** (wajib untuk Storybook 10 + Vite 8).
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
cd prodigy-ui
|
|
15
|
+
pnpm install
|
|
16
|
+
pnpm storybook # dev docs → http://localhost:6006
|
|
17
|
+
pnpm build # build library → dist/ (ESM + .d.ts)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Perintah lain: `pnpm build-storybook` (docs statis), `pnpm typecheck`.
|
|
21
|
+
|
|
22
|
+
> Sudah diverifikasi di Node 20.20.2: `build-storybook` sukses & `tsc --noEmit` bersih.
|
|
23
|
+
|
|
24
|
+
## Kenapa dibuat begini (anti-fragmentasi)
|
|
25
|
+
|
|
26
|
+
Isu di Kelola: styling melewati theme — ribuan inline `style=`, `UnstyledButton` dipakai jauh lebih banyak dari `Button`, plus sistem tipografi/utility paralel. Prodigy mencegahnya lewat **tiga lapis**:
|
|
27
|
+
|
|
28
|
+
1. **Theme mengunci default** — `src/themes/kelola.ts` memakai `Component.extend({ defaultProps })`. Semua keputusan visual default ada di satu tempat.
|
|
29
|
+
2. **Satu pintu import** — komponen di-export dari paket ini (`src/components`). Aplikasi tidak `import` dari `@mantine/core` langsung.
|
|
30
|
+
3. **Lint guard** — `eslint.config.js` melarang impor `@mantine/core` di luar design system (`no-restricted-imports`). Aktifkan: `pnpm add -D eslint && pnpm eslint src`.
|
|
31
|
+
|
|
32
|
+
Props tetap **100% API Mantine** → tidak ada API baru untuk dihafal, dan tabel props di Storybook (`Controls`) mengikuti Mantine.
|
|
33
|
+
|
|
34
|
+
## Arsitektur
|
|
35
|
+
|
|
36
|
+
Tiap komponen adalah **re-export tipis** dari Mantine (menjaga tipe polimorfik tetap utuh); "keputusan visual" ditaruh di theme, bukan di tiap wrapper.
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
prodigy-ui/
|
|
40
|
+
├─ .storybook/ # main.ts, preview.tsx (MantineProvider + toggle light/dark), preview-head.html (font)
|
|
41
|
+
├─ src/
|
|
42
|
+
│ ├─ themes/ # kelola.ts · index.ts — token + defaultProps (tema Kelola)
|
|
43
|
+
│ ├─ theme.ts # kompat: re-export theme
|
|
44
|
+
│ ├─ index.ts # entry paket
|
|
45
|
+
│ ├─ components/
|
|
46
|
+
│ │ ├─ index.ts # barrel (satu pintu import)
|
|
47
|
+
│ │ ├─ primitives.ts # Group/Stack/Flex/Grid/Text/Title … (re-export)
|
|
48
|
+
│ │ └─ <Nama>/<Nama>.tsx + <Nama>.stories.tsx
|
|
49
|
+
│ └─ stories/ # Foundations (Colors, Typography, Spacing, Shadows, Radius, Icons) + Layout/Primitives
|
|
50
|
+
├─ postcss.config.cjs # wajib untuk Mantine (preset + breakpoints)
|
|
51
|
+
└─ eslint.config.js # lint guard anti-fragmentasi
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Komponen (30) + primitives (12)
|
|
55
|
+
|
|
56
|
+
- **Atoms:** Button, Badge, Anchor, Alert, Tooltip, Card, ActionIcon, ThemeIcon, Indicator
|
|
57
|
+
- **Forms:** TextInput, NumberInput, PasswordInput, Textarea, Select, Checkbox, Radio, Switch
|
|
58
|
+
- **Navigation:** Breadcrumbs, NavLink, Burger, Menu, Tabs, Pagination
|
|
59
|
+
- **Layout:** AppShell + **Primitives** (`primitives.ts`: Group, Stack, Flex, Grid, SimpleGrid, Container, Center, Box, Image, ScrollArea, Text, Title)
|
|
60
|
+
- **Overlays:** Modal · **Data display:** Avatar, Divider, Paper, Progress, Table
|
|
61
|
+
- **Foundations:** Colors, Typography, Spacing, Shadows, Radius, **Icons** (Tabler + preview props)
|
|
62
|
+
|
|
63
|
+
Visual di-tuning ke Kelola: tombol/input **pill** + bold, badge pill uppercase, avatar bulat, kartu radius `md`, font Avenir → Open Sans. Molecule (pola *list-page*) menyusul.
|
|
64
|
+
|
|
65
|
+
Cara pakai:
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
import '@mantine/core/styles.css';
|
|
69
|
+
import { MantineProvider } from '@mantine/core';
|
|
70
|
+
import { theme, Button, Badge } from '@talentlytica/prodigy'; // theme = Kelola
|
|
71
|
+
// atau eksplisit: import { kelolaTheme } from '@talentlytica/prodigy';
|
|
72
|
+
|
|
73
|
+
export function App() {
|
|
74
|
+
return (
|
|
75
|
+
<MantineProvider theme={theme}>
|
|
76
|
+
<Button>Simpan</Button> {/* primary (biru Kelola) */}
|
|
77
|
+
<Button color="secondary">Tambah</Button>
|
|
78
|
+
<Badge color="success">Selesai</Badge>
|
|
79
|
+
</MantineProvider>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Pakai sebagai package (di app lain)
|
|
85
|
+
|
|
86
|
+
Di-publish **publik** ke **npm** (npmjs.org) sebagai `@talentlytica/prodigy` — **tanpa token, tanpa setup registry**.
|
|
87
|
+
|
|
88
|
+
**1. Install** (peer deps ikut):
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pnpm add @talentlytica/prodigy @mantine/core @mantine/hooks react react-dom
|
|
92
|
+
# atau: npm install @talentlytica/prodigy @mantine/core @mantine/hooks react react-dom
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**2. Pakai** — import CSS Mantine + bungkus `MantineProvider` dengan tema Kelola (lihat contoh di atas).
|
|
96
|
+
|
|
97
|
+
> **Font:** tema memakai Avenir → fallback Open Sans. Muat font pilihanmu di app konsumen (mis. `@fontsource/open-sans`, atau `<link>` Google Fonts); tanpa itu browser jatuh ke sans-serif sistem.
|
|
98
|
+
|
|
99
|
+
Rilis versi baru (maintainer): lihat [`RELEASING.md`](RELEASING.md).
|
|
100
|
+
|
|
101
|
+
## Menambah komponen baru (tanpa fragmentasi)
|
|
102
|
+
|
|
103
|
+
1. Buat `src/components/<Nama>/<Nama>.tsx` → `export { X, type XProps } from '@mantine/core';` + JSDoc konvensi pakainya.
|
|
104
|
+
2. Tambahkan default visual (jika perlu) di `src/themes/kelola.ts` via `X.extend({ defaultProps })`.
|
|
105
|
+
3. Daftarkan di `src/components/index.ts`.
|
|
106
|
+
4. Buat `<Nama>.stories.tsx` (title `Atoms/…` / `Forms/…`, `argTypes` mengikuti props Mantine — **tanpa** `tags: ['autodocs']`).
|
|
107
|
+
5. Buat halaman docs `<Nama>.mdx` gaya Gamut (attach via `<Meta of={…Stories} />`; embed story lewat `<Canvas of>` + `<Controls of>`), seperti komponen lain.
|
|
108
|
+
|
|
109
|
+
## Catatan versi
|
|
110
|
+
|
|
111
|
+
Package manager **pnpm** (`packageManager: pnpm@9.15.9`). Library dibundel **Vite lib (ESM)** + declarations via `tsc` (`tsconfig.build.json`); peer (`react`, `react-dom`, `@mantine/core`) di-externalize. Di-pin ke Mantine `^9.4`, Storybook `^10.5`, React `19`, Vite `8`, TypeScript `^5.7`. Butuh Node ≥ 20.19 / 22.12. ESLint tidak ikut ter-install secara default — tambahkan saat mengaktifkan lint guard.
|
|
112
|
+
|
|
113
|
+
## Belum termasuk
|
|
114
|
+
|
|
115
|
+
Fitur yang butuh paket ekstensi (lihat `design-system-kelola.md`): tabel sort/search/paginate (`mantine-react-table` — dipakai Kelola), chart (`@mantine/charts`), rich text (`@mantine/tiptap`), notifikasi (`@mantine/notifications`), date picker (`@mantine/dates`), ikon (`@tabler/icons-react`).
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ActionIcon — tombol khusus ikon (lonceng notifikasi, aksi baris tabel, toggle).
|
|
3
|
+
* Default Prodigy: `variant="subtle"`, `color="gray"` (dikunci di theme).
|
|
4
|
+
* WAJIB beri `aria-label` karena tidak ada teks. Untuk tombol dengan teks pakai `Button`.
|
|
5
|
+
*/
|
|
6
|
+
export { ActionIcon, type ActionIconProps } from '@mantine/core';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Anchor — tautan teks. Warna mengikuti `brand`, garis bawah muncul saat hover
|
|
3
|
+
* (dikunci di theme). Untuk aksi berbentuk teks-klik gunakan `Button variant="subtle"`,
|
|
4
|
+
* untuk navigasi/hyperlink gunakan `Anchor`.
|
|
5
|
+
*/
|
|
6
|
+
export { Anchor, type AnchorProps } from '@mantine/core';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AppShell — kerangka aplikasi Kelola (sidebar + header).
|
|
3
|
+
* Susun dari `AppShell.Header`, `AppShell.Navbar`,
|
|
4
|
+
* `AppShell.Main`. Pasangkan dengan `Burger` + `useDisclosure` untuk sidebar
|
|
5
|
+
* yang bisa dilipat di layar kecil.
|
|
6
|
+
*/
|
|
7
|
+
export { AppShell, type AppShellProps } from '@mantine/core';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Badge — satu-satunya cara menampilkan STATUS di Prodigy.
|
|
3
|
+
*
|
|
4
|
+
* Menggantikan campur-aduk (badge + tombol "Status Terbaru" + teks polos).
|
|
5
|
+
* Default `variant="light"`, `radius="xl"` (pill) dikunci di theme.
|
|
6
|
+
*
|
|
7
|
+
* Konvensi warna status:
|
|
8
|
+
* | Status | Cara pakai |
|
|
9
|
+
* |----------------------|-----------------------------------------|
|
|
10
|
+
* | Sukses / selesai | `<Badge color="success">Selesai</Badge>`|
|
|
11
|
+
* | Berjalan / info | `<Badge color="info">Berlangsung</Badge>`|
|
|
12
|
+
* | Perlu perhatian | `<Badge color="warning">Pending</Badge>` |
|
|
13
|
+
* | Gagal / ditolak | `<Badge color="error">Gagal</Badge>` |
|
|
14
|
+
* | Netral | `<Badge color="gray">Draft</Badge>` |
|
|
15
|
+
*/
|
|
16
|
+
export { Badge, type BadgeProps } from '@mantine/core';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Burger — tombol hamburger untuk buka/tutup sidebar di layar kecil
|
|
3
|
+
* (mengganti `navbar-toggler`). Kontrol lewat `opened` + `onClick`,
|
|
4
|
+
* biasanya dipasangkan dengan `AppShell` + `useDisclosure`.
|
|
5
|
+
*/
|
|
6
|
+
export { Burger, type BurgerProps } from '@mantine/core';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Button — aksi utama Talentlytica Prodigy.
|
|
3
|
+
*
|
|
4
|
+
* Re-export tipis dari Mantine `Button` (props 100% Mantine). Default visual
|
|
5
|
+
* (`variant="filled"`, `size="sm"`, warna `primary`) dikunci di theme brand.
|
|
6
|
+
*
|
|
7
|
+
* Lima "intent" yang diberkati (satu Button, bukan puluhan varian liar):
|
|
8
|
+
* | Intent | Cara pakai |
|
|
9
|
+
* |-----------|------------------------------------------|
|
|
10
|
+
* | Primary | `<Button>Simpan</Button>` |
|
|
11
|
+
* | Secondary | `<Button color="secondary">…</Button>` |
|
|
12
|
+
* | Outline | `<Button variant="outline">…</Button>` |
|
|
13
|
+
* | Ghost | `<Button variant="subtle">…</Button>` |
|
|
14
|
+
* | Danger | `<Button color="error">…</Button>` |
|
|
15
|
+
*
|
|
16
|
+
* Ikon → `leftSection` / `rightSection`. Lebar penuh → `fullWidth`.
|
|
17
|
+
* JANGAN tempel utility spacing / class visual manual pada tombol — pakai
|
|
18
|
+
* komponen layout (`Group`, `Stack`) untuk jarak antar elemen.
|
|
19
|
+
*/
|
|
20
|
+
export { Button, type ButtonProps } from '@mantine/core';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Card — kontainer konten (dashboard tile, item list, panel).
|
|
3
|
+
* Default Prodigy: `withBorder`, `shadow="md"`, `radius="md"`, `padding="lg"`.
|
|
4
|
+
* Gunakan `Card.Section` untuk blok yang menempel tepi (gambar, header berwarna).
|
|
5
|
+
*/
|
|
6
|
+
export { Card, type CardProps } from '@mantine/core';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Menu — dropdown aksi (menu baris tabel, menu profil, "Batch Baru").
|
|
3
|
+
* Default Prodigy: `shadow="md"`, `radius="md"`. Susun dari `Menu.Target`,
|
|
4
|
+
* `Menu.Dropdown`, `Menu.Item`, `Menu.Label`, `Menu.Divider`.
|
|
5
|
+
*/
|
|
6
|
+
export { Menu, type MenuProps } from '@mantine/core';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modal — dialog overlay (Tambah Peserta, konfirmasi, form). Default Prodigy:
|
|
3
|
+
* `centered`, `radius="md"`. Kontrol lewat `opened` + `onClose`
|
|
4
|
+
* (umumnya `useDisclosure` dari @mantine/hooks). Konten via children.
|
|
5
|
+
*/
|
|
6
|
+
export { Modal, type ModalProps } from '@mantine/core';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Select — dropdown pilih-satu. Menggantikan Select2; `searchable` &
|
|
3
|
+
* `clearable` sudah bawaan (tanpa lib tambahan). Untuk pilih-banyak pakai
|
|
4
|
+
* `MultiSelect`; untuk `<select>` HTML polos pakai `NativeSelect`.
|
|
5
|
+
*/
|
|
6
|
+
export { Select, type SelectProps } from '@mantine/core';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Switch — toggle on/off untuk pengaturan (mengganti bootstrap-toggle).
|
|
3
|
+
* Gunakan untuk state instan (langsung berlaku), bukan untuk pilihan form yang
|
|
4
|
+
* baru disimpan saat submit — untuk itu pakai `Checkbox`.
|
|
5
|
+
*/
|
|
6
|
+
export { Switch, type SwitchProps } from '@mantine/core';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Table — tabel presentasional (default Prodigy: `highlightOnHover`, spacing sm).
|
|
3
|
+
* Susun dari `Table.Thead/Tbody/Tr/Th/Td`.
|
|
4
|
+
*
|
|
5
|
+
* CATATAN: ini hanya tampilan. Untuk sort + search + pagination, pasang logika
|
|
6
|
+
* via `mantine-react-table` (dipakai Kelola) / TanStack Table
|
|
7
|
+
* (lihat design-system-kelola.md §4) dan tetap render dengan komponen ini.
|
|
8
|
+
*/
|
|
9
|
+
export { Table, type TableProps } from '@mantine/core';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tabs — navigasi antar-panel (tab "Overview/Grup Skor", pill "Semua/Fit/Not Fit"
|
|
3
|
+
* di Kelola). Susun dari `Tabs.List`, `Tabs.Tab`, `Tabs.Panel`.
|
|
4
|
+
* `variant="pills"` untuk gaya pill, `"default"` untuk garis bawah.
|
|
5
|
+
*/
|
|
6
|
+
export { Tabs, type TabsProps } from '@mantine/core';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export { Button, type ButtonProps } from './Button/Button';
|
|
2
|
+
export { Badge, type BadgeProps } from './Badge/Badge';
|
|
3
|
+
export { Anchor, type AnchorProps } from './Anchor/Anchor';
|
|
4
|
+
export { Alert, type AlertProps } from './Alert/Alert';
|
|
5
|
+
export { Tooltip, type TooltipProps } from './Tooltip/Tooltip';
|
|
6
|
+
export { Card, type CardProps } from './Card/Card';
|
|
7
|
+
export { TextInput, type TextInputProps } from './TextInput/TextInput';
|
|
8
|
+
export { NumberInput, type NumberInputProps } from './NumberInput/NumberInput';
|
|
9
|
+
export { PasswordInput, type PasswordInputProps } from './PasswordInput/PasswordInput';
|
|
10
|
+
export { Textarea, type TextareaProps } from './Textarea/Textarea';
|
|
11
|
+
export { Select, type SelectProps } from './Select/Select';
|
|
12
|
+
export { Checkbox, type CheckboxProps } from './Checkbox/Checkbox';
|
|
13
|
+
export { Radio, type RadioProps } from './Radio/Radio';
|
|
14
|
+
export { Switch, type SwitchProps } from './Switch/Switch';
|
|
15
|
+
export { ActionIcon, type ActionIconProps } from './ActionIcon/ActionIcon';
|
|
16
|
+
export { ThemeIcon, type ThemeIconProps } from './ThemeIcon/ThemeIcon';
|
|
17
|
+
export { Indicator, type IndicatorProps } from './Indicator/Indicator';
|
|
18
|
+
export { Breadcrumbs, type BreadcrumbsProps } from './Breadcrumbs/Breadcrumbs';
|
|
19
|
+
export { NavLink, type NavLinkProps } from './NavLink/NavLink';
|
|
20
|
+
export { Burger, type BurgerProps } from './Burger/Burger';
|
|
21
|
+
export { Menu, type MenuProps } from './Menu/Menu';
|
|
22
|
+
export { Tabs, type TabsProps } from './Tabs/Tabs';
|
|
23
|
+
export { Pagination, type PaginationProps } from './Pagination/Pagination';
|
|
24
|
+
export { AppShell, type AppShellProps } from './AppShell/AppShell';
|
|
25
|
+
export { Modal, type ModalProps } from './Modal/Modal';
|
|
26
|
+
export { Table, type TableProps } from './Table/Table';
|
|
27
|
+
export { Avatar, type AvatarProps } from './Avatar/Avatar';
|
|
28
|
+
export { Paper, type PaperProps } from './Paper/Paper';
|
|
29
|
+
export { Progress, type ProgressProps } from './Progress/Progress';
|
|
30
|
+
export { Divider, type DividerProps } from './Divider/Divider';
|
|
31
|
+
export * from './primitives';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Layout & tipografi primitives (re-export Mantine) — LAPIS ANTI-FRAGMENTASI Kelola.
|
|
3
|
+
*
|
|
4
|
+
* Menggantikan kebiasaan Kelola:
|
|
5
|
+
* - `div` + inline `style` / utility Tailwind (`w-full`, `flex-1`) → Group / Stack / Flex
|
|
6
|
+
* - grid manual → Grid / SimpleGrid
|
|
7
|
+
* - class `font-title` / `font-heading` / `font-caption` → Text / Title (prop `size`/`fw`/`order`)
|
|
8
|
+
*
|
|
9
|
+
* Aturannya: jarak, arah, dan ukuran teks lewat PROPS komponen ini — bukan
|
|
10
|
+
* inline style atau class utility.
|
|
11
|
+
*/
|
|
12
|
+
export { Group, type GroupProps } from '@mantine/core';
|
|
13
|
+
export { Stack, type StackProps } from '@mantine/core';
|
|
14
|
+
export { Flex, type FlexProps } from '@mantine/core';
|
|
15
|
+
export { Grid, type GridProps } from '@mantine/core';
|
|
16
|
+
export { SimpleGrid, type SimpleGridProps } from '@mantine/core';
|
|
17
|
+
export { Container, type ContainerProps } from '@mantine/core';
|
|
18
|
+
export { Center, type CenterProps } from '@mantine/core';
|
|
19
|
+
export { Box, type BoxProps } from '@mantine/core';
|
|
20
|
+
export { Image, type ImageProps } from '@mantine/core';
|
|
21
|
+
export { ScrollArea, type ScrollAreaProps } from '@mantine/core';
|
|
22
|
+
export { Text, type TextProps } from '@mantine/core';
|
|
23
|
+
export { Title, type TitleProps } from '@mantine/core';
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { ActionIcon as e, ActionIcon as t, Alert as ee, Alert as n, Anchor as r, Anchor as i, AppShell as a, Avatar as o, Avatar as s, Badge as c, Badge as l, Box as u, Breadcrumbs as d, Burger as f, Button as p, Button as m, Card as h, Card as g, Center as _, Checkbox as v, Container as y, Divider as b, Flex as x, Grid as S, Group as C, Image as w, Indicator as te, Input as T, Menu as E, Menu as D, Modal as O, Modal as k, NavLink as A, NumberInput as j, Pagination as M, Paper as N, PasswordInput as P, Progress as F, Radio as I, ScrollArea as L, Select as R, SimpleGrid as z, Stack as B, Switch as V, Table as H, Table as U, Tabs as W, Text as G, TextInput as K, Textarea as q, ThemeIcon as J, Title as Y, Tooltip as X, Tooltip as Z, createTheme as Q } from "@mantine/core";
|
|
2
|
+
var $ = Q({
|
|
3
|
+
primaryColor: "primary",
|
|
4
|
+
primaryShade: 5,
|
|
5
|
+
colors: {
|
|
6
|
+
primary: [
|
|
7
|
+
"#F9FAFB",
|
|
8
|
+
"#E7F5FF",
|
|
9
|
+
"#D6E6FF",
|
|
10
|
+
"#A4C7FF",
|
|
11
|
+
"#2F95DE",
|
|
12
|
+
"#016699",
|
|
13
|
+
"#005079",
|
|
14
|
+
"#002E4A",
|
|
15
|
+
"#01293D",
|
|
16
|
+
"#001925"
|
|
17
|
+
],
|
|
18
|
+
secondary: [
|
|
19
|
+
"#FFF2E4",
|
|
20
|
+
"#FFE3C5",
|
|
21
|
+
"#FFD399",
|
|
22
|
+
"#FFBB65",
|
|
23
|
+
"#FDA637",
|
|
24
|
+
"#FD9F28",
|
|
25
|
+
"#F28700",
|
|
26
|
+
"#E27E00",
|
|
27
|
+
"#CA6F00",
|
|
28
|
+
"#854800"
|
|
29
|
+
],
|
|
30
|
+
success: [
|
|
31
|
+
"#F2F9F7",
|
|
32
|
+
"#E0EFEB",
|
|
33
|
+
"#ACEECA",
|
|
34
|
+
"#80E5AD",
|
|
35
|
+
"#5BDD94",
|
|
36
|
+
"#00875A",
|
|
37
|
+
"#00714C",
|
|
38
|
+
"#006241",
|
|
39
|
+
"#005035",
|
|
40
|
+
"#003F2A"
|
|
41
|
+
],
|
|
42
|
+
error: [
|
|
43
|
+
"#FDF5F3",
|
|
44
|
+
"#FADFD8",
|
|
45
|
+
"#FFD3D3",
|
|
46
|
+
"#F6A5A6",
|
|
47
|
+
"#EF7476",
|
|
48
|
+
"#DE350B",
|
|
49
|
+
"#E01419",
|
|
50
|
+
"#CB1418",
|
|
51
|
+
"#B60C14",
|
|
52
|
+
"#650009"
|
|
53
|
+
],
|
|
54
|
+
warning: [
|
|
55
|
+
"#fff4e0",
|
|
56
|
+
"#ffe6cb",
|
|
57
|
+
"#ffcc99",
|
|
58
|
+
"#ffb063",
|
|
59
|
+
"#ff9836",
|
|
60
|
+
"#ff8918",
|
|
61
|
+
"#ff8105",
|
|
62
|
+
"#e46e00",
|
|
63
|
+
"#cb6200",
|
|
64
|
+
"#b15200"
|
|
65
|
+
],
|
|
66
|
+
info: [
|
|
67
|
+
"#e0ffff",
|
|
68
|
+
"#ccfbff",
|
|
69
|
+
"#9cf4ff",
|
|
70
|
+
"#68eefe",
|
|
71
|
+
"#44e8fe",
|
|
72
|
+
"#30e5fd",
|
|
73
|
+
"#1ee5fe",
|
|
74
|
+
"#00cae3",
|
|
75
|
+
"#00b5ca",
|
|
76
|
+
"#009db1"
|
|
77
|
+
],
|
|
78
|
+
tertiary: [
|
|
79
|
+
"#eef4ff",
|
|
80
|
+
"#e1e7ee",
|
|
81
|
+
"#c6ccd5",
|
|
82
|
+
"#a8afbc",
|
|
83
|
+
"#8e97a7",
|
|
84
|
+
"#7d889a",
|
|
85
|
+
"#748094",
|
|
86
|
+
"#616e81",
|
|
87
|
+
"#546276",
|
|
88
|
+
"#45546a"
|
|
89
|
+
],
|
|
90
|
+
neutral: [
|
|
91
|
+
"#FFFFFF",
|
|
92
|
+
"#F8F9FA",
|
|
93
|
+
"#E9ECEF",
|
|
94
|
+
"#DEE2E6",
|
|
95
|
+
"#CED4DA",
|
|
96
|
+
"#ADB5BD",
|
|
97
|
+
"#868E96",
|
|
98
|
+
"#495057",
|
|
99
|
+
"#343A40",
|
|
100
|
+
"#212529"
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
black: "#495057",
|
|
104
|
+
white: "#FFFFFF",
|
|
105
|
+
fontFamily: "Avenir, \"Avenir Next\", \"Open Sans\", sans-serif",
|
|
106
|
+
fontFamilyMonospace: "Avenir, \"Avenir Next\", \"Open Sans\", sans-serif",
|
|
107
|
+
headings: {
|
|
108
|
+
fontFamily: "Avenir, \"Avenir Next\", \"Open Sans\", sans-serif",
|
|
109
|
+
fontWeight: "700"
|
|
110
|
+
},
|
|
111
|
+
fontSizes: {
|
|
112
|
+
xs: "0.625rem",
|
|
113
|
+
sm: "0.75rem",
|
|
114
|
+
md: "0.875rem",
|
|
115
|
+
lg: "1rem",
|
|
116
|
+
xl: "1.125rem"
|
|
117
|
+
},
|
|
118
|
+
lineHeights: {
|
|
119
|
+
xs: "1.4",
|
|
120
|
+
sm: "1.4",
|
|
121
|
+
md: "1.4",
|
|
122
|
+
lg: "1.6",
|
|
123
|
+
xl: "1.65"
|
|
124
|
+
},
|
|
125
|
+
defaultRadius: "sm",
|
|
126
|
+
shadows: {
|
|
127
|
+
xs: "2px 2px 8px 0 rgba(0, 0, 0, 0.06)",
|
|
128
|
+
sm: "3px 3px 18px 0 rgba(0, 0, 0, 0.08)",
|
|
129
|
+
md: "5px 5px 35px 0 rgba(0, 0, 0, 0.1)",
|
|
130
|
+
lg: "8px 8px 50px 0 rgba(0, 0, 0, 0.12)",
|
|
131
|
+
xl: "12px 12px 70px 0 rgba(0, 0, 0, 0.16)"
|
|
132
|
+
},
|
|
133
|
+
breakpoints: {
|
|
134
|
+
xs: "0em",
|
|
135
|
+
sm: "36em",
|
|
136
|
+
md: "48em",
|
|
137
|
+
lg: "62em",
|
|
138
|
+
xl: "80em"
|
|
139
|
+
},
|
|
140
|
+
defaultGradient: {
|
|
141
|
+
from: "#2F95DE",
|
|
142
|
+
to: "#016699",
|
|
143
|
+
deg: 186
|
|
144
|
+
},
|
|
145
|
+
cursorType: "pointer",
|
|
146
|
+
other: { appBackground: "#F7F7F7" },
|
|
147
|
+
components: {
|
|
148
|
+
Button: m.extend({
|
|
149
|
+
defaultProps: {
|
|
150
|
+
variant: "filled",
|
|
151
|
+
size: "sm",
|
|
152
|
+
radius: "xl"
|
|
153
|
+
},
|
|
154
|
+
styles: { label: { fontWeight: 700 } }
|
|
155
|
+
}),
|
|
156
|
+
Input: T.extend({ defaultProps: { radius: "xl" } }),
|
|
157
|
+
Badge: l.extend({ defaultProps: {
|
|
158
|
+
variant: "light",
|
|
159
|
+
radius: "xl"
|
|
160
|
+
} }),
|
|
161
|
+
Avatar: s.extend({ defaultProps: { radius: 9999 } }),
|
|
162
|
+
Alert: n.extend({ defaultProps: { variant: "light" } }),
|
|
163
|
+
Anchor: i.extend({ defaultProps: { underline: "hover" } }),
|
|
164
|
+
Card: g.extend({ defaultProps: {
|
|
165
|
+
withBorder: !0,
|
|
166
|
+
shadow: "md",
|
|
167
|
+
radius: "md",
|
|
168
|
+
padding: "lg"
|
|
169
|
+
} }),
|
|
170
|
+
Tooltip: Z.extend({ defaultProps: { withArrow: !0 } }),
|
|
171
|
+
ActionIcon: t.extend({ defaultProps: {
|
|
172
|
+
variant: "subtle",
|
|
173
|
+
color: "gray"
|
|
174
|
+
} }),
|
|
175
|
+
Menu: D.extend({ defaultProps: {
|
|
176
|
+
shadow: "md",
|
|
177
|
+
radius: "md"
|
|
178
|
+
} }),
|
|
179
|
+
Modal: k.extend({ defaultProps: {
|
|
180
|
+
centered: !0,
|
|
181
|
+
radius: "md"
|
|
182
|
+
} }),
|
|
183
|
+
Table: U.extend({ defaultProps: {
|
|
184
|
+
highlightOnHover: !0,
|
|
185
|
+
verticalSpacing: "sm",
|
|
186
|
+
horizontalSpacing: "md"
|
|
187
|
+
} })
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
//#endregion
|
|
191
|
+
export { e as ActionIcon, ee as Alert, r as Anchor, a as AppShell, o as Avatar, c as Badge, u as Box, d as Breadcrumbs, f as Burger, p as Button, h as Card, _ as Center, v as Checkbox, y as Container, b as Divider, x as Flex, S as Grid, C as Group, w as Image, te as Indicator, E as Menu, O as Modal, A as NavLink, j as NumberInput, M as Pagination, N as Paper, P as PasswordInput, F as Progress, I as Radio, L as ScrollArea, R as Select, z as SimpleGrid, B as Stack, V as Switch, H as Table, W as Tabs, G as Text, K as TextInput, q as Textarea, J as ThemeIcon, Y as Title, X as Tooltip, $ as kelolaTheme, $ as theme };
|
package/dist/theme.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './themes';
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { type MantineColorsTuple } from '@mantine/core';
|
|
2
|
+
export declare const kelolaTheme: {
|
|
3
|
+
focusRing?: "always" | "never" | "auto" | undefined;
|
|
4
|
+
scale?: number | undefined;
|
|
5
|
+
fontSmoothing?: boolean | undefined;
|
|
6
|
+
white?: string | undefined;
|
|
7
|
+
black?: string | undefined;
|
|
8
|
+
colors?: {
|
|
9
|
+
[x: string & {}]: MantineColorsTuple | undefined;
|
|
10
|
+
dark?: MantineColorsTuple | undefined;
|
|
11
|
+
gray?: MantineColorsTuple | undefined;
|
|
12
|
+
red?: MantineColorsTuple | undefined;
|
|
13
|
+
pink?: MantineColorsTuple | undefined;
|
|
14
|
+
grape?: MantineColorsTuple | undefined;
|
|
15
|
+
violet?: MantineColorsTuple | undefined;
|
|
16
|
+
indigo?: MantineColorsTuple | undefined;
|
|
17
|
+
blue?: MantineColorsTuple | undefined;
|
|
18
|
+
cyan?: MantineColorsTuple | undefined;
|
|
19
|
+
green?: MantineColorsTuple | undefined;
|
|
20
|
+
lime?: MantineColorsTuple | undefined;
|
|
21
|
+
yellow?: MantineColorsTuple | undefined;
|
|
22
|
+
orange?: MantineColorsTuple | undefined;
|
|
23
|
+
teal?: MantineColorsTuple | undefined;
|
|
24
|
+
} | undefined;
|
|
25
|
+
primaryShade?: import("@mantine/core").MantineColorShade | {
|
|
26
|
+
light?: import("@mantine/core").MantineColorShade | undefined;
|
|
27
|
+
dark?: import("@mantine/core").MantineColorShade | undefined;
|
|
28
|
+
} | undefined;
|
|
29
|
+
primaryColor?: string | undefined;
|
|
30
|
+
variantColorResolver?: import("@mantine/core").VariantColorsResolver | undefined;
|
|
31
|
+
autoContrast?: boolean | undefined;
|
|
32
|
+
luminanceThreshold?: number | undefined;
|
|
33
|
+
fontFamily?: string | undefined;
|
|
34
|
+
fontFamilyMonospace?: string | undefined;
|
|
35
|
+
headings?: {
|
|
36
|
+
fontFamily?: string | undefined;
|
|
37
|
+
fontWeight?: string | undefined;
|
|
38
|
+
textWrap?: "wrap" | "nowrap" | "balance" | "pretty" | "stable" | undefined;
|
|
39
|
+
sizes?: {
|
|
40
|
+
h1?: {
|
|
41
|
+
fontSize?: string | undefined;
|
|
42
|
+
fontWeight?: string | undefined;
|
|
43
|
+
lineHeight?: string | undefined;
|
|
44
|
+
} | undefined;
|
|
45
|
+
h2?: {
|
|
46
|
+
fontSize?: string | undefined;
|
|
47
|
+
fontWeight?: string | undefined;
|
|
48
|
+
lineHeight?: string | undefined;
|
|
49
|
+
} | undefined;
|
|
50
|
+
h3?: {
|
|
51
|
+
fontSize?: string | undefined;
|
|
52
|
+
fontWeight?: string | undefined;
|
|
53
|
+
lineHeight?: string | undefined;
|
|
54
|
+
} | undefined;
|
|
55
|
+
h4?: {
|
|
56
|
+
fontSize?: string | undefined;
|
|
57
|
+
fontWeight?: string | undefined;
|
|
58
|
+
lineHeight?: string | undefined;
|
|
59
|
+
} | undefined;
|
|
60
|
+
h5?: {
|
|
61
|
+
fontSize?: string | undefined;
|
|
62
|
+
fontWeight?: string | undefined;
|
|
63
|
+
lineHeight?: string | undefined;
|
|
64
|
+
} | undefined;
|
|
65
|
+
h6?: {
|
|
66
|
+
fontSize?: string | undefined;
|
|
67
|
+
fontWeight?: string | undefined;
|
|
68
|
+
lineHeight?: string | undefined;
|
|
69
|
+
} | undefined;
|
|
70
|
+
} | undefined;
|
|
71
|
+
} | undefined;
|
|
72
|
+
radius?: {
|
|
73
|
+
[x: string & {}]: string | undefined;
|
|
74
|
+
xs?: string | undefined;
|
|
75
|
+
sm?: string | undefined;
|
|
76
|
+
md?: string | undefined;
|
|
77
|
+
lg?: string | undefined;
|
|
78
|
+
xl?: string | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
defaultRadius?: import("@mantine/core").MantineRadius | undefined;
|
|
81
|
+
spacing?: {
|
|
82
|
+
[x: number]: string | undefined;
|
|
83
|
+
[x: string & {}]: string | undefined;
|
|
84
|
+
xs?: string | undefined;
|
|
85
|
+
sm?: string | undefined;
|
|
86
|
+
md?: string | undefined;
|
|
87
|
+
lg?: string | undefined;
|
|
88
|
+
xl?: string | undefined;
|
|
89
|
+
} | undefined;
|
|
90
|
+
fontSizes?: {
|
|
91
|
+
[x: string & {}]: string | undefined;
|
|
92
|
+
xs?: string | undefined;
|
|
93
|
+
sm?: string | undefined;
|
|
94
|
+
md?: string | undefined;
|
|
95
|
+
lg?: string | undefined;
|
|
96
|
+
xl?: string | undefined;
|
|
97
|
+
} | undefined;
|
|
98
|
+
lineHeights?: {
|
|
99
|
+
[x: string & {}]: string | undefined;
|
|
100
|
+
xs?: string | undefined;
|
|
101
|
+
sm?: string | undefined;
|
|
102
|
+
md?: string | undefined;
|
|
103
|
+
lg?: string | undefined;
|
|
104
|
+
xl?: string | undefined;
|
|
105
|
+
} | undefined;
|
|
106
|
+
fontWeights?: {
|
|
107
|
+
[x: string & {}]: string | undefined;
|
|
108
|
+
bold?: string | undefined;
|
|
109
|
+
regular?: string | undefined;
|
|
110
|
+
medium?: string | undefined;
|
|
111
|
+
} | undefined;
|
|
112
|
+
breakpoints?: {
|
|
113
|
+
[x: string & {}]: string | undefined;
|
|
114
|
+
xs?: string | undefined;
|
|
115
|
+
sm?: string | undefined;
|
|
116
|
+
md?: string | undefined;
|
|
117
|
+
lg?: string | undefined;
|
|
118
|
+
xl?: string | undefined;
|
|
119
|
+
} | undefined;
|
|
120
|
+
shadows?: {
|
|
121
|
+
[x: string & {}]: string | undefined;
|
|
122
|
+
xs?: string | undefined;
|
|
123
|
+
sm?: string | undefined;
|
|
124
|
+
md?: string | undefined;
|
|
125
|
+
lg?: string | undefined;
|
|
126
|
+
xl?: string | undefined;
|
|
127
|
+
} | undefined;
|
|
128
|
+
respectReducedMotion?: boolean | undefined;
|
|
129
|
+
cursorType?: "pointer" | "default" | undefined;
|
|
130
|
+
defaultGradient?: {
|
|
131
|
+
from?: string | undefined;
|
|
132
|
+
to?: string | undefined;
|
|
133
|
+
deg?: number | undefined;
|
|
134
|
+
} | undefined;
|
|
135
|
+
activeClassName?: string | undefined;
|
|
136
|
+
focusClassName?: string | undefined;
|
|
137
|
+
components?: {
|
|
138
|
+
[x: string]: {
|
|
139
|
+
classNames?: any;
|
|
140
|
+
styles?: any;
|
|
141
|
+
vars?: any;
|
|
142
|
+
defaultProps?: any;
|
|
143
|
+
} | undefined;
|
|
144
|
+
} | undefined;
|
|
145
|
+
other?: {
|
|
146
|
+
[x: string]: any;
|
|
147
|
+
} | undefined;
|
|
148
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@talentlytica/prodigy",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Talentlytica Prodigy design system — Mantine v9 base, tema Kelola Apps.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/talentlytica/talentlytica-prodigy.git",
|
|
9
|
+
"directory": "prodigy-ui"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"main": "./dist/index.js",
|
|
20
|
+
"module": "./dist/index.js",
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"import": "./dist/index.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"storybook": "storybook dev -p 6006",
|
|
30
|
+
"build-storybook": "storybook build",
|
|
31
|
+
"build": "vite build --config vite.lib.config.ts && tsc -p tsconfig.build.json",
|
|
32
|
+
"typecheck": "tsc --noEmit",
|
|
33
|
+
"prepublishOnly": "pnpm build"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"@mantine/core": "^9.4.0",
|
|
37
|
+
"react": "^18.2.0 || ^19.0.0",
|
|
38
|
+
"react-dom": "^18.2.0 || ^19.0.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@mantine/core": "^9.4.1",
|
|
42
|
+
"@mantine/hooks": "^9.4.1",
|
|
43
|
+
"@storybook/addon-docs": "^10.5.0",
|
|
44
|
+
"@storybook/addon-themes": "^10.5.0",
|
|
45
|
+
"@storybook/react-vite": "^10.5.0",
|
|
46
|
+
"@tabler/icons-react": "^3.44.0",
|
|
47
|
+
"@types/react": "^19.2.0",
|
|
48
|
+
"@types/react-dom": "^19.2.0",
|
|
49
|
+
"@vitejs/plugin-react": "^6.0.0",
|
|
50
|
+
"postcss": "^8.5.0",
|
|
51
|
+
"postcss-preset-mantine": "^1.18.0",
|
|
52
|
+
"postcss-simple-vars": "^7.0.1",
|
|
53
|
+
"react": "^19.2.0",
|
|
54
|
+
"react-dom": "^19.2.0",
|
|
55
|
+
"remark-gfm": "^4.0.1",
|
|
56
|
+
"storybook": "^10.5.0",
|
|
57
|
+
"typescript": "^5.7.0",
|
|
58
|
+
"vite": "^8.1.0"
|
|
59
|
+
},
|
|
60
|
+
"packageManager": "pnpm@9.15.9",
|
|
61
|
+
"engines": {
|
|
62
|
+
"node": ">=20.19 || >=22.12"
|
|
63
|
+
}
|
|
64
|
+
}
|