@nurvus/ui 0.1.0-alpha.7 → 0.1.0-alpha.8
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/src/components/Button/Button.jsx +7 -9
- package/src/components/FullPageModal/FullPageModal.jsx +7 -9
- package/src/components/Layout/Layout.jsx +10 -12
- package/src/components/Panel/Panel.jsx +8 -10
- package/src/components/Panel/Panel.md +1 -1
- package/src/components/Progress/Progress.jsx +6 -8
- package/src/components/Tag/Tag.jsx +6 -8
- package/src/components/Text/Text.jsx +8 -10
- package/src/components/Title/Title.jsx +7 -9
package/package.json
CHANGED
|
@@ -8,15 +8,13 @@ import './Button.scss';
|
|
|
8
8
|
* Button component.
|
|
9
9
|
* @returns {ReactElement} of Button component.
|
|
10
10
|
*/
|
|
11
|
-
const Button = React.forwardRef(function Button(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} = props;
|
|
19
|
-
|
|
11
|
+
const Button = React.forwardRef(function Button({
|
|
12
|
+
className,
|
|
13
|
+
children,
|
|
14
|
+
size = 'medium',
|
|
15
|
+
type = 'primary',
|
|
16
|
+
...restProps
|
|
17
|
+
}, ref) {
|
|
20
18
|
return (
|
|
21
19
|
<button
|
|
22
20
|
className={ classNames(`${CONSTANT.CLASS_PREFIX}`, 'button', className) }
|
|
@@ -9,15 +9,13 @@ import './FullPageModal.scss';
|
|
|
9
9
|
/**
|
|
10
10
|
* The FullPageModal shows additonal content overlayed on the screen.
|
|
11
11
|
*/
|
|
12
|
-
function FullPageModal(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} = props;
|
|
20
|
-
|
|
12
|
+
function FullPageModal({
|
|
13
|
+
children,
|
|
14
|
+
headerActions,
|
|
15
|
+
title,
|
|
16
|
+
visible = false,
|
|
17
|
+
...restProps
|
|
18
|
+
}) {
|
|
21
19
|
function getAnimationState() {
|
|
22
20
|
if (visible) {
|
|
23
21
|
return 'reveal-in';
|
|
@@ -3,18 +3,16 @@ import classNames from 'classnames';
|
|
|
3
3
|
import CONSTANT from '../../constants.js';
|
|
4
4
|
import './Layout.scss';
|
|
5
5
|
|
|
6
|
-
export default function Layout(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} = props;
|
|
17
|
-
|
|
6
|
+
export default function Layout({
|
|
7
|
+
alignItems,
|
|
8
|
+
className,
|
|
9
|
+
display = 'block',
|
|
10
|
+
flexDirection,
|
|
11
|
+
justifyContent,
|
|
12
|
+
itemDisplay,
|
|
13
|
+
itemSpacing = 20,
|
|
14
|
+
...restProps
|
|
15
|
+
}) {
|
|
18
16
|
return (
|
|
19
17
|
<div
|
|
20
18
|
className={ classNames(`${CONSTANT.CLASS_PREFIX}`, 'layout', className) }
|
|
@@ -8,16 +8,14 @@ import './Panel.scss';
|
|
|
8
8
|
* A card: the theme's surface, a hairline border and 12px corners, with an
|
|
9
9
|
* optional title and a caption footer. Use it to group related content.
|
|
10
10
|
*/
|
|
11
|
-
export default function Panel(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} = props;
|
|
20
|
-
|
|
11
|
+
export default function Panel({
|
|
12
|
+
title,
|
|
13
|
+
caption,
|
|
14
|
+
padding = 'medium',
|
|
15
|
+
children,
|
|
16
|
+
className,
|
|
17
|
+
...restProps
|
|
18
|
+
}) {
|
|
21
19
|
return (
|
|
22
20
|
<section
|
|
23
21
|
className={ classNames(`${CONSTANT.CLASS_PREFIX}`, 'panel', className) }
|
|
@@ -8,14 +8,12 @@ import './Progress.scss';
|
|
|
8
8
|
* Progress component. Use it to track progress!
|
|
9
9
|
* @returns {ReactElement} of Progress component.
|
|
10
10
|
*/
|
|
11
|
-
function Progress(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} = props;
|
|
18
|
-
|
|
11
|
+
function Progress({
|
|
12
|
+
className,
|
|
13
|
+
percent = 0,
|
|
14
|
+
size = 'medium',
|
|
15
|
+
status = 'active'
|
|
16
|
+
}) {
|
|
19
17
|
return (
|
|
20
18
|
<div
|
|
21
19
|
className={ classNames(`${CONSTANT.CLASS_PREFIX}`, 'progress', className) }
|
|
@@ -8,14 +8,12 @@ import './Tag.scss';
|
|
|
8
8
|
* A small pill for a status or label ("new", "preview", "demo"). The text and
|
|
9
9
|
* the border take the tone's theme color; the fill is a faint tint of it.
|
|
10
10
|
*/
|
|
11
|
-
export default function Tag(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} = props;
|
|
18
|
-
|
|
11
|
+
export default function Tag({
|
|
12
|
+
tone = 'neutral',
|
|
13
|
+
children,
|
|
14
|
+
className,
|
|
15
|
+
...restProps
|
|
16
|
+
}) {
|
|
19
17
|
return (
|
|
20
18
|
<span
|
|
21
19
|
className={ classNames(`${CONSTANT.CLASS_PREFIX}`, 'tag', className) }
|
|
@@ -9,16 +9,14 @@ import './Text.scss';
|
|
|
9
9
|
* sizes come from the `--nv-type-*` tokens, so every NURVUS page uses the same
|
|
10
10
|
* scale. Without a `variant` it inherits its parent's type, as before.
|
|
11
11
|
*/
|
|
12
|
-
export default function Text(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} = props;
|
|
21
|
-
|
|
12
|
+
export default function Text({
|
|
13
|
+
as: Element = 'span',
|
|
14
|
+
variant,
|
|
15
|
+
tone,
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
...restProps
|
|
19
|
+
}) {
|
|
22
20
|
return (
|
|
23
21
|
<Element
|
|
24
22
|
className={ classNames(`${CONSTANT.CLASS_PREFIX}`, 'text', className) }
|
|
@@ -30,15 +30,13 @@ function getTag(level) {
|
|
|
30
30
|
* Title component.
|
|
31
31
|
* @returns {ReactElement} of Title component.
|
|
32
32
|
*/
|
|
33
|
-
export default function Title(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
} = props;
|
|
41
|
-
|
|
33
|
+
export default function Title({
|
|
34
|
+
children,
|
|
35
|
+
className,
|
|
36
|
+
level = 1,
|
|
37
|
+
type = "primary",
|
|
38
|
+
...restProps
|
|
39
|
+
}) {
|
|
42
40
|
return React.createElement(
|
|
43
41
|
getTag(level),
|
|
44
42
|
{
|