@noya-app/noya-designsystem 0.1.21 → 0.1.22

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.
@@ -1,5 +1,5 @@
1
1
  import { getShortcutDisplayParts } from "@noya-app/noya-keymap";
2
- import React, { memo, ReactElement, ReactNode } from "react";
2
+ import React, { memo, ReactNode } from "react";
3
3
  import styled, { CSSObject } from "styled-components";
4
4
  import { useDesignSystemConfiguration } from "../../contexts/DesignSystemConfiguration";
5
5
  import { Theme } from "../../theme";
@@ -63,7 +63,7 @@ export type RegularMenuItem<T extends string> = {
63
63
  shortcut?: string;
64
64
  checked?: boolean;
65
65
  disabled?: boolean;
66
- icon?: ReactElement;
66
+ icon?: ReactNode;
67
67
  items?: MenuItem<T>[];
68
68
  role?: MenuItemRole;
69
69
  };
package/src/index.tsx CHANGED
@@ -41,6 +41,7 @@ export * from "./components/Progress";
41
41
  export * from "./components/RadioGroup";
42
42
  export * from "./components/ScrollArea";
43
43
  export * from "./components/Select";
44
+ export * from "./components/SelectMenu";
44
45
  export * from "./components/Slider";
45
46
  export * from "./components/Sortable";
46
47
  export type { RelativeDropPosition } from "./components/Sortable";
@@ -181,7 +181,8 @@ export const textStyles = {
181
181
  fontFamily: fonts.normal,
182
182
  fontSize: "0.62rem",
183
183
  fontWeight: 400,
184
- lineHeight: "1.4",
184
+ lineHeight: "19px",
185
+ // lineHeight: "1.4",
185
186
  textTransform: "uppercase",
186
187
  letterSpacing: "-0.3px",
187
188
  } as CSSObject,
@@ -1,4 +1,4 @@
1
- import { CSSObject } from 'styled-components';
1
+ import { CSSObject } from "styled-components";
2
2
 
3
3
  type BreakpointKey = number | string;
4
4
 
@@ -11,15 +11,15 @@ export type BreakpointCollection<T extends object> =
11
11
  export type StyleMap = Record<string, CSSObject>;
12
12
 
13
13
  export function mergeBreakpoints(
14
- breakpoints: BreakpointCollection<CSSObject>,
14
+ breakpoints: BreakpointCollection<CSSObject>
15
15
  ): StyleMap;
16
16
  export function mergeBreakpoints<T extends object>(
17
17
  breakpoints: BreakpointCollection<T>,
18
- transform?: (value: T) => CSSObject,
18
+ transform?: (value: T) => CSSObject
19
19
  ): StyleMap;
20
20
  export function mergeBreakpoints<T extends object>(
21
21
  breakpoints: BreakpointCollection<T>,
22
- transform?: (value: T) => CSSObject,
22
+ transform?: (value: T) => CSSObject
23
23
  ): StyleMap {
24
24
  const breakpointMap = Array.isArray(breakpoints)
25
25
  ? breakpoints.reduce(
@@ -28,7 +28,7 @@ export function mergeBreakpoints<T extends object>(
28
28
  result[key] = result[key] ? { ...result[key], ...value } : value;
29
29
  return result;
30
30
  },
31
- {},
31
+ {}
32
32
  )
33
33
  : breakpoints;
34
34
 
@@ -37,7 +37,7 @@ export function mergeBreakpoints<T extends object>(
37
37
  const transformedList = breakpointList
38
38
  .sort((a, b) => Number(b[0]) - Number(a[0]))
39
39
  .map(([width, value]: Breakpoint<T>) => [
40
- `@media screen and (max-width: ${width}px)`,
40
+ `@media (min-width: ${width}px)`,
41
41
  transform?.(value) ?? value,
42
42
  ]);
43
43