@vrobots/storybook 0.2.21 → 0.2.23

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/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vrobots/storybook",
3
3
  "private": false,
4
- "version": "0.2.21",
4
+ "version": "0.2.23",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -0,0 +1,9 @@
1
+ import { ButtonProps, ColorPalette, ConditionalValue } from '@chakra-ui/react';
2
+ declare const Button: {
3
+ (): null;
4
+ Primary({ baseColor, ...props }: IButtonPrimaryProps): import("react/jsx-runtime").JSX.Element;
5
+ };
6
+ export interface IButtonPrimaryProps extends ButtonProps {
7
+ baseColor?: ConditionalValue<ColorPalette>;
8
+ }
9
+ export default Button;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Button as ChakraButton } from '@chakra-ui/react';
3
+ const Button = () => {
4
+ return null;
5
+ };
6
+ Button.Primary = ({ baseColor, ...props }) => (_jsx(ChakraButton, { variant: 'subtle', borderRadius: 'full', borderWidth: '1px', borderColor: baseColor || 'green.500', color: baseColor || 'green.500', _hover: { bg: baseColor || 'green.500', color: 'white' }, ...props }));
7
+ export default Button;
@@ -14,4 +14,7 @@ export declare const Page: {
14
14
  ({ breadcrumbs, children }: IPageProps): import("react/jsx-runtime").JSX.Element;
15
15
  Flex({ children, breadcrumbs }: IPageProps): import("react/jsx-runtime").JSX.Element;
16
16
  Heading({ heading, subheading, actions, color }: IPageHeadingProps): import("react/jsx-runtime").JSX.Element;
17
+ Body({ children }: {
18
+ children: React.ReactNode;
19
+ }): import("react/jsx-runtime").JSX.Element;
17
20
  };
@@ -24,3 +24,13 @@ Page.Heading = ({ heading, subheading, actions, color }) => {
24
24
  : 'linear-gradient(120deg, rgba(8, 47, 73, 0.45), rgba(15, 23, 42, 0.6))';
25
25
  return (_jsxs(Box, { mb: 4, p: { base: 3, md: 4 }, borderRadius: 'xl', bg: accentBackground, borderWidth: '1px', borderColor: panelBorder, boxShadow: panelShadow, children: [_jsxs(HStack, { gap: 4, mb: 4, children: [_jsx(Heading, { width: '50%', color: color, children: heading }), _jsx(Box, { textAlign: 'right', width: '50%', children: actions })] }), subheading && (_jsx(Text, { mt: 1, color: isLightMode ? 'gray.700' : 'gray.200', children: subheading }))] }));
26
26
  };
27
+ Page.Body = ({ children }) => {
28
+ const { colorMode } = useColorMode();
29
+ const isLightMode = colorMode === 'light';
30
+ const panelBackground = isLightMode ? 'rgba(255, 255, 255, 0.72)' : 'rgba(15, 23, 42, 0.62)';
31
+ const panelBorder = isLightMode ? 'rgba(15, 23, 42, 0.1)' : 'rgba(148, 163, 184, 0.26)';
32
+ const panelShadow = isLightMode
33
+ ? '0 20px 45px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,0.9)'
34
+ : '0 20px 45px rgba(2, 6, 23, 0.55), inset 0 1px 0 rgba(255,255,255,0.05)';
35
+ return (_jsx(Box, { p: { base: 3, md: 4 }, borderRadius: '2xl', backgroundColor: panelBackground, borderWidth: '1px', borderColor: panelBorder, boxShadow: panelShadow, backdropFilter: 'blur(10px)', children: children }));
36
+ };
@@ -4,6 +4,7 @@ export * from './ui/tooltip';
4
4
  export * from './Accordion';
5
5
  export * from './AvatarIconMenu';
6
6
  export * from './Breadcrumbs';
7
+ export * from './Button';
7
8
  export * from './Chart';
8
9
  export * from './Display';
9
10
  export * from './FoldersAndFiles';
@@ -4,6 +4,7 @@ export * from './ui/tooltip';
4
4
  export * from './Accordion';
5
5
  export * from './AvatarIconMenu';
6
6
  export * from './Breadcrumbs';
7
+ export * from './Button';
7
8
  export * from './Chart';
8
9
  export * from './Display';
9
10
  export * from './FoldersAndFiles';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vrobots/storybook",
3
3
  "private": false,
4
- "version": "0.2.21",
4
+ "version": "0.2.23",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",