@ndlib/component-library 0.0.111 → 0.0.112

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.
@@ -49,7 +49,9 @@ export const ReadMore = (_a) => {
49
49
  const [showEllipsis, setShowEllipsis] = useState(true);
50
50
  const wrapperHeight = useLinesHeight({ typography, lines });
51
51
  const { screenSize } = useMediaQuery();
52
- const { color, bg } = sx || {};
52
+ const { color: _color, bg: _bg } = sx || {};
53
+ const color = Array.isArray(_color) ? _color[0] : _color;
54
+ const bg = Array.isArray(_bg) ? _bg[0] : _bg;
53
55
  React.useEffect(() => {
54
56
  if (ref.current) {
55
57
  if (fixedHeight) {
@@ -79,6 +79,7 @@ export declare const theme: {
79
79
  lineHeights: {
80
80
  normal: number;
81
81
  condensed: number;
82
+ extraCondensed: number;
82
83
  };
83
84
  fontWeights: {
84
85
  normal: number;
@@ -87,15 +88,15 @@ export declare const theme: {
87
88
  };
88
89
  };
89
90
  export type Theme = typeof theme;
90
- export type StylesProp = ThemeUICSSObject & {
91
- color?: COLOR;
92
- bg?: COLOR;
93
- borderColor?: COLOR;
94
- fontSize?: FONT_SIZE;
95
- font?: FONT;
96
- fontWeight?: FONT_WEIGHT;
97
- lineHeight?: LINE_HEIGHT | number;
98
- boxShadow?: BOX_SHADOW;
91
+ export type StylesProp = Omit<ThemeUICSSObject, 'color' | 'bg' | 'borderColor' | 'fontSize' | 'font' | 'fontWeight' | 'lineHeight' | 'boxShadow'> & {
92
+ color?: COLOR | COLOR[];
93
+ bg?: COLOR | COLOR[];
94
+ borderColor?: COLOR | COLOR[];
95
+ fontSize?: FONT_SIZE | FONT_SIZE[];
96
+ font?: FONT | FONT[];
97
+ fontWeight?: FONT_WEIGHT | FONT_WEIGHT[];
98
+ lineHeight?: LINE_HEIGHT | number | (LINE_HEIGHT | number)[];
99
+ boxShadow?: BOX_SHADOW | BOX_SHADOW[];
99
100
  };
100
101
  export type StyledElementProps<E extends Element, CustomProps = object, Children = React.ReactNode> = {
101
102
  sx?: StylesProp;
@@ -177,6 +178,7 @@ export declare const useTheme: () => {
177
178
  lineHeights: {
178
179
  normal: number;
179
180
  condensed: number;
181
+ extraCondensed: number;
180
182
  };
181
183
  fontWeights: {
182
184
  normal: number;
@@ -23,7 +23,8 @@ export declare enum FONT_WEIGHT {
23
23
  }
24
24
  export declare enum LINE_HEIGHT {
25
25
  NORMAL = "normal",
26
- CONDENSED = "condensed"
26
+ CONDENSED = "condensed",
27
+ EXTRA_CONDENSED = "extraCondensed"
27
28
  }
28
29
  export declare const fontSizeMap: {
29
30
  xxs: string;
@@ -57,6 +58,7 @@ export declare const fontStyles: {
57
58
  lineHeights: {
58
59
  normal: number;
59
60
  condensed: number;
61
+ extraCondensed: number;
60
62
  };
61
63
  fontWeights: {
62
64
  normal: number;
@@ -40,6 +40,7 @@ export var LINE_HEIGHT;
40
40
  (function (LINE_HEIGHT) {
41
41
  LINE_HEIGHT["NORMAL"] = "normal";
42
42
  LINE_HEIGHT["CONDENSED"] = "condensed";
43
+ LINE_HEIGHT["EXTRA_CONDENSED"] = "extraCondensed";
43
44
  })(LINE_HEIGHT || (LINE_HEIGHT = {}));
44
45
  export const fontSizeMap = {
45
46
  [FONT_SIZE.XXS]: '0.5rem',
@@ -63,6 +64,7 @@ export const fontStyles = {
63
64
  lineHeights: {
64
65
  [LINE_HEIGHT.NORMAL]: 1.625,
65
66
  [LINE_HEIGHT.CONDENSED]: 1.3,
67
+ [LINE_HEIGHT.EXTRA_CONDENSED]: 1,
66
68
  },
67
69
  fontWeights: {
68
70
  [FONT_WEIGHT.NORMAL]: 400,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndlib/component-library",
3
- "version": "0.0.111",
3
+ "version": "0.0.112",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "files": [