naturalizer-design-system 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 +166 -0
- package/dist/App.d.ts +3 -0
- package/dist/components/atoms/MSAvatar.d.ts +9 -0
- package/dist/components/atoms/MSBadge.d.ts +12 -0
- package/dist/components/atoms/MSButton.d.ts +11 -0
- package/dist/components/atoms/MSChip.d.ts +9 -0
- package/dist/components/atoms/MSDivider.d.ts +8 -0
- package/dist/components/atoms/MSInput.d.ts +14 -0
- package/dist/components/atoms/MSSekuritasLogo.d.ts +26 -0
- package/dist/components/atoms/MSTooltip.d.ts +6 -0
- package/dist/components/atoms/MSTypography.d.ts +12 -0
- package/dist/components/atoms/index.d.ts +9 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/molecules/MSAlertBanner.d.ts +14 -0
- package/dist/components/molecules/MSCarousel.d.ts +37 -0
- package/dist/components/molecules/MSFormField.d.ts +11 -0
- package/dist/components/molecules/MSSearchBar.d.ts +9 -0
- package/dist/components/molecules/MSTable.d.ts +39 -0
- package/dist/components/molecules/index.d.ts +5 -0
- package/dist/components/pages/LandingPage.d.ts +2 -0
- package/dist/components/pages/demo/BackToTop.d.ts +8 -0
- package/dist/components/pages/demo/BrandNavbar.d.ts +7 -0
- package/dist/components/pages/demo/CodeSnippet.d.ts +7 -0
- package/dist/components/pages/demo/ColorPaletteShowcase.d.ts +2 -0
- package/dist/components/pages/demo/ColorSwatch.d.ts +7 -0
- package/dist/components/pages/demo/ComponentDocumentation.d.ts +2 -0
- package/dist/components/pages/demo/ComponentPlayground.d.ts +11 -0
- package/dist/components/pages/demo/DesignSystemLayout.d.ts +7 -0
- package/dist/components/pages/demo/HeroSection.d.ts +5 -0
- package/dist/components/pages/demo/IconShowcase.d.ts +2 -0
- package/dist/components/pages/demo/TypographyShowcase.d.ts +2 -0
- package/dist/components/pages/demo/UsageGuide.d.ts +2 -0
- package/dist/components/pages/demo/index.d.ts +12 -0
- package/dist/components/pages/index.d.ts +2 -0
- package/dist/components/templates/index.d.ts +1 -0
- package/dist/constants/colors.d.ts +27 -0
- package/dist/constants/index.d.ts +7 -0
- package/dist/constants/spacing.d.ts +29 -0
- package/dist/constants/typography.d.ts +99 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.d.ts +13 -0
- package/dist/logo192.png +0 -0
- package/dist/logo512.png +0 -0
- package/dist/logo_small.svg +9 -0
- package/dist/main.d.ts +0 -0
- package/dist/mirae-design-system.cjs +599 -0
- package/dist/mirae-design-system.js +49487 -0
- package/dist/mstock_logo.svg +28 -0
- package/dist/theme/ThemeContext.d.ts +12 -0
- package/dist/theme/miraeTheme.d.ts +21 -0
- package/package.json +68 -0
package/README.md
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Naturalizer Design System (`naturalizer-design-system`)
|
|
2
|
+
|
|
3
|
+
> Official Design System for Mirae Asset Financial Group — **"Building on Principles"**
|
|
4
|
+
|
|
5
|
+
Engineered with an **Atomic Design Architecture**, powered by **Material-UI (MUI v7) + React + TypeScript**, featuring the official brand color palette (**Mirae Asset Orange `#F58220`** and **Mirae Asset Blue `#043B72`**), and typographic hierarchy using **Spoqa Han Sans Neo**.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install naturalizer-design-system
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Ensure peer dependencies are present in your consuming application:
|
|
16
|
+
```bash
|
|
17
|
+
npm install @mui/material @mui/icons-material @emotion/react @emotion/styled
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 2. Quick Start
|
|
23
|
+
|
|
24
|
+
### A. Setup Brand Theme Provider
|
|
25
|
+
|
|
26
|
+
In your application root (e.g. `App.tsx` or `main.tsx`):
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
import React from 'react';
|
|
30
|
+
import { AppThemeProvider, lightTheme, darkTheme } from 'naturalizer-design-system';
|
|
31
|
+
|
|
32
|
+
export function App() {
|
|
33
|
+
return (
|
|
34
|
+
<AppThemeProvider>
|
|
35
|
+
{/* Your application components */}
|
|
36
|
+
</AppThemeProvider>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Or inject directly into your existing MUI setup:
|
|
42
|
+
```tsx
|
|
43
|
+
import { ThemeProvider } from '@mui/material/styles';
|
|
44
|
+
import { lightTheme } from '@mirae/design-system';
|
|
45
|
+
|
|
46
|
+
<ThemeProvider theme={lightTheme}>
|
|
47
|
+
<YourApp />
|
|
48
|
+
</ThemeProvider>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
### B. Using Atomic Components
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
import React from 'react';
|
|
57
|
+
import {
|
|
58
|
+
MiraeButton,
|
|
59
|
+
MiraeBadge,
|
|
60
|
+
MiraeChip,
|
|
61
|
+
MiraeInput,
|
|
62
|
+
MiraeTable,
|
|
63
|
+
SearchBar,
|
|
64
|
+
primaryColors,
|
|
65
|
+
} from '@mirae/design-system';
|
|
66
|
+
|
|
67
|
+
export function DashboardWidget() {
|
|
68
|
+
const columns = [
|
|
69
|
+
{ id: 'ticker', label: 'Ticker', sortable: true },
|
|
70
|
+
{ id: 'name', label: 'Company Name', sortable: true },
|
|
71
|
+
{ id: 'price', label: 'Last Price', align: 'right', sortable: true },
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
const data = [
|
|
75
|
+
{ ticker: 'BBCA', name: 'Bank Central Asia Tbk', price: 'Rp 10.250' },
|
|
76
|
+
{ ticker: 'BBRI', name: 'Bank Rakyat Indonesia Tbk', price: 'Rp 5.150' },
|
|
77
|
+
];
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<div>
|
|
81
|
+
{/* Table Component */}
|
|
82
|
+
<MiraeTable
|
|
83
|
+
title="Featured Stocks"
|
|
84
|
+
columns={columns}
|
|
85
|
+
data={data}
|
|
86
|
+
searchable
|
|
87
|
+
pagination
|
|
88
|
+
headerVariant="blue"
|
|
89
|
+
/>
|
|
90
|
+
</div>
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
### C. Accessing Brand Design Constants
|
|
98
|
+
|
|
99
|
+
```tsx
|
|
100
|
+
import {
|
|
101
|
+
primaryColors,
|
|
102
|
+
graphIllustrationColors,
|
|
103
|
+
digitalBackgroundLineColors,
|
|
104
|
+
fontWeights,
|
|
105
|
+
} from '@mirae/design-system/constants';
|
|
106
|
+
// Note: Can also be imported from '@mirae/design-system' directly or '@mirae/design-system/palette'
|
|
107
|
+
|
|
108
|
+
// Mirae Asset Orange: #F58220 (PANTONE 158C)
|
|
109
|
+
console.log(primaryColors.orange.hex);
|
|
110
|
+
|
|
111
|
+
// Mirae Asset Blue: #043B72 (PANTONE 295C)
|
|
112
|
+
console.log(primaryColors.blue.hex);
|
|
113
|
+
|
|
114
|
+
// Graph sub-colors for data visualization
|
|
115
|
+
console.log(graphIllustrationColors);
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 3. How to Publish to GCP Artifact Registry
|
|
121
|
+
|
|
122
|
+
### Step 1: Set Your GCP Registry in `package.json`
|
|
123
|
+
|
|
124
|
+
Add `publishConfig` to `package.json` pointing to your Artifact Registry repository:
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"publishConfig": {
|
|
128
|
+
"registry": "https://<REGION>-npm.pkg.dev/<PROJECT_ID>/<REPOSITORY_NAME>/"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
*(Example: `https://asia-northeast3-npm.pkg.dev/my-gcp-project/mirae-npm/`)*
|
|
133
|
+
|
|
134
|
+
### Step 2: Authenticate with Google Cloud Artifact Registry
|
|
135
|
+
|
|
136
|
+
Run Google's official credential helper:
|
|
137
|
+
```bash
|
|
138
|
+
npx google-artifactregistry-auth
|
|
139
|
+
```
|
|
140
|
+
This configures your local `~/.npmrc` with OAuth credentials for your repository.
|
|
141
|
+
|
|
142
|
+
### Step 3: Build & Publish
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
# 1. Build library (outputs ESM, CJS, and TypeScript .d.ts in dist/)
|
|
146
|
+
npm run build
|
|
147
|
+
|
|
148
|
+
# 2. Publish package to GCP Artifact Registry
|
|
149
|
+
npm publish
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## 4. Development & Showcase App
|
|
155
|
+
|
|
156
|
+
To run the interactive documentation & showcase portal locally:
|
|
157
|
+
```bash
|
|
158
|
+
npm run dev
|
|
159
|
+
```
|
|
160
|
+
Open [http://localhost:3005](http://localhost:3005).
|
|
161
|
+
|
|
162
|
+
To build the static showcase portal:
|
|
163
|
+
```bash
|
|
164
|
+
npm run build:app
|
|
165
|
+
# Output in dist-app/
|
|
166
|
+
```
|
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { AvatarProps } from '@mui/material/Avatar';
|
|
3
|
+
export interface MSAvatarProps extends AvatarProps {
|
|
4
|
+
status?: 'online' | 'offline' | 'busy';
|
|
5
|
+
brandMonogram?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export type MiraeAvatarProps = MSAvatarProps;
|
|
8
|
+
export declare const MSAvatar: React.FC<MSAvatarProps>;
|
|
9
|
+
export declare const MiraeAvatar: React.FC<MSAvatarProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type MSBadgeVariant = 'primary' | 'secondary' | 'success' | 'warning' | 'info' | 'neutral';
|
|
3
|
+
export type MiraeBadgeVariant = MSBadgeVariant;
|
|
4
|
+
export interface MSBadgeProps {
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
variant?: MSBadgeVariant;
|
|
7
|
+
dot?: boolean;
|
|
8
|
+
size?: 'sm' | 'md';
|
|
9
|
+
}
|
|
10
|
+
export type MiraeBadgeProps = MSBadgeProps;
|
|
11
|
+
export declare const MSBadge: React.FC<MSBadgeProps>;
|
|
12
|
+
export declare const MiraeBadge: React.FC<MSBadgeProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ButtonProps } from '@mui/material/Button';
|
|
3
|
+
export type MSButtonVariant = 'primary' | 'secondary' | 'outlined' | 'soft' | 'ghost';
|
|
4
|
+
export type MiraeButtonVariant = MSButtonVariant;
|
|
5
|
+
export interface MSButtonProps extends Omit<ButtonProps, 'variant'> {
|
|
6
|
+
brandVariant?: MSButtonVariant;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export type MiraeButtonProps = MSButtonProps;
|
|
10
|
+
export declare const MSButton: React.ForwardRefExoticComponent<Omit<MSButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export declare const MiraeButton: React.ForwardRefExoticComponent<Omit<MSButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ChipProps } from '@mui/material/Chip';
|
|
3
|
+
export interface MSChipProps extends Omit<ChipProps, 'color'> {
|
|
4
|
+
trend?: 'up' | 'down';
|
|
5
|
+
brandColor?: 'orange' | 'blue' | 'graph' | 'neutral';
|
|
6
|
+
}
|
|
7
|
+
export type MiraeChipProps = MSChipProps;
|
|
8
|
+
export declare const MSChip: React.FC<MSChipProps>;
|
|
9
|
+
export declare const MiraeChip: React.FC<MSChipProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DividerProps } from '@mui/material/Divider';
|
|
3
|
+
export interface MSDividerProps extends DividerProps {
|
|
4
|
+
colorVariant?: 'subtle' | 'medium' | 'dark' | 'orange' | 'blue';
|
|
5
|
+
}
|
|
6
|
+
export type MiraeDividerProps = MSDividerProps;
|
|
7
|
+
export declare const MSDivider: React.FC<MSDividerProps>;
|
|
8
|
+
export declare const MiraeDivider: React.FC<MSDividerProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TextFieldProps } from '@mui/material/TextField';
|
|
3
|
+
export interface MSInputProps extends Omit<TextFieldProps, 'variant'> {
|
|
4
|
+
focusColor?: 'orange' | 'blue';
|
|
5
|
+
prefixIcon?: React.ReactNode;
|
|
6
|
+
onPrefixClick?: () => void;
|
|
7
|
+
prefixAriaLabel?: string;
|
|
8
|
+
suffixIcon?: React.ReactNode;
|
|
9
|
+
onSuffixClick?: () => void;
|
|
10
|
+
suffixAriaLabel?: string;
|
|
11
|
+
}
|
|
12
|
+
export type MiraeInputProps = MSInputProps;
|
|
13
|
+
export declare const MSInput: React.FC<MSInputProps>;
|
|
14
|
+
export declare const MiraeInput: React.FC<MSInputProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BoxProps } from '@mui/material/Box';
|
|
3
|
+
import { TooltipProps } from '@mui/material/Tooltip';
|
|
4
|
+
export type MSSekuritasLogoVariant = 'horizontal' | 'stacked' | 'symbol' | 'mstock';
|
|
5
|
+
export interface MSSekuritasLogoProps extends BoxProps {
|
|
6
|
+
variant?: MSSekuritasLogoVariant;
|
|
7
|
+
showOjkBadge?: boolean;
|
|
8
|
+
height?: number | string;
|
|
9
|
+
/**
|
|
10
|
+
* Menampilkan info window spesifikasi & tipe varian saat mouse diarahkan (hover).
|
|
11
|
+
* Default: true
|
|
12
|
+
*/
|
|
13
|
+
showVariantInfo?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Posisi penempatan info window tooltip.
|
|
16
|
+
* Default: 'bottom'
|
|
17
|
+
*/
|
|
18
|
+
infoPlacement?: TooltipProps['placement'];
|
|
19
|
+
/**
|
|
20
|
+
* Konten custom info window (opsional override).
|
|
21
|
+
*/
|
|
22
|
+
infoContent?: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export type MiraeSekuritasLogoProps = MSSekuritasLogoProps;
|
|
25
|
+
export declare const MSSekuritasLogo: React.ForwardRefExoticComponent<Omit<MSSekuritasLogoProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
export declare const MiraeSekuritasLogo: React.ForwardRefExoticComponent<Omit<MSSekuritasLogoProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TooltipProps } from '@mui/material/Tooltip';
|
|
3
|
+
export type MSTooltipProps = TooltipProps;
|
|
4
|
+
export type MiraeTooltipProps = MSTooltipProps;
|
|
5
|
+
export declare const MSTooltip: React.FC<MSTooltipProps>;
|
|
6
|
+
export declare const MiraeTooltip: React.FC<TooltipProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TypographyProps } from '@mui/material/Typography';
|
|
3
|
+
export type SpoqaWeight = 'thin' | 'light' | 'regular' | 'medium' | 'bold';
|
|
4
|
+
export type MSTextColor = 'default' | 'orange' | 'blue' | 'muted' | 'white';
|
|
5
|
+
export type MiraeTextColor = MSTextColor;
|
|
6
|
+
export interface MSTypographyProps extends TypographyProps {
|
|
7
|
+
weight?: SpoqaWeight;
|
|
8
|
+
textColor?: MSTextColor;
|
|
9
|
+
}
|
|
10
|
+
export type MiraeTypographyProps = MSTypographyProps;
|
|
11
|
+
export declare const MSTypography: React.FC<MSTypographyProps>;
|
|
12
|
+
export declare const MiraeTypography: React.FC<MSTypographyProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './MSButton';
|
|
2
|
+
export * from './MSTypography';
|
|
3
|
+
export * from './MSBadge';
|
|
4
|
+
export * from './MSChip';
|
|
5
|
+
export * from './MSInput';
|
|
6
|
+
export * from './MSAvatar';
|
|
7
|
+
export * from './MSDivider';
|
|
8
|
+
export * from './MSTooltip';
|
|
9
|
+
export * from './MSSekuritasLogo';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type MSAlertBannerType = 'orange' | 'blue' | 'success' | 'warning' | 'error';
|
|
3
|
+
export type AlertBannerType = MSAlertBannerType;
|
|
4
|
+
export interface MSAlertBannerProps {
|
|
5
|
+
type?: MSAlertBannerType;
|
|
6
|
+
title: string;
|
|
7
|
+
message?: string;
|
|
8
|
+
actionText?: string;
|
|
9
|
+
onAction?: () => void;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export type AlertBannerProps = MSAlertBannerProps;
|
|
13
|
+
export declare const MSAlertBanner: React.FC<MSAlertBannerProps>;
|
|
14
|
+
export declare const AlertBanner: React.FC<MSAlertBannerProps>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface MSCarouselSlide {
|
|
3
|
+
id: string;
|
|
4
|
+
badge?: string;
|
|
5
|
+
badgeVariant?: 'primary' | 'secondary' | 'success' | 'warning' | 'info';
|
|
6
|
+
title: string;
|
|
7
|
+
subtitle: string;
|
|
8
|
+
description: string;
|
|
9
|
+
ctaText?: string;
|
|
10
|
+
onCtaClick?: () => void;
|
|
11
|
+
secondaryCtaText?: string;
|
|
12
|
+
onSecondaryCtaClick?: () => void;
|
|
13
|
+
backgroundColor: string;
|
|
14
|
+
tag?: string;
|
|
15
|
+
metrics?: {
|
|
16
|
+
label: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}[];
|
|
19
|
+
}
|
|
20
|
+
export type CarouselSlide = MSCarouselSlide;
|
|
21
|
+
export interface MSCarouselProps {
|
|
22
|
+
slides?: MSCarouselSlide[];
|
|
23
|
+
autoplay?: boolean;
|
|
24
|
+
interval?: number;
|
|
25
|
+
height?: number | string | {
|
|
26
|
+
xs?: number | string;
|
|
27
|
+
sm?: number | string;
|
|
28
|
+
md?: number | string;
|
|
29
|
+
lg?: number | string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export type MiraeCarouselProps = MSCarouselProps;
|
|
33
|
+
export declare const MSCarousel: React.FC<MSCarouselProps>;
|
|
34
|
+
export declare const defaultSlidesId: MSCarouselSlide[];
|
|
35
|
+
export declare const defaultSlidesEn: MSCarouselSlide[];
|
|
36
|
+
export declare const defaultSlides: MSCarouselSlide[];
|
|
37
|
+
export declare const MiraeCarousel: React.FC<MSCarouselProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { MSInputProps } from '../atoms/MSInput';
|
|
3
|
+
export interface MSFormFieldProps extends MSInputProps {
|
|
4
|
+
label: string;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
hint?: string;
|
|
7
|
+
errorMessage?: string;
|
|
8
|
+
}
|
|
9
|
+
export type FormFieldProps = MSFormFieldProps;
|
|
10
|
+
export declare const MSFormField: React.FC<MSFormFieldProps>;
|
|
11
|
+
export declare const FormField: React.FC<MSFormFieldProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface MSSearchBarProps {
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
categories?: string[];
|
|
5
|
+
onSearch?: (query: string, category?: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export type SearchBarProps = MSSearchBarProps;
|
|
8
|
+
export declare const MSSearchBar: React.FC<MSSearchBarProps>;
|
|
9
|
+
export declare const SearchBar: React.FC<MSSearchBarProps>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
|
+
export interface MSTableColumn<T> {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
minWidth?: number;
|
|
7
|
+
align?: 'right' | 'left' | 'center';
|
|
8
|
+
sortable?: boolean;
|
|
9
|
+
render?: (row: T, index: number) => React.ReactNode;
|
|
10
|
+
sticky?: 'left' | 'right';
|
|
11
|
+
}
|
|
12
|
+
export type MiraeTableColumn<T> = MSTableColumn<T>;
|
|
13
|
+
export interface MSTableProps<T> {
|
|
14
|
+
columns: MSTableColumn<T>[];
|
|
15
|
+
data: T[];
|
|
16
|
+
title?: string;
|
|
17
|
+
subtitle?: string;
|
|
18
|
+
searchable?: boolean;
|
|
19
|
+
searchPlaceholder?: string;
|
|
20
|
+
selectable?: boolean;
|
|
21
|
+
pagination?: boolean;
|
|
22
|
+
rowsPerPageOptions?: number[];
|
|
23
|
+
defaultRowsPerPage?: number;
|
|
24
|
+
loading?: boolean;
|
|
25
|
+
emptyText?: string;
|
|
26
|
+
striped?: boolean;
|
|
27
|
+
headerVariant?: 'subtle' | 'blue' | 'dark';
|
|
28
|
+
onRowClick?: (row: T) => void;
|
|
29
|
+
actions?: React.ReactNode;
|
|
30
|
+
borderRadius?: number | string;
|
|
31
|
+
sx?: SxProps<Theme>;
|
|
32
|
+
stickyFirstColumn?: boolean;
|
|
33
|
+
stickyLastColumn?: boolean;
|
|
34
|
+
showColumnCount?: boolean;
|
|
35
|
+
minTableWidth?: number | string;
|
|
36
|
+
}
|
|
37
|
+
export type MiraeTableProps<T> = MSTableProps<T>;
|
|
38
|
+
export declare function MSTable<T extends Record<string, any>>({ columns, data, title, subtitle, searchable, searchPlaceholder, selectable, pagination, rowsPerPageOptions, defaultRowsPerPage, loading, emptyText, striped, headerVariant, onRowClick, actions, borderRadius, sx, stickyFirstColumn, stickyLastColumn, showColumnCount, minTableWidth, }: MSTableProps<T>): React.JSX.Element;
|
|
39
|
+
export declare const MiraeTable: typeof MSTable;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const defaultPlaygroundScope: Record<string, any>;
|
|
3
|
+
export interface ComponentPlaygroundProps {
|
|
4
|
+
initialCode: string;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
onToggle: () => void;
|
|
7
|
+
title?: string;
|
|
8
|
+
scope?: Record<string, any>;
|
|
9
|
+
previewMinHeight?: number | string;
|
|
10
|
+
}
|
|
11
|
+
export declare const ComponentPlayground: React.FC<ComponentPlaygroundProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './BackToTop';
|
|
2
|
+
export * from './BrandNavbar';
|
|
3
|
+
export * from './CodeSnippet';
|
|
4
|
+
export * from './ColorSwatch';
|
|
5
|
+
export * from './ComponentPlayground';
|
|
6
|
+
export * from './DesignSystemLayout';
|
|
7
|
+
export * from './HeroSection';
|
|
8
|
+
export * from './UsageGuide';
|
|
9
|
+
export * from './ColorPaletteShowcase';
|
|
10
|
+
export * from './TypographyShowcase';
|
|
11
|
+
export * from './IconShowcase';
|
|
12
|
+
export * from './ComponentDocumentation';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../pages/demo/DesignSystemLayout';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mirae Asset Brand Color Tokens
|
|
3
|
+
* Source: Mirae Asset Brand Guide - Color (2020.05)
|
|
4
|
+
*/
|
|
5
|
+
export interface ColorToken {
|
|
6
|
+
name: string;
|
|
7
|
+
role: string;
|
|
8
|
+
pantone?: string;
|
|
9
|
+
cmyk: string;
|
|
10
|
+
rgb: string;
|
|
11
|
+
hex: string;
|
|
12
|
+
contrastText: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const primaryColors: Record<'orange' | 'blue', ColorToken>;
|
|
16
|
+
export declare const graphIllustrationColors: ColorToken[];
|
|
17
|
+
export declare const digitalBackgroundLineColors: ColorToken[];
|
|
18
|
+
export declare const semanticColors: {
|
|
19
|
+
success: string;
|
|
20
|
+
successLight: string;
|
|
21
|
+
warning: string;
|
|
22
|
+
warningLight: string;
|
|
23
|
+
error: string;
|
|
24
|
+
errorLight: string;
|
|
25
|
+
info: string;
|
|
26
|
+
infoLight: string;
|
|
27
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spacing, Elevation & Radius Tokens
|
|
3
|
+
*/
|
|
4
|
+
export declare const spacing: {
|
|
5
|
+
xs: number;
|
|
6
|
+
sm: number;
|
|
7
|
+
md: number;
|
|
8
|
+
lg: number;
|
|
9
|
+
xl: number;
|
|
10
|
+
xxl: number;
|
|
11
|
+
xxxl: number;
|
|
12
|
+
};
|
|
13
|
+
export declare const radii: {
|
|
14
|
+
none: string;
|
|
15
|
+
sm: string;
|
|
16
|
+
md: string;
|
|
17
|
+
lg: string;
|
|
18
|
+
xl: string;
|
|
19
|
+
full: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const shadows: {
|
|
22
|
+
none: string;
|
|
23
|
+
sm: string;
|
|
24
|
+
md: string;
|
|
25
|
+
lg: string;
|
|
26
|
+
xl: string;
|
|
27
|
+
orangeGlow: string;
|
|
28
|
+
blueGlow: string;
|
|
29
|
+
};
|