ingred-ui 27.4.0 → 27.4.1
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/dist/components/DataTable2/DataTable2.stories.d.ts +3 -7
- package/dist/components/DataTable2/context.d.ts +2 -2
- package/dist/components/DataTable2/styled.d.ts +1 -1
- package/dist/index.es.js +7 -33
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +7 -33
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -64,7 +64,6 @@ export default meta;
|
|
|
64
64
|
* ```
|
|
65
65
|
*/
|
|
66
66
|
export declare const Default: StoryObj<typeof DataTable2>;
|
|
67
|
-
export declare const Sample: StoryObj<typeof DataTable2>;
|
|
68
67
|
/**
|
|
69
68
|
* 以下のように、セルの loading を true に設定すると、スピナーが表示されます。
|
|
70
69
|
* ```
|
|
@@ -76,11 +75,6 @@ export declare const Sample: StoryObj<typeof DataTable2>;
|
|
|
76
75
|
* 「カラム」でフィルターやソートを明示しない場合も、それらの機能は非表示になります。
|
|
77
76
|
*/
|
|
78
77
|
export declare const Loading: StoryObj<typeof DataTable2>;
|
|
79
|
-
/**
|
|
80
|
-
* `enableRowSelection={false}` のとき、一括チェック・「n件を」・行頭チェック列を出さない。
|
|
81
|
-
* `tableActions` は `enabledWhen: "unchecked"` のみなど、行選択に依存しない操作だけ置ける。
|
|
82
|
-
*/
|
|
83
|
-
export declare const WithoutRowSelection: StoryObj<typeof DataTable2>;
|
|
84
78
|
/**
|
|
85
79
|
* `enableRowSelection`(既定 `true`)かつ **`tableActions` を渡さない** とき。
|
|
86
80
|
*
|
|
@@ -93,6 +87,8 @@ export declare const RowSelectionWithoutTableActions: StoryObj<typeof DataTable2
|
|
|
93
87
|
* `tableActions` で行頭チェック列・一括選択ツールバーも表示できる(チェック列は通常列としてスクロールする)。
|
|
94
88
|
* 右 sticky 列は `columns` で `sortable: false` の末尾列にしておくと、カラム編集でドラッグ移動されない(`endFixed` と整合)。
|
|
95
89
|
* ツールバー右の設定ボタンから「カラムを編集」を開き、A〜D の並び替えと末尾「操作」がドラッグ不可であることを確認できる(A〜D は `sortable: true`)。
|
|
96
|
-
*
|
|
90
|
+
* 外枠に高さ・横幅 100% を与え多めの行を表示し、縦スクロールでヘッダ(各 `th` の sticky)が張り付くことを確認できる。
|
|
91
|
+
* コンテナ幅に応じて列幅を比例縮小する(狭いビューポートでも横スクロールしやすい)。
|
|
92
|
+
* 列ヘッダをドラッグして幅を変えた列はその幅を維持し、それ以外の列はコンテナ幅の変化に追従する。
|
|
97
93
|
*/
|
|
98
94
|
export declare const StickyColumns: StoryObj<typeof DataTable2>;
|
|
@@ -25,7 +25,7 @@ export declare const DataTable2Context: import("react").Context<{
|
|
|
25
25
|
setColumnWidth: (index: number, width: number | null) => void;
|
|
26
26
|
setRowSpacing: (spacing: RowSpacing) => void;
|
|
27
27
|
}>;
|
|
28
|
-
/**
|
|
28
|
+
/** 横スクロール位置に応じた右 sticky 列の左 inset 線の表示(DataTable2 内のスクロール領域専用) */
|
|
29
29
|
export declare const DataTable2StickyScrollContext: import("react").Context<{
|
|
30
30
|
showStickyRightEdgeDecoration: boolean;
|
|
31
31
|
}>;
|
|
@@ -36,7 +36,7 @@ export declare const DataTable2StickyScrollContext: import("react").Context<{
|
|
|
36
36
|
export declare const DataTable2ColumnStickyContext: import("react").Context<{
|
|
37
37
|
registerColumnSticky: (index: number, sticky: "right" | undefined) => void;
|
|
38
38
|
getStickyRightOffset: (columnIndex: number) => number | undefined;
|
|
39
|
-
/** 右 sticky 列の index
|
|
39
|
+
/** 右 sticky 列の index(左の inset 線はこの列の左縁) */
|
|
40
40
|
rightStickyColumnIndex: number | null;
|
|
41
41
|
getRightStickyZIndexHead: (columnIndex: number) => number;
|
|
42
42
|
getRightStickyZIndexBody: (columnIndex: number) => number;
|
|
@@ -25,7 +25,7 @@ export declare const DataTable2Header: import("styled-components").StyledCompone
|
|
|
25
25
|
export declare const DataTable2Column: import("styled-components").StyledComponent<"th", import("styled-components").DefaultTheme, {
|
|
26
26
|
$stickyRightOffset?: number | undefined;
|
|
27
27
|
$stickyZIndex?: number | undefined;
|
|
28
|
-
/** false
|
|
28
|
+
/** false のとき右 sticky 列の左 inset 線を付けない */
|
|
29
29
|
$showStickyEdgeDecoration?: boolean | undefined;
|
|
30
30
|
}, never>;
|
|
31
31
|
/** tbody の通常セル(横スクロール時の右 sticky 用) */
|
package/dist/index.es.js
CHANGED
|
@@ -2142,9 +2142,8 @@ object-assign
|
|
|
2142
2142
|
width: max-content;
|
|
2143
2143
|
min-width: 100%;
|
|
2144
2144
|
table-layout: fixed;
|
|
2145
|
-
/*
|
|
2146
|
-
border-collapse:
|
|
2147
|
-
border-spacing: 0;
|
|
2145
|
+
/* separate + sticky は安全側だが tr の下線が出ない。collapse で行境界を tr に任せる */
|
|
2146
|
+
border-collapse: collapse;
|
|
2148
2147
|
}
|
|
2149
2148
|
`,xw=x.div`
|
|
2150
2149
|
display: flex;
|
|
@@ -2269,7 +2268,6 @@ object-assign
|
|
|
2269
2268
|
position: relative;
|
|
2270
2269
|
z-index: 2;
|
|
2271
2270
|
background: transparent;
|
|
2272
|
-
box-shadow: 0px 4px 0px ${({theme:e})=>e.palette.action.shadowBase}0A;
|
|
2273
2271
|
`,Mw=x.th`
|
|
2274
2272
|
height: 1px; /* 子要素の高さ 100% を有効にする。table-layout: fixed になっている必要がある */
|
|
2275
2273
|
text-align: left;
|
|
@@ -2283,6 +2281,7 @@ object-assign
|
|
|
2283
2281
|
top: 0;
|
|
2284
2282
|
z-index: 2;
|
|
2285
2283
|
background: ${({theme:e})=>e.palette.background.default};
|
|
2284
|
+
/* border-collapse: collapse では border が潰れやすいので区切りは inset box-shadow(装飾用の影は付けない) */
|
|
2286
2285
|
box-shadow:
|
|
2287
2286
|
inset 0 1px 0 0 ${({theme:e})=>e.palette.divider},
|
|
2288
2287
|
inset 0 -1px 0 0 ${({theme:e})=>e.palette.divider};
|
|
@@ -2311,23 +2310,10 @@ object-assign
|
|
|
2311
2310
|
`}
|
|
2312
2311
|
|
|
2313
2312
|
${({$stickyRightOffset:e,theme:t,$showStickyEdgeDecoration:n})=>void 0!==e&&!1!==n&&w`
|
|
2314
|
-
/* border は collapse で潰れやすい。内側の 1px は inset で確実に */
|
|
2315
2313
|
box-shadow:
|
|
2316
2314
|
inset 0 1px 0 0 ${t.palette.divider},
|
|
2317
2315
|
inset 0 -1px 0 0 ${t.palette.divider},
|
|
2318
2316
|
inset 1px 0 0 0 ${t.palette.divider};
|
|
2319
|
-
/* box-shadow は隣セル上に乗らない。thead の下影(4px・blur 0・…0A)に合わせ均一帯で重ねる */
|
|
2320
|
-
&::after {
|
|
2321
|
-
content: "";
|
|
2322
|
-
position: absolute;
|
|
2323
|
-
top: 0;
|
|
2324
|
-
bottom: 0;
|
|
2325
|
-
right: 100%;
|
|
2326
|
-
width: 4px;
|
|
2327
|
-
pointer-events: none;
|
|
2328
|
-
z-index: 1;
|
|
2329
|
-
background: ${t.palette.action.shadowBase}0A;
|
|
2330
|
-
}
|
|
2331
2317
|
`}
|
|
2332
2318
|
`,Aw=x.td`
|
|
2333
2319
|
${({$stickyRightOffset:e,theme:t,$stickyZIndex:n,$showStickyEdgeDecoration:r})=>void 0!==e&&w`
|
|
@@ -2339,20 +2325,6 @@ object-assign
|
|
|
2339
2325
|
box-shadow: inset 1px 0 0 0 ${t.palette.divider};
|
|
2340
2326
|
`}
|
|
2341
2327
|
|
|
2342
|
-
${!1!==r&&w`
|
|
2343
|
-
&::after {
|
|
2344
|
-
content: "";
|
|
2345
|
-
position: absolute;
|
|
2346
|
-
top: 0;
|
|
2347
|
-
bottom: 0;
|
|
2348
|
-
right: 100%;
|
|
2349
|
-
width: 4px;
|
|
2350
|
-
pointer-events: none;
|
|
2351
|
-
z-index: 2;
|
|
2352
|
-
background: ${t.palette.action.shadowBase}0A;
|
|
2353
|
-
}
|
|
2354
|
-
`}
|
|
2355
|
-
|
|
2356
2328
|
tr[data-highlighted="true"] & {
|
|
2357
2329
|
background: ${t.palette.primary.highlight};
|
|
2358
2330
|
}
|
|
@@ -2368,13 +2340,15 @@ object-assign
|
|
|
2368
2340
|
justify-content: center;
|
|
2369
2341
|
gap: 4px;
|
|
2370
2342
|
box-sizing: border-box;
|
|
2371
|
-
padding
|
|
2343
|
+
/* ハンドル調整で中身を左に 3px ずらす。左右の合計 padding は従来の 2×6 / 2×10 のまま */
|
|
2344
|
+
padding: 8px ${({isSmallLayout:e})=>3+(e?6:10)}px 8px
|
|
2345
|
+
${({isSmallLayout:e})=>(e?6:10)-3}px;
|
|
2372
2346
|
height: 100%;
|
|
2373
2347
|
margin: 0 5px;
|
|
2374
2348
|
`,$w=x.button`
|
|
2375
2349
|
--color: ${({theme:e})=>e.palette.divider};
|
|
2376
2350
|
position: absolute;
|
|
2377
|
-
inset: 0 -
|
|
2351
|
+
inset: 0 -6px 0 auto;
|
|
2378
2352
|
width: 10px;
|
|
2379
2353
|
padding: 0;
|
|
2380
2354
|
border: 0;
|