@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.
- package/dist/{chunk-4SU2KYPU.js → chunk-2ARNY7WZ.js} +1 -1
- package/dist/{chunk-APCXOCAO.js → chunk-562QK2G3.js} +1 -1
- package/dist/{chunk-MOIU7MUA.js → chunk-57LLG32F.js} +2 -2
- package/dist/{chunk-KBHI3IUR.js → chunk-5O6PFLFJ.js} +1 -1
- package/dist/{chunk-ZNITJ4KK.js → chunk-63U54JAG.js} +1 -1
- package/dist/{chunk-WVRCIVAD.js → chunk-73ZMMJRX.js} +1 -1
- package/dist/{chunk-OOHHW4K4.js → chunk-B4A4KY4K.js} +1 -1
- package/dist/{chunk-ZUCI34QY.js → chunk-CRSY67TZ.js} +46 -3
- package/dist/{chunk-MSAV4J4I.js → chunk-DN5YNPJS.js} +2 -2
- package/dist/{chunk-ZQR3ULVH.js → chunk-GWVK3BHB.js} +2 -2
- package/dist/{chunk-56KKWLNI.js → chunk-H32WQHB7.js} +2 -2
- package/dist/{chunk-Q6SBH63R.js → chunk-HGFYXY7F.js} +1 -1
- package/dist/{chunk-DGPRX4MU.js → chunk-J2DSDERS.js} +1 -1
- package/dist/{chunk-FGRR3ROJ.js → chunk-KAXPN6KT.js} +1 -1
- package/dist/{chunk-AROOQ5W6.js → chunk-L4ORCIVN.js} +1 -1
- package/dist/{chunk-IL2KS4WS.js → chunk-PJRXPMI3.js} +13 -6
- package/dist/chunk-QBIVW7E6.js +90 -0
- package/dist/{chunk-WNYWTFGW.js → chunk-TAFUDHIX.js} +1 -1
- package/dist/{chunk-KADFN76X.js → chunk-TKB7H5DB.js} +1 -1
- package/dist/{chunk-LZJTKVMO.js → chunk-XMMYJSRV.js} +1 -1
- package/dist/{chunk-RH7ESUE6.js → chunk-XY2JKFAV.js} +1 -1
- package/dist/{chunk-SEBPBUZR.js → chunk-Y3HYEWSY.js} +1 -1
- package/dist/index.d.ts +53 -17
- package/dist/index.js +69 -39
- package/dist/layout-BnYUuWC2.d.ts +150 -0
- package/dist/meta.js +312 -18
- package/dist/rich.js +3 -3
- package/dist/styles.css +12 -2
- package/dist/widgets/AutocompleteField.js +3 -3
- package/dist/widgets/ColumnBoard.js +2 -2
- package/dist/widgets/DiffView.js +2 -2
- package/dist/widgets/Disclosure.js +2 -2
- package/dist/widgets/EventCalendar.js +2 -2
- package/dist/widgets/ImageLightbox.js +2 -2
- package/dist/widgets/InlineEdit.js +2 -2
- package/dist/widgets/JsonField.js +2 -2
- package/dist/widgets/OrgChart.js +2 -2
- package/dist/widgets/PeriodFilter.js +2 -2
- package/dist/widgets/PrintSheet.js +2 -2
- package/dist/widgets/SearchableMultiPicker.js +3 -3
- package/dist/widgets/SecureScreen.js +2 -2
- package/dist/widgets/Strip.d.ts +9 -2
- package/dist/widgets/Strip.js +2 -1
- package/dist/widgets/TagMultiSelect.js +2 -2
- package/dist/widgets/Timeline.js +3 -3
- package/dist/widgets/TreePicker.js +3 -3
- package/dist/widgets/TreeView.js +2 -2
- package/dist/widgets/index.d.ts +1 -0
- package/dist/widgets/index.js +38 -37
- package/package.json +3 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { includesLooseSearch } from './chunk-
|
|
2
|
-
import { Icon, Button, Input, Spinner } from './chunk-
|
|
1
|
+
import { includesLooseSearch } from './chunk-TKB7H5DB.js';
|
|
2
|
+
import { Icon, Button, Input, Spinner } from './chunk-CRSY67TZ.js';
|
|
3
3
|
import { useId, useRef, useState, useEffect, useMemo } from 'react';
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -688,6 +688,15 @@ var ICON_NODES = {
|
|
|
688
688
|
{ t: "line", x1: "8", x2: "14", y1: "11", y2: "11" }
|
|
689
689
|
]
|
|
690
690
|
};
|
|
691
|
+
|
|
692
|
+
// src/warn-once.ts
|
|
693
|
+
var warned = /* @__PURE__ */ new Set();
|
|
694
|
+
function warnOnce(key, message, level = "error") {
|
|
695
|
+
if (warned.has(key)) return;
|
|
696
|
+
warned.add(key);
|
|
697
|
+
if (level === "warn") console.warn(message);
|
|
698
|
+
else console.error(message);
|
|
699
|
+
}
|
|
691
700
|
function cx(...parts) {
|
|
692
701
|
return parts.filter(Boolean).join(" ");
|
|
693
702
|
}
|
|
@@ -811,15 +820,49 @@ function Textarea({ invalid = false, rows = 3, className = "", ...rest }) {
|
|
|
811
820
|
}
|
|
812
821
|
);
|
|
813
822
|
}
|
|
814
|
-
function
|
|
823
|
+
function pickOptionText(option, key) {
|
|
824
|
+
const raw = option[key];
|
|
825
|
+
if (raw === null || raw === void 0) return void 0;
|
|
826
|
+
return String(raw);
|
|
827
|
+
}
|
|
828
|
+
function Select({
|
|
829
|
+
options,
|
|
830
|
+
valueKey = "value",
|
|
831
|
+
labelKey = "label",
|
|
832
|
+
size = "md",
|
|
833
|
+
invalid = false,
|
|
834
|
+
placeholder,
|
|
835
|
+
className = "",
|
|
836
|
+
...rest
|
|
837
|
+
}) {
|
|
815
838
|
const classes = ["wp-select"];
|
|
816
839
|
if (size !== "md") classes.push(`wp-select--${size}`);
|
|
817
840
|
if (invalid) classes.push("wp-select--invalid");
|
|
818
841
|
if (className) classes.push(className);
|
|
842
|
+
const list = Array.isArray(options) ? options : [];
|
|
819
843
|
return /* @__PURE__ */ jsxs("div", { className: "wp-selectwrap", children: [
|
|
820
844
|
/* @__PURE__ */ jsxs("select", { className: classes.join(" "), "aria-invalid": invalid || void 0, ...rest, children: [
|
|
821
845
|
placeholder ? /* @__PURE__ */ jsx("option", { value: "", children: placeholder }) : null,
|
|
822
|
-
|
|
846
|
+
list.map((option, index) => {
|
|
847
|
+
const value = pickOptionText(option, valueKey);
|
|
848
|
+
const label = pickOptionText(option, labelKey) || value || "";
|
|
849
|
+
if (label === "") {
|
|
850
|
+
warnOnce(
|
|
851
|
+
`select:blank-option:${valueKey}/${labelKey}`,
|
|
852
|
+
`[sdui] <Select> \uC635\uC158\uC774 \uAC12\xB7\uB77C\uBCA8 \uB458 \uB2E4 \uBE44\uC5C8\uC2B5\uB2C8\uB2E4 (valueKey="${valueKey}", labelKey="${labelKey}") \u2014 \uB3C4\uBA54\uC778 \uAC1D\uCCB4\uB97C \uADF8\uB300\uB85C \uB118\uACBC\uB2E4\uBA74 \uB450 \uD504\uB86D\uC73C\uB85C \uC77D\uC744 \uD0A4\uB97C \uC9C0\uC815\uD558\uC138\uC694`,
|
|
853
|
+
"warn"
|
|
854
|
+
);
|
|
855
|
+
}
|
|
856
|
+
return /* @__PURE__ */ jsx(
|
|
857
|
+
"option",
|
|
858
|
+
{
|
|
859
|
+
value,
|
|
860
|
+
disabled: Boolean(option.disabled),
|
|
861
|
+
children: label
|
|
862
|
+
},
|
|
863
|
+
`${value ?? ""}-${index}`
|
|
864
|
+
);
|
|
865
|
+
})
|
|
823
866
|
] }),
|
|
824
867
|
/* @__PURE__ */ jsx("span", { className: "wp-selectwrap__caret", children: /* @__PURE__ */ jsx(Icon, { name: "chevron-down", size: 15 }) })
|
|
825
868
|
] });
|
|
@@ -1287,4 +1330,4 @@ function Tooltip({ label, shortcut, placement = "top", wrap = false, children, c
|
|
|
1287
1330
|
);
|
|
1288
1331
|
}
|
|
1289
1332
|
|
|
1290
|
-
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 };
|
|
1333
|
+
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, warnOnce };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TreeView } from './chunk-
|
|
2
|
-
import { Field, Dialog, Icon, Button, Input } from './chunk-
|
|
1
|
+
import { TreeView } from './chunk-Y3HYEWSY.js';
|
|
2
|
+
import { Field, Dialog, Icon, Button, Input } from './chunk-CRSY67TZ.js';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { includesLooseSearch } from './chunk-
|
|
2
|
-
import { Button, Dialog, Input, Tag, Checkbox } from './chunk-
|
|
1
|
+
import { includesLooseSearch } from './chunk-TKB7H5DB.js';
|
|
2
|
+
import { Button, Dialog, Input, Tag, Checkbox } from './chunk-CRSY67TZ.js';
|
|
3
3
|
import React, { useMemo, useState, useEffect } from 'react';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { containerLayoutStyle } from './chunk-QBIVW7E6.js';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
4
|
|
|
4
|
-
// src/widgets/Strip.tsx
|
|
5
5
|
var STRIP_CSS = `
|
|
6
6
|
.erp-strip{display:flex;align-items:stretch;overflow-x:auto;min-width:0;padding-bottom:var(--wp-space-1);scrollbar-width:thin;scrollbar-color:var(--wp-border-default) transparent}
|
|
7
7
|
.erp-strip::-webkit-scrollbar{height:6px}
|
|
@@ -14,12 +14,19 @@ var STRIP_CSS = `
|
|
|
14
14
|
function StripStyles() {
|
|
15
15
|
return /* @__PURE__ */ jsx("style", { href: "erp-strip", precedence: "medium", children: STRIP_CSS });
|
|
16
16
|
}
|
|
17
|
-
function Strip({ children, gap = "
|
|
17
|
+
function Strip({ children, gap = "12", snap = false }) {
|
|
18
18
|
const items = React.Children.toArray(children);
|
|
19
|
-
return /* @__PURE__ */ jsxs(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
return /* @__PURE__ */ jsxs(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
className: snap ? "erp-strip erp-strip--snap" : "erp-strip",
|
|
23
|
+
style: containerLayoutStyle({ gap }) ?? { gap: "12px" },
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ jsx(StripStyles, {}),
|
|
26
|
+
items.map((child, index) => /* @__PURE__ */ jsx("div", { className: "erp-strip__item", children: child }, index))
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
);
|
|
23
30
|
}
|
|
24
31
|
|
|
25
32
|
export { Strip };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// src/layout.ts
|
|
2
|
+
var GAP_CSS = {
|
|
3
|
+
"2": "2px",
|
|
4
|
+
"4": "4px",
|
|
5
|
+
"8": "8px",
|
|
6
|
+
"12": "12px",
|
|
7
|
+
"16": "16px",
|
|
8
|
+
"20": "20px",
|
|
9
|
+
"24": "24px",
|
|
10
|
+
"32": "32px"
|
|
11
|
+
};
|
|
12
|
+
var ALIGN_CSS = {
|
|
13
|
+
start: "flex-start",
|
|
14
|
+
center: "center",
|
|
15
|
+
end: "flex-end",
|
|
16
|
+
baseline: "baseline",
|
|
17
|
+
stretch: "stretch"
|
|
18
|
+
};
|
|
19
|
+
var JUSTIFY_CSS = {
|
|
20
|
+
start: "flex-start",
|
|
21
|
+
center: "center",
|
|
22
|
+
end: "flex-end",
|
|
23
|
+
between: "space-between"
|
|
24
|
+
};
|
|
25
|
+
var WEIGHT_CSS = {
|
|
26
|
+
regular: "var(--wp-weight-regular, 400)",
|
|
27
|
+
medium: "var(--wp-weight-medium, 500)",
|
|
28
|
+
semibold: "var(--wp-weight-semibold, 600)",
|
|
29
|
+
bold: "var(--wp-weight-bold, 700)"
|
|
30
|
+
};
|
|
31
|
+
var TEXT_ALIGN_CSS = {
|
|
32
|
+
left: "left",
|
|
33
|
+
center: "center",
|
|
34
|
+
right: "right"
|
|
35
|
+
};
|
|
36
|
+
var COLUMNS = /* @__PURE__ */ new Set([1, 2, 3, 4, 5, 6]);
|
|
37
|
+
function lookup(table, value) {
|
|
38
|
+
if (value === void 0 || value === null) return void 0;
|
|
39
|
+
return table[String(value)];
|
|
40
|
+
}
|
|
41
|
+
function containerLayoutStyle(props) {
|
|
42
|
+
const gap = lookup(GAP_CSS, props.gap);
|
|
43
|
+
const alignItems = lookup(ALIGN_CSS, props.align);
|
|
44
|
+
const justifyContent = lookup(JUSTIFY_CSS, props.justify);
|
|
45
|
+
const flexWrap = props.wrap === void 0 ? void 0 : props.wrap ? "wrap" : "nowrap";
|
|
46
|
+
if (gap === void 0 && alignItems === void 0 && justifyContent === void 0 && flexWrap === void 0) {
|
|
47
|
+
return void 0;
|
|
48
|
+
}
|
|
49
|
+
return { gap, alignItems, justifyContent, flexWrap };
|
|
50
|
+
}
|
|
51
|
+
function columnsClass(columns) {
|
|
52
|
+
const n = Number(columns);
|
|
53
|
+
return Number.isInteger(n) && COLUMNS.has(n) ? `wp-grid--${n}` : void 0;
|
|
54
|
+
}
|
|
55
|
+
var CHILD_LAYOUT_PROPS = /* @__PURE__ */ new Set([
|
|
56
|
+
"grow",
|
|
57
|
+
"shrink",
|
|
58
|
+
"span",
|
|
59
|
+
"selfAlign",
|
|
60
|
+
"truncate"
|
|
61
|
+
]);
|
|
62
|
+
function childLayoutFrom(props) {
|
|
63
|
+
const style = {};
|
|
64
|
+
if (props.grow !== void 0) style.flexGrow = props.grow ? 1 : 0;
|
|
65
|
+
if (props.shrink !== void 0) style.flexShrink = props.shrink ? 1 : 0;
|
|
66
|
+
const span = Number(props.span);
|
|
67
|
+
if (Number.isInteger(span) && COLUMNS.has(span)) style.gridColumn = `span ${span}`;
|
|
68
|
+
const alignSelf = lookup(ALIGN_CSS, props.selfAlign);
|
|
69
|
+
if (alignSelf !== void 0) style.alignSelf = alignSelf;
|
|
70
|
+
const className = props.truncate ? "wp-truncate" : void 0;
|
|
71
|
+
const hasStyle = Object.keys(style).length > 0;
|
|
72
|
+
if (!hasStyle && className === void 0) return void 0;
|
|
73
|
+
return { style: hasStyle ? style : void 0, className };
|
|
74
|
+
}
|
|
75
|
+
function typographyStyle(props) {
|
|
76
|
+
const fontWeight = lookup(WEIGHT_CSS, props.weight);
|
|
77
|
+
const textAlign = lookup(TEXT_ALIGN_CSS, props.textAlign);
|
|
78
|
+
if (fontWeight === void 0 && textAlign === void 0) return void 0;
|
|
79
|
+
return { fontWeight, textAlign };
|
|
80
|
+
}
|
|
81
|
+
var LAYOUT_CSS = `
|
|
82
|
+
.wp-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
|
|
83
|
+
.wp-grid--1{grid-template-columns:minmax(0,1fr)}
|
|
84
|
+
.wp-grid--5{grid-template-columns:repeat(5,minmax(0,1fr))}
|
|
85
|
+
.wp-grid--6{grid-template-columns:repeat(6,minmax(0,1fr))}
|
|
86
|
+
@media (max-width:900px){.wp-grid--5,.wp-grid--6{grid-template-columns:repeat(2,minmax(0,1fr))}}
|
|
87
|
+
@media (max-width:600px){.wp-grid--5,.wp-grid--6{grid-template-columns:minmax(0,1fr)}}
|
|
88
|
+
`;
|
|
89
|
+
|
|
90
|
+
export { CHILD_LAYOUT_PROPS, LAYOUT_CSS, childLayoutFrom, columnsClass, containerLayoutStyle, typographyStyle };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Tag, Input, Button, IconButton, Field, Checkbox } from './chunk-
|
|
1
|
+
import { Tag, Input, Button, IconButton, Field, Checkbox } from './chunk-CRSY67TZ.js';
|
|
2
2
|
import { useRef, useEffect, useState, useMemo } from 'react';
|
|
3
3
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SegmentedControl, IconButton, Button, Tag, EmptyState, Icon, Badge } from './chunk-
|
|
1
|
+
import { SegmentedControl, IconButton, Button, Tag, EmptyState, Icon, Badge } from './chunk-CRSY67TZ.js';
|
|
2
2
|
import { useState, useMemo } from 'react';
|
|
3
3
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IconButton } from './chunk-
|
|
1
|
+
import { IconButton } from './chunk-CRSY67TZ.js';
|
|
2
2
|
import { useState, useRef, useCallback, useEffect } from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
4
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import React__default, { CSSProperties, ReactNode, ComponentType } from 'react';
|
|
3
3
|
import { D as DatePicker, a as DateRangePicker } from './DatePicker-CTDcFR7V.js';
|
|
4
4
|
export { b as DatePickerProps, c as DateRangePickerProps, d as DateRangeValue } from './DatePicker-CTDcFR7V.js';
|
|
5
|
+
import { S as SduiContainerLayoutProps, a as SduiColumnsScale, b as SduiWeightScale, c as SduiTextAlignScale } from './layout-BnYUuWC2.js';
|
|
6
|
+
export { C as CHILD_LAYOUT_PROPS, L as LAYOUT_CSS, d as SduiAlignScale, e as SduiChildLayoutProps, f as SduiGapScale, g as SduiSpanScale, h as childLayoutFrom, i as columnsClass, j as containerLayoutStyle, t as typographyStyle } from './layout-BnYUuWC2.js';
|
|
5
7
|
import { S as SduiAction, a as SduiPropValue, b as SduiRule, c as SduiPage } from './types-D5Tkrynd.js';
|
|
6
8
|
export { d as SduiCalcRef, e as SduiChild, f as SduiIndexRef, g as SduiItemRef, h as SduiNode, i as SduiScalar, j as SduiStateRef } from './types-D5Tkrynd.js';
|
|
7
9
|
|
|
@@ -270,14 +272,30 @@ interface SelectOption {
|
|
|
270
272
|
label: string;
|
|
271
273
|
disabled?: boolean;
|
|
272
274
|
}
|
|
275
|
+
/**
|
|
276
|
+
* 자유 형식 옵션 — `valueKey`/`labelKey`가 가리키는 키로 읽는다.
|
|
277
|
+
*
|
|
278
|
+
* `AutocompleteOption`과 같은 모양(`Record<string, unknown>`)으로 맞췄다. 두 어휘가
|
|
279
|
+
* 같은 자리에서 같은 프롭 이름을 쓰는데 옵션 타입만 다르면 스펙 작성자가 둘 사이를
|
|
280
|
+
* 옮길 때마다 다시 배워야 한다.
|
|
281
|
+
*/
|
|
282
|
+
type SelectOptionRecord = Record<string, unknown>;
|
|
273
283
|
interface SelectProps extends Omit<React__default.SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
274
|
-
|
|
284
|
+
/**
|
|
285
|
+
* 옵션 목록. 기본은 `{value, label}`이고, 도메인 객체(`{id, title, …}`)를 그대로
|
|
286
|
+
* 넘길 거면 `valueKey`/`labelKey`로 읽을 키를 알려 준다.
|
|
287
|
+
*/
|
|
288
|
+
options: (SelectOption | SelectOptionRecord)[];
|
|
289
|
+
/** 옵션에서 값을 읽을 키. 기본 'value'. */
|
|
290
|
+
valueKey?: string;
|
|
291
|
+
/** 옵션에서 표시 라벨을 읽을 키. 기본 'label'. */
|
|
292
|
+
labelKey?: string;
|
|
275
293
|
size?: 'sm' | 'md' | 'lg';
|
|
276
294
|
invalid?: boolean;
|
|
277
295
|
/** 비어 있는 첫 옵션 */
|
|
278
296
|
placeholder?: string;
|
|
279
297
|
}
|
|
280
|
-
declare function Select({ options, size, invalid, placeholder, className, ...rest }: SelectProps): React__default.JSX.Element;
|
|
298
|
+
declare function Select({ options, valueKey, labelKey, size, invalid, placeholder, className, ...rest }: SelectProps): React__default.JSX.Element;
|
|
281
299
|
interface CheckboxProps extends React__default.InputHTMLAttributes<HTMLInputElement> {
|
|
282
300
|
label?: React__default.ReactNode;
|
|
283
301
|
description?: React__default.ReactNode;
|
|
@@ -596,39 +614,45 @@ interface TooltipProps extends React__default.HTMLAttributes<HTMLSpanElement> {
|
|
|
596
614
|
/** hover 힌트. 트리거를 감싸며 위치는 CSS가 잡는다 — 포털을 쓰지 않는다. */
|
|
597
615
|
declare function Tooltip({ label, shortcut, placement, wrap, children, className, ...rest }: TooltipProps): React__default.JSX.Element;
|
|
598
616
|
|
|
599
|
-
interface GridProps {
|
|
600
|
-
/** wp-grid--N 프리셋 */
|
|
601
|
-
columns?:
|
|
617
|
+
interface GridProps extends SduiContainerLayoutProps {
|
|
618
|
+
/** wp-grid--N 프리셋 (1~6) */
|
|
619
|
+
columns?: SduiColumnsScale;
|
|
602
620
|
/** 커스텀 트랙 — grid-template-columns 값. columns보다 우선 */
|
|
603
621
|
template?: string;
|
|
604
622
|
className?: string;
|
|
605
623
|
style?: React__default.CSSProperties;
|
|
606
624
|
children?: React__default.ReactNode;
|
|
607
625
|
}
|
|
608
|
-
declare function Grid({ columns, template, className, style, children }: GridProps): React__default.JSX.Element;
|
|
626
|
+
declare function Grid({ columns, template, gap, align, justify, wrap, className, style, children }: GridProps): React__default.JSX.Element;
|
|
609
627
|
type Justify = 'start' | 'center' | 'end' | 'between';
|
|
610
|
-
interface RowProps {
|
|
628
|
+
interface RowProps extends SduiContainerLayoutProps {
|
|
611
629
|
/** 가로 정렬 (기본 start) */
|
|
612
630
|
justify?: Justify;
|
|
613
631
|
className?: string;
|
|
614
632
|
style?: React__default.CSSProperties;
|
|
615
633
|
children?: React__default.ReactNode;
|
|
616
634
|
}
|
|
617
|
-
declare function Row({ justify, className, style, children }: RowProps): React__default.JSX.Element;
|
|
618
|
-
interface ActionsProps {
|
|
635
|
+
declare function Row({ justify, gap, align, wrap, className, style, children }: RowProps): React__default.JSX.Element;
|
|
636
|
+
interface ActionsProps extends SduiContainerLayoutProps {
|
|
619
637
|
/** 가로 정렬 — 기본 end(우측) */
|
|
620
638
|
justify?: Justify;
|
|
621
639
|
className?: string;
|
|
622
640
|
style?: React__default.CSSProperties;
|
|
623
641
|
children?: React__default.ReactNode;
|
|
624
642
|
}
|
|
625
|
-
/**
|
|
626
|
-
|
|
627
|
-
|
|
643
|
+
/**
|
|
644
|
+
* 액션 버튼 묶음 — 슬롯 안에서 정렬을 제어한다(flex:1로 슬롯 폭 차지).
|
|
645
|
+
*
|
|
646
|
+
* `justify = 'end'`가 **2단(타입별 기본)의 실제 사례**다. 전역 기본은 `.wp-row`의
|
|
647
|
+
* `flex-start`인데 이 타입만 `end`로 시작하고, 스펙이 `justify`를 주면 그것이 이긴다.
|
|
648
|
+
*/
|
|
649
|
+
declare function Actions({ justify, gap, align, wrap, className, style, children }: ActionsProps): React__default.JSX.Element;
|
|
650
|
+
interface ColProps extends SduiContainerLayoutProps {
|
|
628
651
|
className?: string;
|
|
629
652
|
style?: React__default.CSSProperties;
|
|
630
653
|
children?: React__default.ReactNode;
|
|
631
|
-
}
|
|
654
|
+
}
|
|
655
|
+
declare function Col({ gap, align, justify, wrap, className, style, children }: ColProps): React__default.JSX.Element;
|
|
632
656
|
interface SpacerProps {
|
|
633
657
|
/**
|
|
634
658
|
* 간격 토큰 단계(`--wp-space-N`). 주면 "남는 공간 밀어내기"가 아니라
|
|
@@ -639,25 +663,37 @@ interface SpacerProps {
|
|
|
639
663
|
size?: 1 | 2 | 3 | 4 | 5 | 6 | 8;
|
|
640
664
|
}
|
|
641
665
|
declare function Spacer({ size }: SpacerProps): React__default.JSX.Element;
|
|
642
|
-
interface SectionProps {
|
|
666
|
+
interface SectionProps extends SduiContainerLayoutProps {
|
|
643
667
|
title?: React__default.ReactNode;
|
|
644
668
|
className?: string;
|
|
645
669
|
style?: React__default.CSSProperties;
|
|
646
670
|
children?: React__default.ReactNode;
|
|
647
671
|
}
|
|
648
|
-
declare function Section({ title, className, style, children }: SectionProps): React__default.JSX.Element;
|
|
672
|
+
declare function Section({ title, gap, align, justify, wrap, className, style, children }: SectionProps): React__default.JSX.Element;
|
|
649
673
|
type TextPreset = 'display-1' | 'display-2' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body-lg' | 'body' | 'body-sm' | 'caption' | 'label' | 'overline' | 'micro' | 'metric' | 'metric-sm' | 'mono' | 'mono-xs';
|
|
650
674
|
interface TextProps {
|
|
651
675
|
/** styles.css의 .wp-* 타입 프리셋 이름 */
|
|
652
676
|
preset?: TextPreset;
|
|
653
677
|
as?: 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
678
|
+
/**
|
|
679
|
+
* 글자 굵기 — `preset`이 정한 굵기를 이 자리에서만 뒤집는다.
|
|
680
|
+
* 프리셋 19종이 크기·굵기·정렬을 묶어 놔 "본문 크기인데 굵게"를 만들 수 없던 것을 푼다.
|
|
681
|
+
*/
|
|
682
|
+
weight?: SduiWeightScale;
|
|
683
|
+
/** 글자 정렬. */
|
|
684
|
+
textAlign?: SduiTextAlignScale;
|
|
654
685
|
className?: string;
|
|
655
686
|
style?: React__default.CSSProperties;
|
|
656
687
|
/** children 대신 쓸 수 있는 내용 — 상태 바인딩({ "$state": ... })에 유용 */
|
|
657
688
|
value?: React__default.ReactNode;
|
|
658
689
|
children?: React__default.ReactNode;
|
|
659
690
|
}
|
|
660
|
-
|
|
691
|
+
/**
|
|
692
|
+
* `weight`·`textAlign`은 **이 요소에만** 붙는다. 자손에게 내려보내는 코드는 없다 —
|
|
693
|
+
* 그 일은 CSS 상속이 이미 하고 있고, JS로 다시 하면 `Show`/`Can` 같은 fragment 노드
|
|
694
|
+
* 때문에 스펙 트리의 부모와 실제 DOM 부모가 어긋나 조용히 틀린 값이 내려간다(layout.ts 주석).
|
|
695
|
+
*/
|
|
696
|
+
declare function Text({ preset, as: Tag, weight, textAlign, className, style, value, children, }: TextProps): React__default.JSX.Element;
|
|
661
697
|
interface KeyValueItem {
|
|
662
698
|
label: React__default.ReactNode;
|
|
663
699
|
/** source에서 꺼낼 필드 키. 생략하면 value를 그대로 출력 */
|
|
@@ -1551,4 +1587,4 @@ declare class NodeErrorBoundary extends React__default.Component<Props, State> {
|
|
|
1551
1587
|
render(): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | React__default.JSX.Element | null | undefined;
|
|
1552
1588
|
}
|
|
1553
1589
|
|
|
1554
|
-
export { Actions, type ActionsProps, Alert, type AlertProps, Avatar, type AvatarProps, Badge, type BadgeProps, type BadgeTone, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Can, type CanProps, Card, type CardProps, type CascadingSearchOption, Checkbox, type CheckboxProps, Col, type CustomActionHandler, type CustomValidator, DatePicker, DateRangePicker, Dialog, type DialogProps, Divider, EmptyState, type EmptyStateProps, Field, type FieldProps, Grid, type GridCardConfig, type GridCardRow, type GridProps, Icon, IconButton, type IconButtonProps, type IconProps, Input, type InputProps, type Justify, type KeyValueItem, KeyValueList, type KeyValueListProps, type MeterTone, NodeErrorBoundary, PageHead, type PageHeadProps, Pagination, type PaginationProps, ProgressBar, type ProgressBarProps, Radio, type RadioProps, RemoteSearchResults, type RemoteSearchResultsProps, ResultTable, type ResultTableColumn, type ResultTableProps, Row, type RowProps, SduiAction, type SduiAdapter, type SduiAssetContext, type SduiAssetResolver, type SduiBadgeCell, type SduiCanFn, type SduiCanQuery, type SduiCanSetting, type SduiCell, type SduiDateCell, SduiDialog, type SduiDispatch, SduiForm, type SduiFormConfig, type SduiFormProps, type SduiGridCard, type SduiGridCardAction, type SduiGridCardRow, type SduiIconCell, type SduiLinkCell, type SduiNumberCell, SduiPage, SduiPermissionProvider, type SduiProgressCell, SduiPropValue, type SduiRegistry, SduiRenderer, type SduiRendererProps, type SduiRowCondition, SduiRule, type SduiRuntime, type SduiSearchAction, type SduiSearchColumn, SduiSearchDataProvider, SduiSearchResults, type SduiSearchResultsProps, type SduiTagCell, type SduiTextCell, type SearchAction, type SearchColumn, type SearchFetcher, type SearchField, type SearchFilter, type SearchOption, type SearchPage, SearchResults, type SearchResultsProps, type SearchRow, SearchToolbar, type SearchValues, type SearchViewItem, Section, type SectionProps, SegmentedControl, type SegmentedControlProps, type SegmentedItem, Select, type SelectOption, type SelectProps, Show, type ShowProps, SidebarNav, type SidebarNavItem, type SidebarNavProps, type SidebarNavSection, type SortDir, SortHandle, type SortHandleProps, SortableList, type SortableListProps, Spacer, type SpacerProps, type SpecIssue, Spinner, type SpinnerProps, StatCard, type StatCardProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextPreset, type TextProps, Textarea, type TextareaProps, Toast, type ToastProps, Tooltip, type TooltipProps, cascadingValuePaths, cellRenderer, cleanSearchValues, createRegistry, defaultAdapter, defaultRegistry, includesLooseSearch, joinMultiValue, normalizePageSizes, normalizeSearchText, searchFieldKeys, searchValuesFromParams, sortableDropIndex, sortableMove, splitMultiValue, useRemoteSearchPage, useSduiAssetResolver, useSduiCan, useSduiDispatch, useSduiRuntime, useSduiSandbox, useSearchFetcher, validateSpec };
|
|
1590
|
+
export { Actions, type ActionsProps, Alert, type AlertProps, Avatar, type AvatarProps, Badge, type BadgeProps, type BadgeTone, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Can, type CanProps, Card, type CardProps, type CascadingSearchOption, Checkbox, type CheckboxProps, Col, type ColProps, type CustomActionHandler, type CustomValidator, DatePicker, DateRangePicker, Dialog, type DialogProps, Divider, EmptyState, type EmptyStateProps, Field, type FieldProps, Grid, type GridCardConfig, type GridCardRow, type GridProps, Icon, IconButton, type IconButtonProps, type IconProps, Input, type InputProps, type Justify, type KeyValueItem, KeyValueList, type KeyValueListProps, type MeterTone, NodeErrorBoundary, PageHead, type PageHeadProps, Pagination, type PaginationProps, ProgressBar, type ProgressBarProps, Radio, type RadioProps, RemoteSearchResults, type RemoteSearchResultsProps, ResultTable, type ResultTableColumn, type ResultTableProps, Row, type RowProps, SduiAction, type SduiAdapter, type SduiAssetContext, type SduiAssetResolver, type SduiBadgeCell, type SduiCanFn, type SduiCanQuery, type SduiCanSetting, type SduiCell, SduiColumnsScale, SduiContainerLayoutProps, type SduiDateCell, SduiDialog, type SduiDispatch, SduiForm, type SduiFormConfig, type SduiFormProps, type SduiGridCard, type SduiGridCardAction, type SduiGridCardRow, type SduiIconCell, type SduiLinkCell, type SduiNumberCell, SduiPage, SduiPermissionProvider, type SduiProgressCell, SduiPropValue, type SduiRegistry, SduiRenderer, type SduiRendererProps, type SduiRowCondition, SduiRule, type SduiRuntime, type SduiSearchAction, type SduiSearchColumn, SduiSearchDataProvider, SduiSearchResults, type SduiSearchResultsProps, type SduiTagCell, SduiTextAlignScale, type SduiTextCell, SduiWeightScale, type SearchAction, type SearchColumn, type SearchFetcher, type SearchField, type SearchFilter, type SearchOption, type SearchPage, SearchResults, type SearchResultsProps, type SearchRow, SearchToolbar, type SearchValues, type SearchViewItem, Section, type SectionProps, SegmentedControl, type SegmentedControlProps, type SegmentedItem, Select, type SelectOption, type SelectOptionRecord, type SelectProps, Show, type ShowProps, SidebarNav, type SidebarNavItem, type SidebarNavProps, type SidebarNavSection, type SortDir, SortHandle, type SortHandleProps, SortableList, type SortableListProps, Spacer, type SpacerProps, type SpecIssue, Spinner, type SpinnerProps, StatCard, type StatCardProps, Switch, type SwitchProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextPreset, type TextProps, Textarea, type TextareaProps, Toast, type ToastProps, Tooltip, type TooltipProps, cascadingValuePaths, cellRenderer, cleanSearchValues, createRegistry, defaultAdapter, defaultRegistry, includesLooseSearch, joinMultiValue, normalizePageSizes, normalizeSearchText, searchFieldKeys, searchValuesFromParams, sortableDropIndex, sortableMove, splitMultiValue, useRemoteSearchPage, useSduiAssetResolver, useSduiCan, useSduiDispatch, useSduiRuntime, useSduiSandbox, useSearchFetcher, validateSpec };
|