@wipco/sdui 0.5.0 → 0.7.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.
Files changed (50) hide show
  1. package/dist/{chunk-4SU2KYPU.js → chunk-2ARNY7WZ.js} +1 -1
  2. package/dist/{chunk-APCXOCAO.js → chunk-562QK2G3.js} +1 -1
  3. package/dist/{chunk-MOIU7MUA.js → chunk-57LLG32F.js} +2 -2
  4. package/dist/{chunk-KBHI3IUR.js → chunk-5O6PFLFJ.js} +1 -1
  5. package/dist/{chunk-ZNITJ4KK.js → chunk-63U54JAG.js} +1 -1
  6. package/dist/{chunk-WVRCIVAD.js → chunk-73ZMMJRX.js} +1 -1
  7. package/dist/{chunk-OOHHW4K4.js → chunk-B4A4KY4K.js} +1 -1
  8. package/dist/{chunk-ZUCI34QY.js → chunk-CRSY67TZ.js} +46 -3
  9. package/dist/{chunk-MSAV4J4I.js → chunk-DN5YNPJS.js} +2 -2
  10. package/dist/{chunk-ZQR3ULVH.js → chunk-GWVK3BHB.js} +2 -2
  11. package/dist/{chunk-56KKWLNI.js → chunk-H32WQHB7.js} +2 -2
  12. package/dist/{chunk-Q6SBH63R.js → chunk-HGFYXY7F.js} +1 -1
  13. package/dist/{chunk-DGPRX4MU.js → chunk-J2DSDERS.js} +1 -1
  14. package/dist/{chunk-FGRR3ROJ.js → chunk-KAXPN6KT.js} +1 -1
  15. package/dist/{chunk-AROOQ5W6.js → chunk-L4ORCIVN.js} +1 -1
  16. package/dist/{chunk-IL2KS4WS.js → chunk-PJRXPMI3.js} +13 -6
  17. package/dist/chunk-QBIVW7E6.js +90 -0
  18. package/dist/{chunk-WNYWTFGW.js → chunk-TAFUDHIX.js} +1 -1
  19. package/dist/{chunk-KADFN76X.js → chunk-TKB7H5DB.js} +1 -1
  20. package/dist/{chunk-LZJTKVMO.js → chunk-XMMYJSRV.js} +1 -1
  21. package/dist/{chunk-RH7ESUE6.js → chunk-XY2JKFAV.js} +1 -1
  22. package/dist/{chunk-SEBPBUZR.js → chunk-Y3HYEWSY.js} +1 -1
  23. package/dist/index.d.ts +53 -17
  24. package/dist/index.js +69 -39
  25. package/dist/layout-BnYUuWC2.d.ts +150 -0
  26. package/dist/meta.js +312 -18
  27. package/dist/rich.js +3 -3
  28. package/dist/styles.css +12 -2
  29. package/dist/widgets/AutocompleteField.js +3 -3
  30. package/dist/widgets/ColumnBoard.js +2 -2
  31. package/dist/widgets/DiffView.js +2 -2
  32. package/dist/widgets/Disclosure.js +2 -2
  33. package/dist/widgets/EventCalendar.js +2 -2
  34. package/dist/widgets/ImageLightbox.js +2 -2
  35. package/dist/widgets/InlineEdit.js +2 -2
  36. package/dist/widgets/JsonField.js +2 -2
  37. package/dist/widgets/OrgChart.js +2 -2
  38. package/dist/widgets/PeriodFilter.js +2 -2
  39. package/dist/widgets/PrintSheet.js +2 -2
  40. package/dist/widgets/SearchableMultiPicker.js +3 -3
  41. package/dist/widgets/SecureScreen.js +2 -2
  42. package/dist/widgets/Strip.d.ts +9 -2
  43. package/dist/widgets/Strip.js +2 -1
  44. package/dist/widgets/TagMultiSelect.js +2 -2
  45. package/dist/widgets/Timeline.js +3 -3
  46. package/dist/widgets/TreePicker.js +3 -3
  47. package/dist/widgets/TreeView.js +2 -2
  48. package/dist/widgets/index.d.ts +1 -0
  49. package/dist/widgets/index.js +38 -37
  50. package/package.json +3 -1
package/dist/index.js CHANGED
@@ -1,9 +1,11 @@
1
- import { DEV, DateRangePicker, DatePicker, isSafeNavigationTarget, useSduiAdapter, hostFetchOf, HoistedStyle, useSduiSandbox, resolveAdapter, assetResolverOf, SduiAdapterContext } from './chunk-FGRR3ROJ.js';
2
- export { DatePicker, DateRangePicker, defaultAdapter, useSduiAssetResolver, useSduiSandbox } from './chunk-FGRR3ROJ.js';
3
- import { searchValuesFromParams, splitMultiValue, includesLooseSearch, cascadingValuePaths, SearchToolbar, searchFieldKeys, Popover } from './chunk-KADFN76X.js';
4
- export { SearchToolbar, cascadingValuePaths, cleanSearchValues, includesLooseSearch, joinMultiValue, normalizeSearchText, searchFieldKeys, searchValuesFromParams, splitMultiValue } from './chunk-KADFN76X.js';
5
- import { Toast, Textarea, Tag, Tabs, Table, Switch, StatCard, Spinner, Select, ProgressBar, Pagination, Input, IconButton, Icon, Field, EmptyState, Checkbox, Card, Button, Badge, Alert, SegmentedControl, Dialog } from './chunk-ZUCI34QY.js';
6
- export { Alert, Avatar, Badge, Breadcrumb, Button, Card, Checkbox, Dialog, EmptyState, Field, Icon, IconButton, Input, Pagination, ProgressBar, Radio, SegmentedControl, Select, SidebarNav, Spinner, StatCard, Switch, Table, Tabs, Tag, Textarea, Toast, Tooltip } from './chunk-ZUCI34QY.js';
1
+ import { DEV, DateRangePicker, DatePicker, isSafeNavigationTarget, useSduiAdapter, hostFetchOf, HoistedStyle, useSduiSandbox, resolveAdapter, assetResolverOf, SduiAdapterContext } from './chunk-KAXPN6KT.js';
2
+ export { DatePicker, DateRangePicker, defaultAdapter, useSduiAssetResolver, useSduiSandbox } from './chunk-KAXPN6KT.js';
3
+ import { containerLayoutStyle, columnsClass, typographyStyle, LAYOUT_CSS, childLayoutFrom, CHILD_LAYOUT_PROPS } from './chunk-QBIVW7E6.js';
4
+ export { CHILD_LAYOUT_PROPS, LAYOUT_CSS, childLayoutFrom, columnsClass, containerLayoutStyle, typographyStyle } from './chunk-QBIVW7E6.js';
5
+ import { searchValuesFromParams, splitMultiValue, includesLooseSearch, cascadingValuePaths, SearchToolbar, searchFieldKeys, Popover } from './chunk-TKB7H5DB.js';
6
+ export { SearchToolbar, cascadingValuePaths, cleanSearchValues, includesLooseSearch, joinMultiValue, normalizeSearchText, searchFieldKeys, searchValuesFromParams, splitMultiValue } from './chunk-TKB7H5DB.js';
7
+ import { Toast, Textarea, Tag, Tabs, Table, Switch, StatCard, Spinner, Select, ProgressBar, Pagination, Input, IconButton, Icon, Field, EmptyState, Checkbox, Card, Button, Badge, Alert, warnOnce, SegmentedControl, Dialog } from './chunk-CRSY67TZ.js';
8
+ export { Alert, Avatar, Badge, Breadcrumb, Button, Card, Checkbox, Dialog, EmptyState, Field, Icon, IconButton, Input, Pagination, ProgressBar, Radio, SegmentedControl, Select, SidebarNav, Spinner, StatCard, Switch, Table, Tabs, Tag, Textarea, Toast, Tooltip } from './chunk-CRSY67TZ.js';
7
9
  import React, { createContext, useContext, useMemo, useState, useRef, useEffect, useCallback } from 'react';
8
10
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
9
11
 
@@ -149,14 +151,6 @@ var NodeErrorBoundary = class extends React.Component {
149
151
  return this.props.children;
150
152
  }
151
153
  };
152
-
153
- // src/warn-once.ts
154
- var warned = /* @__PURE__ */ new Set();
155
- function warnOnce(key, message) {
156
- if (warned.has(key)) return;
157
- warned.add(key);
158
- console.error(message);
159
- }
160
154
  var ALLOW_ALL = () => true;
161
155
  var DENY_ALL = () => false;
162
156
  var MISSING = () => {
@@ -189,51 +183,76 @@ function Can({ entity, action = "read", scope, fallback = null, children }) {
189
183
  function cx(...parts) {
190
184
  return parts.filter(Boolean).join(" ");
191
185
  }
192
- function Grid({ columns = 3, template, className, style, children }) {
186
+ function mergeStyle(own, given) {
187
+ if (!own) return given;
188
+ if (!given) return own;
189
+ return { ...own, ...given };
190
+ }
191
+ function Grid({ columns = 3, template, gap, align, justify, wrap, className, style, children }) {
193
192
  return /* @__PURE__ */ jsx(
194
193
  "div",
195
194
  {
196
- className: cx("wp-grid", !template && `wp-grid--${columns}`, className),
197
- style: template ? { gridTemplateColumns: template, ...style } : style,
195
+ className: cx("wp-grid", !template && columnsClass(columns), className),
196
+ style: mergeStyle(
197
+ template ? { gridTemplateColumns: template, ...containerLayoutStyle({ gap, align, justify, wrap }) } : containerLayoutStyle({ gap, align, justify, wrap }),
198
+ style
199
+ ),
198
200
  children
199
201
  }
200
202
  );
201
203
  }
202
- var JUSTIFY_CSS = {
203
- start: "flex-start",
204
- center: "center",
205
- end: "flex-end",
206
- between: "space-between"
207
- };
208
- function Row({ justify, className, style, children }) {
204
+ function Row({ justify, gap, align, wrap, className, style, children }) {
209
205
  return /* @__PURE__ */ jsx(
210
206
  "div",
211
207
  {
212
208
  className: cx("wp-row", justify === "between" && "wp-row--between", className),
213
- style: justify && justify !== "between" ? { justifyContent: JUSTIFY_CSS[justify], ...style } : style,
209
+ style: mergeStyle(containerLayoutStyle({ gap, align, justify, wrap }), style),
214
210
  children
215
211
  }
216
212
  );
217
213
  }
218
- function Actions({ justify = "end", className, style, children }) {
219
- return /* @__PURE__ */ jsx("div", { className: cx("wp-row", className), style: { flex: 1, justifyContent: JUSTIFY_CSS[justify], ...style }, children });
214
+ function Actions({ justify = "end", gap, align, wrap, className, style, children }) {
215
+ return /* @__PURE__ */ jsx(
216
+ "div",
217
+ {
218
+ className: cx("wp-row", className),
219
+ style: mergeStyle({ flex: 1, ...containerLayoutStyle({ gap, align, justify, wrap }) }, style),
220
+ children
221
+ }
222
+ );
220
223
  }
221
- function Col({ className, style, children }) {
222
- return /* @__PURE__ */ jsx("div", { className: cx("wp-col", className), style, children });
224
+ function Col({ gap, align, justify, wrap, className, style, children }) {
225
+ return /* @__PURE__ */ jsx("div", { className: cx("wp-col", className), style: mergeStyle(containerLayoutStyle({ gap, align, justify, wrap }), style), children });
223
226
  }
224
227
  var SPACER_STEPS = /* @__PURE__ */ new Set([1, 2, 3, 4, 5, 6, 8]);
225
228
  function Spacer({ size }) {
226
229
  const step = size !== void 0 && SPACER_STEPS.has(Number(size)) ? Number(size) : void 0;
227
230
  return /* @__PURE__ */ jsx("div", { className: cx("wp-spacer", step !== void 0 && `wp-spacer--${step}`) });
228
231
  }
229
- function Section({ title, className, style, children }) {
230
- return /* @__PURE__ */ jsxs("section", { className: cx("wp-col", className), style, children: [
231
- title ? /* @__PURE__ */ jsx("h2", { className: "wp-h4", children: title }) : null,
232
- children
233
- ] });
232
+ function Section({ title, gap, align, justify, wrap, className, style, children }) {
233
+ return /* @__PURE__ */ jsxs(
234
+ "section",
235
+ {
236
+ className: cx("wp-col", className),
237
+ style: mergeStyle(containerLayoutStyle({ gap, align, justify, wrap }), style),
238
+ children: [
239
+ title ? /* @__PURE__ */ jsx("h2", { className: "wp-h4", children: title }) : null,
240
+ children
241
+ ]
242
+ }
243
+ );
234
244
  }
235
- function Text({ preset = "body", as: Tag2 = "p", className, style, value, children }) {
236
- return /* @__PURE__ */ jsx(Tag2, { className: cx(`wp-${preset}`, className), style, children: value ?? children });
245
+ function Text({
246
+ preset = "body",
247
+ as: Tag2 = "p",
248
+ weight,
249
+ textAlign,
250
+ className,
251
+ style,
252
+ value,
253
+ children
254
+ }) {
255
+ return /* @__PURE__ */ jsx(Tag2, { className: cx(`wp-${preset}`, className), style: mergeStyle(typographyStyle({ weight, textAlign }), style), children: value ?? children });
237
256
  }
238
257
  function KeyValueList({ source, items, className, style }) {
239
258
  return /* @__PURE__ */ jsx("div", { className: cx("wp-kv", className), style, children: (items ?? []).map((item, index) => {
@@ -1880,10 +1899,10 @@ function toIndex(v) {
1880
1899
  function inRange(index, length) {
1881
1900
  return index !== null && index >= 0 && index < length;
1882
1901
  }
1883
- var warned2 = /* @__PURE__ */ new Set();
1902
+ var warned = /* @__PURE__ */ new Set();
1884
1903
  function warnOnce2(key, message) {
1885
- if (warned2.has(key)) return;
1886
- warned2.add(key);
1904
+ if (warned.has(key)) return;
1905
+ warned.add(key);
1887
1906
  console.error(message);
1888
1907
  }
1889
1908
  function validateForm(values, config, customValidators) {
@@ -2043,6 +2062,16 @@ function SduiNodeRenderer({
2043
2062
  props[name] = resolved;
2044
2063
  }
2045
2064
  }
2065
+ const childLayout = childLayoutFrom(props);
2066
+ if (childLayout) {
2067
+ for (const name of CHILD_LAYOUT_PROPS) delete props[name];
2068
+ if (childLayout.style) {
2069
+ props.style = isPlainObject2(props.style) ? { ...childLayout.style, ...props.style } : childLayout.style;
2070
+ }
2071
+ if (childLayout.className) {
2072
+ props.className = typeof props.className === "string" && props.className ? `${childLayout.className} ${props.className}` : childLayout.className;
2073
+ }
2074
+ }
2046
2075
  for (const [name, slotChildren] of Object.entries(slots ?? {})) {
2047
2076
  if (!Array.isArray(slotChildren)) {
2048
2077
  warnOnce2(
@@ -2448,6 +2477,7 @@ function SduiRenderer({
2448
2477
  // 해석된 어댑터를 트리에 흘려보낸다 — dispatch를 거치지 않고 스스로 요청을 내는
2449
2478
  // 컴포넌트(목록 조회 등)도 호스트가 건 잠금 안에서 움직이게 하기 위해서다(adapter.ts 주석).
2450
2479
  /* @__PURE__ */ jsx(SduiAdapterContext.Provider, { value: host, children: /* @__PURE__ */ jsx(SduiDispatchContext.Provider, { value: dispatch, children: /* @__PURE__ */ jsx(SduiRuntimeContext.Provider, { value: runtime, children: /* @__PURE__ */ jsx(SduiPermissionProvider, { can, children: /* @__PURE__ */ jsxs("div", { className: "sdui-root", children: [
2480
+ /* @__PURE__ */ jsx(HoistedStyle, { id: "wp-sdui-layout", css: LAYOUT_CSS }),
2451
2481
  page.title || page.subtitle ? /* @__PURE__ */ jsx("div", { className: "wp-page-head", children: /* @__PURE__ */ jsxs("div", { className: "wp-page-head__text", children: [
2452
2482
  page.title ? /* @__PURE__ */ jsx("h1", { className: "wp-page-head__title", children: page.title }) : null,
2453
2483
  page.subtitle ? /* @__PURE__ */ jsx("div", { className: "wp-page-head__sub", children: page.subtitle }) : null
@@ -0,0 +1,150 @@
1
+ import React__default from 'react';
2
+
3
+ /**
4
+ * 레이아웃 어휘 — 공통 프롭의 값 척도와, 그 값을 CSS로 바꾸는 자리.
5
+ *
6
+ * ── 왜 이 모듈이 생겼나
7
+ * 스펙 85개에서 `style` 우회가 187선언 있었고, 그중 73선언(39%)이 "프롭이 없어서"
8
+ * 손으로 쓴 CSS였다(`gap` 33 · `align` 17 · `wrap` 7 · `weight` 7 · `justify` 4 ·
9
+ * `textAlign` 3 · `grow` 1 · `selfAlign` 1). `Col`에는 레이아웃 프롭이 0개였고,
10
+ * v2 원본 88화면이 368회 쓰던 `items-center`에 대응하는 프롭이 어휘 어디에도 없었다.
11
+ *
12
+ * ── 축을 네 갈래로 가른다 (이 갈래가 구현 방식을 결정한다)
13
+ * 1. 컨테이너 전용 `gap` `wrap` `columns` — 자식에 그 개념이 없다
14
+ * 2. 컨테이너+자식 `align` ↔ `selfAlign` — CSS의 align-items/align-self 짝
15
+ * 3. 자식 전용 `grow` `shrink` `span` `truncate`
16
+ * 4. CSS가 상속함 `weight` `textAlign` — **JS는 아무것도 하지 않는다**
17
+ *
18
+ * 4번이 핵심이다. `font-weight`·`text-align`은 브라우저가 이미 자손에게 상속시킨다.
19
+ * 렌더러가 부모를 훑어 값을 내려보내면 중복이고, 게다가 **반드시 틀린다** —
20
+ * `Show`·`Can`·`ForEach`는 `dom.element: 'fragment'`라 자기 DOM 박스가 없어서
21
+ * 스펙 트리의 부모와 실제 DOM 부모가 다르고(`Row > Show > Text`의 DOM 부모는 Row다),
22
+ * `Alert`·`Card`는 자식이 `__body`/`__text` 안으로 들어가 한 겹 더 어긋난다.
23
+ * 그래서 `weight`/`textAlign`은 **자기 요소에만 값을 붙이고 끝낸다.** 부모를 보지 않는다.
24
+ */
25
+ /**
26
+ * 간격 척도 — **px 숫자 문자열**이다. 토큰 단계 번호(`1..8`)도 t-shirt(`sm/md/lg`)도 쓰지 않는다.
27
+ *
28
+ * 단계 번호를 버린 이유: DS 토큰 번호와 v2가 쓰던 Tailwind 번호가 위에서 어긋난다.
29
+ * `--wp-space-7`=32px인데 `gap-7`=28px, `--wp-space-8`=40px인데 `gap-8`=32px이다.
30
+ * 88화면을 옮기는 사람이 `gap-4`를 보고 `gap="4"`를 쓰면 4px이 아니라 16px을 원한 것이다.
31
+ *
32
+ * t-shirt를 버린 이유: `size` 프롭이 이미 12종에서 `sm/md/lg`를 **컨트롤 높이**로 쓴다
33
+ * (`Button.size` 131회, `Dialog.size` 87회). 한 속성 패널에 `size:"md"`(높이 32px)와
34
+ * `gap:"md"`(간격 12px)가 나란히 놓이면 같은 낱말이 두 척도를 가리키게 된다.
35
+ *
36
+ * 6px은 뺐다 — v2가 `gap-1.5`로 38회 쓰지만 DS 척도에 없는 값이라, 여기 넣으면
37
+ * "편집기가 DS 척도를 강제한다"는 이 작업의 목적 자체가 무너진다. `--wp-space-1half`를
38
+ * DS에 더할지는 DS 쪽 결정이고, 그때까지 그 자리는 8px로 붙거나 `style`에 남는다.
39
+ */
40
+ type SduiGapScale = '2' | '4' | '8' | '12' | '16' | '20' | '24' | '32';
41
+ /** `align-items` / `align-self`의 DS 낱말. 값 이름을 CSS 낱말(`flex-start`)로 두지 않는 것은 기존 `Justify`와 짝을 맞추기 위해서다. */
42
+ type SduiAlignScale = 'start' | 'center' | 'end' | 'baseline' | 'stretch';
43
+ /** 그리드 자식이 먹는 트랙 수(`grid-column: span N`). */
44
+ type SduiSpanScale = 1 | 2 | 3 | 4 | 5 | 6;
45
+ /** `Grid`의 트랙 수. 기존 2·3·4에 1·5·6을 더했다 — v2가 22회 쓴다(1열 11 · 5열 5 · 6열 3). */
46
+ type SduiColumnsScale = 1 | 2 | 3 | 4 | 5 | 6;
47
+ /**
48
+ * 글자 굵기. `Text.preset` 19종이 크기·굵기·정렬을 한 덩어리로 묶어 놔서
49
+ * "본문 크기인데 굵게"(v2 `font-medium` 282회)를 만들 수단이 없었다.
50
+ */
51
+ type SduiWeightScale = 'regular' | 'medium' | 'semibold' | 'bold';
52
+ type SduiTextAlignScale = 'left' | 'center' | 'right';
53
+ /**
54
+ * 자기 루트가 flex/grid인 컴포넌트만 받는 축.
55
+ *
56
+ * 이 프롭들을 렌더러가 아무 노드에나 꽂지 않고 **컴포넌트가 직접 받게** 한 이유:
57
+ * 렌더러는 컴포넌트의 루트가 flex인지 알 수 없어서, `Timeline`에 `gap`을 준 스펙이
58
+ * 아무 일도 일어나지 않은 채 조용히 넘어간다. 프롭으로 두면 타입이 그 자리에서 막는다.
59
+ */
60
+ interface SduiContainerLayoutProps {
61
+ /** 자식 사이 간격(px 척도). 생략하면 컴포넌트의 CSS 기본값. */
62
+ gap?: SduiGapScale;
63
+ /** 교차축 정렬(`align-items`). 자식이 `selfAlign`으로 자기 몫만 뒤집을 수 있다. */
64
+ align?: SduiAlignScale;
65
+ /** 주축 정렬(`justify-content`). */
66
+ justify?: 'start' | 'center' | 'end' | 'between';
67
+ /** 넘치면 다음 줄로(`flex-wrap`). */
68
+ wrap?: boolean;
69
+ }
70
+ /**
71
+ * 컨테이너 축 → 인라인 style.
72
+ *
73
+ * ── 유틸 클래스(`wp-gap--8` 등)를 만들지 않고 인라인 style로 가는 이유
74
+ * 실측: 같은 클래스의 기본값이 두 시트에서 다르다(`.wp-col` gap 라이브러리 16px / ERP 8px,
75
+ * `.wp-grid` 16px / 20px). 유틸 클래스는 `.wp-col`과 **명시도가 같아서**(둘 다 클래스 1개)
76
+ * 어느 쪽이 이길지 소스 순서로 결정되는데, 이 시트는 React가 런타임에 꽂는 hoisted
77
+ * `<style>`이고 저쪽은 번들러가 낸 `<link>`라 순서를 보장할 수 없다. 인라인 style은
78
+ * 명시도에서 항상 이기므로 `gap="16"`이 두 소비자에서 똑같이 16px이 된다.
79
+ *
80
+ * 캐스케이드를 잃는 대가는 없다. 4단 해소에서 인라인이 맡는 것은 1단(자식 지정)뿐이고,
81
+ * 2단(타입별 기본)은 컴포넌트 기본 인자가, 3·4단(상속·전역)은 `.wp-row`/`.wp-col` 같은
82
+ * 기존 클래스가 그대로 맡는다. 프롭을 안 주면 인라인 선언 자체가 없어 아래 단이 그대로 보인다.
83
+ */
84
+ declare function containerLayoutStyle(props: SduiContainerLayoutProps): React__default.CSSProperties | undefined;
85
+ /** `Grid.columns` → `wp-grid--N`. 표에 없는 값은 undefined로 떨어뜨려 클래스 주입을 막는다. */
86
+ declare function columnsClass(columns: unknown): string | undefined;
87
+ /**
88
+ * 부모가 아니라 **자기 박스**에 거는 축. 부모 쪽 형태가 없다.
89
+ *
90
+ * 컨테이너 축과 달리 이쪽은 렌더러가 가로채 아무 노드에나 붙인다. 어떤 컴포넌트든
91
+ * flex/grid 부모의 자식이 될 수 있어서 대상을 좁힐 근거가 없기 때문이다.
92
+ */
93
+ interface SduiChildLayoutProps {
94
+ /** 남는 공간을 먹는다(`flex-grow`). */
95
+ grow?: boolean;
96
+ /** 좁아질 때 줄어든다(`flex-shrink`). `false`면 원래 크기를 지킨다. */
97
+ shrink?: boolean;
98
+ /** 그리드에서 먹는 트랙 수(`grid-column: span N`). */
99
+ span?: SduiSpanScale;
100
+ /** 부모의 `align`을 이 노드에서만 뒤집는다(`align-self`). */
101
+ selfAlign?: SduiAlignScale;
102
+ /** 한 줄로 잘라 말줄임(`.wp-truncate`). */
103
+ truncate?: boolean;
104
+ }
105
+ /** 렌더러가 가로채는 자식 축 프롭 이름. */
106
+ declare const CHILD_LAYOUT_PROPS: ReadonlySet<string>;
107
+ interface ChildLayoutResult {
108
+ style?: React__default.CSSProperties;
109
+ className?: string;
110
+ }
111
+ /**
112
+ * 자식 축 → style/className.
113
+ *
114
+ * `truncate`만 클래스인 이유: 선언이 넷이고(`overflow`·`text-overflow`·`white-space`·
115
+ * `min-width`) 그중 `min-width:0`이 flex 자식의 축소 하한을 푸는 필수 조건인데,
116
+ * ERP 시트의 `.wp-row`/`.wp-col`/`.wp-grid`에는 `min-width:0`이 아예 없다(라이브러리에는 있다).
117
+ * 그래서 조상을 고치는 대신 **잘리는 요소 자신에게** `min-width:0`을 건다 — flex 자식의
118
+ * 하한을 푸는 표준 처방이고, 조상 시트를 건드리지 않으니 기존 화면이 움직이지 않는다.
119
+ */
120
+ declare function childLayoutFrom(props: SduiChildLayoutProps): ChildLayoutResult | undefined;
121
+ /**
122
+ * `weight`/`textAlign` → 자기 요소의 style.
123
+ *
124
+ * **부모를 훑지 않는다.** 이 둘은 CSS가 이미 자손에게 상속시키는 속성이라, 값을 자기
125
+ * 요소에 한 번 붙이면 3단(부모 상속)이 공짜로 성립한다. 인라인으로 붙여도 상속은
126
+ * 똑같이 일어난다 — 상속은 명시도가 아니라 계산값을 따라가기 때문이다.
127
+ */
128
+ declare function typographyStyle(props: {
129
+ weight?: SduiWeightScale;
130
+ textAlign?: SduiTextAlignScale;
131
+ }): React__default.CSSProperties | undefined;
132
+ /**
133
+ * 새 어휘가 필요로 하는 **최소한의** CSS.
134
+ *
135
+ * 여기 들어온 것은 인라인 style로 표현할 수 없는 둘뿐이다:
136
+ * · `.wp-truncate` — 선언이 여럿이라 묶는 편이 낫다
137
+ * · `.wp-grid--1/5/6` — 미디어 쿼리가 필요하다. 인라인 `grid-template-columns`로 내면
138
+ * 좁은 화면에서 열이 접히는 기존 동작(`.wp-grid--3/4` → 2열 → 1열)을 잃는다.
139
+ *
140
+ * 나머지(gap·align·justify·wrap·grow·shrink·span·selfAlign·weight·textAlign)는 전부
141
+ * 인라인이라 CSS가 없다. 규칙을 적게 낼수록 두 시트와 충돌할 자리도 줄어든다 —
142
+ * 실제로 이 세 선택자는 라이브러리 시트에도 ERP 시트에도 없어서 겹칠 상대가 없다.
143
+ *
144
+ * `styles.css`가 아니라 `HoistedStyle`로 내보내는 이유: ERP는 `@wipco/sdui/styles.css`를
145
+ * **한 번도 로드하지 않는다**(`main.tsx`가 자기 `styles/index.css`만 import한다).
146
+ * 시트에 넣으면 ERP에서 규칙이 도달하지 못해 `truncate`·5열/6열이 죽는다.
147
+ */
148
+ declare const LAYOUT_CSS = "\n.wp-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}\n.wp-grid--1{grid-template-columns:minmax(0,1fr)}\n.wp-grid--5{grid-template-columns:repeat(5,minmax(0,1fr))}\n.wp-grid--6{grid-template-columns:repeat(6,minmax(0,1fr))}\n@media (max-width:900px){.wp-grid--5,.wp-grid--6{grid-template-columns:repeat(2,minmax(0,1fr))}}\n@media (max-width:600px){.wp-grid--5,.wp-grid--6{grid-template-columns:minmax(0,1fr)}}\n";
149
+
150
+ export { CHILD_LAYOUT_PROPS as C, LAYOUT_CSS as L, type SduiContainerLayoutProps as S, type SduiColumnsScale as a, type SduiWeightScale as b, type SduiTextAlignScale as c, type SduiAlignScale as d, type SduiChildLayoutProps as e, type SduiGapScale as f, type SduiSpanScale as g, childLayoutFrom as h, columnsClass as i, containerLayoutStyle as j, typographyStyle as t };