musae 0.1.13 → 0.1.14

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.
@@ -1,5 +1,5 @@
1
1
  import { __rest } from '../../node_modules/tslib/tslib.es6.js';
2
- import { Wrapper, Span } from './styled.js';
2
+ import { StyledWrapper, StyledSpan } from './styled.js';
3
3
  import React, { useMemo } from 'react';
4
4
 
5
5
  /**
@@ -13,8 +13,8 @@ const Button = (_a) => {
13
13
  /// get which variant is using
14
14
  /// variant determin style
15
15
  const variant = useMemo(() => props.variant || "filled", [props.variant]);
16
- return (React.createElement(Wrapper, { onClick: onClick, className: className, variant: variant },
17
- React.createElement(Span, null, children)));
16
+ return (React.createElement(StyledWrapper, { onClick: onClick, className: className, variant: variant },
17
+ React.createElement(StyledSpan, null, children)));
18
18
  };
19
19
 
20
20
  export { Button as default };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare const Wrapper: import("@emotion/styled").StyledComponent<{
2
+ export declare const StyledWrapper: import("@emotion/styled").StyledComponent<{
3
3
  theme?: import("@emotion/react").Theme | undefined;
4
4
  as?: import("react").ElementType<any> | undefined;
5
5
  } & Required<Pick<import("./types").ButtonProps, "variant">>, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
@@ -9,7 +9,7 @@ export declare const Wrapper: import("@emotion/styled").StyledComponent<{
9
9
  * @description
10
10
  * content
11
11
  */
12
- export declare const Span: import("@emotion/styled").StyledComponent<{
12
+ export declare const StyledSpan: import("@emotion/styled").StyledComponent<{
13
13
  theme?: import("@emotion/react").Theme | undefined;
14
14
  as?: import("react").ElementType<any> | undefined;
15
15
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -1,7 +1,7 @@
1
1
  import styled from '@emotion/styled';
2
2
  import { useValidTheme } from '../theme/hooks.js';
3
3
 
4
- const Wrapper = styled.button(({ theme, variant }) => {
4
+ const StyledWrapper = styled.button(({ theme, variant }) => {
5
5
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
6
6
  const validTheme = useValidTheme(theme);
7
7
  return Object.assign(Object.assign(Object.assign(Object.assign({ borderRadius: 999, padding: "0.625rem 1.5rem" }, (variant === "filled" && {
@@ -36,10 +36,10 @@ const Wrapper = styled.button(({ theme, variant }) => {
36
36
  * @description
37
37
  * content
38
38
  */
39
- const Span = styled.span(({ theme }) => {
39
+ const StyledSpan = styled.span(({ theme }) => {
40
40
  var _a, _b;
41
41
  const validTheme = useValidTheme(theme);
42
42
  return Object.assign({ marginLeft: 8, marginRight: 8 }, (_b = (_a = validTheme.typography) === null || _a === void 0 ? void 0 : _a.label) === null || _b === void 0 ? void 0 : _b.large);
43
43
  });
44
44
 
45
- export { Span, Wrapper };
45
+ export { StyledSpan, StyledWrapper };
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { ColProps } from "./types";
3
+ declare const Col: (props: ColProps) => React.JSX.Element;
4
+ export default Col;
@@ -0,0 +1,10 @@
1
+ import React, { useMemo } from 'react';
2
+ import { StyledWrapper } from './styled.js';
3
+
4
+ const Col = (props) => {
5
+ /// span
6
+ const span = useMemo(() => { var _a; return (_a = props.span) !== null && _a !== void 0 ? _a : 8; }, [props.span]);
7
+ return React.createElement(StyledWrapper, { span: span }, props.children);
8
+ };
9
+
10
+ export { Col as default };
@@ -0,0 +1,2 @@
1
+ import Col from "./col";
2
+ export { Col };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledWrapper: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ } & Required<Pick<import("./types").ColProps, "span">>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,10 @@
1
+ import styled from '@emotion/styled';
2
+
3
+ const StyledWrapper = styled.div(({ span }) => {
4
+ return {
5
+ gridColumnStart: "auto",
6
+ gridColumnEnd: `span ${span}`,
7
+ };
8
+ });
9
+
10
+ export { StyledWrapper };
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from "react";
2
+ export interface ColProps {
3
+ span?: number;
4
+ children: ReactNode;
5
+ }
6
+ export type ColRenderProps = Required<Pick<ColProps, "span">>;
@@ -12,6 +12,7 @@ export { Switch } from "./switch";
12
12
  export { Radio, RadioGroup } from "./radio";
13
13
  export { Checkbox } from "./checkbox";
14
14
  export { Row } from "./row";
15
+ export { Col } from "./col";
15
16
  export { Divider } from "./divider";
16
17
  /**
17
18
  * @description
@@ -9,5 +9,6 @@ export { default as Radio } from './radio/radio.js';
9
9
  export { default as RadioGroup } from './radio/group.js';
10
10
  export { default as Checkbox } from './checkbox/checkbox.js';
11
11
  export { default as Row } from './row/row.js';
12
+ export { default as Col } from './col/col.js';
12
13
  export { default as Divider } from './divider/divider.js';
13
14
  export { useMessage } from './message/hooks.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musae",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "musae-ui",
5
5
  "author": "tutu@fantufantu.com",
6
6
  "license": "MIT",