@steroidsjs/core 3.0.0-beta.8 → 3.0.0-beta.9
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/package.json +1 -1
- package/ui/typography/Text/Text.d.ts +36 -0
- package/ui/typography/Text/Text.js +22 -0
- package/ui/typography/Text/index.d.ts +2 -0
- package/ui/typography/Text/index.js +7 -0
- package/ui/typography/Title/Title.d.ts +36 -0
- package/ui/typography/Title/Title.js +22 -0
- package/ui/typography/Title/index.d.ts +2 -0
- package/ui/typography/Title/index.js +7 -0
- package/ui/typography/index.d.ts +3 -0
- package/ui/typography/index.js +10 -0
package/package.json
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ITextProps {
|
|
3
|
+
view?: any;
|
|
4
|
+
className?: CssClassName;
|
|
5
|
+
/**
|
|
6
|
+
* Дочерние элементы
|
|
7
|
+
*/
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Тип текста
|
|
11
|
+
* @example {'body'}
|
|
12
|
+
*/
|
|
13
|
+
type?: 'body' | 'span' | 'boldSpan' | string;
|
|
14
|
+
/** HTML тег
|
|
15
|
+
* @example {'span'}
|
|
16
|
+
*/
|
|
17
|
+
tag?: 'p' | 'span' | string;
|
|
18
|
+
/**
|
|
19
|
+
* Цвет текста
|
|
20
|
+
* @example {'primary'}
|
|
21
|
+
*/
|
|
22
|
+
color?: ColorName;
|
|
23
|
+
/** Текст
|
|
24
|
+
* @example {'Simple text'}
|
|
25
|
+
*/
|
|
26
|
+
content?: string;
|
|
27
|
+
style?: React.CSSProperties;
|
|
28
|
+
}
|
|
29
|
+
export type ITextViewProps = ITextProps;
|
|
30
|
+
declare function Text(props: ITextProps): JSX.Element;
|
|
31
|
+
declare namespace Text {
|
|
32
|
+
var defaultProps: {
|
|
33
|
+
type: string;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export default Text;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
exports.__esModule = true;
|
|
14
|
+
var hooks_1 = require("../../../hooks");
|
|
15
|
+
function Text(props) {
|
|
16
|
+
var components = (0, hooks_1.useComponents)();
|
|
17
|
+
return components.ui.renderView(props.view || 'typography.TextView', __assign({}, props));
|
|
18
|
+
}
|
|
19
|
+
Text.defaultProps = {
|
|
20
|
+
type: 'body'
|
|
21
|
+
};
|
|
22
|
+
exports["default"] = Text;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
var Text_1 = __importDefault(require("./Text"));
|
|
7
|
+
exports["default"] = Text_1["default"];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ITitleProps {
|
|
3
|
+
view?: any;
|
|
4
|
+
className?: CssClassName;
|
|
5
|
+
/**
|
|
6
|
+
* Дочерние элементы
|
|
7
|
+
*/
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Тип заголовка
|
|
11
|
+
* @example {'h1'}
|
|
12
|
+
*/
|
|
13
|
+
type?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle' | string;
|
|
14
|
+
/** HTML тег
|
|
15
|
+
* @example {'h2'}
|
|
16
|
+
*/
|
|
17
|
+
tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
18
|
+
/** Текст заголовка
|
|
19
|
+
* @example {'Simple text'}
|
|
20
|
+
*/
|
|
21
|
+
content?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Цвет заголовка
|
|
24
|
+
* @example {'primary'}
|
|
25
|
+
*/
|
|
26
|
+
color?: ColorName;
|
|
27
|
+
style?: React.CSSProperties;
|
|
28
|
+
}
|
|
29
|
+
export type ITitleViewProps = ITitleProps;
|
|
30
|
+
declare function Title(props: ITitleProps): JSX.Element;
|
|
31
|
+
declare namespace Title {
|
|
32
|
+
var defaultProps: {
|
|
33
|
+
type: string;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export default Title;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
exports.__esModule = true;
|
|
14
|
+
var hooks_1 = require("../../../hooks");
|
|
15
|
+
function Title(props) {
|
|
16
|
+
var components = (0, hooks_1.useComponents)();
|
|
17
|
+
return components.ui.renderView(props.view || 'typography.TitleView', __assign({}, props));
|
|
18
|
+
}
|
|
19
|
+
Title.defaultProps = {
|
|
20
|
+
type: 'h2'
|
|
21
|
+
};
|
|
22
|
+
exports["default"] = Title;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
var Title_1 = __importDefault(require("./Title"));
|
|
7
|
+
exports["default"] = Title_1["default"];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.Title = exports.Text = void 0;
|
|
7
|
+
var Text_1 = __importDefault(require("./Text"));
|
|
8
|
+
exports.Text = Text_1["default"];
|
|
9
|
+
var Title_1 = __importDefault(require("./Title"));
|
|
10
|
+
exports.Title = Title_1["default"];
|