@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nurvus/ui",
3
- "version": "0.1.0-alpha.7",
3
+ "version": "0.1.0-alpha.8",
4
4
  "description": "NURVUS Design System",
5
5
  "main": "dist/index.js",
6
6
  "publishConfig": {
@@ -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(props, ref) {
12
- const {
13
- className,
14
- children,
15
- size = 'medium',
16
- type = 'primary',
17
- ...restProps
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(props) {
13
- const {
14
- children,
15
- headerActions,
16
- title,
17
- visible = false,
18
- ...restProps
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(props) {
7
- const {
8
- alignItems,
9
- className,
10
- display = 'block',
11
- flexDirection,
12
- justifyContent,
13
- itemDisplay,
14
- itemSpacing = 20,
15
- ...restProps
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(props) {
12
- const {
13
- title,
14
- caption,
15
- padding = 'medium',
16
- children,
17
- className,
18
- ...restProps
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) }
@@ -1,4 +1,4 @@
1
- A card for grouping content: the theme's surface, a hairline border and 12px corners. Give it a `title`, a `caption` footer, or both.
1
+ Give it a `title`, a `caption` footer, or both.
2
2
  ```jsx
3
3
  import { Panel, Tag, Text } from '@nurvus/ui';
4
4
 
@@ -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(props) {
12
- const {
13
- className,
14
- percent = 0,
15
- size = 'medium',
16
- status = 'active'
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(props) {
12
- const {
13
- tone = 'neutral',
14
- children,
15
- className,
16
- ...restProps
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(props) {
13
- const {
14
- as: Element = 'span',
15
- variant,
16
- tone,
17
- children,
18
- className,
19
- ...restProps
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(props) {
34
- const {
35
- children,
36
- className,
37
- level = 1,
38
- type = "primary",
39
- ...restProps
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
  {