@canlooks/can-ui 0.0.10 → 0.0.12

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.
@@ -42,9 +42,12 @@ exports.App = (0, react_1.forwardRef)(({ component: Component = 'div', theme, ch
42
42
  app_style_1.style,
43
43
  (0, react_2.css) `
44
44
  font-size: ${themeValue.fontSize}px;
45
- font-family: ${themeValue.fontFamily};
46
45
  color: ${themeValue.text.primary};
47
46
  background-color: ${themeValue.background.body};
47
+
48
+ * {
49
+ font-family: ${themeValue.fontFamily};
50
+ }
48
51
  `,
49
52
  fullSize && (0, react_2.css) `
50
53
  width: 100%;
@@ -23,13 +23,13 @@ exports.classes = (0, utils_1.defineClasses)('date-time-picker', [
23
23
  'calendarDays',
24
24
  'dateItem'
25
25
  ]);
26
- exports.style = (0, utils_1.defineCss)(({ text, fontFamily }) => (0, react_1.css) `
26
+ exports.style = (0, utils_1.defineCss)(({ text }) => (0, react_1.css) `
27
27
  .${exports.classes.container} {
28
28
  display: flex;
29
29
  align-items: center;
30
30
 
31
31
  .${exports.classes.input} {
32
- ${(0, input_style_1.commonNativeInputStyle)(fontFamily)}
32
+ ${input_style_1.commonNativeInputStyle}
33
33
  }
34
34
 
35
35
  .${exports.classes.dateTimeIcon} {
@@ -4,5 +4,5 @@ export declare const classes: {
4
4
  } & {
5
5
  root: string;
6
6
  };
7
- export declare const commonNativeInputStyle: (fontFamily: string) => import("@emotion/react").SerializedStyles;
8
- export declare const style: () => import("@emotion/react").SerializedStyles;
7
+ export declare const commonNativeInputStyle: import("@emotion/react").SerializedStyles;
8
+ export declare const style: import("@emotion/react").SerializedStyles;
@@ -7,7 +7,7 @@ exports.classes = (0, utils_1.defineClasses)('input', [
7
7
  'input',
8
8
  'adaptable'
9
9
  ]);
10
- const commonNativeInputStyle = (fontFamily) => (0, react_1.css) `
10
+ exports.commonNativeInputStyle = (0, react_1.css) `
11
11
  width: 100%;
12
12
  height: 22px;
13
13
  flex: 1;
@@ -16,24 +16,22 @@ const commonNativeInputStyle = (fontFamily) => (0, react_1.css) `
16
16
  padding: 0;
17
17
  background-color: transparent;
18
18
  font-size: 1em;
19
- font-family: ${fontFamily};
20
19
  `;
21
- exports.commonNativeInputStyle = commonNativeInputStyle;
22
- exports.style = (0, utils_1.defineCss)(({ fontFamily }) => (0, react_1.css) `
20
+ exports.style = (0, react_1.css) `
23
21
  position: relative;
24
22
 
25
23
  .${exports.classes.input} {
26
- ${(0, exports.commonNativeInputStyle)(fontFamily)}
27
-
24
+ ${exports.commonNativeInputStyle}
25
+
28
26
  &::-webkit-search-cancel-button {
29
27
  display: none;
30
28
  }
31
-
29
+
32
30
  &::-ms-clear,
33
31
  &::-webkit-search-cancel-button {
34
32
  display: none;
35
33
  }
36
-
34
+
37
35
  &::-webkit-inner-spin-button,
38
36
  &::-webkit-outer-spin-button {
39
37
  width: 12px;
@@ -52,4 +50,4 @@ exports.style = (0, utils_1.defineCss)(({ fontFamily }) => (0, react_1.css) `
52
50
  opacity: 0;
53
51
  pointer-events: none;
54
52
  }
55
- `);
53
+ `;
@@ -7,7 +7,7 @@ const inputBase_style_1 = require("../inputBase/inputBase.style");
7
7
  exports.classes = (0, utils_1.defineClasses)('textarea', [
8
8
  'textarea'
9
9
  ]);
10
- exports.style = (0, utils_1.defineCss)(({ spacing, fontFamily }) => (0, react_1.css) `
10
+ exports.style = (0, utils_1.defineCss)(({ spacing }) => (0, react_1.css) `
11
11
  height: auto;
12
12
 
13
13
  &[data-size] {
@@ -22,7 +22,6 @@ exports.style = (0, utils_1.defineCss)(({ spacing, fontFamily }) => (0, react_1.
22
22
  font-size: 1em;
23
23
  padding: ${spacing[3]}px;
24
24
  display: block;
25
- font-family: ${fontFamily};
26
25
  }
27
26
 
28
27
  &[data-full-width=true] {
@@ -16,15 +16,18 @@ export interface TransportStyleProps extends DIVProps {
16
16
  minHeight?: CSSProperties['minHeight'];
17
17
  maxHeight?: CSSProperties['maxHeight'];
18
18
  lineHeight?: CSSProperties['lineHeight'];
19
- padding?: CSSProperties['padding'];
20
19
  paddingTop?: CSSProperties['paddingTop'];
21
20
  paddingRight?: CSSProperties['paddingRight'];
22
21
  paddingBottom?: CSSProperties['paddingBottom'];
23
22
  paddingLeft?: CSSProperties['paddingLeft'];
24
- margin?: CSSProperties['margin'];
23
+ padding?: CSSProperties['padding'];
25
24
  marginTop?: CSSProperties['marginTop'];
26
25
  marginRight?: CSSProperties['marginRight'];
27
26
  marginBottom?: CSSProperties['marginBottom'];
28
27
  marginLeft?: CSSProperties['marginLeft'];
28
+ margin?: CSSProperties['margin'];
29
+ overflowX?: CSSProperties['overflowX'];
30
+ overflowY?: CSSProperties['overflowY'];
31
+ overflow?: CSSProperties['overflow'];
29
32
  }
30
33
  export declare const TransportStyle: import("react").ForwardRefExoticComponent<Omit<TransportStyleProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TransportStyle = void 0;
4
4
  const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
5
5
  const react_1 = require("react");
6
- exports.TransportStyle = (0, react_1.forwardRef)(({ alignItems, justifyContent, alignSelf, justifySelf, flex, width, minWidth, maxWidth, height, minHeight, maxHeight, lineHeight, padding, paddingTop, paddingRight, paddingBottom, paddingLeft, margin, marginTop, marginRight, marginBottom, marginLeft, ...props }, ref) => {
6
+ exports.TransportStyle = (0, react_1.forwardRef)(({ alignItems, justifyContent, alignSelf, justifySelf, flex, width, minWidth, maxWidth, height, minHeight, maxHeight, lineHeight, paddingTop, paddingRight, paddingBottom, paddingLeft, padding, marginTop, marginRight, marginBottom, marginLeft, margin, overflowX, overflowY, overflow, ...props }, ref) => {
7
7
  return ((0, jsx_runtime_1.jsx)("div", { ...props, ref: ref, style: {
8
8
  alignItems, justifyContent, alignSelf, justifySelf, flex,
9
9
  width, minWidth, maxWidth, height, minHeight, maxHeight, lineHeight,
10
10
  paddingTop, paddingRight, paddingBottom, paddingLeft, padding,
11
11
  marginTop, marginRight, marginBottom, marginLeft, margin,
12
+ overflowX, overflowY, overflow,
12
13
  ...props.style
13
14
  } }));
14
15
  });
@@ -38,9 +38,12 @@ export const App = forwardRef(({ component: Component = 'div', theme, children,
38
38
  style,
39
39
  css `
40
40
  font-size: ${themeValue.fontSize}px;
41
- font-family: ${themeValue.fontFamily};
42
41
  color: ${themeValue.text.primary};
43
42
  background-color: ${themeValue.background.body};
43
+
44
+ * {
45
+ font-family: ${themeValue.fontFamily};
46
+ }
44
47
  `,
45
48
  fullSize && css `
46
49
  width: 100%;
@@ -20,13 +20,13 @@ export const classes = defineClasses('date-time-picker', [
20
20
  'calendarDays',
21
21
  'dateItem'
22
22
  ]);
23
- export const style = defineCss(({ text, fontFamily }) => css `
23
+ export const style = defineCss(({ text }) => css `
24
24
  .${classes.container} {
25
25
  display: flex;
26
26
  align-items: center;
27
27
 
28
28
  .${classes.input} {
29
- ${commonNativeInputStyle(fontFamily)}
29
+ ${commonNativeInputStyle}
30
30
  }
31
31
 
32
32
  .${classes.dateTimeIcon} {
@@ -4,5 +4,5 @@ export declare const classes: {
4
4
  } & {
5
5
  root: string;
6
6
  };
7
- export declare const commonNativeInputStyle: (fontFamily: string) => import("@emotion/react").SerializedStyles;
8
- export declare const style: () => import("@emotion/react").SerializedStyles;
7
+ export declare const commonNativeInputStyle: import("@emotion/react").SerializedStyles;
8
+ export declare const style: import("@emotion/react").SerializedStyles;
@@ -1,10 +1,10 @@
1
1
  import { css } from '@emotion/react';
2
- import { defineClasses, defineCss } from '../../utils';
2
+ import { defineClasses } from '../../utils';
3
3
  export const classes = defineClasses('input', [
4
4
  'input',
5
5
  'adaptable'
6
6
  ]);
7
- export const commonNativeInputStyle = (fontFamily) => css `
7
+ export const commonNativeInputStyle = css `
8
8
  width: 100%;
9
9
  height: 22px;
10
10
  flex: 1;
@@ -13,23 +13,22 @@ export const commonNativeInputStyle = (fontFamily) => css `
13
13
  padding: 0;
14
14
  background-color: transparent;
15
15
  font-size: 1em;
16
- font-family: ${fontFamily};
17
16
  `;
18
- export const style = defineCss(({ fontFamily }) => css `
17
+ export const style = css `
19
18
  position: relative;
20
19
 
21
20
  .${classes.input} {
22
- ${commonNativeInputStyle(fontFamily)}
23
-
21
+ ${commonNativeInputStyle}
22
+
24
23
  &::-webkit-search-cancel-button {
25
24
  display: none;
26
25
  }
27
-
26
+
28
27
  &::-ms-clear,
29
28
  &::-webkit-search-cancel-button {
30
29
  display: none;
31
30
  }
32
-
31
+
33
32
  &::-webkit-inner-spin-button,
34
33
  &::-webkit-outer-spin-button {
35
34
  width: 12px;
@@ -48,4 +47,4 @@ export const style = defineCss(({ fontFamily }) => css `
48
47
  opacity: 0;
49
48
  pointer-events: none;
50
49
  }
51
- `);
50
+ `;
@@ -4,7 +4,7 @@ import { classes as inputBaseClasses } from '../inputBase/inputBase.style';
4
4
  export const classes = defineClasses('textarea', [
5
5
  'textarea'
6
6
  ]);
7
- export const style = defineCss(({ spacing, fontFamily }) => css `
7
+ export const style = defineCss(({ spacing }) => css `
8
8
  height: auto;
9
9
 
10
10
  &[data-size] {
@@ -19,7 +19,6 @@ export const style = defineCss(({ spacing, fontFamily }) => css `
19
19
  font-size: 1em;
20
20
  padding: ${spacing[3]}px;
21
21
  display: block;
22
- font-family: ${fontFamily};
23
22
  }
24
23
 
25
24
  &[data-full-width=true] {
@@ -16,15 +16,18 @@ export interface TransportStyleProps extends DIVProps {
16
16
  minHeight?: CSSProperties['minHeight'];
17
17
  maxHeight?: CSSProperties['maxHeight'];
18
18
  lineHeight?: CSSProperties['lineHeight'];
19
- padding?: CSSProperties['padding'];
20
19
  paddingTop?: CSSProperties['paddingTop'];
21
20
  paddingRight?: CSSProperties['paddingRight'];
22
21
  paddingBottom?: CSSProperties['paddingBottom'];
23
22
  paddingLeft?: CSSProperties['paddingLeft'];
24
- margin?: CSSProperties['margin'];
23
+ padding?: CSSProperties['padding'];
25
24
  marginTop?: CSSProperties['marginTop'];
26
25
  marginRight?: CSSProperties['marginRight'];
27
26
  marginBottom?: CSSProperties['marginBottom'];
28
27
  marginLeft?: CSSProperties['marginLeft'];
28
+ margin?: CSSProperties['margin'];
29
+ overflowX?: CSSProperties['overflowX'];
30
+ overflowY?: CSSProperties['overflowY'];
31
+ overflow?: CSSProperties['overflow'];
29
32
  }
30
33
  export declare const TransportStyle: import("react").ForwardRefExoticComponent<Omit<TransportStyleProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,11 +1,12 @@
1
1
  import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
2
  import { forwardRef } from 'react';
3
- export const TransportStyle = forwardRef(({ alignItems, justifyContent, alignSelf, justifySelf, flex, width, minWidth, maxWidth, height, minHeight, maxHeight, lineHeight, padding, paddingTop, paddingRight, paddingBottom, paddingLeft, margin, marginTop, marginRight, marginBottom, marginLeft, ...props }, ref) => {
3
+ export const TransportStyle = forwardRef(({ alignItems, justifyContent, alignSelf, justifySelf, flex, width, minWidth, maxWidth, height, minHeight, maxHeight, lineHeight, paddingTop, paddingRight, paddingBottom, paddingLeft, padding, marginTop, marginRight, marginBottom, marginLeft, margin, overflowX, overflowY, overflow, ...props }, ref) => {
4
4
  return (_jsx("div", { ...props, ref: ref, style: {
5
5
  alignItems, justifyContent, alignSelf, justifySelf, flex,
6
6
  width, minWidth, maxWidth, height, minHeight, maxHeight, lineHeight,
7
7
  paddingTop, paddingRight, paddingBottom, paddingLeft, padding,
8
8
  marginTop, marginRight, marginBottom, marginLeft, margin,
9
+ overflowX, overflowY, overflow,
9
10
  ...props.style
10
11
  } }));
11
12
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canlooks/can-ui",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "author": "C.CanLiang <canlooks@gmail.com>",
5
5
  "description": "My ui framework",
6
6
  "license": "MIT",