venice-ui 1.0.11 → 1.0.12
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/cjs/components/Section/Section.js +16 -0
- package/dist/cjs/components/Section/Section.styles.js +23 -0
- package/dist/cjs/components/Section/index.js +17 -0
- package/dist/cjs/index.js +1 -0
- package/dist/esm/components/Section/Section.js +9 -0
- package/dist/esm/components/Section/Section.styles.js +17 -0
- package/dist/esm/components/Section/index.js +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/types/components/Dropdown/Dropdown.d.ts +2 -11
- package/dist/types/components/InputText/InputText.d.ts +1 -3
- package/dist/types/components/Section/Section.d.ts +8 -0
- package/dist/types/components/Section/Section.styles.d.ts +8 -0
- package/dist/types/components/Section/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types/types.d.ts +4 -1
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Section = void 0;
|
|
7
|
+
const Typography_1 = require("../Typography");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const Section_styles_1 = require("./Section.styles");
|
|
10
|
+
const Section = ({ title, children, titlePosition = "left" }) => {
|
|
11
|
+
return (react_1.default.createElement(Section_styles_1.SectionElement, null,
|
|
12
|
+
title && (react_1.default.createElement(Section_styles_1.SectionTitle, { titlePosition: titlePosition },
|
|
13
|
+
react_1.default.createElement(Typography_1.TextSubHeader, null, title))),
|
|
14
|
+
react_1.default.createElement(Section_styles_1.SectionContent, null, children)));
|
|
15
|
+
};
|
|
16
|
+
exports.Section = Section;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.SectionContent = exports.SectionTitle = exports.SectionElement = void 0;
|
|
7
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
+
const Theme_1 = require("../../Theme");
|
|
9
|
+
exports.SectionElement = styled_components_1.default.div `
|
|
10
|
+
width:100%;
|
|
11
|
+
box-sizing:border-box;
|
|
12
|
+
padding: ${Theme_1.Theme.padding.l};
|
|
13
|
+
background-color:${Theme_1.Theme.colors.white};
|
|
14
|
+
`;
|
|
15
|
+
exports.SectionTitle = styled_components_1.default.div `
|
|
16
|
+
width:100%;
|
|
17
|
+
padding-bottom: ${Theme_1.Theme.padding.l};
|
|
18
|
+
text-align:${p => p.titlePosition};
|
|
19
|
+
`;
|
|
20
|
+
exports.SectionContent = styled_components_1.default.div `
|
|
21
|
+
width:100%;
|
|
22
|
+
display:flex;
|
|
23
|
+
`;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Section"), exports);
|
package/dist/cjs/index.js
CHANGED
|
@@ -22,6 +22,7 @@ __exportStar(require("./components/ElementHeader"), exports);
|
|
|
22
22
|
__exportStar(require("./components/Icons"), exports);
|
|
23
23
|
__exportStar(require("./components/InputText"), exports);
|
|
24
24
|
__exportStar(require("./components/Modal"), exports);
|
|
25
|
+
__exportStar(require("./components/Section"), exports);
|
|
25
26
|
__exportStar(require("./components/Sidepanel"), exports);
|
|
26
27
|
__exportStar(require("./components/Tile"), exports);
|
|
27
28
|
__exportStar(require("./components/Typography"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TextSubHeader } from '../Typography';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { SectionElement, SectionTitle, SectionContent } from './Section.styles';
|
|
4
|
+
export const Section = ({ title, children, titlePosition = "left" }) => {
|
|
5
|
+
return (React.createElement(SectionElement, null,
|
|
6
|
+
title && (React.createElement(SectionTitle, { titlePosition: titlePosition },
|
|
7
|
+
React.createElement(TextSubHeader, null, title))),
|
|
8
|
+
React.createElement(SectionContent, null, children)));
|
|
9
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { Theme } from "../../Theme";
|
|
3
|
+
export const SectionElement = styled.div `
|
|
4
|
+
width:100%;
|
|
5
|
+
box-sizing:border-box;
|
|
6
|
+
padding: ${Theme.padding.l};
|
|
7
|
+
background-color:${Theme.colors.white};
|
|
8
|
+
`;
|
|
9
|
+
export const SectionTitle = styled.div `
|
|
10
|
+
width:100%;
|
|
11
|
+
padding-bottom: ${Theme.padding.l};
|
|
12
|
+
text-align:${p => p.titlePosition};
|
|
13
|
+
`;
|
|
14
|
+
export const SectionContent = styled.div `
|
|
15
|
+
width:100%;
|
|
16
|
+
display:flex;
|
|
17
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Section';
|
package/dist/esm/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export * from './components/ElementHeader';
|
|
|
6
6
|
export * from './components/Icons';
|
|
7
7
|
export * from "./components/InputText";
|
|
8
8
|
export * from './components/Modal';
|
|
9
|
+
export * from './components/Section';
|
|
9
10
|
export * from './components/Sidepanel';
|
|
10
11
|
export * from './components/Tile';
|
|
11
12
|
export * from './components/Typography';
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface IDropdownProps {
|
|
2
|
+
import { IFormElement, IOption } from '../../types';
|
|
3
|
+
export interface IDropdownProps extends IFormElement {
|
|
4
4
|
mode: 'normal' | 'icon';
|
|
5
|
-
label?: string;
|
|
6
|
-
labelPosition?: LabelPosition;
|
|
7
|
-
size?: InputSize;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
error?: string;
|
|
10
|
-
width?: string;
|
|
11
5
|
options: IOption[];
|
|
12
|
-
value?: string | number;
|
|
13
|
-
placeholder?: string;
|
|
14
|
-
name: string;
|
|
15
6
|
handleSelect: (name: string, value: string | number) => void;
|
|
16
7
|
}
|
|
17
8
|
export declare const Dropdown: FC<IDropdownProps>;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { InputType, IFormElement } from 'types';
|
|
2
|
+
import { InputType, IFormElement } from '../../types';
|
|
3
3
|
export interface IInputTextProps extends IFormElement {
|
|
4
4
|
type: InputType;
|
|
5
|
-
name: string;
|
|
6
5
|
handleChange: (name: string, value: string | number) => void;
|
|
7
|
-
error?: string;
|
|
8
6
|
placeholder?: string;
|
|
9
7
|
}
|
|
10
8
|
export declare const InputText: FC<IInputTextProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TitlePosition } from '../../types';
|
|
2
|
+
export declare const SectionElement: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
interface ISectionTitleSyle {
|
|
4
|
+
titlePosition?: TitlePosition;
|
|
5
|
+
}
|
|
6
|
+
export declare const SectionTitle: import("styled-components").StyledComponent<"div", any, ISectionTitleSyle, never>;
|
|
7
|
+
export declare const SectionContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Section';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './components/ElementHeader';
|
|
|
6
6
|
export * from './components/Icons';
|
|
7
7
|
export * from "./components/InputText";
|
|
8
8
|
export * from './components/Modal';
|
|
9
|
+
export * from './components/Section';
|
|
9
10
|
export * from './components/Sidepanel';
|
|
10
11
|
export * from './components/Tile';
|
|
11
12
|
export * from './components/Typography';
|
|
@@ -2,12 +2,15 @@ export declare type ButtonVariant = 'ghost' | 'primary' | 'inverse';
|
|
|
2
2
|
export declare type InputSize = 'large' | 'medium' | 'small' | 'xsmall';
|
|
3
3
|
export declare type InputType = "text" | "password" | "email" | "number";
|
|
4
4
|
export declare type LabelPosition = "top" | "left";
|
|
5
|
+
export declare type TitlePosition = "left" | "center" | "right";
|
|
5
6
|
export interface IFormElement {
|
|
6
7
|
label?: string;
|
|
7
8
|
labelPosition?: LabelPosition;
|
|
8
|
-
value
|
|
9
|
+
value?: string | number;
|
|
9
10
|
name: string;
|
|
10
11
|
size?: InputSize;
|
|
11
12
|
width?: string;
|
|
12
13
|
disabled?: boolean;
|
|
14
|
+
error?: string;
|
|
15
|
+
placeholder?: string;
|
|
13
16
|
}
|