@mriqbox/ui-kit 3.5.2 → 3.6.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/bin/cli.js +5 -2
- package/dist/components/templates/MriDashboardLayout.d.ts +17 -0
- package/dist/components/templates/MriDashboardLayout.stories.d.ts +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +375 -347
- package/dist/index.umd.js +6 -6
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -62,6 +62,9 @@ const COMPONENT_MAP = {
|
|
|
62
62
|
'MriTopbar': 'organisms',
|
|
63
63
|
'MriTable': 'organisms',
|
|
64
64
|
'MriPlayerScreenStream': 'organisms',
|
|
65
|
+
|
|
66
|
+
// Templates
|
|
67
|
+
'MriDashboardLayout': 'templates',
|
|
65
68
|
};
|
|
66
69
|
|
|
67
70
|
function toPascalCase(str) {
|
|
@@ -140,7 +143,7 @@ async function processComponent(componentName, installDir) {
|
|
|
140
143
|
|
|
141
144
|
// Rewrite imports to be flat
|
|
142
145
|
// Replace @/components/(atoms|molecules|organisms)/ with @/components/ui/
|
|
143
|
-
content = content.replace(/@\/components\/(?:atoms|molecules|organisms)\//g, '@/components/ui/');
|
|
146
|
+
content = content.replace(/@\/components\/(?:atoms|molecules|organisms|templates)\//g, '@/components/ui/');
|
|
144
147
|
|
|
145
148
|
fs.writeFileSync(destPath, content);
|
|
146
149
|
|
|
@@ -177,7 +180,7 @@ async function checkDependencies(filePath, installDir) {
|
|
|
177
180
|
program
|
|
178
181
|
.name('mri-ui')
|
|
179
182
|
.description('Add Mri UI components to your project')
|
|
180
|
-
.version('3.
|
|
183
|
+
.version('3.6.0');
|
|
181
184
|
|
|
182
185
|
program
|
|
183
186
|
.command('add <component>')
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export type MriDashboardSidebarPosition = 'left' | 'right';
|
|
4
|
+
export type MriDashboardTopbarPlacement = 'aside' | 'below';
|
|
5
|
+
export interface MriDashboardLayoutProps {
|
|
6
|
+
sidebar?: ReactNode;
|
|
7
|
+
topbar?: ReactNode;
|
|
8
|
+
header?: ReactNode;
|
|
9
|
+
footer?: ReactNode;
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
sidebarPosition?: MriDashboardSidebarPosition;
|
|
12
|
+
topbarPlacement?: MriDashboardTopbarPlacement;
|
|
13
|
+
className?: string;
|
|
14
|
+
contentClassName?: string;
|
|
15
|
+
mainClassName?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function MriDashboardLayout({ sidebar, topbar, header, footer, children, sidebarPosition, topbarPlacement, className, contentClassName, mainClassName, }: MriDashboardLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MriDashboardLayout } from './MriDashboardLayout';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof MriDashboardLayout>;
|
|
5
|
+
export default meta;
|
|
6
|
+
export declare const Default: StoryObj<typeof MriDashboardLayout>;
|
|
7
|
+
export declare const TopbarBelow: StoryObj<typeof MriDashboardLayout>;
|
|
8
|
+
export declare const SidebarRightWithFooter: StoryObj<typeof MriDashboardLayout>;
|
package/dist/index.d.ts
CHANGED
|
@@ -36,4 +36,5 @@ export * from './components/organisms/MriTopbar';
|
|
|
36
36
|
export * from './components/organisms/MriTopbar';
|
|
37
37
|
export * from './components/organisms/MriKeyboardVisualizer';
|
|
38
38
|
export * from './components/organisms/MriPlayerScreenStream';
|
|
39
|
+
export * from './components/templates/MriDashboardLayout';
|
|
39
40
|
export * from './lib/utils';
|