ingred-ui 37.2.1 → 37.3.0

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,6 +2,7 @@ export { Shadow } from "./shadow";
2
2
  export { Radius } from "./radius";
3
3
  export type { Radii, RadiiKey } from "./radius";
4
4
  export { Space } from "./space";
5
+ export type { SpaceScale, SpaceKey } from "./space";
5
6
  export { breakpointPrimitives, BreakPoint, ContainerBreakPoint, } from "./breakPoint";
6
7
  export type { BreakpointPrimitive } from "./breakPoint";
7
8
  export { colors } from "./color";
@@ -1 +1,34 @@
1
+ /**
2
+ * 余白の基準の値。`theme.spacing` のデフォルト。
3
+ * Spacer の `pt` や Flex の `gap` など、倍数で指定する props の単位にもなる。
4
+ */
1
5
  export declare const Space = 8;
6
+ /**
7
+ * 余白の段階。名前は Figma の Variables(spacing)に合わせている。
8
+ */
9
+ export type SpaceScale = {
10
+ none: number;
11
+ "2xs": number;
12
+ xs: number;
13
+ small: number;
14
+ medium: number;
15
+ large: number;
16
+ xl: number;
17
+ "2xl": number;
18
+ "3xl": number;
19
+ "4xl": number;
20
+ "5xl": number;
21
+ "6xl": number;
22
+ "7xl": number;
23
+ "8xl": number;
24
+ "9xl": number;
25
+ };
26
+ export type SpaceKey = keyof SpaceScale;
27
+ export type SpaceOptions = Partial<SpaceScale>;
28
+ /**
29
+ * `spacing` を基準に段階を作る。
30
+ * 段階ができる前は `theme.spacing` を倍数で使っていたため、同じ比率にしている。
31
+ * デフォルトの `Space`(8)では Figma の値(0 / 2 / 4 / 6 / 8 / 10 / 12 / 14 / 16 / 24 / 32 / 40 / 48 / 56 / 64)になる。
32
+ */
33
+ export declare const createSpace: (spacing: number) => SpaceScale;
34
+ export declare const space: SpaceScale;
@@ -1,6 +1,7 @@
1
1
  import { Palette } from "./palette";
2
2
  import { Depth } from "../styles";
3
3
  import { Radii, RadiiOptions } from "../styles/radius";
4
+ import { SpaceScale, SpaceOptions } from "../styles/space";
4
5
  import { DepthOptions } from "../styles/depth";
5
6
  import { DeepPartial } from "../types";
6
7
  export type ThemeOptions = {
@@ -8,7 +9,11 @@ export type ThemeOptions = {
8
9
  shadow?: {
9
10
  [key: string]: string;
10
11
  };
12
+ /**
13
+ * 余白の基準の値。`space` を渡さなかったときは、この値から `space` の各段階を作る。
14
+ */
11
15
  spacing?: number;
16
+ space?: SpaceOptions;
12
17
  /**
13
18
  * @deprecated `radii` を使う。
14
19
  * `radii` を渡さなかったときは、この値から `radii` の各段階を作る。
@@ -26,6 +31,7 @@ export type Theme = {
26
31
  [key: string]: string;
27
32
  };
28
33
  spacing: number;
34
+ space: SpaceScale;
29
35
  /**
30
36
  * @deprecated `radii` を使う。
31
37
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ingred-ui",
3
- "version": "37.2.1",
3
+ "version": "37.3.0",
4
4
  "description": "",
5
5
  "author": "CARTA HOLDINGS, Inc.",
6
6
  "license": "MIT",
@@ -45,10 +45,10 @@
45
45
  "@rollup/plugin-terser": "1.0.2",
46
46
  "@rollup/plugin-typescript": "12.3.1",
47
47
  "@rollup/plugin-url": "8.0.2",
48
- "@storybook/addon-docs": "10.6.5",
49
- "@storybook/addon-links": "10.6.5",
50
- "@storybook/addon-vitest": "10.6.5",
51
- "@storybook/react-vite": "10.6.5",
48
+ "@storybook/addon-docs": "10.6.6",
49
+ "@storybook/addon-links": "10.6.6",
50
+ "@storybook/addon-vitest": "10.6.6",
51
+ "@storybook/react-vite": "10.6.6",
52
52
  "@testing-library/dom": "10.4.2",
53
53
  "@testing-library/jest-dom": "7.0.1",
54
54
  "@testing-library/react": "16.3.2",
@@ -63,7 +63,7 @@
63
63
  "@vitest/browser-playwright": "4.1.12",
64
64
  "@vitest/coverage-v8": "4.1.12",
65
65
  "@vitest/eslint-plugin": "1.6.27",
66
- "chaosbringer": "0.14.0",
66
+ "chaosbringer": "0.15.0",
67
67
  "eslint": "8.57.1",
68
68
  "eslint-config-prettier": "9.1.0",
69
69
  "eslint-plugin-import": "2.29.0",
@@ -72,15 +72,15 @@
72
72
  "eslint-plugin-react-hooks": "4.6.0",
73
73
  "eslint-plugin-storybook": "10.6.3",
74
74
  "jsdom": "29.1.1",
75
- "playwright": "1.64.1",
75
+ "playwright": "1.65.0",
76
76
  "prettier": "3.9.10",
77
77
  "react": "19.2.7",
78
78
  "react-docgen-typescript": "2.4.0",
79
79
  "react-dom": "19.2.7",
80
- "rollup": "4.67.4",
80
+ "rollup": "4.68.0",
81
81
  "rollup-plugin-peer-deps-external": "2.2.4",
82
82
  "scaffdog": "4.1.0",
83
- "storybook": "10.6.5",
83
+ "storybook": "10.6.6",
84
84
  "styled-components": "6.4.1",
85
85
  "tslib": "2.9.1",
86
86
  "tsx": "4.23.15",