@iyulab/enterprise 0.12.0 → 0.13.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/CHANGELOG.md +20 -0
- package/README.md +2 -0
- package/dist/FormRow.d.ts +16 -0
- package/dist/index.js +17 -1
- package/package.json +2 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.13.0
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- **`FormRow`'s grid tracks are now `minmax(0, 1fr)` rather than `1fr`, so columns declared
|
|
8
|
+
equal actually render equal.** A grid item's default `min-width: auto` refuses to shrink below
|
|
9
|
+
its content's min-content width, so one long value in a row was enough to blow out its own
|
|
10
|
+
column and squeeze the rest. Measured in a 400px container with one long unbreakable string:
|
|
11
|
+
a two-column row laid out at **425px / 8px** and a three-column row at **425px / 8px / 8px**,
|
|
12
|
+
and the row overflowed its container. With `minmax(0, 1fr)` the same cases lay out at
|
|
13
|
+
**196 / 196** and **128 / 128 / 128**. Nothing about the API changes, and rows whose content
|
|
14
|
+
already fit are unaffected.
|
|
15
|
+
- Long unbreakable content still overflows its own column — that is a separate axis, handled
|
|
16
|
+
on the cell with `overflow-wrap` (this package's peer elements already set it).
|
|
17
|
+
|
|
18
|
+
- **`@iyulab/components` is no longer an optional peer dependency.** The main entry imports it
|
|
19
|
+
unconditionally, so declaring it optional meant a consumer installing this package alone got
|
|
20
|
+
nothing installed and no warning — the failure surfaced only as a module-not-found at
|
|
21
|
+
runtime. Consumers already installing it are unaffected.
|
|
22
|
+
|
|
3
23
|
## 0.12.0
|
|
4
24
|
|
|
5
25
|
### Added
|
package/README.md
CHANGED
|
@@ -51,6 +51,8 @@ import { FormSection, FormRow } from '@iyulab/enterprise'
|
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
- `FormRow`는 기본 2컬럼 그리드입니다. 한 칸을 차지하려면 `full`을, 다른 열 수가 필요하면 `columns`를 씁니다.
|
|
54
|
+
- **열 폭 — 선언한 열은 실제로 균등합니다.** 트랙은 `1fr`이 아니라 `minmax(0, 1fr)`입니다. 그리드 아이템의 기본 `min-width: auto`는 내용의 min-content 아래로 줄어들기를 거부해서, 순수 `1fr`로 두면 긴 내용이 든 칸만 부풀고 나머지가 찌그러집니다(400px 컨테이너 실측: 2열 **425/8**, 3열 **425/8/8**). `minmax(0, 1fr)`은 트랙 최소를 0으로 만들어 같은 경우를 **196/196**·**128/128/128**로 만듭니다.
|
|
55
|
+
- ⚠**긴 불가분 문자열 자체의 넘침은 별개 축입니다.** 칸이 균등해져도 그 안의 긴 문자열은 자기 칸을 넘습니다 — 셀 쪽에서 `overflow-wrap`으로 다룹니다(`@iyulab/components`의 엘리먼트는 이미 그 값을 갖습니다).
|
|
54
56
|
- 두 컴포넌트 모두 `className`·`style`을 받아 기본값 **뒤에** 병합합니다 — 블록을 복제하지 않고 조정하는 정규 경로입니다. `FormSection`은 제목 줄만 바꾸는 `titleStyle`도 받습니다.
|
|
55
57
|
|
|
56
58
|
```tsx
|
package/dist/FormRow.d.ts
CHANGED
|
@@ -5,6 +5,22 @@ import { CSSProperties, ReactNode } from 'react';
|
|
|
5
5
|
* 오버라이드 계약(docs/lob-layers.md §2)에 따라 `className`·`style` 을 받아 병합한다.
|
|
6
6
|
* `columns` 는 2열 고정이 맞지 않는 소비자가 **컴포넌트를 복제하지 않고** 조정하는 경로다
|
|
7
7
|
* — 복제가 시작되면 이 계층은 쓰기 전보다 나쁜 상태를 만든다.
|
|
8
|
+
*
|
|
9
|
+
* 🔴**트랙은 `minmax(0, 1fr)` 이지 `1fr` 이 아니다 — 순수 `1fr` 은 «균등» 을 약속하고**
|
|
10
|
+
* **지키지 않는다.** 그리드 아이템의 기본 `min-width: auto` 는 내용의 min-content 아래로
|
|
11
|
+
* 줄어들기를 거부하므로, 한 칸에 긴 내용이 들어오면 그 칸만 부풀고 나머지가 찌그러진다.
|
|
12
|
+
* 실측(400px 컨테이너 · 한 칸에 긴 불가분 문자열): 2열이 **425/8**, 3열이 **425/8/8** 이었고
|
|
13
|
+
* 행 자체가 컨테이너를 넘쳤다. `minmax(0, 1fr)` 은 트랙의 최소를 0 으로 만들어 **자식을**
|
|
14
|
+
* **건드리지 않고** 이를 고친다 — 같은 실측에서 **196/196** · **128/128/128**.
|
|
15
|
+
*
|
|
16
|
+
* ⚠**긴 불가분 내용 자체의 넘침은 별개 축이고 이 컴포넌트의 몫이 아니다.** 칸이 균등해져도
|
|
17
|
+
* 그 안의 긴 문자열은 여전히 자기 칸을 넘는다 — 그것은 셀의 `overflow-wrap` 이 답이다
|
|
18
|
+
* (`@iyulab/components` 의 엘리먼트는 이미 그 값을 갖는다). 같은 실측에서 `overflow-wrap` 을
|
|
19
|
+
* 주면 행의 넘침이 0 이 됐다.
|
|
20
|
+
*
|
|
21
|
+
* 계약은 `tests/form-layout-contract.test.ts` 가 고정한다 — 다만 그 파일은 **«선언» 을 재지**
|
|
22
|
+
* **«배치» 를 재지 않는다**(이 패키지엔 레이아웃을 계산하는 테스트 자리가 없다). 위 수치는
|
|
23
|
+
* 형제 패키지의 브라우저 프로젝트를 계측기로 빌린 일회성 탐침으로 쟀다.
|
|
8
24
|
*/
|
|
9
25
|
export declare function FormRow({ children, full, columns, className, style, }: {
|
|
10
26
|
children: ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -59,6 +59,22 @@ function FormSection({ title, children, className, style, titleStyle }) {
|
|
|
59
59
|
* 오버라이드 계약(docs/lob-layers.md §2)에 따라 `className`·`style` 을 받아 병합한다.
|
|
60
60
|
* `columns` 는 2열 고정이 맞지 않는 소비자가 **컴포넌트를 복제하지 않고** 조정하는 경로다
|
|
61
61
|
* — 복제가 시작되면 이 계층은 쓰기 전보다 나쁜 상태를 만든다.
|
|
62
|
+
*
|
|
63
|
+
* 🔴**트랙은 `minmax(0, 1fr)` 이지 `1fr` 이 아니다 — 순수 `1fr` 은 «균등» 을 약속하고**
|
|
64
|
+
* **지키지 않는다.** 그리드 아이템의 기본 `min-width: auto` 는 내용의 min-content 아래로
|
|
65
|
+
* 줄어들기를 거부하므로, 한 칸에 긴 내용이 들어오면 그 칸만 부풀고 나머지가 찌그러진다.
|
|
66
|
+
* 실측(400px 컨테이너 · 한 칸에 긴 불가분 문자열): 2열이 **425/8**, 3열이 **425/8/8** 이었고
|
|
67
|
+
* 행 자체가 컨테이너를 넘쳤다. `minmax(0, 1fr)` 은 트랙의 최소를 0 으로 만들어 **자식을**
|
|
68
|
+
* **건드리지 않고** 이를 고친다 — 같은 실측에서 **196/196** · **128/128/128**.
|
|
69
|
+
*
|
|
70
|
+
* ⚠**긴 불가분 내용 자체의 넘침은 별개 축이고 이 컴포넌트의 몫이 아니다.** 칸이 균등해져도
|
|
71
|
+
* 그 안의 긴 문자열은 여전히 자기 칸을 넘는다 — 그것은 셀의 `overflow-wrap` 이 답이다
|
|
72
|
+
* (`@iyulab/components` 의 엘리먼트는 이미 그 값을 갖는다). 같은 실측에서 `overflow-wrap` 을
|
|
73
|
+
* 주면 행의 넘침이 0 이 됐다.
|
|
74
|
+
*
|
|
75
|
+
* 계약은 `tests/form-layout-contract.test.ts` 가 고정한다 — 다만 그 파일은 **«선언» 을 재지**
|
|
76
|
+
* **«배치» 를 재지 않는다**(이 패키지엔 레이아웃을 계산하는 테스트 자리가 없다). 위 수치는
|
|
77
|
+
* 형제 패키지의 브라우저 프로젝트를 계측기로 빌린 일회성 탐침으로 쟀다.
|
|
62
78
|
*/
|
|
63
79
|
function FormRow({ children, full, columns = 2, className, style }) {
|
|
64
80
|
if (full) return /* @__PURE__ */ jsx("div", {
|
|
@@ -73,7 +89,7 @@ function FormRow({ children, full, columns = 2, className, style }) {
|
|
|
73
89
|
className,
|
|
74
90
|
style: {
|
|
75
91
|
display: "grid",
|
|
76
|
-
gridTemplateColumns: `repeat(${columns}, 1fr)`,
|
|
92
|
+
gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))`,
|
|
77
93
|
gap: "var(--u-space-sm, 8px)",
|
|
78
94
|
...style
|
|
79
95
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iyulab/enterprise",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Enterprise utilities and components for iyulab framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"enterprise",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@iyulab/components": "^1.27.0",
|
|
59
59
|
"@types/node": "^26.1.1",
|
|
60
60
|
"@types/react": "^19.2.14",
|
|
61
|
-
"typescript": "^
|
|
61
|
+
"typescript": "^6.0.2",
|
|
62
62
|
"vite": "^8.1.4",
|
|
63
63
|
"vite-plugin-dts": "^5.0.3",
|
|
64
64
|
"vitest": "^4.1.10"
|
|
@@ -66,10 +66,5 @@
|
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"react": ">=18",
|
|
68
68
|
"@iyulab/components": ">=1.27.0"
|
|
69
|
-
},
|
|
70
|
-
"peerDependenciesMeta": {
|
|
71
|
-
"@iyulab/components": {
|
|
72
|
-
"optional": true
|
|
73
|
-
}
|
|
74
69
|
}
|
|
75
70
|
}
|