@mriqbox/ui-kit 2.0.0 → 3.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 +9 -6
- package/bin/cli.js +198 -0
- package/dist/components/atoms/MriStatusBadge.d.ts +7 -0
- package/dist/components/atoms/MriStatusBadge.stories.d.ts +10 -0
- package/dist/components/{ui → atoms}/mri-badge-variants.d.ts +1 -1
- package/dist/components/{ui → atoms}/mri-button-variants.d.ts +1 -1
- package/dist/components/{ui → molecules}/MriCommand.d.ts +3 -3
- package/dist/components/molecules/MriCopyButton.d.ts +7 -0
- package/dist/components/molecules/MriCopyButton.stories.d.ts +8 -0
- package/dist/components/molecules/MriEconomyCard.d.ts +8 -0
- package/dist/components/molecules/MriEconomyCard.stories.d.ts +8 -0
- package/dist/components/molecules/MriGridActionButton.d.ts +11 -0
- package/dist/components/molecules/MriGridActionButton.stories.d.ts +9 -0
- package/dist/components/molecules/MriSearchInput.d.ts +8 -0
- package/dist/components/molecules/MriSearchInput.stories.d.ts +8 -0
- package/dist/components/molecules/MriSectionHeader.d.ts +8 -0
- package/dist/components/molecules/MriSectionHeader.stories.d.ts +8 -0
- package/dist/index.d.ts +28 -15
- package/dist/index.es.js +8107 -4380
- package/dist/index.umd.js +76 -36
- package/dist/style.css +1 -1
- package/package.json +11 -3
- package/dist/components/ui/index.d.ts +0 -22
- /package/dist/components/{ui → atoms}/MriBadge.d.ts +0 -0
- /package/dist/components/{ui → atoms}/MriBadge.stories.d.ts +0 -0
- /package/dist/components/{ui → atoms}/MriButton.d.ts +0 -0
- /package/dist/components/{ui → atoms}/MriButton.stories.d.ts +0 -0
- /package/dist/components/{ui → atoms}/MriIcons.d.ts +0 -0
- /package/dist/components/{ui → atoms}/MriIcons.stories.d.ts +0 -0
- /package/dist/components/{ui → atoms}/MriInput.d.ts +0 -0
- /package/dist/components/{ui → atoms}/MriInput.stories.d.ts +0 -0
- /package/dist/components/{ui → atoms}/MriScrollArea.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriButtonGroup.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriButtonGroup.stories.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriCard.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriCard.stories.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriCommand.stories.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriCompactSearch.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriCompactSearch.stories.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriDatePicker.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriDatePicker.stories.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriDialog.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriDialog.stories.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriModal.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriModal.stories.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriPopover.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriPopover.stories.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriSelectSearch.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriSelectSearch.stories.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriThemeToggle.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriThemeToggle.stories.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriTimePicker.d.ts +0 -0
- /package/dist/components/{ui → molecules}/MriTimePicker.stories.d.ts +0 -0
- /package/dist/components/{ui → organisms}/MriCalendar.d.ts +0 -0
- /package/dist/components/{ui → organisms}/MriPageHeader.d.ts +0 -0
- /package/dist/components/{ui → organisms}/MriPageHeader.stories.d.ts +0 -0
- /package/dist/components/{ui → organisms}/MriSidebar.d.ts +0 -0
- /package/dist/components/{ui → organisms}/MriSidebar.stories.d.ts +0 -0
- /package/dist/components/{ui → organisms}/MriTable.d.ts +0 -0
- /package/dist/components/{ui → organisms}/MriTable.stories.d.ts +0 -0
package/README.md
CHANGED
|
@@ -22,10 +22,10 @@ npm install @mriqbox/ui-kit
|
|
|
22
22
|
|
|
23
23
|
**Uso:**
|
|
24
24
|
```tsx
|
|
25
|
-
import {
|
|
25
|
+
import { MriButton } from '@mriqbox/ui-kit';
|
|
26
26
|
|
|
27
27
|
export default function MyComponent() {
|
|
28
|
-
return <
|
|
28
|
+
return <MriButton>Clique aqui</MriButton>;
|
|
29
29
|
}
|
|
30
30
|
```
|
|
31
31
|
|
|
@@ -34,12 +34,15 @@ Ideal se você quer ter o código dos componentes no seu projeto para customizá
|
|
|
34
34
|
|
|
35
35
|
Este projeto contém um arquivo `components.json` na raiz, permitindo o uso da CLI do shadcn.
|
|
36
36
|
|
|
37
|
-
**Adicionar componente via CLI:**
|
|
38
|
-
|
|
37
|
+
**Adicionar componente via CLI (Novo):**
|
|
38
|
+
Você pode adicionar componentes individualmente (estilo Shadcn) direto do nosso repositório:
|
|
39
|
+
|
|
39
40
|
```bash
|
|
40
|
-
npx
|
|
41
|
+
npx @mriqbox/ui-kit add mri-button
|
|
41
42
|
```
|
|
42
|
-
Isso irá baixar o código do
|
|
43
|
+
Isso irá baixar o código fonte do `MriButton.tsx` para `src/components/ui/MriButton.tsx` (ou diretório configurado, se detectado).
|
|
44
|
+
|
|
45
|
+
**Nota:** A CLI irá baixar apenas o arquivo do componente. Verifique se ele possui dependências de outros componentes `Mri*` e adicione-os também se necessário.
|
|
43
46
|
|
|
44
47
|
## ⚙️ Configuração (Para uso via NPM)
|
|
45
48
|
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Simple CLI to add Mri UI components to a project.
|
|
5
|
+
* Usage: npx @mriqbox/ui-kit add <component-name>
|
|
6
|
+
* Example: npx @mriqbox/ui-kit add mri-button
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { Command } from 'commander';
|
|
10
|
+
import chalk from 'chalk';
|
|
11
|
+
import fs from 'fs';
|
|
12
|
+
import path from 'path';
|
|
13
|
+
import https from 'https';
|
|
14
|
+
|
|
15
|
+
const program = new Command();
|
|
16
|
+
const BASE_PREFIX = 'https://raw.githubusercontent.com/mri-Qbox-Brasil/mri-ui-kit/main/src/components';
|
|
17
|
+
|
|
18
|
+
const COMPONENT_MAP = {
|
|
19
|
+
// Atoms
|
|
20
|
+
'MriBadge': 'atoms',
|
|
21
|
+
'MriButton': 'atoms',
|
|
22
|
+
'MriIcons': 'atoms',
|
|
23
|
+
'MriInput': 'atoms',
|
|
24
|
+
'MriScrollArea': 'atoms',
|
|
25
|
+
'MriStatusBadge': 'atoms',
|
|
26
|
+
'mri-badge-variants': 'atoms',
|
|
27
|
+
'mri-button-variants': 'atoms',
|
|
28
|
+
|
|
29
|
+
// Molecules
|
|
30
|
+
'MriButtonGroup': 'molecules',
|
|
31
|
+
'MriCard': 'molecules',
|
|
32
|
+
'MriCompactSearch': 'molecules',
|
|
33
|
+
'MriDialog': 'molecules',
|
|
34
|
+
'MriModal': 'molecules',
|
|
35
|
+
'MriPopover': 'molecules',
|
|
36
|
+
'MriSelectSearch': 'molecules',
|
|
37
|
+
'MriThemeToggle': 'molecules',
|
|
38
|
+
'MriTimePicker': 'molecules',
|
|
39
|
+
'MriCommand': 'molecules',
|
|
40
|
+
'MriCopyButton': 'molecules',
|
|
41
|
+
'MriEconomyCard': 'molecules',
|
|
42
|
+
'MriGridActionButton': 'molecules',
|
|
43
|
+
'MriSearchInput': 'molecules',
|
|
44
|
+
'MriSectionHeader': 'molecules',
|
|
45
|
+
'MriDatePicker': 'molecules',
|
|
46
|
+
|
|
47
|
+
// Organisms
|
|
48
|
+
'MriCalendar': 'organisms',
|
|
49
|
+
'MriPageHeader': 'organisms',
|
|
50
|
+
'MriSidebar': 'organisms',
|
|
51
|
+
'MriTable': 'organisms',
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
function toPascalCase(str) {
|
|
55
|
+
return str
|
|
56
|
+
.replace(/(^\w|-\w)/g, (clear) => clear.replace(/-/, "").toUpperCase());
|
|
57
|
+
}
|
|
58
|
+
function ensureDirectory(dir) {
|
|
59
|
+
if (!fs.existsSync(dir)) {
|
|
60
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function fetchFileContent(url) {
|
|
65
|
+
return new Promise((resolve, reject) => {
|
|
66
|
+
https.get(url, (response) => {
|
|
67
|
+
if (response.statusCode === 200) {
|
|
68
|
+
let data = '';
|
|
69
|
+
response.on('data', (chunk) => data += chunk);
|
|
70
|
+
response.on('end', () => resolve(data));
|
|
71
|
+
} else {
|
|
72
|
+
reject(new Error(`Failed to download: ${response.statusCode} ${response.statusMessage}`));
|
|
73
|
+
}
|
|
74
|
+
}).on('error', (err) => {
|
|
75
|
+
reject(err);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const visited = new Set();
|
|
81
|
+
|
|
82
|
+
async function processComponent(componentName, installDir) {
|
|
83
|
+
let fileName = componentName;
|
|
84
|
+
let isVariant = componentName.includes('variants');
|
|
85
|
+
|
|
86
|
+
if (!isVariant) {
|
|
87
|
+
if (!fileName.startsWith('Mri') && !fileName.match(/^[A-Z]/)) {
|
|
88
|
+
fileName = toPascalCase(fileName);
|
|
89
|
+
}
|
|
90
|
+
if (!fileName.startsWith('Mri')) {
|
|
91
|
+
fileName = `Mri${fileName}`;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Check map for directory
|
|
96
|
+
const componentKey = isVariant ? fileName.replace(/\.ts$/, '') : fileName.replace(/\.tsx$/, '');
|
|
97
|
+
const category = COMPONENT_MAP[componentKey];
|
|
98
|
+
|
|
99
|
+
if (!category) {
|
|
100
|
+
console.warn(chalk.yellow(`⚠️ Component ${fileName} not found in atomic map. Trying legacy path...`));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (!isVariant) {
|
|
104
|
+
if (!fileName.endsWith('.tsx')) fileName += '.tsx';
|
|
105
|
+
} else {
|
|
106
|
+
if (!fileName.endsWith('.ts')) fileName += '.ts';
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (visited.has(fileName)) return;
|
|
110
|
+
visited.add(fileName);
|
|
111
|
+
|
|
112
|
+
const destPath = path.join(installDir, fileName);
|
|
113
|
+
|
|
114
|
+
// Construct URL
|
|
115
|
+
const remoteDir = category || 'ui';
|
|
116
|
+
const fileUrl = `${BASE_PREFIX}/${remoteDir}/${fileName}`;
|
|
117
|
+
|
|
118
|
+
if (fs.existsSync(destPath)) {
|
|
119
|
+
console.log(chalk.gray(` ${fileName} already exists.`));
|
|
120
|
+
await checkDependencies(destPath, installDir);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
console.log(chalk.cyan(`⬇️ Downloading ${fileName}...`));
|
|
125
|
+
try {
|
|
126
|
+
let content = await fetchFileContent(fileUrl);
|
|
127
|
+
|
|
128
|
+
// Rewrite imports to be flat
|
|
129
|
+
// Replace @/components/(atoms|molecules|organisms)/ with @/components/ui/
|
|
130
|
+
content = content.replace(/@\/components\/(?:atoms|molecules|organisms)\//g, '@/components/ui/');
|
|
131
|
+
|
|
132
|
+
fs.writeFileSync(destPath, content);
|
|
133
|
+
|
|
134
|
+
console.log(chalk.green(`✅ ${fileName} added.`));
|
|
135
|
+
|
|
136
|
+
await checkDependenciesContent(content, installDir);
|
|
137
|
+
|
|
138
|
+
} catch (err) {
|
|
139
|
+
console.error(chalk.red(`❌ Error downloading ${fileName}: ${err.message}`));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
async function checkDependenciesContent(content, installDir) {
|
|
144
|
+
try {
|
|
145
|
+
const importRegex = /from\s+['"](?:@\/components\/ui\/|\.\/)([^'"]+)['"]/g;
|
|
146
|
+
let match;
|
|
147
|
+
|
|
148
|
+
while ((match = importRegex.exec(content)) !== null) {
|
|
149
|
+
const depName = match[1];
|
|
150
|
+
if (depName.startsWith('Mri') || depName.includes('variants')) {
|
|
151
|
+
await processComponent(depName, installDir);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
} catch (e) {
|
|
155
|
+
console.warn(chalk.yellow(`Could not parse dependencies.`));
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
async function checkDependencies(filePath, installDir) {
|
|
160
|
+
const content = fs.readFileSync(filePath, 'utf8');
|
|
161
|
+
await checkDependenciesContent(content, installDir);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
program
|
|
165
|
+
.name('mri-ui')
|
|
166
|
+
.description('Add Mri UI components to your project')
|
|
167
|
+
.version('3.0.0');
|
|
168
|
+
|
|
169
|
+
program
|
|
170
|
+
.command('add <component>')
|
|
171
|
+
.description('Add a component to your project')
|
|
172
|
+
.action(async (componentName) => {
|
|
173
|
+
try {
|
|
174
|
+
console.log(chalk.blue(`🔹 Resolving ${componentName}...`));
|
|
175
|
+
|
|
176
|
+
let installDir = './src/components/ui';
|
|
177
|
+
if (fs.existsSync('components.json')) {
|
|
178
|
+
try {
|
|
179
|
+
if (fs.existsSync('./components/ui')) installDir = './components/ui';
|
|
180
|
+
} catch (e) { }
|
|
181
|
+
} else if (fs.existsSync('./components/ui')) {
|
|
182
|
+
installDir = './components/ui';
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
console.log(chalk.gray(` Target directory: ${installDir}`));
|
|
186
|
+
ensureDirectory(installDir);
|
|
187
|
+
|
|
188
|
+
await processComponent(componentName, installDir);
|
|
189
|
+
|
|
190
|
+
console.log(chalk.blue(`\n🎉 Done!`));
|
|
191
|
+
console.log(chalk.gray(` Don't forget to install external libraries if prompted by your linter (lucide-react, etc).`));
|
|
192
|
+
|
|
193
|
+
} catch (error) {
|
|
194
|
+
console.error(chalk.red('An unexpected error occurred:'), error);
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
program.parse();
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface MriStatusBadgeProps {
|
|
2
|
+
label: string | number;
|
|
3
|
+
variant?: 'default' | 'destructive' | 'warning' | 'success' | 'outline' | 'ghost';
|
|
4
|
+
className?: string;
|
|
5
|
+
size?: 'xs' | 'sm' | 'md';
|
|
6
|
+
}
|
|
7
|
+
export declare function MriStatusBadge({ label, variant, className, size }: MriStatusBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MriStatusBadge } from './MriStatusBadge';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof MriStatusBadge>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof MriStatusBadge>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const Success: Story;
|
|
9
|
+
export declare const Warning: Story;
|
|
10
|
+
export declare const Destructive: Story;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const mriBadgeVariants: (props?: ({
|
|
2
|
-
variant?: "default" | "
|
|
2
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
|
|
3
3
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const mriButtonVariants: (props?: ({
|
|
2
|
-
variant?: "default" | "
|
|
2
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | "link" | "ghost" | null | undefined;
|
|
3
3
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
4
4
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -20,7 +20,7 @@ declare const MriCommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pi
|
|
|
20
20
|
ref?: React.Ref<HTMLInputElement>;
|
|
21
21
|
} & {
|
|
22
22
|
asChild?: boolean;
|
|
23
|
-
}, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "
|
|
23
|
+
}, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
|
|
24
24
|
value?: string;
|
|
25
25
|
onValueChange?: (search: string) => void;
|
|
26
26
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -46,7 +46,7 @@ declare const MriCommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
|
46
46
|
ref?: React.Ref<HTMLDivElement>;
|
|
47
47
|
} & {
|
|
48
48
|
asChild?: boolean;
|
|
49
|
-
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "
|
|
49
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "heading" | "value"> & {
|
|
50
50
|
heading?: React.ReactNode;
|
|
51
51
|
value?: string;
|
|
52
52
|
forceMount?: boolean;
|
|
@@ -64,7 +64,7 @@ declare const MriCommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
|
64
64
|
ref?: React.Ref<HTMLDivElement>;
|
|
65
65
|
} & {
|
|
66
66
|
asChild?: boolean;
|
|
67
|
-
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "
|
|
67
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "onSelect" | "disabled" | "value"> & {
|
|
68
68
|
disabled?: boolean;
|
|
69
69
|
onSelect?: (value: string) => void;
|
|
70
70
|
value?: string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface MriCopyButtonProps {
|
|
2
|
+
text: string;
|
|
3
|
+
className?: string;
|
|
4
|
+
iconSize?: number;
|
|
5
|
+
variant?: 'ghost' | 'outline' | 'default' | 'secondary' | 'link';
|
|
6
|
+
}
|
|
7
|
+
export declare function MriCopyButton({ text, className, iconSize, variant }: MriCopyButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MriCopyButton } from './MriCopyButton';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof MriCopyButton>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof MriCopyButton>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const WithCustomSize: Story;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface MriEconomyCardProps {
|
|
2
|
+
label: string;
|
|
3
|
+
amount: number | string;
|
|
4
|
+
amountColorClass?: string;
|
|
5
|
+
onAdd?: () => void;
|
|
6
|
+
onRemove?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function MriEconomyCard({ label, amount, amountColorClass, onAdd, onRemove }: MriEconomyCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MriEconomyCard } from './MriEconomyCard';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof MriEconomyCard>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof MriEconomyCard>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const Negative: Story;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LucideIcon } from 'lucide-react';
|
|
2
|
+
|
|
3
|
+
export interface MriGridActionButtonProps {
|
|
4
|
+
icon: LucideIcon;
|
|
5
|
+
label: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
variant?: 'default' | 'destructive' | 'warning';
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function MriGridActionButton({ icon: Icon, label, onClick, variant, disabled, className }: MriGridActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MriGridActionButton } from './MriGridActionButton';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof MriGridActionButton>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof MriGridActionButton>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const Destructive: Story;
|
|
9
|
+
export declare const Warning: Story;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface MriSearchInputProps {
|
|
2
|
+
value: string;
|
|
3
|
+
onChange: (value: string) => void;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
width?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function MriSearchInput({ value, onChange, placeholder, className, width }: MriSearchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MriSearchInput } from './MriSearchInput';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof MriSearchInput>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof MriSearchInput>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const CustomWidth: Story;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LucideIcon } from 'lucide-react';
|
|
2
|
+
|
|
3
|
+
export interface MriSectionHeaderProps {
|
|
4
|
+
icon: LucideIcon;
|
|
5
|
+
title: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function MriSectionHeader({ icon: Icon, title, className }: MriSectionHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MriSectionHeader } from './MriSectionHeader';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof MriSectionHeader>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof MriSectionHeader>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const CustomColor: Story;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,30 @@
|
|
|
1
1
|
|
|
2
|
-
export * from './components/
|
|
3
|
-
export * from './components/
|
|
4
|
-
export * from './components/
|
|
5
|
-
export * from './components/
|
|
6
|
-
export * from './components/
|
|
7
|
-
export * from './components/
|
|
8
|
-
export * from './components/
|
|
9
|
-
export * from './components/
|
|
10
|
-
export * from './components/
|
|
11
|
-
export * from './components/
|
|
12
|
-
export * from './components/
|
|
13
|
-
export * from './components/
|
|
2
|
+
export * from './components/atoms/MriBadge';
|
|
3
|
+
export * from './components/atoms/MriButton';
|
|
4
|
+
export * from './components/atoms/MriIcons';
|
|
5
|
+
export * from './components/atoms/MriInput';
|
|
6
|
+
export * from './components/atoms/MriScrollArea';
|
|
7
|
+
export * from './components/atoms/MriStatusBadge';
|
|
8
|
+
export * from './components/atoms/mri-badge-variants';
|
|
9
|
+
export * from './components/atoms/mri-button-variants';
|
|
10
|
+
export * from './components/molecules/MriButtonGroup';
|
|
11
|
+
export * from './components/molecules/MriCard';
|
|
12
|
+
export * from './components/molecules/MriCompactSearch';
|
|
13
|
+
export * from './components/molecules/MriDialog';
|
|
14
|
+
export * from './components/molecules/MriModal';
|
|
15
|
+
export * from './components/molecules/MriPopover';
|
|
16
|
+
export * from './components/molecules/MriSelectSearch';
|
|
17
|
+
export * from './components/molecules/MriThemeToggle';
|
|
18
|
+
export * from './components/molecules/MriTimePicker';
|
|
19
|
+
export * from './components/molecules/MriCommand';
|
|
20
|
+
export * from './components/molecules/MriCopyButton';
|
|
21
|
+
export * from './components/molecules/MriEconomyCard';
|
|
22
|
+
export * from './components/molecules/MriGridActionButton';
|
|
23
|
+
export * from './components/molecules/MriSearchInput';
|
|
24
|
+
export * from './components/molecules/MriSectionHeader';
|
|
25
|
+
export * from './components/molecules/MriDatePicker';
|
|
26
|
+
export * from './components/organisms/MriCalendar';
|
|
27
|
+
export * from './components/organisms/MriPageHeader';
|
|
28
|
+
export * from './components/organisms/MriSidebar';
|
|
29
|
+
export * from './components/organisms/MriTable';
|
|
14
30
|
export * from './lib/utils';
|
|
15
|
-
export * from './components/ui/MriSidebar';
|
|
16
|
-
export * from './components/ui/mri-button-variants';
|
|
17
|
-
export * from './components/ui/mri-badge-variants';
|