musae 0.1.12 → 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.
Files changed (35) hide show
  1. package/README.md +37 -0
  2. package/dist/components/button/button.d.ts +1 -1
  3. package/dist/components/button/button.js +10 -6
  4. package/dist/components/button/styled.d.ts +12 -2
  5. package/dist/components/button/styled.js +38 -8
  6. package/dist/components/button/types.d.ts +7 -0
  7. package/dist/components/checkbox/styled.js +1 -1
  8. package/dist/components/col/col.d.ts +4 -0
  9. package/dist/components/col/col.js +10 -0
  10. package/dist/components/col/index.d.ts +2 -0
  11. package/dist/components/col/styled.d.ts +5 -0
  12. package/dist/components/col/styled.js +10 -0
  13. package/dist/components/col/types.d.ts +6 -0
  14. package/dist/components/divider/styled.js +1 -1
  15. package/dist/components/index.d.ts +1 -0
  16. package/dist/components/index.js +1 -0
  17. package/dist/components/input/hooks.d.ts +1 -2
  18. package/dist/components/input/hooks.js +1 -1
  19. package/dist/components/input/input.js +5 -6
  20. package/dist/components/input/styled.d.ts +6 -2
  21. package/dist/components/input/styled.js +15 -6
  22. package/dist/components/input/types.d.ts +1 -1
  23. package/dist/components/loading/loading.js +2 -2
  24. package/dist/components/loading/styled.d.ts +1 -1
  25. package/dist/components/loading/styled.js +2 -2
  26. package/dist/components/menu/menu.js +1 -1
  27. package/dist/components/radio/styled.js +1 -1
  28. package/dist/components/switch/styled.js +2 -2
  29. package/dist/components/theme/hooks.js +0 -6
  30. package/dist/components/theme/types.d.ts +0 -3
  31. package/package.json +1 -1
  32. package/dist/components/button/span.d.ts +0 -12
  33. package/dist/components/button/span.js +0 -16
  34. package/dist/components/input/label.d.ts +0 -7
  35. package/dist/components/input/label.js +0 -14
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ <h1 align="center">Musae</h1>
2
+
3
+ ## ✨ Features
4
+
5
+ - 🌈 Enterprise-class UI designed for web applications.
6
+ - 📦 A set of high-quality React components out of the box.
7
+ - 🛡 Written in TypeScript with predictable static types.
8
+ - ⚙️ Whole package of design resources and development tools.
9
+ - 🌍 Internationalization support for dozens of languages.
10
+ - 🎨 Powerful theme customization based on CSS-in-JS.
11
+
12
+ ## 📦 Install
13
+
14
+ ```bash
15
+ npm install musae
16
+ ```
17
+
18
+ ```bash
19
+ yarn add musae
20
+ ```
21
+
22
+ ```bash
23
+ pnpm add musae
24
+ ```
25
+
26
+ ## 🔨 Usage
27
+
28
+ ```tsx
29
+ import React from "react";
30
+ import { Button } from "musae";
31
+
32
+ const App = () => (
33
+ <>
34
+ <Button>PRESS ME</Button>
35
+ </>
36
+ );
37
+ ```
@@ -6,5 +6,5 @@ import React from "react";
6
6
  * @description
7
7
  * button
8
8
  */
9
- declare const Button: ({ children, className, onClick }: ButtonProps) => React.JSX.Element;
9
+ declare const Button: ({ children, className, onClick, ...props }: ButtonProps) => React.JSX.Element;
10
10
  export default Button;
@@ -1,6 +1,6 @@
1
- import { Wrapper } from './styled.js';
2
- import Span from './span.js';
3
- import React from 'react';
1
+ import { __rest } from '../../node_modules/tslib/tslib.es6.js';
2
+ import { StyledWrapper, StyledSpan } from './styled.js';
3
+ import React, { useMemo } from 'react';
4
4
 
5
5
  /**
6
6
  * @author murukal
@@ -8,9 +8,13 @@ import React from 'react';
8
8
  * @description
9
9
  * button
10
10
  */
11
- const Button = ({ children, className, onClick }) => {
12
- return (React.createElement(Wrapper, { onClick: onClick, className: className },
13
- React.createElement(Span, null, children)));
11
+ const Button = (_a) => {
12
+ var { children, className, onClick } = _a, props = __rest(_a, ["children", "className", "onClick"]);
13
+ /// get which variant is using
14
+ /// variant determin style
15
+ const variant = useMemo(() => props.variant || "filled", [props.variant]);
16
+ return (React.createElement(StyledWrapper, { onClick: onClick, className: className, variant: variant },
17
+ React.createElement(StyledSpan, null, children)));
14
18
  };
15
19
 
16
20
  export { Button as default };
@@ -1,5 +1,15 @@
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
- }, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
5
+ } & Required<Pick<import("./types").ButtonProps, "variant">>, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
6
+ /**
7
+ * @author murukal
8
+ *
9
+ * @description
10
+ * content
11
+ */
12
+ export declare const StyledSpan: import("@emotion/styled").StyledComponent<{
13
+ theme?: import("@emotion/react").Theme | undefined;
14
+ as?: import("react").ElementType<any> | undefined;
15
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -1,15 +1,45 @@
1
1
  import styled from '@emotion/styled';
2
2
  import { useValidTheme } from '../theme/hooks.js';
3
3
 
4
- const Wrapper = styled.button(({ theme }) => {
5
- var _a;
4
+ const StyledWrapper = styled.button(({ theme, variant }) => {
5
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
6
6
  const validTheme = useValidTheme(theme);
7
- return {
8
- borderRadius: 999,
9
- padding: "10px 16px",
10
- backgroundColor: (_a = validTheme.colors) === null || _a === void 0 ? void 0 : _a.primary,
7
+ return Object.assign(Object.assign(Object.assign(Object.assign({ borderRadius: 999, padding: "0.625rem 1.5rem" }, (variant === "filled" && {
8
+ backgroundColor: (_a = validTheme.palettes) === null || _a === void 0 ? void 0 : _a.primary[40],
11
9
  border: "none",
12
- };
10
+ span: {
11
+ color: (_b = validTheme.palettes) === null || _b === void 0 ? void 0 : _b.primary[100],
12
+ },
13
+ })), (variant === "outlined" && {
14
+ borderWidth: 1,
15
+ borderStyle: "solid",
16
+ borderColor: (_c = validTheme.palettes) === null || _c === void 0 ? void 0 : _c.neutral[50],
17
+ span: {
18
+ color: (_d = validTheme.palettes) === null || _d === void 0 ? void 0 : _d.primary[40],
19
+ },
20
+ })), (variant === "elevated" && {
21
+ backgroundColor: (_e = validTheme.palettes) === null || _e === void 0 ? void 0 : _e.neutral[95],
22
+ boxShadow: (_f = validTheme.elevations) === null || _f === void 0 ? void 0 : _f[1].boxShadow,
23
+ span: {
24
+ color: (_g = validTheme.palettes) === null || _g === void 0 ? void 0 : _g.primary[40],
25
+ },
26
+ })), (variant === "tonal" && {
27
+ backgroundColor: (_h = validTheme.palettes) === null || _h === void 0 ? void 0 : _h.secondary[90],
28
+ span: {
29
+ color: (_j = validTheme.palettes) === null || _j === void 0 ? void 0 : _j.secondary[10],
30
+ },
31
+ }));
32
+ });
33
+ /**
34
+ * @author murukal
35
+ *
36
+ * @description
37
+ * content
38
+ */
39
+ const StyledSpan = styled.span(({ theme }) => {
40
+ var _a, _b;
41
+ const validTheme = useValidTheme(theme);
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);
13
43
  });
14
44
 
15
- export { Wrapper };
45
+ export { StyledSpan, StyledWrapper };
@@ -1,4 +1,5 @@
1
1
  import type { MouseEventHandler, ReactNode } from "react";
2
+ export type Variant = "filled" | "outlined" | "text" | "elevated" | "tonal";
2
3
  /**
3
4
  * @author murukal
4
5
  *
@@ -7,6 +8,12 @@ import type { MouseEventHandler, ReactNode } from "react";
7
8
  */
8
9
  export interface ButtonProps {
9
10
  className?: string;
11
+ variant?: Variant;
10
12
  children?: ReactNode;
11
13
  onClick?: MouseEventHandler<HTMLButtonElement>;
12
14
  }
15
+ /**
16
+ * @description
17
+ * button render props
18
+ */
19
+ export type ButtonRenderProps = Required<Pick<ButtonProps, "variant">>;
@@ -4,7 +4,7 @@ import { useValidTheme } from '../theme/hooks.js';
4
4
  const Wrapper = styled.input(({ theme }) => {
5
5
  var _a;
6
6
  const validTheme = useValidTheme(theme);
7
- const primaryColor = (_a = validTheme.colors) === null || _a === void 0 ? void 0 : _a.primary;
7
+ const primaryColor = (_a = validTheme.palettes) === null || _a === void 0 ? void 0 : _a.primary[40];
8
8
  return {
9
9
  margin: 0,
10
10
  visibility: "hidden",
@@ -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">>;
@@ -3,7 +3,7 @@ import styled from '@emotion/styled';
3
3
  const StyledWrapper = styled.div(({ hasChildren }) => {
4
4
  if (!hasChildren) {
5
5
  return {
6
- margin: "1.5rem 0",
6
+ margin: "1rem 0",
7
7
  borderBlockStart: "1px solid rgba(5, 5, 5, 0.06)",
8
8
  };
9
9
  }
@@ -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';
@@ -1,7 +1,6 @@
1
- import type { Variant } from "./types";
2
1
  /**
3
2
  * @description class name for input
4
3
  */
5
- export declare const useStyles: ([variant, isFocused, className]: [variant: Variant, isFocused: boolean, className?: string | undefined]) => {
4
+ export declare const useStyles: ([className]: [className?: string | undefined]) => {
6
5
  wrapperClassName: string;
7
6
  };
@@ -4,7 +4,7 @@ import clsx from 'clsx';
4
4
  /**
5
5
  * @description class name for input
6
6
  */
7
- const useStyles = ([variant, isFocused, className]) => {
7
+ const useStyles = ([className]) => {
8
8
  /// wrapper
9
9
  const wrapperClassName = useMemo(() => {
10
10
  return clsx(["musae-input-wrapper", className]);
@@ -1,8 +1,7 @@
1
1
  import React, { forwardRef, useRef, useImperativeHandle, useMemo } from 'react';
2
2
  import { useStyles } from './hooks.js';
3
3
  import { useBoolean } from '@aiszlab/relax';
4
- import Label from './label.js';
5
- import { Wrapper, StyledInput } from './styled.js';
4
+ import { StyledWrapper, StyledLabel, StyledInput } from './styled.js';
6
5
 
7
6
  /**
8
7
  * @author murukal
@@ -18,9 +17,9 @@ const Input = forwardRef((props, ref) => {
18
17
  /// is focused
19
18
  const { isOn: isFocused, turnOn: focus, turnOff: blur } = useBoolean();
20
19
  /// variant
21
- const variant = useMemo(() => props.variant || "outlined", [props.variant]);
20
+ useMemo(() => props.variant || "outlined", [props.variant]);
22
21
  /// style
23
- const { wrapperClassName } = useStyles([variant, isFocused, props.className]);
22
+ const { wrapperClassName } = useStyles([props.className]);
24
23
  /// used input props
25
24
  const inputProps = useMemo(() => {
26
25
  return {
@@ -40,9 +39,9 @@ const Input = forwardRef((props, ref) => {
40
39
  };
41
40
  }, [focus, blur, props.type, props.onFocus, props.onBlur]);
42
41
  /// render
43
- return (React.createElement(Wrapper, { ref: wrapperRef, className: wrapperClassName, isFocused: isFocused },
42
+ return (React.createElement(StyledWrapper, { ref: wrapperRef, className: wrapperClassName, isFocused: isFocused },
44
43
  props.prefix,
45
- !!props.label && (React.createElement(Label, { isFocused: isFocused, className: "musae-input-label" }, props.label)),
44
+ !!props.label && (React.createElement(StyledLabel, { isFocused: isFocused, className: "musae-input-label" }, props.label)),
46
45
  React.createElement(StyledInput, Object.assign({}, inputProps)),
47
46
  props.suffix));
48
47
  });
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import type { WrapperProps } from "./types";
3
- export declare const Wrapper: import("@emotion/styled").StyledComponent<{
2
+ import type { LabelRenderProps, WrapperProps } from "./types";
3
+ export declare const StyledWrapper: import("@emotion/styled").StyledComponent<{
4
4
  theme?: import("@emotion/react").Theme | undefined;
5
5
  as?: import("react").ElementType<any> | undefined;
6
6
  } & WrapperProps, import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, {}>;
@@ -8,3 +8,7 @@ export declare const StyledInput: import("@emotion/styled").StyledComponent<{
8
8
  theme?: import("@emotion/react").Theme | undefined;
9
9
  as?: import("react").ElementType<any> | undefined;
10
10
  }, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
11
+ export declare const StyledLabel: import("@emotion/styled").StyledComponent<{
12
+ theme?: import("@emotion/react").Theme | undefined;
13
+ as?: import("react").ElementType<any> | undefined;
14
+ } & LabelRenderProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, {}>;
@@ -1,22 +1,31 @@
1
1
  import styled from '@emotion/styled';
2
2
  import { useValidTheme } from '../theme/hooks.js';
3
3
 
4
- const Wrapper = styled.fieldset(({ isFocused, theme }) => {
5
- var _a;
4
+ const StyledWrapper = styled.fieldset(({ isFocused, theme }) => {
5
+ var _a, _b;
6
6
  const validTheme = useValidTheme(theme);
7
- return Object.assign({ textAlign: "start", height: 56, margin: 0, paddingTop: 0, paddingBottom: 0, display: "flex", alignItems: "center", borderColor: "#79747e", borderWidth: 1, borderStyle: "solid", borderRadius: 4, boxSizing: "border-box" }, (isFocused && {
8
- borderColor: (_a = validTheme.colors) === null || _a === void 0 ? void 0 : _a.primary,
7
+ return Object.assign({ textAlign: "start", height: 56, margin: 0, paddingTop: 0, paddingBottom: 0, display: "flex", alignItems: "center", borderColor: (_a = validTheme.palettes) === null || _a === void 0 ? void 0 : _a.neutral[50], borderWidth: 1, borderStyle: "solid", borderRadius: 4, boxSizing: "border-box" }, (isFocused && {
8
+ borderColor: (_b = validTheme.palettes) === null || _b === void 0 ? void 0 : _b.primary[40],
9
9
  borderWidth: 2,
10
10
  }));
11
11
  });
12
12
  const StyledInput = styled.input(() => {
13
13
  return {
14
- padding: 0,
14
+ padding: "0 0.75rem",
15
15
  backgroundColor: "transparent",
16
16
  outline: "none",
17
17
  border: "none",
18
18
  height: "auto",
19
19
  };
20
20
  });
21
+ const StyledLabel = styled.legend(({ isFocused, theme }) => {
22
+ var _a, _b, _c;
23
+ const validTheme = useValidTheme(theme);
24
+ return Object.assign(Object.assign(Object.assign({}, (_b = (_a = validTheme.typography) === null || _a === void 0 ? void 0 : _a.body) === null || _b === void 0 ? void 0 : _b.small), {
25
+ // layout
26
+ paddingInlineStart: 4, paddingInlineEnd: 4 }), (isFocused && {
27
+ color: (_c = validTheme.palettes) === null || _c === void 0 ? void 0 : _c.primary[40],
28
+ }));
29
+ });
21
30
 
22
- export { StyledInput, Wrapper };
31
+ export { StyledInput, StyledLabel, StyledWrapper };
@@ -22,7 +22,7 @@ export interface InputProps {
22
22
  /**
23
23
  * @description label props
24
24
  */
25
- export interface LabelProps {
25
+ export interface LabelRenderProps {
26
26
  isFocused: boolean;
27
27
  }
28
28
  /**
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { keyframes } from '@emotion/react';
3
3
  import Circle from './circle.js';
4
- import { Wrapper } from './styled.js';
4
+ import { StyledWrapper } from './styled.js';
5
5
 
6
6
  const large = keyframes `
7
7
  from,
@@ -187,7 +187,7 @@ const right = keyframes `
187
187
  }
188
188
  `;
189
189
  const Loading = () => {
190
- return (React.createElement(Wrapper, { width: "240", height: "240", viewBox: "0 0 240 240" },
190
+ return (React.createElement(StyledWrapper, { width: "240", height: "240", viewBox: "0 0 240 240" },
191
191
  React.createElement(Circle, { animationName: large, cx: "120", cy: "120", r: "105", stroke: "#f42f25" }),
192
192
  React.createElement(Circle, { animationName: small, cx: "120", cy: "120", r: "35", stroke: "#f49725" }),
193
193
  React.createElement(Circle, { animationName: left, cx: "85", cy: "120", r: "70", stroke: "#255ff4" }),
@@ -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
  }, import("react").SVGProps<SVGSVGElement>, {}>;
@@ -1,10 +1,10 @@
1
1
  import styled from '@emotion/styled';
2
2
 
3
- const Wrapper = styled.svg(() => {
3
+ const StyledWrapper = styled.svg(() => {
4
4
  return {
5
5
  width: "6rem",
6
6
  height: "6rem",
7
7
  };
8
8
  });
9
9
 
10
- export { Wrapper };
10
+ export { StyledWrapper };
@@ -17,7 +17,7 @@ const Menu = (props) => {
17
17
  setSelectedKeys([key]);
18
18
  (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, key);
19
19
  },
20
- selectedKeys: [],
20
+ selectedKeys,
21
21
  }), [props.onClick, selectedKeys]);
22
22
  return (React.createElement(MenuContext.Provider, { value: contextValue },
23
23
  React.createElement(Group, { items: props.items })));
@@ -25,7 +25,7 @@ const Wrapper = styled.input(({ theme }) => {
25
25
  "&[aria-checked=true]": {
26
26
  "::after": {
27
27
  borderWidth: "0.3rem",
28
- borderColor: (_a = validTheme.colors) === null || _a === void 0 ? void 0 : _a.primary,
28
+ borderColor: (_a = validTheme.palettes) === null || _a === void 0 ? void 0 : _a.primary[40],
29
29
  },
30
30
  },
31
31
  };
@@ -24,8 +24,8 @@ const Wrapper = styled.div(({ theme }) => {
24
24
  transition: "all .2s",
25
25
  },
26
26
  "&[aria-selected=true]": {
27
- borderColor: (_a = validTheme.colors) === null || _a === void 0 ? void 0 : _a.primary,
28
- backgroundColor: (_b = validTheme.colors) === null || _b === void 0 ? void 0 : _b.primary,
27
+ borderColor: (_a = validTheme.palettes) === null || _a === void 0 ? void 0 : _a.primary[40],
28
+ backgroundColor: (_b = validTheme.palettes) === null || _b === void 0 ? void 0 : _b.primary[40],
29
29
  "::before": {
30
30
  translate: "100%",
31
31
  backgroundColor: "white",
@@ -87,12 +87,6 @@ const palettes = {
87
87
  * let ui components display well
88
88
  */
89
89
  const DEFAULT_THEME = {
90
- colors: {
91
- primary: palettes.primary[40],
92
- secondary: palettes.secondary[40],
93
- tertiary: palettes.tertiary[40],
94
- error: palettes.error[40],
95
- },
96
90
  typography: {
97
91
  body: {
98
92
  small: {
@@ -8,9 +8,6 @@ type Elevation = Pick<CSSProperties, "boxShadow">;
8
8
  * declaration for theme
9
9
  */
10
10
  export interface Theme {
11
- colors?: {
12
- [key in ColorProperty]?: string;
13
- };
14
11
  typography?: {
15
12
  body?: {
16
13
  small?: Typography;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musae",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "description": "musae-ui",
5
5
  "author": "tutu@fantufantu.com",
6
6
  "license": "MIT",
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- /**
3
- * @author murukal
4
- *
5
- * @description
6
- * content
7
- */
8
- declare const Span: import("@emotion/styled").StyledComponent<{
9
- theme?: import("@emotion/react").Theme | undefined;
10
- as?: import("react").ElementType<any> | undefined;
11
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
12
- export default Span;
@@ -1,16 +0,0 @@
1
- import styled from '@emotion/styled';
2
- import { useValidTheme } from '../theme/hooks.js';
3
-
4
- /**
5
- * @author murukal
6
- *
7
- * @description
8
- * content
9
- */
10
- const Span = styled.span(({ theme }) => {
11
- var _a, _b;
12
- const validTheme = useValidTheme(theme);
13
- return Object.assign({ marginLeft: 8, marginRight: 8, color: "#fff" }, (_b = (_a = validTheme.typography) === null || _a === void 0 ? void 0 : _a.label) === null || _b === void 0 ? void 0 : _b.large);
14
- });
15
-
16
- export { Span as default };
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import type { LabelProps } from "./types";
3
- declare const Label: import("@emotion/styled").StyledComponent<{
4
- theme?: import("@emotion/react").Theme | undefined;
5
- as?: import("react").ElementType<any> | undefined;
6
- } & LabelProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, {}>;
7
- export default Label;
@@ -1,14 +0,0 @@
1
- import styled from '@emotion/styled';
2
- import { useValidTheme } from '../theme/hooks.js';
3
-
4
- const Label = styled.legend(({ isFocused, theme }) => {
5
- var _a, _b, _c;
6
- const validTheme = useValidTheme(theme);
7
- return Object.assign(Object.assign(Object.assign({}, (_b = (_a = validTheme.typography) === null || _a === void 0 ? void 0 : _a.body) === null || _b === void 0 ? void 0 : _b.small), {
8
- // layout
9
- paddingInlineStart: 4, paddingInlineEnd: 4 }), (isFocused && {
10
- color: (_c = validTheme.colors) === null || _c === void 0 ? void 0 : _c.primary,
11
- }));
12
- });
13
-
14
- export { Label as default };