sellmate-design-system-react 9.0.0-beta.24 → 9.0.0-beta.25
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/AGENTS.md +32 -2
- package/dist/components/SIcon/README.md +2 -0
- package/dist/components/SSystemActionButton/README.md +129 -0
- package/dist/components/SSystemActionButton/SSystemActionButton.d.ts +79 -0
- package/dist/components/SSystemActionButton/index.d.ts +2 -0
- package/dist/components/SSystemActionButton/systemActionButton.config.d.ts +87 -0
- package/dist/components/STag/README.md +2 -0
- package/dist/index.cjs +351 -176
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +346 -177
- package/dist/index.js.map +1 -1
- package/dist/llms-full.txt +161 -2
- package/dist/llms.txt +36 -4
- package/dist/styles.css +146 -1
- package/dist/theme.css +89 -1
- package/eslint/scale.gen.mjs +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4215,7 +4215,7 @@ function moveWithDepth(items, fromIndex, target, getDepth, setDepth, maxDepth) {
|
|
|
4215
4215
|
const nextDepth = target.intent === "inside" ? targetDepth + 1 : targetDepth;
|
|
4216
4216
|
const depthDelta = clampDepth(nextDepth, maxDepth) - sourceDepth;
|
|
4217
4217
|
const nextMovedItems = setDepth && depthDelta !== 0 ? movedItems.map(
|
|
4218
|
-
(
|
|
4218
|
+
(item2, index) => setDepth(item2, clampDepth(getDepth(item2, fromIndex + index) + depthDelta, maxDepth))
|
|
4219
4219
|
) : movedItems;
|
|
4220
4220
|
return [
|
|
4221
4221
|
...remainingItems.slice(0, insertionIndex),
|
|
@@ -4262,7 +4262,7 @@ function SDraggableListInner({
|
|
|
4262
4262
|
setDropTarget({ index, intent: "before" });
|
|
4263
4263
|
}, []);
|
|
4264
4264
|
const readDepth = useCallback(
|
|
4265
|
-
(
|
|
4265
|
+
(item2, index) => clampDepth(getDepth?.(item2, index) ?? 1, maxDepth),
|
|
4266
4266
|
[getDepth, maxDepth]
|
|
4267
4267
|
);
|
|
4268
4268
|
useEffect(() => {
|
|
@@ -4303,8 +4303,8 @@ function SDraggableListInner({
|
|
|
4303
4303
|
nextDropTarget = ratio < 0.5 ? { index, intent: "before" } : { index, intent: "after" };
|
|
4304
4304
|
break;
|
|
4305
4305
|
}
|
|
4306
|
-
const
|
|
4307
|
-
const canHaveChildren = (getCanHaveChildren?.(
|
|
4306
|
+
const item2 = items[index];
|
|
4307
|
+
const canHaveChildren = (getCanHaveChildren?.(item2, index) ?? true) && readDepth(item2, index) < maxDepth;
|
|
4308
4308
|
if (ratio < 0.25) {
|
|
4309
4309
|
nextDropTarget = { index, intent: "before" };
|
|
4310
4310
|
} else if (ratio > 0.75 || !canHaveChildren) {
|
|
@@ -4384,10 +4384,10 @@ function SDraggableListInner({
|
|
|
4384
4384
|
className: `${className ?? ""} ${dragContext ? "min-h-[40px]" : ""} ${showEmptyDrop ? "relative before:absolute before:left-0 before:right-0 before:top-0 before:z-10 before:h-[2px] before:bg-(--sys-color-border-accent) before:content-['']" : ""}`,
|
|
4385
4385
|
"data-draggable-group": dragContext ? dragGroup : void 0,
|
|
4386
4386
|
"data-draggable-list-id": dragContext ? listId : void 0,
|
|
4387
|
-
children: items.map((
|
|
4388
|
-
const itemKey = getKey(
|
|
4389
|
-
const disabled = (getDisabled?.(
|
|
4390
|
-
const depth = readDepth(
|
|
4387
|
+
children: items.map((item2, index) => {
|
|
4388
|
+
const itemKey = getKey(item2, index);
|
|
4389
|
+
const disabled = (getDisabled?.(item2, index) ?? false) || isDescendant(items, index, draggedSubtreeStart, usesDepth ? readDepth : void 0);
|
|
4390
|
+
const depth = readDepth(item2, index);
|
|
4391
4391
|
const showBefore = isDropTarget && currentDropIndex === index && (dragContext || currentDropIntent === "before");
|
|
4392
4392
|
const showInside = isDropTarget && currentDropIndex === index && !dragContext && usesDepth && currentDropIntent === "inside";
|
|
4393
4393
|
const showAfter = isDropTarget && (dragContext ? currentDropIndex === items.length && index === items.length - 1 : currentDropIndex === index && currentDropIntent === "after");
|
|
@@ -4411,7 +4411,7 @@ function SDraggableListInner({
|
|
|
4411
4411
|
onClick: selectItem,
|
|
4412
4412
|
onKeyDown: handleItemKeyDown,
|
|
4413
4413
|
className: `relative ${showBefore ? `before:absolute before:left-0 before:right-0 ${beforeIndicatorPosition} before:z-10 before:h-[2px] before:bg-(--sys-color-border-accent) before:content-['']` : ""} ${showAfter ? `after:absolute after:left-0 after:right-0 ${afterIndicatorPosition} after:z-10 after:h-[2px] after:bg-(--sys-color-border-accent) after:content-['']` : ""} ${showInside ? "outline outline-2 outline-offset-[-2px] outline-(--sys-color-border-accent)" : ""}`,
|
|
4414
|
-
children: renderItem(
|
|
4414
|
+
children: renderItem(item2, index, {
|
|
4415
4415
|
onDragHandleMouseDown: (event) => {
|
|
4416
4416
|
if (disabled) return;
|
|
4417
4417
|
if (dragContext && dragGroup && listId) {
|
|
@@ -5333,7 +5333,7 @@ var STreeImpl = /* @__PURE__ */ forwardRef(function STree({
|
|
|
5333
5333
|
}, ref) {
|
|
5334
5334
|
const [internalValue, setInternalValue] = useState(defaultValue ?? []);
|
|
5335
5335
|
const [internalExpandedIds, setInternalExpandedIds] = useState(
|
|
5336
|
-
defaultExpandedIds ?? items.filter((
|
|
5336
|
+
defaultExpandedIds ?? items.filter((item2) => item2.children?.length).map((item2) => item2.id)
|
|
5337
5337
|
);
|
|
5338
5338
|
const currentValue = value ?? internalValue;
|
|
5339
5339
|
const currentExpandedIds = expandedIds ?? internalExpandedIds;
|
|
@@ -6708,6 +6708,174 @@ function SSwitch({
|
|
|
6708
6708
|
}
|
|
6709
6709
|
);
|
|
6710
6710
|
}
|
|
6711
|
+
|
|
6712
|
+
// src/components/SSystemActionButton/systemActionButton.config.ts
|
|
6713
|
+
var SYSTEM_ACTION_BUTTON_COLORS = ["light", "dark", "darker"];
|
|
6714
|
+
var SYSTEM_ACTION_BUTTON_TYPES = [
|
|
6715
|
+
"account",
|
|
6716
|
+
"switch",
|
|
6717
|
+
"select",
|
|
6718
|
+
"subSelect",
|
|
6719
|
+
"status"
|
|
6720
|
+
];
|
|
6721
|
+
var item = (p) => `var(--cmp-gnb-system-item-${p})`;
|
|
6722
|
+
var action = (p) => `var(--cmp-gnb-system-actionButton-${p})`;
|
|
6723
|
+
var sys = (p) => `var(--sys-color-${p})`;
|
|
6724
|
+
var SYSTEM_ACTION_BUTTON_COLOR_CONFIG = {
|
|
6725
|
+
light: {
|
|
6726
|
+
bg: item("light-bg-default"),
|
|
6727
|
+
bgHover: item("light-bg-hover"),
|
|
6728
|
+
// light 의 아이콘 프레임 배경은 기본·hover 공통 한 값이다 (흰 면 위 흰 프레임)
|
|
6729
|
+
iconBg: item("light-icon-bg"),
|
|
6730
|
+
iconBgHover: item("light-icon-bg"),
|
|
6731
|
+
iconGlyph: item("light-icon-default"),
|
|
6732
|
+
iconGlyphHover: item("light-icon-default"),
|
|
6733
|
+
text: item("light-text"),
|
|
6734
|
+
actionText: {
|
|
6735
|
+
switch: action("switch-text-light"),
|
|
6736
|
+
selectData: action("selectData-text-light")
|
|
6737
|
+
},
|
|
6738
|
+
// 트레일링 아이콘 전용 색 토큰이 없다. light 는 item.icon.default 가
|
|
6739
|
+
// "actionButton/alertButton/setting 공통 글리프색"이라고 토큰에 명시돼 있다.
|
|
6740
|
+
actionIcon: item("light-icon-default")
|
|
6741
|
+
},
|
|
6742
|
+
dark: {
|
|
6743
|
+
bg: item("dark-bg-default"),
|
|
6744
|
+
bgHover: item("dark-bg-hover"),
|
|
6745
|
+
iconBg: item("dark-icon-bg-default"),
|
|
6746
|
+
iconBgHover: item("dark-icon-bg-hover"),
|
|
6747
|
+
// 어두운 면에는 글리프색 토큰이 없다. 기본은 프레임이 배경과 블렌딩되므로 라벨색(흰색),
|
|
6748
|
+
// hover 는 프레임이 흰색이 되므로 그 위에 표면색을 그대로 얹는다.
|
|
6749
|
+
iconGlyph: item("dark-text"),
|
|
6750
|
+
iconGlyphHover: item("dark-bg-hover"),
|
|
6751
|
+
text: item("dark-text"),
|
|
6752
|
+
actionText: {
|
|
6753
|
+
switch: action("switch-text-dark"),
|
|
6754
|
+
selectData: action("selectData-text-dark")
|
|
6755
|
+
},
|
|
6756
|
+
// TODO: 어두운 면의 트레일링 아이콘 색 토큰이 없다. 시안(#AAAAAA)에 맞는 시맨틱 토큰으로 둔다.
|
|
6757
|
+
actionIcon: sys("fg-quaternary")
|
|
6758
|
+
},
|
|
6759
|
+
darker: {
|
|
6760
|
+
bg: item("darker-bg-default"),
|
|
6761
|
+
bgHover: item("darker-bg-hover"),
|
|
6762
|
+
iconBg: item("darker-icon-bg-default"),
|
|
6763
|
+
iconBgHover: item("darker-icon-bg-hover"),
|
|
6764
|
+
iconGlyph: item("darker-text"),
|
|
6765
|
+
iconGlyphHover: item("darker-bg-hover"),
|
|
6766
|
+
text: item("darker-text"),
|
|
6767
|
+
actionText: {
|
|
6768
|
+
switch: action("switch-text-dark"),
|
|
6769
|
+
selectData: action("selectData-text-dark")
|
|
6770
|
+
},
|
|
6771
|
+
actionIcon: sys("fg-quaternary")
|
|
6772
|
+
}
|
|
6773
|
+
};
|
|
6774
|
+
var SYSTEM_ACTION_BUTTON_TYPE_CONFIG = {
|
|
6775
|
+
account: { fixedIcon: "user" },
|
|
6776
|
+
switch: {
|
|
6777
|
+
actionText: { token: "switch", typo: "typo-field-sm-default" },
|
|
6778
|
+
actionIcon: { name: "synchronize", size: action("switch-icon") }
|
|
6779
|
+
},
|
|
6780
|
+
select: {
|
|
6781
|
+
actionIcon: { name: "chevronRight", size: action("select-icon") }
|
|
6782
|
+
},
|
|
6783
|
+
subSelect: {
|
|
6784
|
+
actionText: { token: "selectData", typo: "typo-control-xs-medium" },
|
|
6785
|
+
actionIcon: { name: "chevronRight", size: action("selectData-icon") }
|
|
6786
|
+
},
|
|
6787
|
+
status: {
|
|
6788
|
+
// status 는 선행 아이콘 없이 태그가 라벨 자리를 차지한다
|
|
6789
|
+
actionIcon: { name: "chevronRight", size: action("select-icon") }
|
|
6790
|
+
}
|
|
6791
|
+
};
|
|
6792
|
+
var SYSTEM_ACTION_BUTTON_LAYOUT = {
|
|
6793
|
+
/** 행 높이 */
|
|
6794
|
+
height: item("height"),
|
|
6795
|
+
/** 행 라운드 */
|
|
6796
|
+
radius: item("radius"),
|
|
6797
|
+
/** 아이콘 프레임 한 변 */
|
|
6798
|
+
iconFrame: item("icon-frame"),
|
|
6799
|
+
/** 아이콘 글리프 크기 */
|
|
6800
|
+
iconGlyph: item("icon-glyph"),
|
|
6801
|
+
/** 아이콘 프레임 라운드 */
|
|
6802
|
+
iconRadius: item("icon-radius"),
|
|
6803
|
+
/** 아이콘 프레임 ↔ 라벨 간격 */
|
|
6804
|
+
iconLabelGap: item("iconLabelGap"),
|
|
6805
|
+
/** 좌측 여백 */
|
|
6806
|
+
paddingLeft: action("paddingLeft"),
|
|
6807
|
+
/** 우측 여백 */
|
|
6808
|
+
paddingRight: action("paddingRight"),
|
|
6809
|
+
/** 액션 텍스트 ↔ 액션 아이콘 간격 */
|
|
6810
|
+
actionGap: action("selectData-gap")
|
|
6811
|
+
};
|
|
6812
|
+
function TokenIcon({ name, size }) {
|
|
6813
|
+
return /* @__PURE__ */ jsx(SIcon, { name, size: "100%", style: { width: size, height: size } });
|
|
6814
|
+
}
|
|
6815
|
+
var SSystemActionButton = /* @__PURE__ */ forwardRef(
|
|
6816
|
+
function SSystemActionButton2({ color = "light", type, label, option, disabled = false, className, style, ...rest }, ref) {
|
|
6817
|
+
const c = SYSTEM_ACTION_BUTTON_COLOR_CONFIG[color];
|
|
6818
|
+
const spec = SYSTEM_ACTION_BUTTON_TYPE_CONFIG[type];
|
|
6819
|
+
const hoverable = !disabled;
|
|
6820
|
+
const status = type === "status" ? option : void 0;
|
|
6821
|
+
const resolvedIcon = spec.fixedIcon ?? option?.icon;
|
|
6822
|
+
const actionText = spec.actionText ? option?.text : void 0;
|
|
6823
|
+
const cssVars = {
|
|
6824
|
+
"--sab-bg": c.bg,
|
|
6825
|
+
"--sab-bg-hover": hoverable ? c.bgHover : c.bg,
|
|
6826
|
+
"--sab-icon-bg": c.iconBg,
|
|
6827
|
+
"--sab-icon-bg-hover": hoverable ? c.iconBgHover : c.iconBg,
|
|
6828
|
+
"--sab-icon-glyph": c.iconGlyph,
|
|
6829
|
+
"--sab-icon-glyph-hover": hoverable ? c.iconGlyphHover : c.iconGlyph,
|
|
6830
|
+
"--sab-text": c.text,
|
|
6831
|
+
"--sab-action-text": spec.actionText ? c.actionText[spec.actionText.token] : void 0,
|
|
6832
|
+
"--sab-action-icon": c.actionIcon,
|
|
6833
|
+
"minHeight": SYSTEM_ACTION_BUTTON_LAYOUT.height,
|
|
6834
|
+
"borderRadius": SYSTEM_ACTION_BUTTON_LAYOUT.radius,
|
|
6835
|
+
"paddingLeft": SYSTEM_ACTION_BUTTON_LAYOUT.paddingLeft,
|
|
6836
|
+
"paddingRight": SYSTEM_ACTION_BUTTON_LAYOUT.paddingRight,
|
|
6837
|
+
"gap": SYSTEM_ACTION_BUTTON_LAYOUT.iconLabelGap,
|
|
6838
|
+
...style
|
|
6839
|
+
};
|
|
6840
|
+
return /* @__PURE__ */ jsxs(
|
|
6841
|
+
"button",
|
|
6842
|
+
{
|
|
6843
|
+
ref,
|
|
6844
|
+
type: "button",
|
|
6845
|
+
disabled,
|
|
6846
|
+
className: cn(
|
|
6847
|
+
"group box-border flex w-full items-center border-none bg-(--sab-bg) text-left transition-colors",
|
|
6848
|
+
"hover:bg-(--sab-bg-hover)",
|
|
6849
|
+
disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer",
|
|
6850
|
+
className
|
|
6851
|
+
),
|
|
6852
|
+
style: cssVars,
|
|
6853
|
+
...rest,
|
|
6854
|
+
children: [
|
|
6855
|
+
resolvedIcon && /* @__PURE__ */ jsx(
|
|
6856
|
+
"span",
|
|
6857
|
+
{
|
|
6858
|
+
className: "inline-flex shrink-0 items-center justify-center bg-(--sab-icon-bg) text-(--sab-icon-glyph) transition-colors group-hover:bg-(--sab-icon-bg-hover) group-hover:text-(--sab-icon-glyph-hover)",
|
|
6859
|
+
style: { width: SYSTEM_ACTION_BUTTON_LAYOUT.iconFrame, height: SYSTEM_ACTION_BUTTON_LAYOUT.iconFrame, borderRadius: SYSTEM_ACTION_BUTTON_LAYOUT.iconRadius },
|
|
6860
|
+
children: /* @__PURE__ */ jsx(TokenIcon, { name: resolvedIcon, size: SYSTEM_ACTION_BUTTON_LAYOUT.iconGlyph })
|
|
6861
|
+
}
|
|
6862
|
+
),
|
|
6863
|
+
/* @__PURE__ */ jsx("span", { className: "typo-body-sm-semibold flex min-w-0 flex-1 items-center text-(--sab-text)", children: status ? /* @__PURE__ */ jsx(STag, { color: status.color ?? "blue", icon: "dot", label: status.label }) : /* @__PURE__ */ jsx("span", { className: "truncate", children: label }) }),
|
|
6864
|
+
(actionText != null || spec.actionIcon) && /* @__PURE__ */ jsxs("span", { className: "inline-flex shrink-0 items-center", style: { gap: SYSTEM_ACTION_BUTTON_LAYOUT.actionGap }, children: [
|
|
6865
|
+
actionText != null && spec.actionText && /* @__PURE__ */ jsx(
|
|
6866
|
+
"span",
|
|
6867
|
+
{
|
|
6868
|
+
className: cn(spec.actionText.typo, "whitespace-nowrap text-(--sab-action-text)"),
|
|
6869
|
+
children: actionText
|
|
6870
|
+
}
|
|
6871
|
+
),
|
|
6872
|
+
spec.actionIcon && /* @__PURE__ */ jsx("span", { className: "inline-flex shrink-0 items-center text-(--sab-action-icon)", children: /* @__PURE__ */ jsx(TokenIcon, { name: spec.actionIcon.name, size: spec.actionIcon.size }) })
|
|
6873
|
+
] })
|
|
6874
|
+
]
|
|
6875
|
+
}
|
|
6876
|
+
);
|
|
6877
|
+
}
|
|
6878
|
+
);
|
|
6711
6879
|
var SIZE_CLASSES = {
|
|
6712
6880
|
xs: "h-[24px] px-[8px] text-[12px] font-normal leading-[20px]",
|
|
6713
6881
|
sm: "h-[28px] px-[12px] text-[14px] font-medium leading-[24px]"
|
|
@@ -8494,17 +8662,17 @@ var GNB_TOP_ICON_GAP = 8;
|
|
|
8494
8662
|
var GNB_TOP_ICON_SIZE = 24;
|
|
8495
8663
|
var GNB_FULL_LOGO_WIDTH_NO_LAUNCHER = GNB_FULL_LOGO_WIDTH + GNB_TOP_ICON_SIZE + GNB_TOP_ICON_GAP;
|
|
8496
8664
|
function findGnbRailValue(items, value) {
|
|
8497
|
-
if (items.some((
|
|
8665
|
+
if (items.some((item2) => item2.value === value)) return value;
|
|
8498
8666
|
return findGnbAncestors(items, value)[0];
|
|
8499
8667
|
}
|
|
8500
8668
|
function findGnbSiblingValues(items, value) {
|
|
8501
8669
|
const walk = (list) => {
|
|
8502
|
-
if (list.some((
|
|
8503
|
-
return list.filter((
|
|
8670
|
+
if (list.some((item2) => item2.value === value)) {
|
|
8671
|
+
return list.filter((item2) => item2.value !== value).map((item2) => item2.value);
|
|
8504
8672
|
}
|
|
8505
|
-
for (const
|
|
8506
|
-
if (
|
|
8507
|
-
const found = walk(
|
|
8673
|
+
for (const item2 of list) {
|
|
8674
|
+
if (item2.children) {
|
|
8675
|
+
const found = walk(item2.children);
|
|
8508
8676
|
if (found) return found;
|
|
8509
8677
|
}
|
|
8510
8678
|
}
|
|
@@ -8514,10 +8682,10 @@ function findGnbSiblingValues(items, value) {
|
|
|
8514
8682
|
}
|
|
8515
8683
|
function findGnbAncestors(items, value) {
|
|
8516
8684
|
const walk = (list, trail) => {
|
|
8517
|
-
for (const
|
|
8518
|
-
if (
|
|
8519
|
-
if (
|
|
8520
|
-
const found = walk(
|
|
8685
|
+
for (const item2 of list) {
|
|
8686
|
+
if (item2.value === value) return trail;
|
|
8687
|
+
if (item2.children) {
|
|
8688
|
+
const found = walk(item2.children, [...trail, item2.value]);
|
|
8521
8689
|
if (found) return found;
|
|
8522
8690
|
}
|
|
8523
8691
|
}
|
|
@@ -8527,20 +8695,20 @@ function findGnbAncestors(items, value) {
|
|
|
8527
8695
|
}
|
|
8528
8696
|
function findGnbDescendantBranchValues(items, value) {
|
|
8529
8697
|
const find = (list) => {
|
|
8530
|
-
for (const
|
|
8531
|
-
if (
|
|
8532
|
-
if (
|
|
8533
|
-
const found = find(
|
|
8698
|
+
for (const item2 of list) {
|
|
8699
|
+
if (item2.value === value) return item2;
|
|
8700
|
+
if (item2.children) {
|
|
8701
|
+
const found = find(item2.children);
|
|
8534
8702
|
if (found) return found;
|
|
8535
8703
|
}
|
|
8536
8704
|
}
|
|
8537
8705
|
return void 0;
|
|
8538
8706
|
};
|
|
8539
8707
|
const collect = (list, acc) => {
|
|
8540
|
-
for (const
|
|
8541
|
-
if (
|
|
8542
|
-
acc.push(
|
|
8543
|
-
collect(
|
|
8708
|
+
for (const item2 of list) {
|
|
8709
|
+
if (item2.children && item2.children.length > 0) {
|
|
8710
|
+
acc.push(item2.value);
|
|
8711
|
+
collect(item2.children, acc);
|
|
8544
8712
|
}
|
|
8545
8713
|
}
|
|
8546
8714
|
return acc;
|
|
@@ -8583,7 +8751,7 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
|
8583
8751
|
const type = typeProp ?? layout?.type ?? "box";
|
|
8584
8752
|
const folded = foldedProp ?? layout?.folded ?? false;
|
|
8585
8753
|
const useRail = useRailProp ?? layout?.useRail ?? false;
|
|
8586
|
-
const railHasLeaf = useRail && items.some((
|
|
8754
|
+
const railHasLeaf = useRail && items.some((item2) => !item2.children || item2.children.length === 0);
|
|
8587
8755
|
const header = railHasLeaf ? "full" : headerProp ?? layout?.header ?? "fix";
|
|
8588
8756
|
const H = GNB_HEADER[header];
|
|
8589
8757
|
const M = GNB_MENU[type];
|
|
@@ -8626,13 +8794,13 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
|
8626
8794
|
labelTipHideRef.current = setTimeout(() => setLabelTip(null), LABEL_TIP_HIDE_DELAY_MS);
|
|
8627
8795
|
};
|
|
8628
8796
|
useEffect(() => cancelLabelTipHide, []);
|
|
8629
|
-
const rowHoverProps = (
|
|
8797
|
+
const rowHoverProps = (item2) => ({
|
|
8630
8798
|
onMouseEnter: (event) => {
|
|
8631
|
-
setHoveredKey(
|
|
8632
|
-
showLabelTipIfTruncated(event.currentTarget,
|
|
8799
|
+
setHoveredKey(item2.value);
|
|
8800
|
+
showLabelTipIfTruncated(event.currentTarget, item2.label);
|
|
8633
8801
|
},
|
|
8634
8802
|
onMouseLeave: () => {
|
|
8635
|
-
setHoveredKey((prev) => prev ===
|
|
8803
|
+
setHoveredKey((prev) => prev === item2.value ? null : prev);
|
|
8636
8804
|
startLabelTipHide();
|
|
8637
8805
|
}
|
|
8638
8806
|
});
|
|
@@ -8658,7 +8826,7 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
|
8658
8826
|
}, [items, value]);
|
|
8659
8827
|
useEffect(() => {
|
|
8660
8828
|
setActiveRail(
|
|
8661
|
-
(prev) => prev !== void 0 && items.some((
|
|
8829
|
+
(prev) => prev !== void 0 && items.some((item2) => item2.value === prev) ? prev : items[0]?.value
|
|
8662
8830
|
);
|
|
8663
8831
|
}, [items]);
|
|
8664
8832
|
const toggleExpand = (key) => {
|
|
@@ -8675,33 +8843,33 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
|
8675
8843
|
return next;
|
|
8676
8844
|
});
|
|
8677
8845
|
};
|
|
8678
|
-
const handleItemClick = (
|
|
8679
|
-
if (
|
|
8680
|
-
if (
|
|
8681
|
-
toggleExpand(
|
|
8846
|
+
const handleItemClick = (item2) => {
|
|
8847
|
+
if (item2.disabled) return;
|
|
8848
|
+
if (item2.children && item2.children.length > 0) {
|
|
8849
|
+
toggleExpand(item2.value);
|
|
8682
8850
|
return;
|
|
8683
8851
|
}
|
|
8684
|
-
onValueChange?.(
|
|
8852
|
+
onValueChange?.(item2.value);
|
|
8685
8853
|
};
|
|
8686
|
-
const handleRailClick = (
|
|
8687
|
-
if (
|
|
8688
|
-
setActiveRail(
|
|
8689
|
-
onRailChange?.(
|
|
8690
|
-
if (!
|
|
8854
|
+
const handleRailClick = (item2) => {
|
|
8855
|
+
if (item2.disabled) return;
|
|
8856
|
+
setActiveRail(item2.value);
|
|
8857
|
+
onRailChange?.(item2.value);
|
|
8858
|
+
if (!item2.children || item2.children.length === 0) onValueChange?.(item2.value);
|
|
8691
8859
|
};
|
|
8692
8860
|
const handleFoldToggle = () => {
|
|
8693
8861
|
const next = !folded;
|
|
8694
8862
|
onFoldChange?.(next);
|
|
8695
8863
|
if (foldedProp === void 0) layout?.setFolded(next);
|
|
8696
8864
|
};
|
|
8697
|
-
const renderRailItem = (
|
|
8698
|
-
const isActive =
|
|
8699
|
-
const isHovered = hoveredKey ===
|
|
8865
|
+
const renderRailItem = (item2) => {
|
|
8866
|
+
const isActive = item2.value === activeRail;
|
|
8867
|
+
const isHovered = hoveredKey === item2.value && !item2.disabled;
|
|
8700
8868
|
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
8701
8869
|
"button",
|
|
8702
8870
|
{
|
|
8703
8871
|
type: "button",
|
|
8704
|
-
disabled:
|
|
8872
|
+
disabled: item2.disabled,
|
|
8705
8873
|
"aria-current": isActive ? "true" : void 0,
|
|
8706
8874
|
className: "box-border flex select-none flex-col items-center border-none bg-transparent transition-colors duration-150",
|
|
8707
8875
|
style: {
|
|
@@ -8716,31 +8884,31 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
|
8716
8884
|
fontSize: GNB_RAIL.itemFontSize,
|
|
8717
8885
|
lineHeight: `${GNB_RAIL.itemLineHeight}px`,
|
|
8718
8886
|
fontWeight: isActive ? GNB_RAIL.itemFontWeightSelected : GNB_RAIL.itemFontWeight,
|
|
8719
|
-
opacity:
|
|
8720
|
-
cursor:
|
|
8887
|
+
opacity: item2.disabled ? 0.4 : 1,
|
|
8888
|
+
cursor: item2.disabled ? "not-allowed" : "pointer"
|
|
8721
8889
|
},
|
|
8722
|
-
onClick: () => handleRailClick(
|
|
8723
|
-
...rowHoverProps(
|
|
8890
|
+
onClick: () => handleRailClick(item2),
|
|
8891
|
+
...rowHoverProps(item2),
|
|
8724
8892
|
children: [
|
|
8725
|
-
|
|
8893
|
+
item2.icon && /* @__PURE__ */ jsx(SIcon, { name: item2.icon, size: GNB_RAIL.itemIcon, className: "shrink-0" }),
|
|
8726
8894
|
/* @__PURE__ */ jsx(
|
|
8727
8895
|
"span",
|
|
8728
8896
|
{
|
|
8729
8897
|
"data-gnb-label": true,
|
|
8730
8898
|
className: "w-full overflow-hidden text-ellipsis whitespace-nowrap text-center",
|
|
8731
|
-
children:
|
|
8899
|
+
children: item2.label
|
|
8732
8900
|
}
|
|
8733
8901
|
)
|
|
8734
8902
|
]
|
|
8735
8903
|
}
|
|
8736
|
-
) },
|
|
8904
|
+
) }, item2.value);
|
|
8737
8905
|
};
|
|
8738
|
-
const renderItem = (
|
|
8739
|
-
const hasChildren = !!(
|
|
8740
|
-
const isSelected = !hasChildren &&
|
|
8741
|
-
const isExpanded = expandedKeys.has(
|
|
8742
|
-
const isHovered = hoveredKey ===
|
|
8743
|
-
const iconBranch = depth === 1 ? !!
|
|
8906
|
+
const renderItem = (item2, depth, branchHasIcon = false) => {
|
|
8907
|
+
const hasChildren = !!(item2.children && item2.children.length > 0);
|
|
8908
|
+
const isSelected = !hasChildren && item2.value === value;
|
|
8909
|
+
const isExpanded = expandedKeys.has(item2.value);
|
|
8910
|
+
const isHovered = hoveredKey === item2.value && !item2.disabled;
|
|
8911
|
+
const iconBranch = depth === 1 ? !!item2.icon : branchHasIcon;
|
|
8744
8912
|
const itemStyle = {
|
|
8745
8913
|
gap: M.itemGap,
|
|
8746
8914
|
paddingTop: M.itemPaddingY,
|
|
@@ -8757,8 +8925,8 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
|
8757
8925
|
fontSize: depth === 1 ? M.depth1FontSize : M.itemFontSize,
|
|
8758
8926
|
lineHeight: `${depth === 1 ? M.depth1LineHeight : M.itemLineHeight}px`,
|
|
8759
8927
|
fontWeight: depth === 1 ? M.depth1FontWeight : isSelected ? M.itemFontWeightSelected : M.itemFontWeight,
|
|
8760
|
-
opacity:
|
|
8761
|
-
cursor:
|
|
8928
|
+
opacity: item2.disabled ? 0.4 : 1,
|
|
8929
|
+
cursor: item2.disabled ? "not-allowed" : "pointer"
|
|
8762
8930
|
};
|
|
8763
8931
|
return (
|
|
8764
8932
|
// li 를 flex-col 로 둬야 버튼이 좌우 마진만큼 안쪽으로 들어가고,
|
|
@@ -8768,18 +8936,18 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
|
8768
8936
|
"button",
|
|
8769
8937
|
{
|
|
8770
8938
|
type: "button",
|
|
8771
|
-
disabled:
|
|
8939
|
+
disabled: item2.disabled,
|
|
8772
8940
|
"aria-expanded": hasChildren ? isExpanded : void 0,
|
|
8773
8941
|
"aria-current": isSelected ? "page" : void 0,
|
|
8774
8942
|
className: "box-border flex select-none items-center border-none bg-transparent text-left transition-colors duration-150",
|
|
8775
8943
|
style: itemStyle,
|
|
8776
|
-
onClick: () => handleItemClick(
|
|
8777
|
-
...rowHoverProps(
|
|
8944
|
+
onClick: () => handleItemClick(item2),
|
|
8945
|
+
...rowHoverProps(item2),
|
|
8778
8946
|
children: [
|
|
8779
|
-
depth === 1 &&
|
|
8947
|
+
depth === 1 && item2.icon && /* @__PURE__ */ jsx(
|
|
8780
8948
|
SIcon,
|
|
8781
8949
|
{
|
|
8782
|
-
name:
|
|
8950
|
+
name: item2.icon,
|
|
8783
8951
|
size: M.depth1Icon,
|
|
8784
8952
|
color: isSelected ? C.itemColorActive : C.itemIcon,
|
|
8785
8953
|
className: "shrink-0"
|
|
@@ -8799,17 +8967,17 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
|
8799
8967
|
{
|
|
8800
8968
|
"data-gnb-label": true,
|
|
8801
8969
|
className: "min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
8802
|
-
children:
|
|
8970
|
+
children: item2.label
|
|
8803
8971
|
}
|
|
8804
8972
|
)
|
|
8805
8973
|
] }),
|
|
8806
|
-
|
|
8974
|
+
item2.tag !== void 0 && item2.tag !== "" && /* @__PURE__ */ jsx(
|
|
8807
8975
|
STag,
|
|
8808
8976
|
{
|
|
8809
8977
|
shape: "square",
|
|
8810
8978
|
size: "xs",
|
|
8811
|
-
color:
|
|
8812
|
-
label:
|
|
8979
|
+
color: item2.tagColor ?? "blue",
|
|
8980
|
+
label: item2.tag,
|
|
8813
8981
|
className: "shrink-0"
|
|
8814
8982
|
}
|
|
8815
8983
|
),
|
|
@@ -8842,16 +9010,16 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
|
8842
9010
|
visibility: isExpanded ? "visible" : "hidden",
|
|
8843
9011
|
transition: `visibility 0s linear ${isExpanded ? "0s" : `${GNB_EXPAND_MS}ms`}`
|
|
8844
9012
|
},
|
|
8845
|
-
children:
|
|
9013
|
+
children: item2.children.map((child) => renderItem(child, depth + 1, iconBranch))
|
|
8846
9014
|
}
|
|
8847
9015
|
)
|
|
8848
9016
|
}
|
|
8849
9017
|
)
|
|
8850
|
-
] },
|
|
9018
|
+
] }, item2.value)
|
|
8851
9019
|
);
|
|
8852
9020
|
};
|
|
8853
9021
|
const railItems = useRail ? items : [];
|
|
8854
|
-
const menuItems = useRail ? items.find((
|
|
9022
|
+
const menuItems = useRail ? items.find((item2) => item2.value === activeRail)?.children ?? [] : items;
|
|
8855
9023
|
const showMenu = !useRail || menuItems.length > 0;
|
|
8856
9024
|
const [uncontrolledMenuWidth, setUncontrolledMenuWidth] = useState(
|
|
8857
9025
|
() => defaultMenuWidth ?? GNB_MENU_WIDTH
|
|
@@ -9158,7 +9326,7 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
|
9158
9326
|
paddingTop: M.bodyPaddingY,
|
|
9159
9327
|
paddingBottom: M.bodyPaddingY
|
|
9160
9328
|
},
|
|
9161
|
-
children: /* @__PURE__ */ jsx("ul", { className: "m-0 flex list-none flex-col p-0", children: menuItems.map((
|
|
9329
|
+
children: /* @__PURE__ */ jsx("ul", { className: "m-0 flex list-none flex-col p-0", children: menuItems.map((item2) => renderItem(item2, 1)) })
|
|
9162
9330
|
}
|
|
9163
9331
|
),
|
|
9164
9332
|
menuFooter && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: menuFooter })
|
|
@@ -9809,19 +9977,19 @@ var STEPPER_VERTICAL_COLORS = {
|
|
|
9809
9977
|
errorBadge: "#FB4444"
|
|
9810
9978
|
};
|
|
9811
9979
|
var ERROR_TOOLTIP_MESSAGE = "\uD655\uC778\uC774 \uD544\uC694\uD55C \uD56D\uBAA9\uC774 \uC788\uC2B5\uB2C8\uB2E4.";
|
|
9812
|
-
function getItemValue(
|
|
9813
|
-
return
|
|
9980
|
+
function getItemValue(item2, index) {
|
|
9981
|
+
return item2.value ?? String(index + 1);
|
|
9814
9982
|
}
|
|
9815
9983
|
function groupAdjacentItems(items) {
|
|
9816
9984
|
return items.reduce(
|
|
9817
|
-
(groups,
|
|
9818
|
-
const currentGroup =
|
|
9985
|
+
(groups, item2, index) => {
|
|
9986
|
+
const currentGroup = item2.group;
|
|
9819
9987
|
const previous = groups[groups.length - 1];
|
|
9820
9988
|
if (currentGroup && previous?.group === currentGroup) {
|
|
9821
|
-
previous.items.push(
|
|
9989
|
+
previous.items.push(item2);
|
|
9822
9990
|
return groups;
|
|
9823
9991
|
}
|
|
9824
|
-
groups.push({ group: currentGroup, startIndex: index, items: [
|
|
9992
|
+
groups.push({ group: currentGroup, startIndex: index, items: [item2] });
|
|
9825
9993
|
return groups;
|
|
9826
9994
|
},
|
|
9827
9995
|
[]
|
|
@@ -9851,15 +10019,15 @@ var SStepper = /* @__PURE__ */ forwardRef(function SStepper2({
|
|
|
9851
10019
|
const verticalItemRefs = useRef([]);
|
|
9852
10020
|
const activeIndex = Math.max(
|
|
9853
10021
|
0,
|
|
9854
|
-
items.findIndex((
|
|
10022
|
+
items.findIndex((item2, index) => getItemValue(item2, index) === value)
|
|
9855
10023
|
);
|
|
9856
10024
|
const lastCompletedIndex = items.reduce(
|
|
9857
|
-
(lastIndex,
|
|
10025
|
+
(lastIndex, item2, index) => item2.completed === true ? index : lastIndex,
|
|
9858
10026
|
-1
|
|
9859
10027
|
);
|
|
9860
10028
|
const resolvedClickableIndex = lastCompletedIndex + 1;
|
|
9861
10029
|
const [visitedMaxIndex, setVisitedMaxIndex] = useState(activeIndex);
|
|
9862
|
-
const firstErrorIndex = items.findIndex((
|
|
10030
|
+
const firstErrorIndex = items.findIndex((item2) => item2.error === true);
|
|
9863
10031
|
useImperativeHandle(
|
|
9864
10032
|
ref,
|
|
9865
10033
|
() => ({
|
|
@@ -9887,18 +10055,18 @@ var SStepper = /* @__PURE__ */ forwardRef(function SStepper2({
|
|
|
9887
10055
|
transform: `translateY(${activeItem.offsetTop}px)`
|
|
9888
10056
|
});
|
|
9889
10057
|
}, [activeIndex, vertical, items]);
|
|
9890
|
-
const getState = (
|
|
10058
|
+
const getState = (item2, index) => {
|
|
9891
10059
|
if (index === activeIndex) return "active";
|
|
9892
|
-
if (
|
|
10060
|
+
if (item2.completed != null) return item2.completed ? "completed" : "default";
|
|
9893
10061
|
return "default";
|
|
9894
10062
|
};
|
|
9895
|
-
const emitValueChange = (
|
|
9896
|
-
onValueChange?.(getItemValue(
|
|
10063
|
+
const emitValueChange = (item2, index) => {
|
|
10064
|
+
onValueChange?.(getItemValue(item2, index), item2, index);
|
|
9897
10065
|
};
|
|
9898
10066
|
const isWithinClickableIndex = (index) => index <= resolvedClickableIndex;
|
|
9899
|
-
const renderStepContent = (
|
|
10067
|
+
const renderStepContent = (item2, index, options = {}) => {
|
|
9900
10068
|
const { isVertical = false, roleListItem = true, hovered = false } = options;
|
|
9901
|
-
const state2 = getState(
|
|
10069
|
+
const state2 = getState(item2, index);
|
|
9902
10070
|
const isHorizontalCompleted = !isVertical && state2 === "completed";
|
|
9903
10071
|
const isVerticalCompleted = isVertical && state2 === "completed";
|
|
9904
10072
|
const isVerticalLastActive = isVertical && state2 === "default" && index === visitedMaxIndex;
|
|
@@ -9973,12 +10141,12 @@ var SStepper = /* @__PURE__ */ forwardRef(function SStepper2({
|
|
|
9973
10141
|
children: showsCheckIcon ? /* @__PURE__ */ jsx(SIcon, { name: "check", size: STEPPER_LAYOUT.sequenceIcon, color: "currentColor" }) : index + 1
|
|
9974
10142
|
}
|
|
9975
10143
|
),
|
|
9976
|
-
/* @__PURE__ */ jsx("span", { children:
|
|
10144
|
+
/* @__PURE__ */ jsx("span", { children: item2.label })
|
|
9977
10145
|
]
|
|
9978
10146
|
}
|
|
9979
10147
|
);
|
|
9980
10148
|
};
|
|
9981
|
-
const renderClickableStepContent = (
|
|
10149
|
+
const renderClickableStepContent = (item2, index, isVertical = false) => {
|
|
9982
10150
|
const isDisabled = !isWithinClickableIndex(index);
|
|
9983
10151
|
return /* @__PURE__ */ jsx(
|
|
9984
10152
|
"button",
|
|
@@ -9991,9 +10159,9 @@ var SStepper = /* @__PURE__ */ forwardRef(function SStepper2({
|
|
|
9991
10159
|
),
|
|
9992
10160
|
style: { font: "inherit", color: "inherit" },
|
|
9993
10161
|
onClick: () => {
|
|
9994
|
-
if (!isDisabled) emitValueChange(
|
|
10162
|
+
if (!isDisabled) emitValueChange(item2, index);
|
|
9995
10163
|
},
|
|
9996
|
-
children: renderStepContent(
|
|
10164
|
+
children: renderStepContent(item2, index, { isVertical, roleListItem: false })
|
|
9997
10165
|
}
|
|
9998
10166
|
);
|
|
9999
10167
|
};
|
|
@@ -10052,10 +10220,10 @@ var SStepper = /* @__PURE__ */ forwardRef(function SStepper2({
|
|
|
10052
10220
|
children: /* @__PURE__ */ jsx("span", { className: "whitespace-nowrap", children: group.group })
|
|
10053
10221
|
}
|
|
10054
10222
|
),
|
|
10055
|
-
group.items.map((
|
|
10223
|
+
group.items.map((item2, itemIndex) => {
|
|
10056
10224
|
const index = group.startIndex + itemIndex;
|
|
10057
|
-
const state2 = getState(
|
|
10058
|
-
const itemValue = getItemValue(
|
|
10225
|
+
const state2 = getState(item2, index);
|
|
10226
|
+
const itemValue = getItemValue(item2, index);
|
|
10059
10227
|
const canClickItem = isClickable && isWithinClickableIndex(index);
|
|
10060
10228
|
const isDisabled = !canClickItem;
|
|
10061
10229
|
const isHovered = hoveredIndex === index && canClickItem && state2 !== "active";
|
|
@@ -10073,12 +10241,12 @@ var SStepper = /* @__PURE__ */ forwardRef(function SStepper2({
|
|
|
10073
10241
|
const handleMouseLeave = () => {
|
|
10074
10242
|
setHoveredIndex((current) => current === index ? null : current);
|
|
10075
10243
|
};
|
|
10076
|
-
const stepContent = renderStepContent(
|
|
10244
|
+
const stepContent = renderStepContent(item2, index, {
|
|
10077
10245
|
isVertical: true,
|
|
10078
10246
|
roleListItem: false,
|
|
10079
10247
|
hovered: isHovered
|
|
10080
10248
|
});
|
|
10081
|
-
const errorBadge =
|
|
10249
|
+
const errorBadge = item2.error ? /* @__PURE__ */ jsx(
|
|
10082
10250
|
"span",
|
|
10083
10251
|
{
|
|
10084
10252
|
"aria-hidden": "true",
|
|
@@ -10093,7 +10261,7 @@ var SStepper = /* @__PURE__ */ forwardRef(function SStepper2({
|
|
|
10093
10261
|
) : null;
|
|
10094
10262
|
const isTooltipHovered = tooltipHoverValue === itemValue;
|
|
10095
10263
|
const isCustomTooltipOpen = customTooltipOpen && index === firstErrorIndex;
|
|
10096
|
-
const showTooltip =
|
|
10264
|
+
const showTooltip = item2.error === true && (isTooltipHovered || isCustomTooltipOpen);
|
|
10097
10265
|
const handleTooltipMouseEnter = () => setTooltipHoverValue(itemValue);
|
|
10098
10266
|
const handleTooltipMouseLeave = () => {
|
|
10099
10267
|
setTooltipHoverValue((current) => current === itemValue ? null : current);
|
|
@@ -10117,7 +10285,7 @@ var SStepper = /* @__PURE__ */ forwardRef(function SStepper2({
|
|
|
10117
10285
|
onMouseEnter: handleTooltipMouseEnter,
|
|
10118
10286
|
onMouseLeave: handleTooltipMouseLeave,
|
|
10119
10287
|
onClick: isClickable ? () => {
|
|
10120
|
-
if (!isDisabled) emitValueChange(
|
|
10288
|
+
if (!isDisabled) emitValueChange(item2, index);
|
|
10121
10289
|
} : void 0,
|
|
10122
10290
|
children: [
|
|
10123
10291
|
stepContent,
|
|
@@ -10149,13 +10317,13 @@ var SStepper = /* @__PURE__ */ forwardRef(function SStepper2({
|
|
|
10149
10317
|
{
|
|
10150
10318
|
type: "button",
|
|
10151
10319
|
disabled: isDisabled,
|
|
10152
|
-
"aria-label":
|
|
10320
|
+
"aria-label": item2.label,
|
|
10153
10321
|
className: cn(
|
|
10154
10322
|
"absolute inset-0 z-[2] m-0 border-0 bg-transparent p-0 text-left outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-(--sys-color-border-accent)",
|
|
10155
10323
|
isDisabled ? "cursor-default" : "cursor-pointer"
|
|
10156
10324
|
),
|
|
10157
10325
|
onClick: () => {
|
|
10158
|
-
if (!isDisabled) emitValueChange(
|
|
10326
|
+
if (!isDisabled) emitValueChange(item2, index);
|
|
10159
10327
|
}
|
|
10160
10328
|
}
|
|
10161
10329
|
),
|
|
@@ -10206,9 +10374,9 @@ var SStepper = /* @__PURE__ */ forwardRef(function SStepper2({
|
|
|
10206
10374
|
lineHeight: config.lineHeight,
|
|
10207
10375
|
...style
|
|
10208
10376
|
},
|
|
10209
|
-
children: items.map((
|
|
10210
|
-
const state2 = getState(
|
|
10211
|
-
const content = isClickable ? /* @__PURE__ */ jsx("span", { role: "listitem", "aria-current": state2 === "active" ? "step" : void 0, children: renderClickableStepContent(
|
|
10377
|
+
children: items.map((item2, index) => {
|
|
10378
|
+
const state2 = getState(item2, index);
|
|
10379
|
+
const content = isClickable ? /* @__PURE__ */ jsx("span", { role: "listitem", "aria-current": state2 === "active" ? "step" : void 0, children: renderClickableStepContent(item2, index) }) : renderStepContent(item2, index);
|
|
10212
10380
|
return /* @__PURE__ */ jsxs(
|
|
10213
10381
|
"span",
|
|
10214
10382
|
{
|
|
@@ -10242,7 +10410,7 @@ var SStepper = /* @__PURE__ */ forwardRef(function SStepper2({
|
|
|
10242
10410
|
)
|
|
10243
10411
|
]
|
|
10244
10412
|
},
|
|
10245
|
-
getItemValue(
|
|
10413
|
+
getItemValue(item2, index)
|
|
10246
10414
|
);
|
|
10247
10415
|
})
|
|
10248
10416
|
}
|
|
@@ -10785,7 +10953,7 @@ var SSelectImpl = /* @__PURE__ */ forwardRef(function SSelect({
|
|
|
10785
10953
|
const selectedAnchorIndex = useMemo(() => {
|
|
10786
10954
|
if (selected.length === 0) return -1;
|
|
10787
10955
|
const selectedSet = new Set(selected);
|
|
10788
|
-
return navigableItems.findIndex((
|
|
10956
|
+
return navigableItems.findIndex((item2) => item2.value != null && selectedSet.has(item2.value));
|
|
10789
10957
|
}, [navigableItems, selected]);
|
|
10790
10958
|
selectedAnchorRef.current = selectedAnchorIndex;
|
|
10791
10959
|
const triggerText = (() => {
|
|
@@ -11078,7 +11246,7 @@ var SSelectImpl = /* @__PURE__ */ forwardRef(function SSelect({
|
|
|
11078
11246
|
setFocusedIndex(-1);
|
|
11079
11247
|
return;
|
|
11080
11248
|
}
|
|
11081
|
-
const index = navigableItems.findIndex((
|
|
11249
|
+
const index = navigableItems.findIndex((item2) => item2.key === key);
|
|
11082
11250
|
if (index >= 0) setFocusedIndex(index);
|
|
11083
11251
|
}
|
|
11084
11252
|
}
|
|
@@ -11943,11 +12111,12 @@ var STable = /* @__PURE__ */ forwardRef(function STable2({
|
|
|
11943
12111
|
]
|
|
11944
12112
|
}
|
|
11945
12113
|
),
|
|
11946
|
-
(showPagination ||
|
|
12114
|
+
(showPagination || useRowsPerPageSelect) && // 원본 sd-table__pagination: 테이블 하단에 이어붙는 회색 바(높이 48px, margin-top:-1px로 테두리 겹침).
|
|
11947
12115
|
// SPagination은 전체 폭 기준 중앙, rows-per-page SSelect는 우측에 absolute 배치해 중앙 정렬을 유지한다.
|
|
11948
12116
|
// 루트 높이가 확정된 경우(테이블이 남은 영역을 채우는 배치) 페이지네이션 바가
|
|
11949
12117
|
// 눌리지 않도록 shrink-0으로 48px를 보장한다.
|
|
11950
|
-
// 페이지네이션이 없어도
|
|
12118
|
+
// 페이지네이션이 없어도 rows-per-page 셀렉트가 있으면 이 바를 그린다 — 셀렉트와
|
|
12119
|
+
// 밀도 토글이 사는 곳이 여기다. dense 만으로는 그리지 않는다(빈 바가 남는다).
|
|
11951
12120
|
/* @__PURE__ */ jsxs(
|
|
11952
12121
|
"div",
|
|
11953
12122
|
{
|
|
@@ -11958,7 +12127,7 @@ var STable = /* @__PURE__ */ forwardRef(function STable2({
|
|
|
11958
12127
|
),
|
|
11959
12128
|
children: [
|
|
11960
12129
|
showPagination && /* @__PURE__ */ jsx(SPagination, { currentPage: displayPage, lastPage, onPageChange: changePage }),
|
|
11961
|
-
|
|
12130
|
+
useRowsPerPageSelect && /* @__PURE__ */ jsxs("div", { className: "absolute right-[10px] top-1/2 flex -translate-y-1/2 items-center gap-[12px]", children: [
|
|
11962
12131
|
dense && /* @__PURE__ */ jsx(
|
|
11963
12132
|
STextLink,
|
|
11964
12133
|
{
|
|
@@ -11970,8 +12139,8 @@ var STable = /* @__PURE__ */ forwardRef(function STable2({
|
|
|
11970
12139
|
onClick: () => changeDense(!innerDense)
|
|
11971
12140
|
}
|
|
11972
12141
|
),
|
|
11973
|
-
dense &&
|
|
11974
|
-
|
|
12142
|
+
dense && /* @__PURE__ */ jsx(SDivider, { vertical: true, className: "my-[6px]" }),
|
|
12143
|
+
/* @__PURE__ */ jsx(
|
|
11975
12144
|
SSelect2,
|
|
11976
12145
|
{
|
|
11977
12146
|
options: rowsPerPageOption,
|
|
@@ -13048,7 +13217,7 @@ function SCalendar({
|
|
|
13048
13217
|
}) }),
|
|
13049
13218
|
legend.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13050
13219
|
/* @__PURE__ */ jsx(SDivider, {}),
|
|
13051
|
-
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center justify-center gap-x-[var(--cmp-datepicker-calendar-legend-group-gap)] gap-y-[4px] text-[11px] leading-[18px]", children: legend.map((
|
|
13220
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center justify-center gap-x-[var(--cmp-datepicker-calendar-legend-group-gap)] gap-y-[4px] text-[11px] leading-[18px]", children: legend.map((item2) => /* @__PURE__ */ jsxs(
|
|
13052
13221
|
"span",
|
|
13053
13222
|
{
|
|
13054
13223
|
className: "inline-flex items-center gap-[var(--cmp-datepicker-calendar-legend-gap)]",
|
|
@@ -13057,14 +13226,14 @@ function SCalendar({
|
|
|
13057
13226
|
"span",
|
|
13058
13227
|
{
|
|
13059
13228
|
className: "h-[var(--cmp-datepicker-calendar-day-dot-size)] w-[var(--cmp-datepicker-calendar-day-dot-size)] rounded-full",
|
|
13060
|
-
style: { backgroundColor: resolveColor(
|
|
13229
|
+
style: { backgroundColor: resolveColor(item2.color) },
|
|
13061
13230
|
"aria-hidden": true
|
|
13062
13231
|
}
|
|
13063
13232
|
),
|
|
13064
|
-
/* @__PURE__ */ jsx("span", { children:
|
|
13233
|
+
/* @__PURE__ */ jsx("span", { children: item2.label })
|
|
13065
13234
|
]
|
|
13066
13235
|
},
|
|
13067
|
-
`${
|
|
13236
|
+
`${item2.color}|${item2.label}`
|
|
13068
13237
|
)) })
|
|
13069
13238
|
] })
|
|
13070
13239
|
]
|
|
@@ -16031,19 +16200,19 @@ function EditorToolbarBar({
|
|
|
16031
16200
|
closeLinkEditor();
|
|
16032
16201
|
};
|
|
16033
16202
|
const visible = [];
|
|
16034
|
-
for (const
|
|
16035
|
-
if (
|
|
16036
|
-
if (
|
|
16037
|
-
visible.push(
|
|
16203
|
+
for (const item2 of items) {
|
|
16204
|
+
if (item2 === "image" && !onImageUpload) continue;
|
|
16205
|
+
if (item2 === "|" && (visible.length === 0 || visible[visible.length - 1] === "|")) continue;
|
|
16206
|
+
visible.push(item2);
|
|
16038
16207
|
}
|
|
16039
16208
|
while (visible.length > 0 && visible[visible.length - 1] === "|") visible.pop();
|
|
16040
16209
|
const groups = [[]];
|
|
16041
|
-
for (const
|
|
16042
|
-
if (
|
|
16043
|
-
else groups[groups.length - 1].push(
|
|
16210
|
+
for (const item2 of visible) {
|
|
16211
|
+
if (item2 === "|") groups.push([]);
|
|
16212
|
+
else groups[groups.length - 1].push(item2);
|
|
16044
16213
|
}
|
|
16045
|
-
const node = (
|
|
16046
|
-
switch (
|
|
16214
|
+
const node = (item2) => {
|
|
16215
|
+
switch (item2) {
|
|
16047
16216
|
case "heading":
|
|
16048
16217
|
return /* @__PURE__ */ jsxs(RDropdown2.Root, { modal: !insideModal, children: [
|
|
16049
16218
|
/* @__PURE__ */ jsx(RDropdown2.Trigger, { asChild: true, disabled: off, children: /* @__PURE__ */ jsxs(
|
|
@@ -16078,7 +16247,7 @@ function EditorToolbarBar({
|
|
|
16078
16247
|
level
|
|
16079
16248
|
))
|
|
16080
16249
|
] }) })
|
|
16081
|
-
] },
|
|
16250
|
+
] }, item2);
|
|
16082
16251
|
case "fontSize":
|
|
16083
16252
|
return /* @__PURE__ */ jsxs(RDropdown2.Root, { modal: !insideModal, children: [
|
|
16084
16253
|
/* @__PURE__ */ jsx(RDropdown2.Trigger, { asChild: true, disabled: off, children: /* @__PURE__ */ jsxs(ToolbarButton, { label: "\uAE00\uC790 \uD06C\uAE30", disabled: off, className: "px-[6px]", children: [
|
|
@@ -16117,7 +16286,7 @@ function EditorToolbarBar({
|
|
|
16117
16286
|
]
|
|
16118
16287
|
}
|
|
16119
16288
|
) })
|
|
16120
|
-
] },
|
|
16289
|
+
] }, item2);
|
|
16121
16290
|
case "bold":
|
|
16122
16291
|
return /* @__PURE__ */ jsx(
|
|
16123
16292
|
ToolbarButton,
|
|
@@ -16129,7 +16298,7 @@ function EditorToolbarBar({
|
|
|
16129
16298
|
onClick: () => chain()?.toggleBold().run(),
|
|
16130
16299
|
children: /* @__PURE__ */ jsx(IconBold, { size: ICON_SIZE })
|
|
16131
16300
|
},
|
|
16132
|
-
|
|
16301
|
+
item2
|
|
16133
16302
|
);
|
|
16134
16303
|
case "italic":
|
|
16135
16304
|
return /* @__PURE__ */ jsx(
|
|
@@ -16142,7 +16311,7 @@ function EditorToolbarBar({
|
|
|
16142
16311
|
onClick: () => chain()?.toggleItalic().run(),
|
|
16143
16312
|
children: /* @__PURE__ */ jsx(IconItalic, { size: ICON_SIZE })
|
|
16144
16313
|
},
|
|
16145
|
-
|
|
16314
|
+
item2
|
|
16146
16315
|
);
|
|
16147
16316
|
case "underline":
|
|
16148
16317
|
return /* @__PURE__ */ jsx(
|
|
@@ -16155,7 +16324,7 @@ function EditorToolbarBar({
|
|
|
16155
16324
|
onClick: () => chain()?.toggleUnderline().run(),
|
|
16156
16325
|
children: /* @__PURE__ */ jsx(IconUnderline, { size: ICON_SIZE })
|
|
16157
16326
|
},
|
|
16158
|
-
|
|
16327
|
+
item2
|
|
16159
16328
|
);
|
|
16160
16329
|
case "strike":
|
|
16161
16330
|
return /* @__PURE__ */ jsx(
|
|
@@ -16168,7 +16337,7 @@ function EditorToolbarBar({
|
|
|
16168
16337
|
onClick: () => chain()?.toggleStrike().run(),
|
|
16169
16338
|
children: /* @__PURE__ */ jsx(IconStrike, { size: ICON_SIZE })
|
|
16170
16339
|
},
|
|
16171
|
-
|
|
16340
|
+
item2
|
|
16172
16341
|
);
|
|
16173
16342
|
case "code":
|
|
16174
16343
|
return /* @__PURE__ */ jsx(
|
|
@@ -16181,7 +16350,7 @@ function EditorToolbarBar({
|
|
|
16181
16350
|
onClick: () => chain()?.toggleCode().run(),
|
|
16182
16351
|
children: /* @__PURE__ */ jsx(IconCode, { size: ICON_SIZE })
|
|
16183
16352
|
},
|
|
16184
|
-
|
|
16353
|
+
item2
|
|
16185
16354
|
);
|
|
16186
16355
|
case "color":
|
|
16187
16356
|
if (mobile)
|
|
@@ -16193,7 +16362,7 @@ function EditorToolbarBar({
|
|
|
16193
16362
|
onClick: () => setMobileView("color"),
|
|
16194
16363
|
children: /* @__PURE__ */ jsx(ColorIndicator, { color: off ? "currentColor" : activeColor, children: /* @__PURE__ */ jsx(IconTextColor, { size: ICON_SIZE }) })
|
|
16195
16364
|
},
|
|
16196
|
-
|
|
16365
|
+
item2
|
|
16197
16366
|
);
|
|
16198
16367
|
return /* @__PURE__ */ jsxs(RDropdown2.Root, { modal: !insideModal, children: [
|
|
16199
16368
|
/* @__PURE__ */ jsx(RDropdown2.Trigger, { asChild: true, disabled: off, children: /* @__PURE__ */ jsx(ToolbarButton, { label: "\uAE00\uC790\uC0C9", disabled: off, children: /* @__PURE__ */ jsx(ColorIndicator, { color: off ? "currentColor" : activeColor, children: /* @__PURE__ */ jsx(IconTextColor, { size: ICON_SIZE }) }) }) }),
|
|
@@ -16208,7 +16377,7 @@ function EditorToolbarBar({
|
|
|
16208
16377
|
onClear: clearColor
|
|
16209
16378
|
}
|
|
16210
16379
|
) }) })
|
|
16211
|
-
] },
|
|
16380
|
+
] }, item2);
|
|
16212
16381
|
case "alignLeft":
|
|
16213
16382
|
return /* @__PURE__ */ jsx(
|
|
16214
16383
|
ToolbarButton,
|
|
@@ -16220,7 +16389,7 @@ function EditorToolbarBar({
|
|
|
16220
16389
|
onClick: () => chain()?.setTextAlign("left").run(),
|
|
16221
16390
|
children: /* @__PURE__ */ jsx(IconAlignLeft, { size: ICON_SIZE })
|
|
16222
16391
|
},
|
|
16223
|
-
|
|
16392
|
+
item2
|
|
16224
16393
|
);
|
|
16225
16394
|
case "alignCenter":
|
|
16226
16395
|
return /* @__PURE__ */ jsx(
|
|
@@ -16233,7 +16402,7 @@ function EditorToolbarBar({
|
|
|
16233
16402
|
onClick: () => chain()?.setTextAlign("center").run(),
|
|
16234
16403
|
children: /* @__PURE__ */ jsx(IconAlignCenter, { size: ICON_SIZE })
|
|
16235
16404
|
},
|
|
16236
|
-
|
|
16405
|
+
item2
|
|
16237
16406
|
);
|
|
16238
16407
|
case "alignRight":
|
|
16239
16408
|
return /* @__PURE__ */ jsx(
|
|
@@ -16246,7 +16415,7 @@ function EditorToolbarBar({
|
|
|
16246
16415
|
onClick: () => chain()?.setTextAlign("right").run(),
|
|
16247
16416
|
children: /* @__PURE__ */ jsx(IconAlignRight, { size: ICON_SIZE })
|
|
16248
16417
|
},
|
|
16249
|
-
|
|
16418
|
+
item2
|
|
16250
16419
|
);
|
|
16251
16420
|
case "alignJustify":
|
|
16252
16421
|
return /* @__PURE__ */ jsx(
|
|
@@ -16259,7 +16428,7 @@ function EditorToolbarBar({
|
|
|
16259
16428
|
onClick: () => chain()?.setTextAlign("justify").run(),
|
|
16260
16429
|
children: /* @__PURE__ */ jsx(IconAlignJustify, { size: ICON_SIZE })
|
|
16261
16430
|
},
|
|
16262
|
-
|
|
16431
|
+
item2
|
|
16263
16432
|
);
|
|
16264
16433
|
case "bulletList":
|
|
16265
16434
|
return /* @__PURE__ */ jsx(
|
|
@@ -16272,7 +16441,7 @@ function EditorToolbarBar({
|
|
|
16272
16441
|
onClick: () => chain()?.toggleBulletList().run(),
|
|
16273
16442
|
children: /* @__PURE__ */ jsx(IconBulletList, { size: ICON_SIZE })
|
|
16274
16443
|
},
|
|
16275
|
-
|
|
16444
|
+
item2
|
|
16276
16445
|
);
|
|
16277
16446
|
case "orderedList":
|
|
16278
16447
|
return /* @__PURE__ */ jsx(
|
|
@@ -16285,7 +16454,7 @@ function EditorToolbarBar({
|
|
|
16285
16454
|
onClick: () => chain()?.toggleOrderedList().run(),
|
|
16286
16455
|
children: /* @__PURE__ */ jsx(IconOrderedList, { size: ICON_SIZE })
|
|
16287
16456
|
},
|
|
16288
|
-
|
|
16457
|
+
item2
|
|
16289
16458
|
);
|
|
16290
16459
|
case "taskList":
|
|
16291
16460
|
return /* @__PURE__ */ jsx(
|
|
@@ -16298,7 +16467,7 @@ function EditorToolbarBar({
|
|
|
16298
16467
|
onClick: () => chain()?.toggleTaskList().run(),
|
|
16299
16468
|
children: /* @__PURE__ */ jsx(IconTaskList, { size: ICON_SIZE })
|
|
16300
16469
|
},
|
|
16301
|
-
|
|
16470
|
+
item2
|
|
16302
16471
|
);
|
|
16303
16472
|
case "list": {
|
|
16304
16473
|
const ListIcon = state2.orderedList ? IconOrderedList : state2.taskList ? IconTaskList : IconBulletList;
|
|
@@ -16343,7 +16512,7 @@ function EditorToolbarBar({
|
|
|
16343
16512
|
}
|
|
16344
16513
|
)
|
|
16345
16514
|
] }) })
|
|
16346
|
-
] },
|
|
16515
|
+
] }, item2);
|
|
16347
16516
|
}
|
|
16348
16517
|
case "blockquote":
|
|
16349
16518
|
return /* @__PURE__ */ jsx(
|
|
@@ -16356,7 +16525,7 @@ function EditorToolbarBar({
|
|
|
16356
16525
|
onClick: () => chain()?.toggleBlockquote().run(),
|
|
16357
16526
|
children: /* @__PURE__ */ jsx(IconBlockquote, { size: ICON_SIZE })
|
|
16358
16527
|
},
|
|
16359
|
-
|
|
16528
|
+
item2
|
|
16360
16529
|
);
|
|
16361
16530
|
case "codeBlock":
|
|
16362
16531
|
return /* @__PURE__ */ jsx(
|
|
@@ -16369,7 +16538,7 @@ function EditorToolbarBar({
|
|
|
16369
16538
|
onClick: () => chain()?.toggleCodeBlock().run(),
|
|
16370
16539
|
children: /* @__PURE__ */ jsx(IconCodeBlock, { size: ICON_SIZE })
|
|
16371
16540
|
},
|
|
16372
|
-
|
|
16541
|
+
item2
|
|
16373
16542
|
);
|
|
16374
16543
|
case "horizontalRule":
|
|
16375
16544
|
return /* @__PURE__ */ jsx(
|
|
@@ -16380,7 +16549,7 @@ function EditorToolbarBar({
|
|
|
16380
16549
|
onClick: () => chain()?.setHorizontalRule().run(),
|
|
16381
16550
|
children: /* @__PURE__ */ jsx(IconHorizontalRule, { size: ICON_SIZE })
|
|
16382
16551
|
},
|
|
16383
|
-
|
|
16552
|
+
item2
|
|
16384
16553
|
);
|
|
16385
16554
|
case "link":
|
|
16386
16555
|
if (mobile)
|
|
@@ -16393,7 +16562,7 @@ function EditorToolbarBar({
|
|
|
16393
16562
|
onClick: () => setMobileView("link"),
|
|
16394
16563
|
children: /* @__PURE__ */ jsx(IconLink, { size: ICON_SIZE })
|
|
16395
16564
|
},
|
|
16396
|
-
|
|
16565
|
+
item2
|
|
16397
16566
|
);
|
|
16398
16567
|
return /* @__PURE__ */ jsxs(RPopover11.Root, { open: linkOpen, onOpenChange: setLinkOpen, children: [
|
|
16399
16568
|
/* @__PURE__ */ jsx(RPopover11.Trigger, { asChild: true, disabled: off, children: /* @__PURE__ */ jsx(ToolbarButton, { label: "\uB9C1\uD06C", active: state2.link, disabled: off, children: /* @__PURE__ */ jsx(IconLink, { size: ICON_SIZE }) }) }),
|
|
@@ -16418,7 +16587,7 @@ function EditorToolbarBar({
|
|
|
16418
16587
|
)
|
|
16419
16588
|
}
|
|
16420
16589
|
) })
|
|
16421
|
-
] },
|
|
16590
|
+
] }, item2);
|
|
16422
16591
|
case "image":
|
|
16423
16592
|
return /* @__PURE__ */ jsxs(
|
|
16424
16593
|
ToolbarButton,
|
|
@@ -16432,7 +16601,7 @@ function EditorToolbarBar({
|
|
|
16432
16601
|
/* @__PURE__ */ jsx("span", { className: "text-[12px] leading-[20px]", children: "\uC774\uBBF8\uC9C0" })
|
|
16433
16602
|
]
|
|
16434
16603
|
},
|
|
16435
|
-
|
|
16604
|
+
item2
|
|
16436
16605
|
);
|
|
16437
16606
|
case "table":
|
|
16438
16607
|
return /* @__PURE__ */ jsxs(
|
|
@@ -16553,7 +16722,7 @@ function EditorToolbarBar({
|
|
|
16553
16722
|
] }) })
|
|
16554
16723
|
]
|
|
16555
16724
|
},
|
|
16556
|
-
|
|
16725
|
+
item2
|
|
16557
16726
|
);
|
|
16558
16727
|
case "undo":
|
|
16559
16728
|
return /* @__PURE__ */ jsx(
|
|
@@ -16564,7 +16733,7 @@ function EditorToolbarBar({
|
|
|
16564
16733
|
onClick: () => chain()?.undo().run(),
|
|
16565
16734
|
children: /* @__PURE__ */ jsx(IconUndo, { size: ICON_SIZE })
|
|
16566
16735
|
},
|
|
16567
|
-
|
|
16736
|
+
item2
|
|
16568
16737
|
);
|
|
16569
16738
|
case "redo":
|
|
16570
16739
|
return /* @__PURE__ */ jsx(
|
|
@@ -16575,7 +16744,7 @@ function EditorToolbarBar({
|
|
|
16575
16744
|
onClick: () => chain()?.redo().run(),
|
|
16576
16745
|
children: /* @__PURE__ */ jsx(IconRedo, { size: ICON_SIZE })
|
|
16577
16746
|
},
|
|
16578
|
-
|
|
16747
|
+
item2
|
|
16579
16748
|
);
|
|
16580
16749
|
default:
|
|
16581
16750
|
return null;
|
|
@@ -19009,8 +19178,8 @@ var SChipInput = /* @__PURE__ */ forwardRef(function SChipInput2({
|
|
|
19009
19178
|
onMouseDown: (e) => e.preventDefault(),
|
|
19010
19179
|
children: [
|
|
19011
19180
|
loading2 && /* @__PURE__ */ jsx("div", { className: "s-chip-input__suggestions-empty p-sd-12 text-center text-12 leading-sd-20 text-(--color-grey-65)", children: "\uBD88\uB7EC\uC624\uB294 \uC911..." }),
|
|
19012
|
-
!effectiveAutocomplete ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-sd-8 px-sd-12 py-sd-6", children: items.map((
|
|
19013
|
-
const selected = values.includes(
|
|
19181
|
+
!effectiveAutocomplete ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-sd-8 px-sd-12 py-sd-6", children: items.map((item2, i) => {
|
|
19182
|
+
const selected = values.includes(item2);
|
|
19014
19183
|
const active = i === activeIndex && !selected;
|
|
19015
19184
|
return /* @__PURE__ */ jsx(
|
|
19016
19185
|
"div",
|
|
@@ -19021,14 +19190,14 @@ var SChipInput = /* @__PURE__ */ forwardRef(function SChipInput2({
|
|
|
19021
19190
|
style: active ? { outline: "2px solid var(--color-border-accent)", outlineOffset: 1 } : void 0,
|
|
19022
19191
|
onMouseDown: (e) => {
|
|
19023
19192
|
e.preventDefault();
|
|
19024
|
-
if (!selected) addChip(
|
|
19193
|
+
if (!selected) addChip(item2);
|
|
19025
19194
|
},
|
|
19026
|
-
children: /* @__PURE__ */ jsx(SChip2, { value:
|
|
19195
|
+
children: /* @__PURE__ */ jsx(SChip2, { value: item2, disabled: selected, editable: false, showRemove: false })
|
|
19027
19196
|
},
|
|
19028
|
-
|
|
19197
|
+
item2
|
|
19029
19198
|
);
|
|
19030
|
-
}) }) : items.map((
|
|
19031
|
-
const selected = values.includes(
|
|
19199
|
+
}) }) : items.map((item2, i) => {
|
|
19200
|
+
const selected = values.includes(item2);
|
|
19032
19201
|
const active = i === activeIndex && !selected;
|
|
19033
19202
|
return /* @__PURE__ */ jsxs(
|
|
19034
19203
|
"div",
|
|
@@ -19041,10 +19210,10 @@ var SChipInput = /* @__PURE__ */ forwardRef(function SChipInput2({
|
|
|
19041
19210
|
),
|
|
19042
19211
|
onMouseDown: (e) => {
|
|
19043
19212
|
e.preventDefault();
|
|
19044
|
-
if (!selected) addChip(
|
|
19213
|
+
if (!selected) addChip(item2);
|
|
19045
19214
|
},
|
|
19046
19215
|
children: [
|
|
19047
|
-
/* @__PURE__ */ jsx("span", { className: "flex-1", children:
|
|
19216
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1", children: item2 }),
|
|
19048
19217
|
selected && /* @__PURE__ */ jsx(
|
|
19049
19218
|
SIcon,
|
|
19050
19219
|
{
|
|
@@ -19055,7 +19224,7 @@ var SChipInput = /* @__PURE__ */ forwardRef(function SChipInput2({
|
|
|
19055
19224
|
)
|
|
19056
19225
|
]
|
|
19057
19226
|
},
|
|
19058
|
-
|
|
19227
|
+
item2
|
|
19059
19228
|
);
|
|
19060
19229
|
})
|
|
19061
19230
|
]
|
|
@@ -19439,22 +19608,22 @@ function TimeSelector({
|
|
|
19439
19608
|
style: {
|
|
19440
19609
|
padding: "var(--cmp-timepicker-selector-section-paddingY) var(--cmp-timepicker-selector-section-paddingX)"
|
|
19441
19610
|
},
|
|
19442
|
-
children: /* @__PURE__ */ jsx("div", { className: "isolate flex", children: ["AM", "PM"].map((
|
|
19443
|
-
const selected =
|
|
19611
|
+
children: /* @__PURE__ */ jsx("div", { className: "isolate flex", children: ["AM", "PM"].map((item2, index) => {
|
|
19612
|
+
const selected = item2 === meridiem;
|
|
19444
19613
|
return /* @__PURE__ */ jsx(
|
|
19445
19614
|
"button",
|
|
19446
19615
|
{
|
|
19447
19616
|
type: "button",
|
|
19448
|
-
onClick: () => setMeridiem(
|
|
19617
|
+
onClick: () => setMeridiem(item2),
|
|
19449
19618
|
className: cn(
|
|
19450
19619
|
"box-border h-[var(--cmp-textinput-sm-height)] w-[61px] cursor-pointer border border-solid bg-white text-center text-[12px] font-medium leading-[20px]",
|
|
19451
19620
|
index === 0 ? "rounded-l-[var(--cmp-select-sm-radius)]" : "rounded-r-[var(--cmp-select-sm-radius)]",
|
|
19452
19621
|
index === 0 ? "-mr-px" : "",
|
|
19453
19622
|
selected ? "z-[1] border-[var(--cmp-timepicker-border-focus)] text-[var(--cmp-timepicker-border-focus)]" : "border-[var(--cmp-timepicker-border-default)] text-[var(--cmp-field-hint-color)]"
|
|
19454
19623
|
),
|
|
19455
|
-
children:
|
|
19624
|
+
children: item2 === "AM" ? "\uC624\uC804" : "\uC624\uD6C4"
|
|
19456
19625
|
},
|
|
19457
|
-
|
|
19626
|
+
item2
|
|
19458
19627
|
);
|
|
19459
19628
|
}) })
|
|
19460
19629
|
}
|
|
@@ -19675,8 +19844,8 @@ function getTimeMinutes(value) {
|
|
|
19675
19844
|
}
|
|
19676
19845
|
function normalizeTimeRangeValue(value, rangeOrder = "strict") {
|
|
19677
19846
|
if (value == null) return null;
|
|
19678
|
-
const normalized = value.map((
|
|
19679
|
-
const parsed = parseTimeValue(
|
|
19847
|
+
const normalized = value.map((item2) => {
|
|
19848
|
+
const parsed = parseTimeValue(item2);
|
|
19680
19849
|
return formatTimeValue(parsed.hour, parsed.minute);
|
|
19681
19850
|
});
|
|
19682
19851
|
if (rangeOrder === "strict" && getTimeMinutes(normalized[0]) > getTimeMinutes(normalized[1])) {
|
|
@@ -19886,21 +20055,21 @@ function RangeTimeSelector({
|
|
|
19886
20055
|
style: { gap: "var(--cmp-timepicker-selector-range-heading-gap)" },
|
|
19887
20056
|
children: [
|
|
19888
20057
|
/* @__PURE__ */ jsx("div", { className: "whitespace-nowrap text-center text-[12px] font-bold leading-[20px] text-[var(--cmp-timepicker-selector-range-heading-color)]", children: title }),
|
|
19889
|
-
useMeridiem && /* @__PURE__ */ jsx("div", { className: "isolate flex", children: ["AM", "PM"].map((
|
|
19890
|
-
const selected =
|
|
20058
|
+
useMeridiem && /* @__PURE__ */ jsx("div", { className: "isolate flex", children: ["AM", "PM"].map((item2, index) => {
|
|
20059
|
+
const selected = item2 === getMeridiem(side);
|
|
19891
20060
|
return /* @__PURE__ */ jsx(
|
|
19892
20061
|
"button",
|
|
19893
20062
|
{
|
|
19894
20063
|
type: "button",
|
|
19895
|
-
onClick: () => setMeridiem(side,
|
|
20064
|
+
onClick: () => setMeridiem(side, item2),
|
|
19896
20065
|
className: cn(
|
|
19897
20066
|
"box-border h-[var(--cmp-textinput-sm-height)] w-[61px] cursor-pointer border border-solid bg-white text-center text-[12px] font-medium leading-[20px]",
|
|
19898
20067
|
index === 0 ? "rounded-l-[var(--cmp-select-sm-radius)] -mr-px" : "rounded-r-[var(--cmp-select-sm-radius)]",
|
|
19899
20068
|
selected ? "z-[1] border-[var(--cmp-timepicker-border-focus)] text-[var(--cmp-timepicker-border-focus)]" : "border-[var(--cmp-timepicker-border-default)] text-[var(--cmp-field-hint-color)]"
|
|
19900
20069
|
),
|
|
19901
|
-
children:
|
|
20070
|
+
children: item2 === "AM" ? "\uC624\uC804" : "\uC624\uD6C4"
|
|
19902
20071
|
},
|
|
19903
|
-
|
|
20072
|
+
item2
|
|
19904
20073
|
);
|
|
19905
20074
|
}) })
|
|
19906
20075
|
]
|
|
@@ -20136,6 +20305,6 @@ function STimeRangePicker({
|
|
|
20136
20305
|
);
|
|
20137
20306
|
}
|
|
20138
20307
|
|
|
20139
|
-
export { BADGE_COLORS, BUTTON_COLORS, BUTTON_SIZES, COLOR_KEYS, FIELD_WIDTH_GRADES, GNB_COLORS, GNB_COMMON, GNB_FOLD_MS, GNB_FULL_LOGO_WIDTH, GNB_HEADER, GNB_MENU, GNB_MENU_WIDTH, GNB_RAIL, GNB_RAIL_WIDTH, ICONS, IMAGE_FITS, PAGE_BACKGROUNDS, PAGE_CONTENT_HEIGHTS, RangeCalendar, SActionModal, SBadge, SBarcodeInput, SButton, SCROLL_AREA_AXES, SCalendar, SCallout, SCard, SCheckbox, SChip2 as SChip, SChipFilter, SChipInput, SCircleProgress, SConfirmModal, SDatePicker, SDatePickerMonthListbox, SDatePickerYearListbox, SDateRangePicker, SDivider, SDraggableGroup, SDraggableItem2 as SDraggableItem, SDraggableList, SDraggableProvider, SDrawer, SDropdownButton2 as SDropdownButton, SEDITOR_DEFAULT_FONT_SIZE, SEDITOR_HEADING_LABELS, SEDITOR_HEADING_LEVELS, SEditor, SExpansionItem, SExpansionList2 as SExpansionList, SField, SFilePicker, SForm, SGhostButton, SGnb, SGuide, SIcon, SImage, SInput, SKeyValueTable, SLAYOUT_MIN_WIDTH, SLayout, SLayoutContext, SLinearProgress, SList2 as SList, SListItem2 as SListItem, SLoadingContainer, SLoadingModal, SLoadingViewport, SModal, SModalOutlet, SNumberInput, SPage, SPagination, SPopover, SPopup, SPortal, SRadio, SRadioButton, SRadioGroup, SSPLITTER_UNITS, SScrollArea, SSearchInput, SSectionHeaderCard2 as SSectionHeaderCard, SSelect2 as SSelect, SSplitter2 as SSplitter, SStepper, SSwitch, STEPPER_SIZES, STable, STableBar, STabs, STag, STextLink, STextarea, STimePicker, STimeRangePicker, SToast, SToastContainer, SToggle, STooltip2 as STooltip, STree2 as STree, STreeItem2 as STreeItem, TAG_COLORS, TAG_SHAPES, TAG_SIZES, TIMEPICKER_SIZES, TIMEPICKER_SIZE_CONFIG, buttonPreset, cn, fieldWidthValue, findGnbAncestors, findGnbRailValue, isColorKey, isFieldWidthGrade, loading, resolveColor, useSLayout };
|
|
20308
|
+
export { BADGE_COLORS, BUTTON_COLORS, BUTTON_SIZES, COLOR_KEYS, FIELD_WIDTH_GRADES, GNB_COLORS, GNB_COMMON, GNB_FOLD_MS, GNB_FULL_LOGO_WIDTH, GNB_HEADER, GNB_MENU, GNB_MENU_WIDTH, GNB_RAIL, GNB_RAIL_WIDTH, ICONS, IMAGE_FITS, PAGE_BACKGROUNDS, PAGE_CONTENT_HEIGHTS, RangeCalendar, SActionModal, SBadge, SBarcodeInput, SButton, SCROLL_AREA_AXES, SCalendar, SCallout, SCard, SCheckbox, SChip2 as SChip, SChipFilter, SChipInput, SCircleProgress, SConfirmModal, SDatePicker, SDatePickerMonthListbox, SDatePickerYearListbox, SDateRangePicker, SDivider, SDraggableGroup, SDraggableItem2 as SDraggableItem, SDraggableList, SDraggableProvider, SDrawer, SDropdownButton2 as SDropdownButton, SEDITOR_DEFAULT_FONT_SIZE, SEDITOR_HEADING_LABELS, SEDITOR_HEADING_LEVELS, SEditor, SExpansionItem, SExpansionList2 as SExpansionList, SField, SFilePicker, SForm, SGhostButton, SGnb, SGuide, SIcon, SImage, SInput, SKeyValueTable, SLAYOUT_MIN_WIDTH, SLayout, SLayoutContext, SLinearProgress, SList2 as SList, SListItem2 as SListItem, SLoadingContainer, SLoadingModal, SLoadingViewport, SModal, SModalOutlet, SNumberInput, SPage, SPagination, SPopover, SPopup, SPortal, SRadio, SRadioButton, SRadioGroup, SSPLITTER_UNITS, SScrollArea, SSearchInput, SSectionHeaderCard2 as SSectionHeaderCard, SSelect2 as SSelect, SSplitter2 as SSplitter, SStepper, SSwitch, SSystemActionButton, STEPPER_SIZES, STable, STableBar, STabs, STag, STextLink, STextarea, STimePicker, STimeRangePicker, SToast, SToastContainer, SToggle, STooltip2 as STooltip, STree2 as STree, STreeItem2 as STreeItem, SYSTEM_ACTION_BUTTON_COLORS, SYSTEM_ACTION_BUTTON_COLOR_CONFIG, SYSTEM_ACTION_BUTTON_LAYOUT, SYSTEM_ACTION_BUTTON_TYPES, SYSTEM_ACTION_BUTTON_TYPE_CONFIG, TAG_COLORS, TAG_SHAPES, TAG_SIZES, TIMEPICKER_SIZES, TIMEPICKER_SIZE_CONFIG, buttonPreset, cn, fieldWidthValue, findGnbAncestors, findGnbRailValue, isColorKey, isFieldWidthGrade, loading, resolveColor, useSLayout };
|
|
20140
20309
|
//# sourceMappingURL=index.js.map
|
|
20141
20310
|
//# sourceMappingURL=index.js.map
|