@code0-tech/pictor 0.2.1 → 0.2.3

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.
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { Code0Component, Code0Sizes } from "../../utils/types";
3
3
  import "./Text.style.scss";
4
4
  export interface FontType extends Omit<Omit<Code0Component<HTMLSpanElement>, "children">, "size"> {
5
- children: string;
5
+ children: React.ReactNode;
6
6
  size: Code0Sizes;
7
7
  hierarchy?: "primary" | "secondary" | "tertiary";
8
8
  }
@@ -6,7 +6,7 @@ export { default as Card } from "./components/card/Card";
6
6
  export { default as Col } from "./components/col/Col";
7
7
  export { default as Container } from "./components/container/Container";
8
8
  export { default as Dropdown } from "./components/dropdown/Dropdown";
9
- export { default as Text } from "./components/FontSizes/Text";
9
+ export { default as Text } from "./components/Text/Text";
10
10
  export { default as Input } from "./components/input/Input";
11
11
  export { default as ListGroup } from "./components/list-group/ListGroup";
12
12
  export { default as Menu } from "./components/menu/Menu";
package/dist/cjs/index.js CHANGED
@@ -1396,11 +1396,11 @@ const getContent = (children, ...child) => {
1396
1396
  });
1397
1397
  return array.length == 0 ? null : array;
1398
1398
  };
1399
- const createStyle = (styles) => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (styles.m ? { margin: `${styles.m}rem` } : {})), (styles.my ? { marginTop: `${styles.my}rem`, marginBottom: `${styles.my}rem` } : {})), (styles.mx ? { marginLeft: `${styles.mx}rem`, marginRight: `${styles.mx}rem` } : {})), (styles.mt ? { marginTop: `${styles.mt}rem` } : {})), (styles.mb ? { marginBottom: `${styles.mb}rem` } : {})), (styles.ml ? { marginLeft: `${styles.ml}rem` } : {})), (styles.mr ? { marginRight: `${styles.mr}rem` } : {})), (styles.p ? { padding: `${styles.p}rem` } : {})), (styles.py ? { paddingTop: `${styles.py}rem`, paddingBottom: `${styles.py}rem` } : {})), (styles.px ? { paddingLeft: `${styles.px}rem`, paddingRight: `${styles.px}rem` } : {})), (styles.pt ? { paddingTop: `${styles.pt}rem` } : {})), (styles.pb ? { paddingBottom: `${styles.pb}rem` } : {})), (styles.pl ? { paddingLeft: `${styles.pl}rem` } : {})), (styles.pr ? { paddingRight: `${styles.pr}rem` } : {})), (styles.bg ? { backgroundColor: styles.bg } : {})), (styles.c ? { color: styles.c } : {})), (styles.opacity ? { opacity: styles.opacity } : {})), (styles.ff ? { fontFamily: styles.ff } : {})), (styles.fz ? { fontSize: `${styles.fz}rem` } : {})), (styles.ta ? { textAlign: styles.ta } : {})), (styles.w ? { width: styles.w } : {})), (styles.miw ? { minWidth: styles.miw } : {})), (styles.maw ? { maxWidth: styles.maw } : {})), (styles.h ? { height: styles.h } : {})), (styles.mih ? { minHeight: styles.mih } : {})), (styles.mah ? { maxHeight: styles.mah } : {})), (styles.pos ? { position: styles.pos } : {})), (styles.top ? { top: styles.top } : {})), (styles.left ? { left: styles.left } : {})), (styles.bottom ? { bottom: styles.bottom } : {})), (styles.right ? { right: styles.right } : {})), (styles.display ? { display: styles.display } : {})), (styles.flex ? { flex: styles.flex } : {})));
1399
+ const createStyle = (styles) => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (styles.m ? { margin: `${styles.m}rem` } : {})), (styles.my ? { marginTop: `${styles.my}rem`, marginBottom: `${styles.my}rem` } : {})), (styles.mx ? { marginLeft: `${styles.mx}rem`, marginRight: `${styles.mx}rem` } : {})), (styles.mt ? { marginTop: `${styles.mt}rem` } : {})), (styles.mb ? { marginBottom: `${styles.mb}rem` } : {})), (styles.ml ? { marginLeft: `${styles.ml}rem` } : {})), (styles.mr ? { marginRight: `${styles.mr}rem` } : {})), (styles.p ? { padding: `${styles.p}rem` } : {})), (styles.py ? { paddingTop: `${styles.py}rem`, paddingBottom: `${styles.py}rem` } : {})), (styles.px ? { paddingLeft: `${styles.px}rem`, paddingRight: `${styles.px}rem` } : {})), (styles.pt ? { paddingTop: `${styles.pt}rem` } : {})), (styles.pb ? { paddingBottom: `${styles.pb}rem` } : {})), (styles.pl ? { paddingLeft: `${styles.pl}rem` } : {})), (styles.pr ? { paddingRight: `${styles.pr}rem` } : {})), (styles.bg ? { backgroundColor: styles.bg } : {})), (styles.c ? { color: styles.c } : {})), (styles.opacity ? { opacity: styles.opacity } : {})), (styles.ff ? { fontFamily: styles.ff } : {})), (styles.fz ? { fontSize: `${styles.fz}rem` } : {})), (styles.ta ? { textAlign: styles.ta } : {})), (styles.w ? { width: styles.w } : {})), (styles.miw ? { minWidth: styles.miw } : {})), (styles.maw ? { maxWidth: styles.maw } : {})), (styles.h ? { height: styles.h } : {})), (styles.mih ? { minHeight: styles.mih } : {})), (styles.mah ? { maxHeight: styles.mah } : {})), (styles.pos ? { position: styles.pos } : {})), (styles.top ? { top: styles.top } : {})), (styles.left ? { left: styles.left } : {})), (styles.bottom ? { bottom: styles.bottom } : {})), (styles.right ? { right: styles.right } : {})), (styles.display ? { display: styles.display } : {})), (styles.flex ? { flex: styles.flex } : {})), (styles.align ? { alignItems: styles.align } : {})), (styles.justify ? { justifyContent: styles.justify } : {})), (styles.tf ? { transform: styles.tf } : {})));
1400
1400
  const mergeCode0Props = (cn, rest) => {
1401
1401
  const style = createStyle(rest);
1402
1402
  const newProps = rest;
1403
- const keys = ["m", "my", "mx", "mt", "mb", "ml", "mr", "p", "py", "px", "pt", "pb", "pl", "pr", "bg", "c", "opacity", "ff", "fz", "fw", "lts", "ta", "lh", "fs", "tt", "td", "w", "miw", "maw", "h", "mih", "mah", "bgsz", "bgp", "bgr", "bga", "pos", "top", "left", "bottom", "right", "inset", "display", "flex"];
1403
+ const keys = ["m", "my", "mx", "mt", "mb", "ml", "mr", "p", "py", "px", "pt", "pb", "pl", "pr", "bg", "c", "opacity", "ff", "fz", "fw", "lts", "ta", "lh", "fs", "tt", "td", "w", "miw", "maw", "h", "mih", "mah", "bgsz", "bgp", "bgr", "bga", "pos", "top", "left", "bottom", "right", "inset", "display", "flex", "align", "justify", "tf"];
1404
1404
  keys.forEach(key => {
1405
1405
  delete newProps[key];
1406
1406
  });
@@ -49,6 +49,9 @@ export interface Code0ComponentProps {
49
49
  inset?: StyleProp<React.CSSProperties['inset']>;
50
50
  display?: StyleProp<React.CSSProperties['display']>;
51
51
  flex?: StyleProp<React.CSSProperties['flex']>;
52
+ align?: StyleProp<React.CSSProperties['alignItems']>;
53
+ justify?: StyleProp<React.CSSProperties['justifyContent']>;
54
+ tf?: StyleProp<React.CSSProperties['transform']>;
52
55
  }
53
56
  export interface Code0Component<T> extends Code0ComponentProps, HTMLProps<T> {
54
57
  }
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { Code0Component, Code0Sizes } from "../../utils/types";
3
3
  import "./Text.style.scss";
4
4
  export interface FontType extends Omit<Omit<Code0Component<HTMLSpanElement>, "children">, "size"> {
5
- children: string;
5
+ children: React.ReactNode;
6
6
  size: Code0Sizes;
7
7
  hierarchy?: "primary" | "secondary" | "tertiary";
8
8
  }
@@ -6,7 +6,7 @@ export { default as Card } from "./components/card/Card";
6
6
  export { default as Col } from "./components/col/Col";
7
7
  export { default as Container } from "./components/container/Container";
8
8
  export { default as Dropdown } from "./components/dropdown/Dropdown";
9
- export { default as Text } from "./components/FontSizes/Text";
9
+ export { default as Text } from "./components/Text/Text";
10
10
  export { default as Input } from "./components/input/Input";
11
11
  export { default as ListGroup } from "./components/list-group/ListGroup";
12
12
  export { default as Menu } from "./components/menu/Menu";
package/dist/esm/index.js CHANGED
@@ -1387,11 +1387,11 @@ const getContent = (children, ...child) => {
1387
1387
  });
1388
1388
  return array.length == 0 ? null : array;
1389
1389
  };
1390
- const createStyle = (styles) => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (styles.m ? { margin: `${styles.m}rem` } : {})), (styles.my ? { marginTop: `${styles.my}rem`, marginBottom: `${styles.my}rem` } : {})), (styles.mx ? { marginLeft: `${styles.mx}rem`, marginRight: `${styles.mx}rem` } : {})), (styles.mt ? { marginTop: `${styles.mt}rem` } : {})), (styles.mb ? { marginBottom: `${styles.mb}rem` } : {})), (styles.ml ? { marginLeft: `${styles.ml}rem` } : {})), (styles.mr ? { marginRight: `${styles.mr}rem` } : {})), (styles.p ? { padding: `${styles.p}rem` } : {})), (styles.py ? { paddingTop: `${styles.py}rem`, paddingBottom: `${styles.py}rem` } : {})), (styles.px ? { paddingLeft: `${styles.px}rem`, paddingRight: `${styles.px}rem` } : {})), (styles.pt ? { paddingTop: `${styles.pt}rem` } : {})), (styles.pb ? { paddingBottom: `${styles.pb}rem` } : {})), (styles.pl ? { paddingLeft: `${styles.pl}rem` } : {})), (styles.pr ? { paddingRight: `${styles.pr}rem` } : {})), (styles.bg ? { backgroundColor: styles.bg } : {})), (styles.c ? { color: styles.c } : {})), (styles.opacity ? { opacity: styles.opacity } : {})), (styles.ff ? { fontFamily: styles.ff } : {})), (styles.fz ? { fontSize: `${styles.fz}rem` } : {})), (styles.ta ? { textAlign: styles.ta } : {})), (styles.w ? { width: styles.w } : {})), (styles.miw ? { minWidth: styles.miw } : {})), (styles.maw ? { maxWidth: styles.maw } : {})), (styles.h ? { height: styles.h } : {})), (styles.mih ? { minHeight: styles.mih } : {})), (styles.mah ? { maxHeight: styles.mah } : {})), (styles.pos ? { position: styles.pos } : {})), (styles.top ? { top: styles.top } : {})), (styles.left ? { left: styles.left } : {})), (styles.bottom ? { bottom: styles.bottom } : {})), (styles.right ? { right: styles.right } : {})), (styles.display ? { display: styles.display } : {})), (styles.flex ? { flex: styles.flex } : {})));
1390
+ const createStyle = (styles) => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (styles.m ? { margin: `${styles.m}rem` } : {})), (styles.my ? { marginTop: `${styles.my}rem`, marginBottom: `${styles.my}rem` } : {})), (styles.mx ? { marginLeft: `${styles.mx}rem`, marginRight: `${styles.mx}rem` } : {})), (styles.mt ? { marginTop: `${styles.mt}rem` } : {})), (styles.mb ? { marginBottom: `${styles.mb}rem` } : {})), (styles.ml ? { marginLeft: `${styles.ml}rem` } : {})), (styles.mr ? { marginRight: `${styles.mr}rem` } : {})), (styles.p ? { padding: `${styles.p}rem` } : {})), (styles.py ? { paddingTop: `${styles.py}rem`, paddingBottom: `${styles.py}rem` } : {})), (styles.px ? { paddingLeft: `${styles.px}rem`, paddingRight: `${styles.px}rem` } : {})), (styles.pt ? { paddingTop: `${styles.pt}rem` } : {})), (styles.pb ? { paddingBottom: `${styles.pb}rem` } : {})), (styles.pl ? { paddingLeft: `${styles.pl}rem` } : {})), (styles.pr ? { paddingRight: `${styles.pr}rem` } : {})), (styles.bg ? { backgroundColor: styles.bg } : {})), (styles.c ? { color: styles.c } : {})), (styles.opacity ? { opacity: styles.opacity } : {})), (styles.ff ? { fontFamily: styles.ff } : {})), (styles.fz ? { fontSize: `${styles.fz}rem` } : {})), (styles.ta ? { textAlign: styles.ta } : {})), (styles.w ? { width: styles.w } : {})), (styles.miw ? { minWidth: styles.miw } : {})), (styles.maw ? { maxWidth: styles.maw } : {})), (styles.h ? { height: styles.h } : {})), (styles.mih ? { minHeight: styles.mih } : {})), (styles.mah ? { maxHeight: styles.mah } : {})), (styles.pos ? { position: styles.pos } : {})), (styles.top ? { top: styles.top } : {})), (styles.left ? { left: styles.left } : {})), (styles.bottom ? { bottom: styles.bottom } : {})), (styles.right ? { right: styles.right } : {})), (styles.display ? { display: styles.display } : {})), (styles.flex ? { flex: styles.flex } : {})), (styles.align ? { alignItems: styles.align } : {})), (styles.justify ? { justifyContent: styles.justify } : {})), (styles.tf ? { transform: styles.tf } : {})));
1391
1391
  const mergeCode0Props = (cn, rest) => {
1392
1392
  const style = createStyle(rest);
1393
1393
  const newProps = rest;
1394
- const keys = ["m", "my", "mx", "mt", "mb", "ml", "mr", "p", "py", "px", "pt", "pb", "pl", "pr", "bg", "c", "opacity", "ff", "fz", "fw", "lts", "ta", "lh", "fs", "tt", "td", "w", "miw", "maw", "h", "mih", "mah", "bgsz", "bgp", "bgr", "bga", "pos", "top", "left", "bottom", "right", "inset", "display", "flex"];
1394
+ const keys = ["m", "my", "mx", "mt", "mb", "ml", "mr", "p", "py", "px", "pt", "pb", "pl", "pr", "bg", "c", "opacity", "ff", "fz", "fw", "lts", "ta", "lh", "fs", "tt", "td", "w", "miw", "maw", "h", "mih", "mah", "bgsz", "bgp", "bgr", "bga", "pos", "top", "left", "bottom", "right", "inset", "display", "flex", "align", "justify", "tf"];
1395
1395
  keys.forEach(key => {
1396
1396
  delete newProps[key];
1397
1397
  });
@@ -49,6 +49,9 @@ export interface Code0ComponentProps {
49
49
  inset?: StyleProp<React.CSSProperties['inset']>;
50
50
  display?: StyleProp<React.CSSProperties['display']>;
51
51
  flex?: StyleProp<React.CSSProperties['flex']>;
52
+ align?: StyleProp<React.CSSProperties['alignItems']>;
53
+ justify?: StyleProp<React.CSSProperties['justifyContent']>;
54
+ tf?: StyleProp<React.CSSProperties['transform']>;
52
55
  }
53
56
  export interface Code0Component<T> extends Code0ComponentProps, HTMLProps<T> {
54
57
  }
package/dist/index.d.ts CHANGED
@@ -52,6 +52,9 @@ interface Code0ComponentProps {
52
52
  inset?: StyleProp<React.CSSProperties['inset']>;
53
53
  display?: StyleProp<React.CSSProperties['display']>;
54
54
  flex?: StyleProp<React.CSSProperties['flex']>;
55
+ align?: StyleProp<React.CSSProperties['alignItems']>;
56
+ justify?: StyleProp<React.CSSProperties['justifyContent']>;
57
+ tf?: StyleProp<React.CSSProperties['transform']>;
55
58
  }
56
59
  interface Code0Component<T> extends Code0ComponentProps, HTMLProps<T> {
57
60
  }
@@ -164,7 +167,7 @@ declare const _default$5: React.FC<DropdownType$1> & {
164
167
  };
165
168
 
166
169
  interface FontType extends Omit<Omit<Code0Component<HTMLSpanElement>, "children">, "size"> {
167
- children: string;
170
+ children: React.ReactNode;
168
171
  size: Code0Sizes;
169
172
  hierarchy?: "primary" | "secondary" | "tertiary";
170
173
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code0-tech/pictor",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "A simple template for a custom React component library",
5
5
  "scripts": {
6
6
  "dev": "npm run storybook:dev",