@fringeworks/react-layouts 0.8.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.
- package/LICENSE +21 -0
- package/README.ja.md +234 -0
- package/README.md +236 -0
- package/_internal/_constants.cjs +27 -0
- package/_internal/_constants.d.cts +7 -0
- package/_internal/_constants.d.mts +7 -0
- package/_internal/_constants.mjs +25 -0
- package/_internal/applyLayout/applyLayout.cjs +26 -0
- package/_internal/applyLayout/applyLayout.d.cts +13 -0
- package/_internal/applyLayout/applyLayout.d.mts +14 -0
- package/_internal/applyLayout/applyLayout.mjs +24 -0
- package/_internal/applyLayout/index.cjs +3 -0
- package/_internal/applyLayout/index.d.cts +3 -0
- package/_internal/applyLayout/index.d.mts +3 -0
- package/_internal/applyLayout/index.mjs +3 -0
- package/_internal/applyLayout/types.cjs +0 -0
- package/_internal/applyLayout/types.d.cts +37 -0
- package/_internal/applyLayout/types.d.mts +37 -0
- package/_internal/applyLayout/types.mjs +1 -0
- package/_internal/withLayoutBase/index.cjs +3 -0
- package/_internal/withLayoutBase/index.d.cts +3 -0
- package/_internal/withLayoutBase/index.d.mts +3 -0
- package/_internal/withLayoutBase/index.mjs +3 -0
- package/_internal/withLayoutBase/types.cjs +0 -0
- package/_internal/withLayoutBase/types.d.cts +43 -0
- package/_internal/withLayoutBase/types.d.mts +43 -0
- package/_internal/withLayoutBase/types.mjs +1 -0
- package/_internal/withLayoutBase/withLayoutBase.cjs +50 -0
- package/_internal/withLayoutBase/withLayoutBase.d.cts +13 -0
- package/_internal/withLayoutBase/withLayoutBase.d.mts +14 -0
- package/_internal/withLayoutBase/withLayoutBase.mjs +47 -0
- package/_virtual/_rolldown/runtime.cjs +43 -0
- package/_virtual/_rolldown/runtime.mjs +18 -0
- package/constants.cjs +57 -0
- package/constants.d.cts +20 -0
- package/constants.d.mts +20 -0
- package/constants.mjs +20 -0
- package/css/balance.css +171 -0
- package/css/center.css +189 -0
- package/css/flow.css +205 -0
- package/css/layer.css +72 -0
- package/css/matrix.css +184 -0
- package/css/pack.css +42 -0
- package/css/pin.css +23 -0
- package/css/stack.css +216 -0
- package/css/styles.css +1346 -0
- package/css/tile.css +236 -0
- package/index.cjs +61 -0
- package/index.d.cts +22 -0
- package/index.d.mts +22 -0
- package/index.mjs +13 -0
- package/package.json +56 -0
- package/with-css/index.cjs +68 -0
- package/with-css/index.d.cts +23 -0
- package/with-css/index.d.mts +23 -0
- package/with-css/index.mjs +14 -0
- package/with-css/styles.cjs +14 -0
- package/with-css/styles.d.cts +2 -0
- package/with-css/styles.d.mts +2 -0
- package/with-css/styles.mjs +8 -0
- package/with-css/withBalanceLayout/index.cjs +4 -0
- package/with-css/withBalanceLayout/index.d.cts +3 -0
- package/with-css/withBalanceLayout/index.d.mts +3 -0
- package/with-css/withBalanceLayout/index.mjs +4 -0
- package/with-css/withCenterLayout/index.cjs +4 -0
- package/with-css/withCenterLayout/index.d.cts +3 -0
- package/with-css/withCenterLayout/index.d.mts +3 -0
- package/with-css/withCenterLayout/index.mjs +4 -0
- package/with-css/withFlowLayout/index.cjs +4 -0
- package/with-css/withFlowLayout/index.d.cts +3 -0
- package/with-css/withFlowLayout/index.d.mts +3 -0
- package/with-css/withFlowLayout/index.mjs +4 -0
- package/with-css/withLayerLayout/index.cjs +4 -0
- package/with-css/withLayerLayout/index.d.cts +3 -0
- package/with-css/withLayerLayout/index.d.mts +3 -0
- package/with-css/withLayerLayout/index.mjs +4 -0
- package/with-css/withLayout/index.cjs +4 -0
- package/with-css/withLayout/index.d.cts +3 -0
- package/with-css/withLayout/index.d.mts +3 -0
- package/with-css/withLayout/index.mjs +4 -0
- package/with-css/withMatrixLayout/index.cjs +4 -0
- package/with-css/withMatrixLayout/index.d.cts +3 -0
- package/with-css/withMatrixLayout/index.d.mts +3 -0
- package/with-css/withMatrixLayout/index.mjs +4 -0
- package/with-css/withPackLayout/index.cjs +4 -0
- package/with-css/withPackLayout/index.d.cts +3 -0
- package/with-css/withPackLayout/index.d.mts +3 -0
- package/with-css/withPackLayout/index.mjs +4 -0
- package/with-css/withPinLayout/index.cjs +4 -0
- package/with-css/withPinLayout/index.d.cts +3 -0
- package/with-css/withPinLayout/index.d.mts +3 -0
- package/with-css/withPinLayout/index.mjs +4 -0
- package/with-css/withStackLayout/index.cjs +4 -0
- package/with-css/withStackLayout/index.d.cts +3 -0
- package/with-css/withStackLayout/index.d.mts +3 -0
- package/with-css/withStackLayout/index.mjs +4 -0
- package/with-css/withTileLayout/index.cjs +4 -0
- package/with-css/withTileLayout/index.d.cts +3 -0
- package/with-css/withTileLayout/index.d.mts +3 -0
- package/with-css/withTileLayout/index.mjs +4 -0
- package/withBalanceLayout/index.cjs +3 -0
- package/withBalanceLayout/index.d.cts +3 -0
- package/withBalanceLayout/index.d.mts +3 -0
- package/withBalanceLayout/index.mjs +3 -0
- package/withBalanceLayout/types.cjs +0 -0
- package/withBalanceLayout/types.d.cts +10 -0
- package/withBalanceLayout/types.d.mts +10 -0
- package/withBalanceLayout/types.mjs +1 -0
- package/withBalanceLayout/withBalanceLayout.cjs +18 -0
- package/withBalanceLayout/withBalanceLayout.d.cts +12 -0
- package/withBalanceLayout/withBalanceLayout.d.mts +13 -0
- package/withBalanceLayout/withBalanceLayout.mjs +16 -0
- package/withCenterLayout/index.cjs +3 -0
- package/withCenterLayout/index.d.cts +3 -0
- package/withCenterLayout/index.d.mts +3 -0
- package/withCenterLayout/index.mjs +3 -0
- package/withCenterLayout/types.cjs +0 -0
- package/withCenterLayout/types.d.cts +10 -0
- package/withCenterLayout/types.d.mts +10 -0
- package/withCenterLayout/types.mjs +1 -0
- package/withCenterLayout/withCenterLayout.cjs +18 -0
- package/withCenterLayout/withCenterLayout.d.cts +12 -0
- package/withCenterLayout/withCenterLayout.d.mts +13 -0
- package/withCenterLayout/withCenterLayout.mjs +16 -0
- package/withFlowLayout/index.cjs +3 -0
- package/withFlowLayout/index.d.cts +3 -0
- package/withFlowLayout/index.d.mts +3 -0
- package/withFlowLayout/index.mjs +3 -0
- package/withFlowLayout/types.cjs +0 -0
- package/withFlowLayout/types.d.cts +10 -0
- package/withFlowLayout/types.d.mts +10 -0
- package/withFlowLayout/types.mjs +1 -0
- package/withFlowLayout/withFlowLayout.cjs +18 -0
- package/withFlowLayout/withFlowLayout.d.cts +12 -0
- package/withFlowLayout/withFlowLayout.d.mts +13 -0
- package/withFlowLayout/withFlowLayout.mjs +16 -0
- package/withLayerLayout/index.cjs +3 -0
- package/withLayerLayout/index.d.cts +3 -0
- package/withLayerLayout/index.d.mts +3 -0
- package/withLayerLayout/index.mjs +3 -0
- package/withLayerLayout/types.cjs +0 -0
- package/withLayerLayout/types.d.cts +10 -0
- package/withLayerLayout/types.d.mts +10 -0
- package/withLayerLayout/types.mjs +1 -0
- package/withLayerLayout/withLayerLayout.cjs +18 -0
- package/withLayerLayout/withLayerLayout.d.cts +12 -0
- package/withLayerLayout/withLayerLayout.d.mts +13 -0
- package/withLayerLayout/withLayerLayout.mjs +16 -0
- package/withLayout/index.cjs +3 -0
- package/withLayout/index.d.cts +3 -0
- package/withLayout/index.d.mts +3 -0
- package/withLayout/index.mjs +3 -0
- package/withLayout/types.cjs +0 -0
- package/withLayout/types.d.cts +37 -0
- package/withLayout/types.d.mts +37 -0
- package/withLayout/types.mjs +1 -0
- package/withLayout/withLayout.cjs +48 -0
- package/withLayout/withLayout.d.cts +14 -0
- package/withLayout/withLayout.d.mts +15 -0
- package/withLayout/withLayout.mjs +38 -0
- package/withMatrixLayout/index.cjs +3 -0
- package/withMatrixLayout/index.d.cts +3 -0
- package/withMatrixLayout/index.d.mts +3 -0
- package/withMatrixLayout/index.mjs +3 -0
- package/withMatrixLayout/types.cjs +0 -0
- package/withMatrixLayout/types.d.cts +10 -0
- package/withMatrixLayout/types.d.mts +10 -0
- package/withMatrixLayout/types.mjs +1 -0
- package/withMatrixLayout/withMatrixLayout.cjs +18 -0
- package/withMatrixLayout/withMatrixLayout.d.cts +12 -0
- package/withMatrixLayout/withMatrixLayout.d.mts +13 -0
- package/withMatrixLayout/withMatrixLayout.mjs +16 -0
- package/withPackLayout/index.cjs +3 -0
- package/withPackLayout/index.d.cts +3 -0
- package/withPackLayout/index.d.mts +3 -0
- package/withPackLayout/index.mjs +3 -0
- package/withPackLayout/types.cjs +0 -0
- package/withPackLayout/types.d.cts +10 -0
- package/withPackLayout/types.d.mts +10 -0
- package/withPackLayout/types.mjs +1 -0
- package/withPackLayout/withPackLayout.cjs +18 -0
- package/withPackLayout/withPackLayout.d.cts +12 -0
- package/withPackLayout/withPackLayout.d.mts +13 -0
- package/withPackLayout/withPackLayout.mjs +16 -0
- package/withPinLayout/index.cjs +3 -0
- package/withPinLayout/index.d.cts +3 -0
- package/withPinLayout/index.d.mts +3 -0
- package/withPinLayout/index.mjs +3 -0
- package/withPinLayout/types.cjs +0 -0
- package/withPinLayout/types.d.cts +10 -0
- package/withPinLayout/types.d.mts +10 -0
- package/withPinLayout/types.mjs +1 -0
- package/withPinLayout/withPinLayout.cjs +18 -0
- package/withPinLayout/withPinLayout.d.cts +12 -0
- package/withPinLayout/withPinLayout.d.mts +13 -0
- package/withPinLayout/withPinLayout.mjs +16 -0
- package/withStackLayout/index.cjs +3 -0
- package/withStackLayout/index.d.cts +3 -0
- package/withStackLayout/index.d.mts +3 -0
- package/withStackLayout/index.mjs +3 -0
- package/withStackLayout/types.cjs +0 -0
- package/withStackLayout/types.d.cts +10 -0
- package/withStackLayout/types.d.mts +10 -0
- package/withStackLayout/types.mjs +1 -0
- package/withStackLayout/withStackLayout.cjs +18 -0
- package/withStackLayout/withStackLayout.d.cts +12 -0
- package/withStackLayout/withStackLayout.d.mts +13 -0
- package/withStackLayout/withStackLayout.mjs +16 -0
- package/withTileLayout/index.cjs +3 -0
- package/withTileLayout/index.d.cts +3 -0
- package/withTileLayout/index.d.mts +3 -0
- package/withTileLayout/index.mjs +3 -0
- package/withTileLayout/types.cjs +0 -0
- package/withTileLayout/types.d.cts +10 -0
- package/withTileLayout/types.d.mts +10 -0
- package/withTileLayout/types.mjs +1 -0
- package/withTileLayout/withTileLayout.cjs +18 -0
- package/withTileLayout/withTileLayout.d.cts +12 -0
- package/withTileLayout/withTileLayout.d.mts +13 -0
- package/withTileLayout/withTileLayout.mjs +16 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LayerLayoutComponent, WithLayerLayoutOptions } from "./types.mjs";
|
|
2
|
+
import { ElementType } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/withLayerLayout/withLayerLayout.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* コンテナーのレイアウト機能を追加するHOC
|
|
7
|
+
* @param Component コンポーネント
|
|
8
|
+
* @param options オプション
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
declare function withLayerLayout<C extends ElementType>(Component: C, options?: WithLayerLayoutOptions): LayerLayoutComponent<C>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { withLayerLayout as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import withLayoutBase from "../_internal/withLayoutBase/withLayoutBase.mjs";
|
|
2
|
+
import layer from "@fringeworks/style-layouts/layer";
|
|
3
|
+
|
|
4
|
+
//#region src/withLayerLayout/withLayerLayout.tsx
|
|
5
|
+
/**
|
|
6
|
+
* コンテナーのレイアウト機能を追加するHOC
|
|
7
|
+
* @param Component コンポーネント
|
|
8
|
+
* @param options オプション
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
function withLayerLayout(Component, options = {}) {
|
|
12
|
+
return withLayoutBase(Component, layer, options);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { withLayerLayout as default };
|
|
File without changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { LayoutComponentBase, WithLayoutBaseOptions } from "../_internal/withLayoutBase/types.cjs";
|
|
2
|
+
import { LayoutType } from "../constants.cjs";
|
|
3
|
+
import { WithBalanceLayoutProps } from "../withBalanceLayout/types.cjs";
|
|
4
|
+
import { WithCenterLayoutProps } from "../withCenterLayout/types.cjs";
|
|
5
|
+
import { WithFlowLayoutProps } from "../withFlowLayout/types.cjs";
|
|
6
|
+
import { WithLayerLayoutProps } from "../withLayerLayout/types.cjs";
|
|
7
|
+
import { WithMatrixLayoutProps } from "../withMatrixLayout/types.cjs";
|
|
8
|
+
import { WithPackLayoutProps } from "../withPackLayout/types.cjs";
|
|
9
|
+
import { WithPinLayoutProps } from "../withPinLayout/types.cjs";
|
|
10
|
+
import { WithStackLayoutProps } from "../withStackLayout/types.cjs";
|
|
11
|
+
import { WithTileLayoutProps } from "../withTileLayout/types.cjs";
|
|
12
|
+
import { ElementType } from "react";
|
|
13
|
+
|
|
14
|
+
//#region src/withLayout/types.d.ts
|
|
15
|
+
type WithLayoutProps = ({
|
|
16
|
+
layout: typeof LayoutType.balance;
|
|
17
|
+
} & WithBalanceLayoutProps) | ({
|
|
18
|
+
layout: typeof LayoutType.center;
|
|
19
|
+
} & WithCenterLayoutProps) | ({
|
|
20
|
+
layout: typeof LayoutType.flow;
|
|
21
|
+
} & WithFlowLayoutProps) | ({
|
|
22
|
+
layout: typeof LayoutType.layer;
|
|
23
|
+
} & WithLayerLayoutProps) | ({
|
|
24
|
+
layout: typeof LayoutType.matrix;
|
|
25
|
+
} & WithMatrixLayoutProps) | ({
|
|
26
|
+
layout: typeof LayoutType.pack;
|
|
27
|
+
} & WithPackLayoutProps) | ({
|
|
28
|
+
layout: typeof LayoutType.pin;
|
|
29
|
+
} & WithPinLayoutProps) | ({
|
|
30
|
+
layout: typeof LayoutType.stack;
|
|
31
|
+
} & WithStackLayoutProps) | ({
|
|
32
|
+
layout: typeof LayoutType.tile;
|
|
33
|
+
} & WithTileLayoutProps);
|
|
34
|
+
type WithLayoutOptions = WithLayoutBaseOptions;
|
|
35
|
+
type LayoutComponent<C extends ElementType> = LayoutComponentBase<C, WithLayoutProps>;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { LayoutComponent, WithLayoutOptions, WithLayoutProps };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { LayoutComponentBase, WithLayoutBaseOptions } from "../_internal/withLayoutBase/types.mjs";
|
|
2
|
+
import { LayoutType } from "../constants.mjs";
|
|
3
|
+
import { WithBalanceLayoutProps } from "../withBalanceLayout/types.mjs";
|
|
4
|
+
import { WithCenterLayoutProps } from "../withCenterLayout/types.mjs";
|
|
5
|
+
import { WithFlowLayoutProps } from "../withFlowLayout/types.mjs";
|
|
6
|
+
import { WithLayerLayoutProps } from "../withLayerLayout/types.mjs";
|
|
7
|
+
import { WithMatrixLayoutProps } from "../withMatrixLayout/types.mjs";
|
|
8
|
+
import { WithPackLayoutProps } from "../withPackLayout/types.mjs";
|
|
9
|
+
import { WithPinLayoutProps } from "../withPinLayout/types.mjs";
|
|
10
|
+
import { WithStackLayoutProps } from "../withStackLayout/types.mjs";
|
|
11
|
+
import { WithTileLayoutProps } from "../withTileLayout/types.mjs";
|
|
12
|
+
import { ElementType } from "react";
|
|
13
|
+
|
|
14
|
+
//#region src/withLayout/types.d.ts
|
|
15
|
+
type WithLayoutProps = ({
|
|
16
|
+
layout: typeof LayoutType.balance;
|
|
17
|
+
} & WithBalanceLayoutProps) | ({
|
|
18
|
+
layout: typeof LayoutType.center;
|
|
19
|
+
} & WithCenterLayoutProps) | ({
|
|
20
|
+
layout: typeof LayoutType.flow;
|
|
21
|
+
} & WithFlowLayoutProps) | ({
|
|
22
|
+
layout: typeof LayoutType.layer;
|
|
23
|
+
} & WithLayerLayoutProps) | ({
|
|
24
|
+
layout: typeof LayoutType.matrix;
|
|
25
|
+
} & WithMatrixLayoutProps) | ({
|
|
26
|
+
layout: typeof LayoutType.pack;
|
|
27
|
+
} & WithPackLayoutProps) | ({
|
|
28
|
+
layout: typeof LayoutType.pin;
|
|
29
|
+
} & WithPinLayoutProps) | ({
|
|
30
|
+
layout: typeof LayoutType.stack;
|
|
31
|
+
} & WithStackLayoutProps) | ({
|
|
32
|
+
layout: typeof LayoutType.tile;
|
|
33
|
+
} & WithTileLayoutProps);
|
|
34
|
+
type WithLayoutOptions = WithLayoutBaseOptions;
|
|
35
|
+
type LayoutComponent<C extends ElementType> = LayoutComponentBase<C, WithLayoutProps>;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { LayoutComponent, WithLayoutOptions, WithLayoutProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require__internal_withLayoutBase_withLayoutBase = require('../_internal/withLayoutBase/withLayoutBase.cjs');
|
|
3
|
+
let _fringeworks_style_layouts_balance = require("@fringeworks/style-layouts/balance");
|
|
4
|
+
_fringeworks_style_layouts_balance = require_runtime.__toESM(_fringeworks_style_layouts_balance, 1);
|
|
5
|
+
let _fringeworks_utils = require("@fringeworks/utils");
|
|
6
|
+
let _fringeworks_style_layouts_center = require("@fringeworks/style-layouts/center");
|
|
7
|
+
_fringeworks_style_layouts_center = require_runtime.__toESM(_fringeworks_style_layouts_center, 1);
|
|
8
|
+
let _fringeworks_style_layouts_flow = require("@fringeworks/style-layouts/flow");
|
|
9
|
+
_fringeworks_style_layouts_flow = require_runtime.__toESM(_fringeworks_style_layouts_flow, 1);
|
|
10
|
+
let _fringeworks_style_layouts_layer = require("@fringeworks/style-layouts/layer");
|
|
11
|
+
_fringeworks_style_layouts_layer = require_runtime.__toESM(_fringeworks_style_layouts_layer, 1);
|
|
12
|
+
let _fringeworks_style_layouts_matrix = require("@fringeworks/style-layouts/matrix");
|
|
13
|
+
_fringeworks_style_layouts_matrix = require_runtime.__toESM(_fringeworks_style_layouts_matrix, 1);
|
|
14
|
+
let _fringeworks_style_layouts_pack = require("@fringeworks/style-layouts/pack");
|
|
15
|
+
_fringeworks_style_layouts_pack = require_runtime.__toESM(_fringeworks_style_layouts_pack, 1);
|
|
16
|
+
let _fringeworks_style_layouts_pin = require("@fringeworks/style-layouts/pin");
|
|
17
|
+
_fringeworks_style_layouts_pin = require_runtime.__toESM(_fringeworks_style_layouts_pin, 1);
|
|
18
|
+
let _fringeworks_style_layouts_stack = require("@fringeworks/style-layouts/stack");
|
|
19
|
+
_fringeworks_style_layouts_stack = require_runtime.__toESM(_fringeworks_style_layouts_stack, 1);
|
|
20
|
+
let _fringeworks_style_layouts_tile = require("@fringeworks/style-layouts/tile");
|
|
21
|
+
_fringeworks_style_layouts_tile = require_runtime.__toESM(_fringeworks_style_layouts_tile, 1);
|
|
22
|
+
|
|
23
|
+
//#region src/withLayout/withLayout.tsx
|
|
24
|
+
const LAYOUTS = {
|
|
25
|
+
balance: _fringeworks_style_layouts_balance.default,
|
|
26
|
+
center: _fringeworks_style_layouts_center.default,
|
|
27
|
+
flow: _fringeworks_style_layouts_flow.default,
|
|
28
|
+
layer: _fringeworks_style_layouts_layer.default,
|
|
29
|
+
matrix: _fringeworks_style_layouts_matrix.default,
|
|
30
|
+
pack: _fringeworks_style_layouts_pack.default,
|
|
31
|
+
pin: _fringeworks_style_layouts_pin.default,
|
|
32
|
+
stack: _fringeworks_style_layouts_stack.default,
|
|
33
|
+
tile: _fringeworks_style_layouts_tile.default
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* コンテナーのレイアウト機能を追加するHOC
|
|
37
|
+
*
|
|
38
|
+
* - `layout`プロパティで適用するレイアウトを選択する
|
|
39
|
+
* @param Component コンポーネント
|
|
40
|
+
* @param options オプション
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
43
|
+
function withLayout(Component, options = {}) {
|
|
44
|
+
return (0, _fringeworks_utils.unsafeCast)(require__internal_withLayoutBase_withLayoutBase(Component, LAYOUTS, options));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
module.exports = withLayout;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LayoutComponent, WithLayoutOptions } from "./types.cjs";
|
|
2
|
+
import { ElementType } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/withLayout/withLayout.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* コンテナーのレイアウト機能を追加するHOC
|
|
7
|
+
*
|
|
8
|
+
* - `layout`プロパティで適用するレイアウトを選択する
|
|
9
|
+
* @param Component コンポーネント
|
|
10
|
+
* @param options オプション
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
declare function withLayout<C extends ElementType>(Component: C, options?: WithLayoutOptions): LayoutComponent<C>;
|
|
14
|
+
export = withLayout;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LayoutComponent, WithLayoutOptions } from "./types.mjs";
|
|
2
|
+
import { ElementType } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/withLayout/withLayout.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* コンテナーのレイアウト機能を追加するHOC
|
|
7
|
+
*
|
|
8
|
+
* - `layout`プロパティで適用するレイアウトを選択する
|
|
9
|
+
* @param Component コンポーネント
|
|
10
|
+
* @param options オプション
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
declare function withLayout<C extends ElementType>(Component: C, options?: WithLayoutOptions): LayoutComponent<C>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { withLayout as default };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import withLayoutBase from "../_internal/withLayoutBase/withLayoutBase.mjs";
|
|
2
|
+
import balance from "@fringeworks/style-layouts/balance";
|
|
3
|
+
import { unsafeCast } from "@fringeworks/utils";
|
|
4
|
+
import center from "@fringeworks/style-layouts/center";
|
|
5
|
+
import flow from "@fringeworks/style-layouts/flow";
|
|
6
|
+
import layer from "@fringeworks/style-layouts/layer";
|
|
7
|
+
import matrix from "@fringeworks/style-layouts/matrix";
|
|
8
|
+
import pack from "@fringeworks/style-layouts/pack";
|
|
9
|
+
import pin from "@fringeworks/style-layouts/pin";
|
|
10
|
+
import stack from "@fringeworks/style-layouts/stack";
|
|
11
|
+
import tile from "@fringeworks/style-layouts/tile";
|
|
12
|
+
|
|
13
|
+
//#region src/withLayout/withLayout.tsx
|
|
14
|
+
const LAYOUTS = {
|
|
15
|
+
balance,
|
|
16
|
+
center,
|
|
17
|
+
flow,
|
|
18
|
+
layer,
|
|
19
|
+
matrix,
|
|
20
|
+
pack,
|
|
21
|
+
pin,
|
|
22
|
+
stack,
|
|
23
|
+
tile
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* コンテナーのレイアウト機能を追加するHOC
|
|
27
|
+
*
|
|
28
|
+
* - `layout`プロパティで適用するレイアウトを選択する
|
|
29
|
+
* @param Component コンポーネント
|
|
30
|
+
* @param options オプション
|
|
31
|
+
* @returns
|
|
32
|
+
*/
|
|
33
|
+
function withLayout(Component, options = {}) {
|
|
34
|
+
return unsafeCast(withLayoutBase(Component, LAYOUTS, options));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { withLayout as default };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { MatrixLayoutComponent, WithMatrixLayoutOptions, WithMatrixLayoutProps } from "./types.cjs";
|
|
2
|
+
import withMatrixLayout from "./withMatrixLayout.cjs";
|
|
3
|
+
export { type MatrixLayoutComponent, type WithMatrixLayoutOptions, type WithMatrixLayoutProps, withMatrixLayout as default };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { MatrixLayoutComponent, WithMatrixLayoutOptions, WithMatrixLayoutProps } from "./types.mjs";
|
|
2
|
+
import withMatrixLayout from "./withMatrixLayout.mjs";
|
|
3
|
+
export { type MatrixLayoutComponent, type WithMatrixLayoutOptions, type WithMatrixLayoutProps, withMatrixLayout as default };
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LayoutComponentBase, WithLayoutBaseOptions } from "../_internal/withLayoutBase/types.cjs";
|
|
2
|
+
import { ElementType } from "react";
|
|
3
|
+
import { MatrixLayoutOptions } from "@fringeworks/style-layouts/matrix";
|
|
4
|
+
|
|
5
|
+
//#region src/withMatrixLayout/types.d.ts
|
|
6
|
+
type WithMatrixLayoutProps = MatrixLayoutOptions;
|
|
7
|
+
type WithMatrixLayoutOptions = WithLayoutBaseOptions;
|
|
8
|
+
type MatrixLayoutComponent<C extends ElementType> = LayoutComponentBase<C, MatrixLayoutOptions>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { MatrixLayoutComponent, WithMatrixLayoutOptions, WithMatrixLayoutProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LayoutComponentBase, WithLayoutBaseOptions } from "../_internal/withLayoutBase/types.mjs";
|
|
2
|
+
import { ElementType } from "react";
|
|
3
|
+
import { MatrixLayoutOptions } from "@fringeworks/style-layouts/matrix";
|
|
4
|
+
|
|
5
|
+
//#region src/withMatrixLayout/types.d.ts
|
|
6
|
+
type WithMatrixLayoutProps = MatrixLayoutOptions;
|
|
7
|
+
type WithMatrixLayoutOptions = WithLayoutBaseOptions;
|
|
8
|
+
type MatrixLayoutComponent<C extends ElementType> = LayoutComponentBase<C, MatrixLayoutOptions>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { MatrixLayoutComponent, WithMatrixLayoutOptions, WithMatrixLayoutProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require__internal_withLayoutBase_withLayoutBase = require('../_internal/withLayoutBase/withLayoutBase.cjs');
|
|
3
|
+
let _fringeworks_style_layouts_matrix = require("@fringeworks/style-layouts/matrix");
|
|
4
|
+
_fringeworks_style_layouts_matrix = require_runtime.__toESM(_fringeworks_style_layouts_matrix, 1);
|
|
5
|
+
|
|
6
|
+
//#region src/withMatrixLayout/withMatrixLayout.tsx
|
|
7
|
+
/**
|
|
8
|
+
* コンテナーのレイアウト機能を追加するHOC
|
|
9
|
+
* @param Component コンポーネント
|
|
10
|
+
* @param options オプション
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
function withMatrixLayout(Component, options = {}) {
|
|
14
|
+
return require__internal_withLayoutBase_withLayoutBase(Component, _fringeworks_style_layouts_matrix.default, options);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
module.exports = withMatrixLayout;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MatrixLayoutComponent, WithMatrixLayoutOptions } from "./types.cjs";
|
|
2
|
+
import { ElementType } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/withMatrixLayout/withMatrixLayout.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* コンテナーのレイアウト機能を追加するHOC
|
|
7
|
+
* @param Component コンポーネント
|
|
8
|
+
* @param options オプション
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
declare function withMatrixLayout<C extends ElementType>(Component: C, options?: WithMatrixLayoutOptions): MatrixLayoutComponent<C>;
|
|
12
|
+
export = withMatrixLayout;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MatrixLayoutComponent, WithMatrixLayoutOptions } from "./types.mjs";
|
|
2
|
+
import { ElementType } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/withMatrixLayout/withMatrixLayout.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* コンテナーのレイアウト機能を追加するHOC
|
|
7
|
+
* @param Component コンポーネント
|
|
8
|
+
* @param options オプション
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
declare function withMatrixLayout<C extends ElementType>(Component: C, options?: WithMatrixLayoutOptions): MatrixLayoutComponent<C>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { withMatrixLayout as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import withLayoutBase from "../_internal/withLayoutBase/withLayoutBase.mjs";
|
|
2
|
+
import matrix from "@fringeworks/style-layouts/matrix";
|
|
3
|
+
|
|
4
|
+
//#region src/withMatrixLayout/withMatrixLayout.tsx
|
|
5
|
+
/**
|
|
6
|
+
* コンテナーのレイアウト機能を追加するHOC
|
|
7
|
+
* @param Component コンポーネント
|
|
8
|
+
* @param options オプション
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
function withMatrixLayout(Component, options = {}) {
|
|
12
|
+
return withLayoutBase(Component, matrix, options);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { withMatrixLayout as default };
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LayoutComponentBase, WithLayoutBaseOptions } from "../_internal/withLayoutBase/types.cjs";
|
|
2
|
+
import { ElementType } from "react";
|
|
3
|
+
import { PackLayoutOptions } from "@fringeworks/style-layouts/pack";
|
|
4
|
+
|
|
5
|
+
//#region src/withPackLayout/types.d.ts
|
|
6
|
+
type WithPackLayoutProps = PackLayoutOptions;
|
|
7
|
+
type WithPackLayoutOptions = WithLayoutBaseOptions;
|
|
8
|
+
type PackLayoutComponent<C extends ElementType> = LayoutComponentBase<C, PackLayoutOptions>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { PackLayoutComponent, WithPackLayoutOptions, WithPackLayoutProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LayoutComponentBase, WithLayoutBaseOptions } from "../_internal/withLayoutBase/types.mjs";
|
|
2
|
+
import { ElementType } from "react";
|
|
3
|
+
import { PackLayoutOptions } from "@fringeworks/style-layouts/pack";
|
|
4
|
+
|
|
5
|
+
//#region src/withPackLayout/types.d.ts
|
|
6
|
+
type WithPackLayoutProps = PackLayoutOptions;
|
|
7
|
+
type WithPackLayoutOptions = WithLayoutBaseOptions;
|
|
8
|
+
type PackLayoutComponent<C extends ElementType> = LayoutComponentBase<C, PackLayoutOptions>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { PackLayoutComponent, WithPackLayoutOptions, WithPackLayoutProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require__internal_withLayoutBase_withLayoutBase = require('../_internal/withLayoutBase/withLayoutBase.cjs');
|
|
3
|
+
let _fringeworks_style_layouts_pack = require("@fringeworks/style-layouts/pack");
|
|
4
|
+
_fringeworks_style_layouts_pack = require_runtime.__toESM(_fringeworks_style_layouts_pack, 1);
|
|
5
|
+
|
|
6
|
+
//#region src/withPackLayout/withPackLayout.tsx
|
|
7
|
+
/**
|
|
8
|
+
* コンテナーのレイアウト機能を追加するHOC
|
|
9
|
+
* @param Component コンポーネント
|
|
10
|
+
* @param options オプション
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
function withPackLayout(Component, options = {}) {
|
|
14
|
+
return require__internal_withLayoutBase_withLayoutBase(Component, _fringeworks_style_layouts_pack.default, options);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
module.exports = withPackLayout;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PackLayoutComponent, WithPackLayoutOptions } from "./types.cjs";
|
|
2
|
+
import { ElementType } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/withPackLayout/withPackLayout.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* コンテナーのレイアウト機能を追加するHOC
|
|
7
|
+
* @param Component コンポーネント
|
|
8
|
+
* @param options オプション
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
declare function withPackLayout<C extends ElementType>(Component: C, options?: WithPackLayoutOptions): PackLayoutComponent<C>;
|
|
12
|
+
export = withPackLayout;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PackLayoutComponent, WithPackLayoutOptions } from "./types.mjs";
|
|
2
|
+
import { ElementType } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/withPackLayout/withPackLayout.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* コンテナーのレイアウト機能を追加するHOC
|
|
7
|
+
* @param Component コンポーネント
|
|
8
|
+
* @param options オプション
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
declare function withPackLayout<C extends ElementType>(Component: C, options?: WithPackLayoutOptions): PackLayoutComponent<C>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { withPackLayout as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import withLayoutBase from "../_internal/withLayoutBase/withLayoutBase.mjs";
|
|
2
|
+
import pack from "@fringeworks/style-layouts/pack";
|
|
3
|
+
|
|
4
|
+
//#region src/withPackLayout/withPackLayout.tsx
|
|
5
|
+
/**
|
|
6
|
+
* コンテナーのレイアウト機能を追加するHOC
|
|
7
|
+
* @param Component コンポーネント
|
|
8
|
+
* @param options オプション
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
function withPackLayout(Component, options = {}) {
|
|
12
|
+
return withLayoutBase(Component, pack, options);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { withPackLayout as default };
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LayoutComponentBase, WithLayoutBaseOptions } from "../_internal/withLayoutBase/types.cjs";
|
|
2
|
+
import { ElementType } from "react";
|
|
3
|
+
import { PinLayoutOptions } from "@fringeworks/style-layouts/pin";
|
|
4
|
+
|
|
5
|
+
//#region src/withPinLayout/types.d.ts
|
|
6
|
+
type WithPinLayoutProps = PinLayoutOptions;
|
|
7
|
+
type WithPinLayoutOptions = WithLayoutBaseOptions;
|
|
8
|
+
type PinLayoutComponent<C extends ElementType> = LayoutComponentBase<C, PinLayoutOptions>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { PinLayoutComponent, WithPinLayoutOptions, WithPinLayoutProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LayoutComponentBase, WithLayoutBaseOptions } from "../_internal/withLayoutBase/types.mjs";
|
|
2
|
+
import { ElementType } from "react";
|
|
3
|
+
import { PinLayoutOptions } from "@fringeworks/style-layouts/pin";
|
|
4
|
+
|
|
5
|
+
//#region src/withPinLayout/types.d.ts
|
|
6
|
+
type WithPinLayoutProps = PinLayoutOptions;
|
|
7
|
+
type WithPinLayoutOptions = WithLayoutBaseOptions;
|
|
8
|
+
type PinLayoutComponent<C extends ElementType> = LayoutComponentBase<C, PinLayoutOptions>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { PinLayoutComponent, WithPinLayoutOptions, WithPinLayoutProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require__internal_withLayoutBase_withLayoutBase = require('../_internal/withLayoutBase/withLayoutBase.cjs');
|
|
3
|
+
let _fringeworks_style_layouts_pin = require("@fringeworks/style-layouts/pin");
|
|
4
|
+
_fringeworks_style_layouts_pin = require_runtime.__toESM(_fringeworks_style_layouts_pin, 1);
|
|
5
|
+
|
|
6
|
+
//#region src/withPinLayout/withPinLayout.tsx
|
|
7
|
+
/**
|
|
8
|
+
* コンテナーのレイアウト機能を追加するHOC
|
|
9
|
+
* @param Component コンポーネント
|
|
10
|
+
* @param options オプション
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
function withPinLayout(Component, options = {}) {
|
|
14
|
+
return require__internal_withLayoutBase_withLayoutBase(Component, _fringeworks_style_layouts_pin.default, options);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
module.exports = withPinLayout;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PinLayoutComponent, WithPinLayoutOptions } from "./types.cjs";
|
|
2
|
+
import { ElementType } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/withPinLayout/withPinLayout.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* コンテナーのレイアウト機能を追加するHOC
|
|
7
|
+
* @param Component コンポーネント
|
|
8
|
+
* @param options オプション
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
declare function withPinLayout<C extends ElementType>(Component: C, options?: WithPinLayoutOptions): PinLayoutComponent<C>;
|
|
12
|
+
export = withPinLayout;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PinLayoutComponent, WithPinLayoutOptions } from "./types.mjs";
|
|
2
|
+
import { ElementType } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/withPinLayout/withPinLayout.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* コンテナーのレイアウト機能を追加するHOC
|
|
7
|
+
* @param Component コンポーネント
|
|
8
|
+
* @param options オプション
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
declare function withPinLayout<C extends ElementType>(Component: C, options?: WithPinLayoutOptions): PinLayoutComponent<C>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { withPinLayout as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import withLayoutBase from "../_internal/withLayoutBase/withLayoutBase.mjs";
|
|
2
|
+
import pin from "@fringeworks/style-layouts/pin";
|
|
3
|
+
|
|
4
|
+
//#region src/withPinLayout/withPinLayout.tsx
|
|
5
|
+
/**
|
|
6
|
+
* コンテナーのレイアウト機能を追加するHOC
|
|
7
|
+
* @param Component コンポーネント
|
|
8
|
+
* @param options オプション
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
function withPinLayout(Component, options = {}) {
|
|
12
|
+
return withLayoutBase(Component, pin, options);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { withPinLayout as default };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { StackLayoutComponent, WithStackLayoutOptions, WithStackLayoutProps } from "./types.cjs";
|
|
2
|
+
import withStackLayout from "./withStackLayout.cjs";
|
|
3
|
+
export { type StackLayoutComponent, type WithStackLayoutOptions, type WithStackLayoutProps, withStackLayout as default };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { StackLayoutComponent, WithStackLayoutOptions, WithStackLayoutProps } from "./types.mjs";
|
|
2
|
+
import withStackLayout from "./withStackLayout.mjs";
|
|
3
|
+
export { type StackLayoutComponent, type WithStackLayoutOptions, type WithStackLayoutProps, withStackLayout as default };
|
|
File without changes
|