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.
- package/dist/components/button/button.js +3 -3
- package/dist/components/button/styled.d.ts +2 -2
- package/dist/components/button/styled.js +3 -3
- package/dist/components/col/col.d.ts +4 -0
- package/dist/components/col/col.js +10 -0
- package/dist/components/col/index.d.ts +2 -0
- package/dist/components/col/styled.d.ts +5 -0
- package/dist/components/col/styled.js +10 -0
- package/dist/components/col/types.d.ts +6 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __rest } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
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(
|
|
17
|
-
React.createElement(
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 {
|
|
45
|
+
export { StyledSpan, StyledWrapper };
|
|
@@ -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,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>, {}>;
|
package/dist/components/index.js
CHANGED
|
@@ -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';
|