sellmate-design-system-react 9.0.0-beta.29 → 9.0.0-beta.30
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 +39 -2
- package/dist/components/SChipFilter/README.md +7 -8
- package/dist/components/SChipFilter/SChipFilter.d.ts +10 -16
- package/dist/components/SChipFilter/index.d.ts +1 -1
- package/dist/components/SChipInput/index.d.ts +1 -1
- package/dist/components/SConfirmModal/README.md +3 -3
- package/dist/components/SConfirmModal/SConfirmModal.d.ts +2 -2
- package/dist/components/SConfirmModal/index.d.ts +1 -1
- package/dist/components/SDraggableItem/index.d.ts +1 -1
- package/dist/components/SExpansionItem/index.d.ts +1 -1
- package/dist/components/SGnb/README.md +6 -0
- package/dist/components/SGnb/SGnb.d.ts +22 -0
- package/dist/components/SGnb/index.d.ts +1 -1
- package/dist/components/SGnbSystem/README.md +121 -0
- package/dist/components/SGnbSystem/SGnbSystem.d.ts +93 -0
- package/dist/components/SGnbSystem/gnbSystem.config.d.ts +89 -0
- package/dist/components/SGnbSystem/index.d.ts +2 -0
- package/dist/components/SIcon/README.md +2 -0
- package/dist/components/SKeyValueTable/index.d.ts +1 -1
- package/dist/components/SLayout/index.d.ts +1 -1
- package/dist/components/SListItem/index.d.ts +1 -1
- package/dist/components/SLoadingModal/README.md +3 -3
- package/dist/components/SLoadingModal/SLoadingModal.d.ts +2 -2
- package/dist/components/SLoadingModal/index.d.ts +1 -1
- package/dist/components/SSystemActionButton/README.md +5 -0
- package/dist/components/SToggle/index.d.ts +1 -1
- package/dist/index.cjs +530 -203
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +526 -204
- package/dist/index.js.map +1 -1
- package/dist/llms-full.txt +178 -16
- package/dist/llms.txt +41 -4
- package/dist/styles.css +81 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3762,13 +3762,20 @@ var SDraggableItemView = /* @__PURE__ */ react.forwardRef(
|
|
|
3762
3762
|
"relative flex w-full items-center gap-(--cmp-listDraggableItem-gap) overflow-hidden px-(--cmp-listDraggableItem-paddingX)",
|
|
3763
3763
|
titleTypo,
|
|
3764
3764
|
disabled ? "bg-(--cmp-listDraggableItem-bg-default) text-(--sys-color-disabled-text)" : selected ? "bg-(--cmp-listDraggableItem-bg-selected) text-(--cmp-listDraggableItem-text-selected)" : "bg-(--cmp-listDraggableItem-bg-default) text-(--cmp-listDraggableItem-text-default)",
|
|
3765
|
-
!disabled && !selected && !dragging &&
|
|
3765
|
+
!disabled && !selected && !dragging && cn(
|
|
3766
|
+
"hover:bg-(--cmp-listDraggableItem-bg-hover)",
|
|
3767
|
+
// 리스트가 드래그 중이면(SDraggableList 가 data-drag-active 를 붙인다) hover 를 무효화한다.
|
|
3768
|
+
"[[data-drag-active]_&]:hover:bg-(--cmp-listDraggableItem-bg-default)"
|
|
3769
|
+
),
|
|
3766
3770
|
// 높이는 세로 패딩과 내용이 정한다 — 항목에 높이를 못 박지 않는다 (SListItem 과 동일)
|
|
3767
3771
|
paddingYClass,
|
|
3768
3772
|
// 항목 사이 구분선은 리스트가 그린다.
|
|
3769
3773
|
bordered && cn(
|
|
3770
3774
|
"rounded-(--cmp-listDraggableItem-radius-bordered) border border-(--cmp-listDraggableItem-border-default)",
|
|
3771
|
-
!disabled && !selected && !dragging &&
|
|
3775
|
+
!disabled && !selected && !dragging && cn(
|
|
3776
|
+
"hover:border-(--cmp-listDraggableItem-bordered-border-hover)",
|
|
3777
|
+
"[[data-drag-active]_&]:hover:border-(--cmp-listDraggableItem-border-default)"
|
|
3778
|
+
),
|
|
3772
3779
|
!disabled && selected && !dragging && "border-(--cmp-listDraggableItem-bordered-border-selected) bg-(--cmp-listDraggableItem-bordered-bg-selected)",
|
|
3773
3780
|
!disabled && selected && dragging && "border-(--cmp-listDraggableItem-bordered-dragging-border-color) bg-(--cmp-listDraggableItem-bordered-dragging-bg)"
|
|
3774
3781
|
),
|
|
@@ -3796,6 +3803,7 @@ var SDraggableItemView = /* @__PURE__ */ react.forwardRef(
|
|
|
3796
3803
|
className: cn(
|
|
3797
3804
|
"flex size-[24px] shrink-0 select-none items-center justify-center rounded-[4px]",
|
|
3798
3805
|
disabled ? "cursor-not-allowed opacity-0" : "cursor-grab hover:bg-black/5 active:cursor-grabbing",
|
|
3806
|
+
!disabled && !dragging && "[[data-drag-active]_&]:hover:bg-transparent",
|
|
3799
3807
|
dragging && "bg-black/5",
|
|
3800
3808
|
dragHandleProps?.className
|
|
3801
3809
|
),
|
|
@@ -4252,7 +4260,7 @@ function moveWithDepth(items, fromIndex, target, getDepth, setDepth, maxDepth) {
|
|
|
4252
4260
|
const nextDepth = target.intent === "inside" ? targetDepth + 1 : targetDepth;
|
|
4253
4261
|
const depthDelta = clampDepth(nextDepth, maxDepth) - sourceDepth;
|
|
4254
4262
|
const nextMovedItems = setDepth && depthDelta !== 0 ? movedItems.map(
|
|
4255
|
-
(
|
|
4263
|
+
(item3, index) => setDepth(item3, clampDepth(getDepth(item3, fromIndex + index) + depthDelta, maxDepth))
|
|
4256
4264
|
) : movedItems;
|
|
4257
4265
|
return [
|
|
4258
4266
|
...remainingItems.slice(0, insertionIndex),
|
|
@@ -4300,7 +4308,7 @@ function SDraggableListInner({
|
|
|
4300
4308
|
setDropTarget({ index, intent: "before" });
|
|
4301
4309
|
}, []);
|
|
4302
4310
|
const readDepth = react.useCallback(
|
|
4303
|
-
(
|
|
4311
|
+
(item3, index) => clampDepth(getDepth?.(item3, index) ?? 1, maxDepth),
|
|
4304
4312
|
[getDepth, maxDepth]
|
|
4305
4313
|
);
|
|
4306
4314
|
react.useEffect(() => {
|
|
@@ -4335,8 +4343,8 @@ function SDraggableListInner({
|
|
|
4335
4343
|
nextDropTarget = ratio < 0.5 ? { index, intent: "before" } : { index, intent: "after" };
|
|
4336
4344
|
break;
|
|
4337
4345
|
}
|
|
4338
|
-
const
|
|
4339
|
-
const canHaveChildren = (getCanHaveChildren?.(
|
|
4346
|
+
const item3 = items[index];
|
|
4347
|
+
const canHaveChildren = (getCanHaveChildren?.(item3, index) ?? true) && readDepth(item3, index) < maxDepth;
|
|
4340
4348
|
if (ratio < 0.25) {
|
|
4341
4349
|
nextDropTarget = { index, intent: "before" };
|
|
4342
4350
|
} else if (ratio > 0.75 || !canHaveChildren) {
|
|
@@ -4399,6 +4407,7 @@ function SDraggableListInner({
|
|
|
4399
4407
|
const currentDropIntent = dragContext ? void 0 : dropTarget?.intent;
|
|
4400
4408
|
const isDropTarget = dragContext ? groupDrop?.group === dragGroup && groupDrop?.listId === listId : draggingIndex != null;
|
|
4401
4409
|
const showEmptyDrop = Boolean(dragContext && isDropTarget && items.length === 0);
|
|
4410
|
+
const dragActive = dragContext ? groupDragging?.group === dragGroup : draggingIndex != null;
|
|
4402
4411
|
const beforeIndicatorStyle = (depth) => ({
|
|
4403
4412
|
borderTop: "2px solid var(--sys-color-fg-accentLight)",
|
|
4404
4413
|
left: getIndicatorOffset(depth),
|
|
@@ -4432,12 +4441,13 @@ function SDraggableListInner({
|
|
|
4432
4441
|
...rest,
|
|
4433
4442
|
useGap,
|
|
4434
4443
|
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-fg-accentLight) before:content-['']" : ""}`,
|
|
4444
|
+
"data-drag-active": dragActive || void 0,
|
|
4435
4445
|
"data-draggable-group": dragContext ? dragGroup : void 0,
|
|
4436
4446
|
"data-draggable-list-id": dragContext ? listId : void 0,
|
|
4437
|
-
children: items.map((
|
|
4438
|
-
const itemKey = getKey(
|
|
4439
|
-
const disabled = (getDisabled?.(
|
|
4440
|
-
const depth = depthEnabled ? readDepth(
|
|
4447
|
+
children: items.map((item3, index) => {
|
|
4448
|
+
const itemKey = getKey(item3, index);
|
|
4449
|
+
const disabled = (getDisabled?.(item3, index) ?? false) || isDescendant(items, index, draggedSubtreeStart, depthEnabled ? readDepth : void 0);
|
|
4450
|
+
const depth = depthEnabled ? readDepth(item3, index) : 1;
|
|
4441
4451
|
const showBefore = isDropTarget && currentDropIndex === index && (dragContext || currentDropIntent === "before");
|
|
4442
4452
|
const showInside = isDropTarget && currentDropIndex === index && !dragContext && depthEnabled && currentDropIntent === "inside";
|
|
4443
4453
|
const showAfter = isDropTarget && (dragContext ? currentDropIndex === items.length && index === items.length - 1 : currentDropIndex === index && currentDropIntent === "after");
|
|
@@ -4491,7 +4501,7 @@ function SDraggableListInner({
|
|
|
4491
4501
|
}
|
|
4492
4502
|
}
|
|
4493
4503
|
),
|
|
4494
|
-
renderItem(
|
|
4504
|
+
renderItem(item3, index, {
|
|
4495
4505
|
onDragHandleMouseDown: (event) => {
|
|
4496
4506
|
if (disabled) return;
|
|
4497
4507
|
if (dragContext && dragGroup && listId) {
|
|
@@ -5416,7 +5426,7 @@ var STreeImpl = /* @__PURE__ */ react.forwardRef(function STree({
|
|
|
5416
5426
|
}, ref) {
|
|
5417
5427
|
const [internalValue, setInternalValue] = react.useState(defaultValue ?? []);
|
|
5418
5428
|
const [internalExpandedIds, setInternalExpandedIds] = react.useState(
|
|
5419
|
-
defaultExpandedIds ?? items.filter((
|
|
5429
|
+
defaultExpandedIds ?? items.filter((item3) => item3.children?.length).map((item3) => item3.id)
|
|
5420
5430
|
);
|
|
5421
5431
|
const currentValue = value ?? internalValue;
|
|
5422
5432
|
const currentExpandedIds = expandedIds ?? internalExpandedIds;
|
|
@@ -7906,12 +7916,12 @@ function SDrawer({
|
|
|
7906
7916
|
return () => window.removeEventListener("resize", sync);
|
|
7907
7917
|
}, [rendered]);
|
|
7908
7918
|
react.useEffect(() => {
|
|
7909
|
-
const
|
|
7910
|
-
if (!resizable || !rendered || !
|
|
7919
|
+
const panel2 = panelRef.current;
|
|
7920
|
+
if (!resizable || !rendered || !panel2 || typeof ResizeObserver === "undefined") return;
|
|
7911
7921
|
const observer = new ResizeObserver(
|
|
7912
|
-
() => setMeasuredWidth(Math.round(
|
|
7922
|
+
() => setMeasuredWidth(Math.round(panel2.getBoundingClientRect().width))
|
|
7913
7923
|
);
|
|
7914
|
-
observer.observe(
|
|
7924
|
+
observer.observe(panel2);
|
|
7915
7925
|
return () => observer.disconnect();
|
|
7916
7926
|
}, [resizable, rendered]);
|
|
7917
7927
|
react.useEffect(() => {
|
|
@@ -7973,13 +7983,13 @@ function SDrawer({
|
|
|
7973
7983
|
};
|
|
7974
7984
|
const handleResizeStart = (event) => {
|
|
7975
7985
|
if (typeof document === "undefined") return;
|
|
7976
|
-
const
|
|
7977
|
-
if (!
|
|
7986
|
+
const panel2 = panelRef.current;
|
|
7987
|
+
if (!panel2) return;
|
|
7978
7988
|
event.preventDefault();
|
|
7979
7989
|
event.stopPropagation();
|
|
7980
7990
|
event.currentTarget.focus();
|
|
7981
7991
|
const startX = event.clientX;
|
|
7982
|
-
const startWidth =
|
|
7992
|
+
const startWidth = panel2.getBoundingClientRect().width;
|
|
7983
7993
|
const { min, max } = resizeBounds();
|
|
7984
7994
|
let latest = startWidth;
|
|
7985
7995
|
const { body } = document;
|
|
@@ -8007,9 +8017,9 @@ function SDrawer({
|
|
|
8007
8017
|
setResizing(true);
|
|
8008
8018
|
};
|
|
8009
8019
|
const handleResizeKeyDown = (event) => {
|
|
8010
|
-
const
|
|
8011
|
-
if (!
|
|
8012
|
-
const startWidth =
|
|
8020
|
+
const panel2 = panelRef.current;
|
|
8021
|
+
if (!panel2) return;
|
|
8022
|
+
const startWidth = panel2.getBoundingClientRect().width;
|
|
8013
8023
|
const { min, max } = resizeBounds();
|
|
8014
8024
|
const step = RESIZE_KEY_STEP[event.shiftKey ? "large" : "normal"];
|
|
8015
8025
|
let next = null;
|
|
@@ -8753,17 +8763,17 @@ var GNB_TOP_ICON_GAP = 8;
|
|
|
8753
8763
|
var GNB_TOP_ICON_SIZE = 24;
|
|
8754
8764
|
var GNB_FULL_LOGO_WIDTH_NO_LAUNCHER = GNB_FULL_LOGO_WIDTH + GNB_TOP_ICON_SIZE + GNB_TOP_ICON_GAP;
|
|
8755
8765
|
function findGnbRailValue(items, value) {
|
|
8756
|
-
if (items.some((
|
|
8766
|
+
if (items.some((item3) => item3.value === value)) return value;
|
|
8757
8767
|
return findGnbAncestors(items, value)[0];
|
|
8758
8768
|
}
|
|
8759
8769
|
function findGnbSiblingValues(items, value) {
|
|
8760
8770
|
const walk = (list) => {
|
|
8761
|
-
if (list.some((
|
|
8762
|
-
return list.filter((
|
|
8771
|
+
if (list.some((item3) => item3.value === value)) {
|
|
8772
|
+
return list.filter((item3) => item3.value !== value).map((item3) => item3.value);
|
|
8763
8773
|
}
|
|
8764
|
-
for (const
|
|
8765
|
-
if (
|
|
8766
|
-
const found = walk(
|
|
8774
|
+
for (const item3 of list) {
|
|
8775
|
+
if (item3.children) {
|
|
8776
|
+
const found = walk(item3.children);
|
|
8767
8777
|
if (found) return found;
|
|
8768
8778
|
}
|
|
8769
8779
|
}
|
|
@@ -8773,10 +8783,10 @@ function findGnbSiblingValues(items, value) {
|
|
|
8773
8783
|
}
|
|
8774
8784
|
function findGnbAncestors(items, value) {
|
|
8775
8785
|
const walk = (list, trail) => {
|
|
8776
|
-
for (const
|
|
8777
|
-
if (
|
|
8778
|
-
if (
|
|
8779
|
-
const found = walk(
|
|
8786
|
+
for (const item3 of list) {
|
|
8787
|
+
if (item3.value === value) return trail;
|
|
8788
|
+
if (item3.children) {
|
|
8789
|
+
const found = walk(item3.children, [...trail, item3.value]);
|
|
8780
8790
|
if (found) return found;
|
|
8781
8791
|
}
|
|
8782
8792
|
}
|
|
@@ -8786,20 +8796,20 @@ function findGnbAncestors(items, value) {
|
|
|
8786
8796
|
}
|
|
8787
8797
|
function findGnbDescendantBranchValues(items, value) {
|
|
8788
8798
|
const find = (list) => {
|
|
8789
|
-
for (const
|
|
8790
|
-
if (
|
|
8791
|
-
if (
|
|
8792
|
-
const found = find(
|
|
8799
|
+
for (const item3 of list) {
|
|
8800
|
+
if (item3.value === value) return item3;
|
|
8801
|
+
if (item3.children) {
|
|
8802
|
+
const found = find(item3.children);
|
|
8793
8803
|
if (found) return found;
|
|
8794
8804
|
}
|
|
8795
8805
|
}
|
|
8796
8806
|
return void 0;
|
|
8797
8807
|
};
|
|
8798
8808
|
const collect = (list, acc) => {
|
|
8799
|
-
for (const
|
|
8800
|
-
if (
|
|
8801
|
-
acc.push(
|
|
8802
|
-
collect(
|
|
8809
|
+
for (const item3 of list) {
|
|
8810
|
+
if (item3.children && item3.children.length > 0) {
|
|
8811
|
+
acc.push(item3.value);
|
|
8812
|
+
collect(item3.children, acc);
|
|
8803
8813
|
}
|
|
8804
8814
|
}
|
|
8805
8815
|
return acc;
|
|
@@ -8807,6 +8817,7 @@ function findGnbDescendantBranchValues(items, value) {
|
|
|
8807
8817
|
const target = find(items);
|
|
8808
8818
|
return target?.children ? collect(target.children, []) : [];
|
|
8809
8819
|
}
|
|
8820
|
+
var SGnbSystemContext = /* @__PURE__ */ react.createContext(null);
|
|
8810
8821
|
var LABEL_TIP_HIDE_DELAY_MS = 100;
|
|
8811
8822
|
var DEPTH_PADDING_LEFT = (M, depth) => depth === 1 ? M.depth1PaddingLeft : depth === 2 ? M.depth2PaddingLeft : M.depth3PaddingLeft;
|
|
8812
8823
|
var SGnb = /* @__PURE__ */ react.forwardRef(function SGnb2({
|
|
@@ -8829,6 +8840,7 @@ var SGnb = /* @__PURE__ */ react.forwardRef(function SGnb2({
|
|
|
8829
8840
|
menuFooter,
|
|
8830
8841
|
foldedTop,
|
|
8831
8842
|
foldedFooter,
|
|
8843
|
+
system,
|
|
8832
8844
|
resizable = false,
|
|
8833
8845
|
menuWidth: menuWidthProp,
|
|
8834
8846
|
defaultMenuWidth,
|
|
@@ -8842,7 +8854,7 @@ var SGnb = /* @__PURE__ */ react.forwardRef(function SGnb2({
|
|
|
8842
8854
|
const type = typeProp ?? layout?.type ?? "box";
|
|
8843
8855
|
const folded = foldedProp ?? layout?.folded ?? false;
|
|
8844
8856
|
const useRail = useRailProp ?? layout?.useRail ?? false;
|
|
8845
|
-
const railHasLeaf = useRail && items.some((
|
|
8857
|
+
const railHasLeaf = useRail && items.some((item3) => !item3.children || item3.children.length === 0);
|
|
8846
8858
|
const header = railHasLeaf ? "full" : headerProp ?? layout?.header ?? "fix";
|
|
8847
8859
|
const H = GNB_HEADER[header];
|
|
8848
8860
|
const M = GNB_MENU[type];
|
|
@@ -8885,13 +8897,13 @@ var SGnb = /* @__PURE__ */ react.forwardRef(function SGnb2({
|
|
|
8885
8897
|
labelTipHideRef.current = setTimeout(() => setLabelTip(null), LABEL_TIP_HIDE_DELAY_MS);
|
|
8886
8898
|
};
|
|
8887
8899
|
react.useEffect(() => cancelLabelTipHide, []);
|
|
8888
|
-
const rowHoverProps = (
|
|
8900
|
+
const rowHoverProps = (item3) => ({
|
|
8889
8901
|
onMouseEnter: (event) => {
|
|
8890
|
-
setHoveredKey(
|
|
8891
|
-
showLabelTipIfTruncated(event.currentTarget,
|
|
8902
|
+
setHoveredKey(item3.value);
|
|
8903
|
+
showLabelTipIfTruncated(event.currentTarget, item3.label);
|
|
8892
8904
|
},
|
|
8893
8905
|
onMouseLeave: () => {
|
|
8894
|
-
setHoveredKey((prev) => prev ===
|
|
8906
|
+
setHoveredKey((prev) => prev === item3.value ? null : prev);
|
|
8895
8907
|
startLabelTipHide();
|
|
8896
8908
|
}
|
|
8897
8909
|
});
|
|
@@ -8917,7 +8929,7 @@ var SGnb = /* @__PURE__ */ react.forwardRef(function SGnb2({
|
|
|
8917
8929
|
}, [items, value]);
|
|
8918
8930
|
react.useEffect(() => {
|
|
8919
8931
|
setActiveRail(
|
|
8920
|
-
(prev) => prev !== void 0 && items.some((
|
|
8932
|
+
(prev) => prev !== void 0 && items.some((item3) => item3.value === prev) ? prev : items[0]?.value
|
|
8921
8933
|
);
|
|
8922
8934
|
}, [items]);
|
|
8923
8935
|
const toggleExpand = (key) => {
|
|
@@ -8934,33 +8946,33 @@ var SGnb = /* @__PURE__ */ react.forwardRef(function SGnb2({
|
|
|
8934
8946
|
return next;
|
|
8935
8947
|
});
|
|
8936
8948
|
};
|
|
8937
|
-
const handleItemClick = (
|
|
8938
|
-
if (
|
|
8939
|
-
if (
|
|
8940
|
-
toggleExpand(
|
|
8949
|
+
const handleItemClick = (item3) => {
|
|
8950
|
+
if (item3.disabled) return;
|
|
8951
|
+
if (item3.children && item3.children.length > 0) {
|
|
8952
|
+
toggleExpand(item3.value);
|
|
8941
8953
|
return;
|
|
8942
8954
|
}
|
|
8943
|
-
onValueChange?.(
|
|
8955
|
+
onValueChange?.(item3.value);
|
|
8944
8956
|
};
|
|
8945
|
-
const handleRailClick = (
|
|
8946
|
-
if (
|
|
8947
|
-
setActiveRail(
|
|
8948
|
-
onRailChange?.(
|
|
8949
|
-
if (!
|
|
8957
|
+
const handleRailClick = (item3) => {
|
|
8958
|
+
if (item3.disabled) return;
|
|
8959
|
+
setActiveRail(item3.value);
|
|
8960
|
+
onRailChange?.(item3.value);
|
|
8961
|
+
if (!item3.children || item3.children.length === 0) onValueChange?.(item3.value);
|
|
8950
8962
|
};
|
|
8951
8963
|
const handleFoldToggle = () => {
|
|
8952
8964
|
const next = !folded;
|
|
8953
8965
|
onFoldChange?.(next);
|
|
8954
8966
|
if (foldedProp === void 0) layout?.setFolded(next);
|
|
8955
8967
|
};
|
|
8956
|
-
const renderRailItem = (
|
|
8957
|
-
const isActive =
|
|
8958
|
-
const isHovered = hoveredKey ===
|
|
8968
|
+
const renderRailItem = (item3) => {
|
|
8969
|
+
const isActive = item3.value === activeRail;
|
|
8970
|
+
const isHovered = hoveredKey === item3.value && !item3.disabled;
|
|
8959
8971
|
return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8960
8972
|
"button",
|
|
8961
8973
|
{
|
|
8962
8974
|
type: "button",
|
|
8963
|
-
disabled:
|
|
8975
|
+
disabled: item3.disabled,
|
|
8964
8976
|
"aria-current": isActive ? "true" : void 0,
|
|
8965
8977
|
className: "box-border flex select-none flex-col items-center border-none bg-transparent transition-colors duration-150",
|
|
8966
8978
|
style: {
|
|
@@ -8975,31 +8987,31 @@ var SGnb = /* @__PURE__ */ react.forwardRef(function SGnb2({
|
|
|
8975
8987
|
fontSize: GNB_RAIL.itemFontSize,
|
|
8976
8988
|
lineHeight: `${GNB_RAIL.itemLineHeight}px`,
|
|
8977
8989
|
fontWeight: isActive ? GNB_RAIL.itemFontWeightSelected : GNB_RAIL.itemFontWeight,
|
|
8978
|
-
opacity:
|
|
8979
|
-
cursor:
|
|
8990
|
+
opacity: item3.disabled ? 0.4 : 1,
|
|
8991
|
+
cursor: item3.disabled ? "not-allowed" : "pointer"
|
|
8980
8992
|
},
|
|
8981
|
-
onClick: () => handleRailClick(
|
|
8982
|
-
...rowHoverProps(
|
|
8993
|
+
onClick: () => handleRailClick(item3),
|
|
8994
|
+
...rowHoverProps(item3),
|
|
8983
8995
|
children: [
|
|
8984
|
-
|
|
8996
|
+
item3.icon && /* @__PURE__ */ jsxRuntime.jsx(SIcon, { name: item3.icon, size: GNB_RAIL.itemIcon, className: "shrink-0" }),
|
|
8985
8997
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8986
8998
|
"span",
|
|
8987
8999
|
{
|
|
8988
9000
|
"data-gnb-label": true,
|
|
8989
9001
|
className: "w-full overflow-hidden text-ellipsis whitespace-nowrap text-center",
|
|
8990
|
-
children:
|
|
9002
|
+
children: item3.label
|
|
8991
9003
|
}
|
|
8992
9004
|
)
|
|
8993
9005
|
]
|
|
8994
9006
|
}
|
|
8995
|
-
) },
|
|
9007
|
+
) }, item3.value);
|
|
8996
9008
|
};
|
|
8997
|
-
const renderItem = (
|
|
8998
|
-
const hasChildren = !!(
|
|
8999
|
-
const isSelected = !hasChildren &&
|
|
9000
|
-
const isExpanded = expandedKeys.has(
|
|
9001
|
-
const isHovered = hoveredKey ===
|
|
9002
|
-
const iconBranch = depth === 1 ? !!
|
|
9009
|
+
const renderItem = (item3, depth, branchHasIcon = false) => {
|
|
9010
|
+
const hasChildren = !!(item3.children && item3.children.length > 0);
|
|
9011
|
+
const isSelected = !hasChildren && item3.value === value;
|
|
9012
|
+
const isExpanded = expandedKeys.has(item3.value);
|
|
9013
|
+
const isHovered = hoveredKey === item3.value && !item3.disabled;
|
|
9014
|
+
const iconBranch = depth === 1 ? !!item3.icon : branchHasIcon;
|
|
9003
9015
|
const itemStyle = {
|
|
9004
9016
|
gap: M.itemGap,
|
|
9005
9017
|
paddingTop: M.itemPaddingY,
|
|
@@ -9016,8 +9028,8 @@ var SGnb = /* @__PURE__ */ react.forwardRef(function SGnb2({
|
|
|
9016
9028
|
fontSize: depth === 1 ? M.depth1FontSize : M.itemFontSize,
|
|
9017
9029
|
lineHeight: `${depth === 1 ? M.depth1LineHeight : M.itemLineHeight}px`,
|
|
9018
9030
|
fontWeight: depth === 1 ? M.depth1FontWeight : isSelected ? M.itemFontWeightSelected : M.itemFontWeight,
|
|
9019
|
-
opacity:
|
|
9020
|
-
cursor:
|
|
9031
|
+
opacity: item3.disabled ? 0.4 : 1,
|
|
9032
|
+
cursor: item3.disabled ? "not-allowed" : "pointer"
|
|
9021
9033
|
};
|
|
9022
9034
|
return (
|
|
9023
9035
|
// li 를 flex-col 로 둬야 버튼이 좌우 마진만큼 안쪽으로 들어가고,
|
|
@@ -9027,18 +9039,18 @@ var SGnb = /* @__PURE__ */ react.forwardRef(function SGnb2({
|
|
|
9027
9039
|
"button",
|
|
9028
9040
|
{
|
|
9029
9041
|
type: "button",
|
|
9030
|
-
disabled:
|
|
9042
|
+
disabled: item3.disabled,
|
|
9031
9043
|
"aria-expanded": hasChildren ? isExpanded : void 0,
|
|
9032
9044
|
"aria-current": isSelected ? "page" : void 0,
|
|
9033
9045
|
className: "box-border flex select-none items-center border-none bg-transparent text-left transition-colors duration-150",
|
|
9034
9046
|
style: itemStyle,
|
|
9035
|
-
onClick: () => handleItemClick(
|
|
9036
|
-
...rowHoverProps(
|
|
9047
|
+
onClick: () => handleItemClick(item3),
|
|
9048
|
+
...rowHoverProps(item3),
|
|
9037
9049
|
children: [
|
|
9038
|
-
depth === 1 &&
|
|
9050
|
+
depth === 1 && item3.icon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9039
9051
|
SIcon,
|
|
9040
9052
|
{
|
|
9041
|
-
name:
|
|
9053
|
+
name: item3.icon,
|
|
9042
9054
|
size: M.depth1Icon,
|
|
9043
9055
|
color: isSelected ? C.itemColorActive : C.itemIcon,
|
|
9044
9056
|
className: "shrink-0"
|
|
@@ -9058,17 +9070,17 @@ var SGnb = /* @__PURE__ */ react.forwardRef(function SGnb2({
|
|
|
9058
9070
|
{
|
|
9059
9071
|
"data-gnb-label": true,
|
|
9060
9072
|
className: "min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
9061
|
-
children:
|
|
9073
|
+
children: item3.label
|
|
9062
9074
|
}
|
|
9063
9075
|
)
|
|
9064
9076
|
] }),
|
|
9065
|
-
|
|
9077
|
+
item3.tag !== void 0 && item3.tag !== "" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9066
9078
|
STag,
|
|
9067
9079
|
{
|
|
9068
9080
|
shape: "square",
|
|
9069
9081
|
size: "xs",
|
|
9070
|
-
color:
|
|
9071
|
-
label:
|
|
9082
|
+
color: item3.tagColor ?? "blue",
|
|
9083
|
+
label: item3.tag,
|
|
9072
9084
|
className: "shrink-0"
|
|
9073
9085
|
}
|
|
9074
9086
|
),
|
|
@@ -9101,16 +9113,16 @@ var SGnb = /* @__PURE__ */ react.forwardRef(function SGnb2({
|
|
|
9101
9113
|
visibility: isExpanded ? "visible" : "hidden",
|
|
9102
9114
|
transition: `visibility 0s linear ${isExpanded ? "0s" : `${GNB_EXPAND_MS}ms`}`
|
|
9103
9115
|
},
|
|
9104
|
-
children:
|
|
9116
|
+
children: item3.children.map((child) => renderItem(child, depth + 1, iconBranch))
|
|
9105
9117
|
}
|
|
9106
9118
|
)
|
|
9107
9119
|
}
|
|
9108
9120
|
)
|
|
9109
|
-
] },
|
|
9121
|
+
] }, item3.value)
|
|
9110
9122
|
);
|
|
9111
9123
|
};
|
|
9112
9124
|
const railItems = useRail ? items : [];
|
|
9113
|
-
const menuItems = useRail ? items.find((
|
|
9125
|
+
const menuItems = useRail ? items.find((item3) => item3.value === activeRail)?.children ?? [] : items;
|
|
9114
9126
|
const showMenu = !useRail || menuItems.length > 0;
|
|
9115
9127
|
const [uncontrolledMenuWidth, setUncontrolledMenuWidth] = react.useState(
|
|
9116
9128
|
() => defaultMenuWidth ?? GNB_MENU_WIDTH
|
|
@@ -9300,6 +9312,14 @@ var SGnb = /* @__PURE__ */ react.forwardRef(function SGnb2({
|
|
|
9300
9312
|
},
|
|
9301
9313
|
"topContent"
|
|
9302
9314
|
) : null;
|
|
9315
|
+
const systemMenuContext = react.useMemo(
|
|
9316
|
+
() => ({ color, folded: false }),
|
|
9317
|
+
[color]
|
|
9318
|
+
);
|
|
9319
|
+
const systemFoldedContext = react.useMemo(
|
|
9320
|
+
() => ({ color, folded: true }),
|
|
9321
|
+
[color]
|
|
9322
|
+
);
|
|
9303
9323
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9304
9324
|
"div",
|
|
9305
9325
|
{
|
|
@@ -9417,10 +9437,11 @@ var SGnb = /* @__PURE__ */ react.forwardRef(function SGnb2({
|
|
|
9417
9437
|
paddingTop: M.bodyPaddingY,
|
|
9418
9438
|
paddingBottom: M.bodyPaddingY
|
|
9419
9439
|
},
|
|
9420
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "m-0 flex list-none flex-col p-0", children: menuItems.map((
|
|
9440
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "m-0 flex list-none flex-col p-0", children: menuItems.map((item3) => renderItem(item3, 1)) })
|
|
9421
9441
|
}
|
|
9422
9442
|
),
|
|
9423
|
-
menuFooter && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: menuFooter })
|
|
9443
|
+
menuFooter && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: menuFooter }),
|
|
9444
|
+
system && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(SGnbSystemContext.Provider, { value: systemMenuContext, children: system }) })
|
|
9424
9445
|
]
|
|
9425
9446
|
}
|
|
9426
9447
|
)
|
|
@@ -9448,7 +9469,295 @@ var SGnb = /* @__PURE__ */ react.forwardRef(function SGnb2({
|
|
|
9448
9469
|
}
|
|
9449
9470
|
) })
|
|
9450
9471
|
] }),
|
|
9451
|
-
railFolded && foldedFooter && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center justify-center mb-[24px]", children: foldedFooter })
|
|
9472
|
+
railFolded && foldedFooter && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center justify-center mb-[24px]", children: foldedFooter }),
|
|
9473
|
+
railFolded && system && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(SGnbSystemContext.Provider, { value: systemFoldedContext, children: system }) })
|
|
9474
|
+
]
|
|
9475
|
+
}
|
|
9476
|
+
);
|
|
9477
|
+
});
|
|
9478
|
+
|
|
9479
|
+
// src/components/SGnbSystem/gnbSystem.config.ts
|
|
9480
|
+
var GNB_SYSTEM_COLORS = ["light", "dark"];
|
|
9481
|
+
var panel = (p) => `var(--cmp-gnb-system-panel-${p})`;
|
|
9482
|
+
var domain = (p) => `var(--cmp-gnb-system-domainTag-${p})`;
|
|
9483
|
+
var item2 = (p) => `var(--cmp-gnb-system-item-${p})`;
|
|
9484
|
+
var alert = (p) => `var(--cmp-gnb-system-alertButton-${p})`;
|
|
9485
|
+
var GNB_SYSTEM_COLOR_CONFIG = {
|
|
9486
|
+
light: {
|
|
9487
|
+
bg: panel("light-bg"),
|
|
9488
|
+
border: panel("light-border"),
|
|
9489
|
+
divider: panel("divider-color-light"),
|
|
9490
|
+
domainBg: domain("light-bg"),
|
|
9491
|
+
domainText: domain("light-text"),
|
|
9492
|
+
alertIcon: alert("icon-color-notification-light"),
|
|
9493
|
+
alertCount: alert("count-color-light"),
|
|
9494
|
+
alertHoverBg: alert("bg-notificationHover-light")
|
|
9495
|
+
},
|
|
9496
|
+
dark: {
|
|
9497
|
+
bg: panel("dark-bg"),
|
|
9498
|
+
// dark 는 패널 배경(#004177)이 GNB 배경(#001B39)과 달라 그 차이만으로 경계가 읽힌다.
|
|
9499
|
+
// 시안도 dark 패널 위에 선을 긋지 않으므로 --cmp-gnb-system-panel-dark-border 는 쓰지 않는다.
|
|
9500
|
+
// (light 는 패널 배경이 GNB 배경과 같은 흰색이라 이 선이 유일한 경계다.)
|
|
9501
|
+
border: void 0,
|
|
9502
|
+
divider: panel("divider-color-dark"),
|
|
9503
|
+
domainBg: domain("dark-bg"),
|
|
9504
|
+
domainText: domain("dark-text"),
|
|
9505
|
+
alertIcon: alert("icon-color-notification-dark"),
|
|
9506
|
+
alertCount: alert("count-color-dark"),
|
|
9507
|
+
// dark 에는 알림 hover 배경 토큰이 없다 → 행 기본 hover 를 그대로 쓴다.
|
|
9508
|
+
alertHoverBg: void 0
|
|
9509
|
+
}
|
|
9510
|
+
};
|
|
9511
|
+
var GNB_SYSTEM_LAYOUT = {
|
|
9512
|
+
/** 펼친 패널의 안쪽 여백 */
|
|
9513
|
+
padding: "var(--cmp-gnb-system-project-padding)",
|
|
9514
|
+
/** 접힌(min) 패널의 안쪽 여백 */
|
|
9515
|
+
foldedPadding: "var(--cmp-gnb-system-min-padding)",
|
|
9516
|
+
/**
|
|
9517
|
+
* 패널이 쌓는 블록 사이 간격. 알림↔설정 사이의 가로 간격도 전용 토큰이 없어 이 값을 쓴다
|
|
9518
|
+
* (시안에서 두 간격이 같다).
|
|
9519
|
+
*/
|
|
9520
|
+
gap: panel("gap"),
|
|
9521
|
+
/** 행 높이 */
|
|
9522
|
+
itemHeight: item2("height"),
|
|
9523
|
+
/** 행 라운드 */
|
|
9524
|
+
itemRadius: item2("radius"),
|
|
9525
|
+
/** 아이콘 프레임 한 변 */
|
|
9526
|
+
iconFrame: item2("icon-frame"),
|
|
9527
|
+
/** 아이콘 글리프 크기 */
|
|
9528
|
+
iconGlyph: item2("icon-glyph"),
|
|
9529
|
+
/** 아이콘 프레임 라운드 */
|
|
9530
|
+
iconRadius: item2("icon-radius"),
|
|
9531
|
+
/** 아이콘 프레임 ↔ 라벨 간격 */
|
|
9532
|
+
iconLabelGap: item2("iconLabelGap"),
|
|
9533
|
+
/** 알림 버튼 좌우 여백 */
|
|
9534
|
+
alertPaddingX: alert("paddingX"),
|
|
9535
|
+
/** 설정 버튼 좌우 여백 */
|
|
9536
|
+
settingPaddingX: "var(--cmp-gnb-system-setting-paddingX)",
|
|
9537
|
+
/** 도메인 태그 */
|
|
9538
|
+
domainPaddingX: domain("paddingX"),
|
|
9539
|
+
domainPaddingY: domain("paddingY"),
|
|
9540
|
+
domainRadius: domain("radius")
|
|
9541
|
+
};
|
|
9542
|
+
var GNB_SYSTEM_ALERT_DOT_SIZE = 6;
|
|
9543
|
+
var GNB_SYSTEM_ALERT_LABEL = "\uC54C\uB9BC";
|
|
9544
|
+
var GNB_SYSTEM_SETTING_LABEL = "\uC124\uC815";
|
|
9545
|
+
function TokenIcon2({ name, size }) {
|
|
9546
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SIcon, { name, size: "100%", style: { width: size, height: size } });
|
|
9547
|
+
}
|
|
9548
|
+
function SystemButton({
|
|
9549
|
+
color,
|
|
9550
|
+
icon,
|
|
9551
|
+
label,
|
|
9552
|
+
ariaLabel,
|
|
9553
|
+
paddingX,
|
|
9554
|
+
iconColor,
|
|
9555
|
+
hoverBg,
|
|
9556
|
+
count,
|
|
9557
|
+
dot,
|
|
9558
|
+
accentColor,
|
|
9559
|
+
stretch,
|
|
9560
|
+
onClick
|
|
9561
|
+
}) {
|
|
9562
|
+
const c = SYSTEM_ACTION_BUTTON_COLOR_CONFIG[color];
|
|
9563
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9564
|
+
"button",
|
|
9565
|
+
{
|
|
9566
|
+
type: "button",
|
|
9567
|
+
"aria-label": label ? void 0 : ariaLabel,
|
|
9568
|
+
onClick,
|
|
9569
|
+
className: cn(
|
|
9570
|
+
"group box-border flex cursor-pointer items-center border-none bg-(--gsb-bg) text-(--gsb-text) transition-colors hover:bg-(--gsb-bg-hover)",
|
|
9571
|
+
stretch ? "min-w-0 flex-1" : "shrink-0",
|
|
9572
|
+
label ? "text-left" : "justify-center"
|
|
9573
|
+
),
|
|
9574
|
+
style: {
|
|
9575
|
+
"--gsb-bg": c.bg,
|
|
9576
|
+
"--gsb-bg-hover": hoverBg ?? c.bgHover,
|
|
9577
|
+
"--gsb-icon-bg": c.iconBg,
|
|
9578
|
+
"--gsb-icon-bg-hover": c.iconBgHover,
|
|
9579
|
+
"--gsb-icon": iconColor ?? c.iconGlyph,
|
|
9580
|
+
// 강조색을 받은 알림은 hover 해도 그 색을 유지한다 — 색이 곧 "알림이 있다" 는 표시다.
|
|
9581
|
+
"--gsb-icon-hover": iconColor ?? c.iconGlyphHover,
|
|
9582
|
+
"--gsb-text": c.text,
|
|
9583
|
+
"minHeight": GNB_SYSTEM_LAYOUT.itemHeight,
|
|
9584
|
+
"borderRadius": GNB_SYSTEM_LAYOUT.itemRadius,
|
|
9585
|
+
"paddingLeft": paddingX,
|
|
9586
|
+
"paddingRight": paddingX,
|
|
9587
|
+
"gap": GNB_SYSTEM_LAYOUT.iconLabelGap
|
|
9588
|
+
},
|
|
9589
|
+
children: [
|
|
9590
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9591
|
+
"span",
|
|
9592
|
+
{
|
|
9593
|
+
className: "relative inline-flex shrink-0 items-center justify-center bg-(--gsb-icon-bg) text-(--gsb-icon) transition-colors group-hover:bg-(--gsb-icon-bg-hover) group-hover:text-(--gsb-icon-hover)",
|
|
9594
|
+
style: { width: GNB_SYSTEM_LAYOUT.iconFrame, height: GNB_SYSTEM_LAYOUT.iconFrame, borderRadius: GNB_SYSTEM_LAYOUT.iconRadius },
|
|
9595
|
+
children: [
|
|
9596
|
+
/* @__PURE__ */ jsxRuntime.jsx(TokenIcon2, { name: icon, size: GNB_SYSTEM_LAYOUT.iconGlyph }),
|
|
9597
|
+
dot && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9598
|
+
"span",
|
|
9599
|
+
{
|
|
9600
|
+
className: "absolute",
|
|
9601
|
+
style: {
|
|
9602
|
+
top: 1,
|
|
9603
|
+
right: -GNB_SYSTEM_ALERT_DOT_SIZE / 2,
|
|
9604
|
+
width: GNB_SYSTEM_ALERT_DOT_SIZE,
|
|
9605
|
+
height: GNB_SYSTEM_ALERT_DOT_SIZE,
|
|
9606
|
+
borderRadius: "50%",
|
|
9607
|
+
backgroundColor: accentColor
|
|
9608
|
+
}
|
|
9609
|
+
}
|
|
9610
|
+
)
|
|
9611
|
+
]
|
|
9612
|
+
}
|
|
9613
|
+
),
|
|
9614
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "typo-body-sm-semibold min-w-0 flex-1 truncate", children: label }),
|
|
9615
|
+
count != null && count > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "typo-body-md-bold shrink-0", style: { color: accentColor }, children: count.toLocaleString() })
|
|
9616
|
+
]
|
|
9617
|
+
}
|
|
9618
|
+
);
|
|
9619
|
+
}
|
|
9620
|
+
var SGnbSystem = /* @__PURE__ */ react.forwardRef(function SGnbSystem2({
|
|
9621
|
+
color: colorProp,
|
|
9622
|
+
folded: foldedProp,
|
|
9623
|
+
actions,
|
|
9624
|
+
domain: domain2,
|
|
9625
|
+
alert: alert2,
|
|
9626
|
+
setting,
|
|
9627
|
+
account,
|
|
9628
|
+
className,
|
|
9629
|
+
style,
|
|
9630
|
+
...rest
|
|
9631
|
+
}, ref) {
|
|
9632
|
+
const gnb2 = react.useContext(SGnbSystemContext);
|
|
9633
|
+
const color = colorProp ?? gnb2?.color ?? "light";
|
|
9634
|
+
const folded = foldedProp ?? gnb2?.folded ?? false;
|
|
9635
|
+
const c = GNB_SYSTEM_COLOR_CONFIG[color];
|
|
9636
|
+
const hasActions = (actions?.length ?? 0) > 0;
|
|
9637
|
+
const hasDomain = domain2 != null;
|
|
9638
|
+
const hasUserBlock = Boolean(alert2 || setting || account);
|
|
9639
|
+
const alertCount = alert2?.count ?? 0;
|
|
9640
|
+
const notified = alertCount > 0;
|
|
9641
|
+
const alertLabel = alert2?.label ?? GNB_SYSTEM_ALERT_LABEL;
|
|
9642
|
+
const settingLabel = setting?.label ?? GNB_SYSTEM_SETTING_LABEL;
|
|
9643
|
+
const alertButton = alert2 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9644
|
+
SystemButton,
|
|
9645
|
+
{
|
|
9646
|
+
color,
|
|
9647
|
+
icon: notified ? "alert" : "bell",
|
|
9648
|
+
label: folded ? void 0 : alertLabel,
|
|
9649
|
+
ariaLabel: alertLabel,
|
|
9650
|
+
paddingX: GNB_SYSTEM_LAYOUT.alertPaddingX,
|
|
9651
|
+
iconColor: notified ? c.alertIcon : void 0,
|
|
9652
|
+
hoverBg: notified ? c.alertHoverBg : void 0,
|
|
9653
|
+
count: folded ? void 0 : alertCount,
|
|
9654
|
+
dot: folded && notified,
|
|
9655
|
+
accentColor: c.alertCount,
|
|
9656
|
+
stretch: !folded,
|
|
9657
|
+
onClick: alert2.onClick
|
|
9658
|
+
}
|
|
9659
|
+
);
|
|
9660
|
+
const panelStyle = {
|
|
9661
|
+
backgroundColor: c.bg,
|
|
9662
|
+
// 색에 따라 경계선이 없을 수 있다 — 배경 차이만으로 경계가 읽히는 dark 가 그렇다.
|
|
9663
|
+
borderTop: c.border ? `1px solid ${c.border}` : void 0,
|
|
9664
|
+
padding: folded ? GNB_SYSTEM_LAYOUT.foldedPadding : GNB_SYSTEM_LAYOUT.padding,
|
|
9665
|
+
...style
|
|
9666
|
+
};
|
|
9667
|
+
if (folded) {
|
|
9668
|
+
if (!alert2 && !account) return null;
|
|
9669
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9670
|
+
"div",
|
|
9671
|
+
{
|
|
9672
|
+
ref,
|
|
9673
|
+
className: cn("box-border flex w-full flex-col", className),
|
|
9674
|
+
style: panelStyle,
|
|
9675
|
+
"data-color": color,
|
|
9676
|
+
"data-folded": "",
|
|
9677
|
+
...rest,
|
|
9678
|
+
children: [
|
|
9679
|
+
alertButton,
|
|
9680
|
+
account && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9681
|
+
SystemButton,
|
|
9682
|
+
{
|
|
9683
|
+
color,
|
|
9684
|
+
icon: "user",
|
|
9685
|
+
ariaLabel: account.label ?? "account",
|
|
9686
|
+
paddingX: GNB_SYSTEM_LAYOUT.alertPaddingX,
|
|
9687
|
+
onClick: account.onClick
|
|
9688
|
+
}
|
|
9689
|
+
)
|
|
9690
|
+
]
|
|
9691
|
+
}
|
|
9692
|
+
);
|
|
9693
|
+
}
|
|
9694
|
+
if (!hasActions && !hasDomain && !hasUserBlock) return null;
|
|
9695
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9696
|
+
"div",
|
|
9697
|
+
{
|
|
9698
|
+
ref,
|
|
9699
|
+
className: cn("box-border flex w-full flex-col", className),
|
|
9700
|
+
style: { ...panelStyle, gap: GNB_SYSTEM_LAYOUT.gap },
|
|
9701
|
+
"data-color": color,
|
|
9702
|
+
...rest,
|
|
9703
|
+
children: [
|
|
9704
|
+
actions?.map(({ value, ...action2 }, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9705
|
+
SSystemActionButton,
|
|
9706
|
+
{
|
|
9707
|
+
color,
|
|
9708
|
+
...action2
|
|
9709
|
+
},
|
|
9710
|
+
value ?? index
|
|
9711
|
+
)),
|
|
9712
|
+
hasActions && (hasDomain || hasUserBlock) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px shrink-0", style: { backgroundColor: c.divider } }),
|
|
9713
|
+
domain2 != null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9714
|
+
"div",
|
|
9715
|
+
{
|
|
9716
|
+
className: "typo-body-sm-medium box-border w-full truncate text-center",
|
|
9717
|
+
style: {
|
|
9718
|
+
paddingInline: GNB_SYSTEM_LAYOUT.domainPaddingX,
|
|
9719
|
+
paddingBlock: GNB_SYSTEM_LAYOUT.domainPaddingY,
|
|
9720
|
+
borderRadius: GNB_SYSTEM_LAYOUT.domainRadius,
|
|
9721
|
+
backgroundColor: c.domainBg,
|
|
9722
|
+
color: c.domainText
|
|
9723
|
+
},
|
|
9724
|
+
children: domain2
|
|
9725
|
+
}
|
|
9726
|
+
),
|
|
9727
|
+
hasUserBlock && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
9728
|
+
(alert2 || setting) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", style: { gap: GNB_SYSTEM_LAYOUT.gap }, children: [
|
|
9729
|
+
alertButton,
|
|
9730
|
+
alert2 && setting && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9731
|
+
"span",
|
|
9732
|
+
{
|
|
9733
|
+
className: "h-sd-16 w-px shrink-0",
|
|
9734
|
+
style: { backgroundColor: c.divider },
|
|
9735
|
+
"aria-hidden": true
|
|
9736
|
+
}
|
|
9737
|
+
),
|
|
9738
|
+
setting && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9739
|
+
SystemButton,
|
|
9740
|
+
{
|
|
9741
|
+
color,
|
|
9742
|
+
icon: "setting",
|
|
9743
|
+
label: settingLabel,
|
|
9744
|
+
ariaLabel: settingLabel,
|
|
9745
|
+
paddingX: GNB_SYSTEM_LAYOUT.settingPaddingX,
|
|
9746
|
+
stretch: !alert2,
|
|
9747
|
+
onClick: setting.onClick
|
|
9748
|
+
}
|
|
9749
|
+
)
|
|
9750
|
+
] }),
|
|
9751
|
+
account && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9752
|
+
SSystemActionButton,
|
|
9753
|
+
{
|
|
9754
|
+
color,
|
|
9755
|
+
type: "account",
|
|
9756
|
+
label: account.label,
|
|
9757
|
+
onClick: account.onClick
|
|
9758
|
+
}
|
|
9759
|
+
)
|
|
9760
|
+
] })
|
|
9452
9761
|
]
|
|
9453
9762
|
}
|
|
9454
9763
|
);
|
|
@@ -10068,19 +10377,19 @@ var STEPPER_VERTICAL_COLORS = {
|
|
|
10068
10377
|
errorBadge: "#FB4444"
|
|
10069
10378
|
};
|
|
10070
10379
|
var ERROR_TOOLTIP_MESSAGE = "\uD655\uC778\uC774 \uD544\uC694\uD55C \uD56D\uBAA9\uC774 \uC788\uC2B5\uB2C8\uB2E4.";
|
|
10071
|
-
function getItemValue(
|
|
10072
|
-
return
|
|
10380
|
+
function getItemValue(item3, index) {
|
|
10381
|
+
return item3.value ?? String(index + 1);
|
|
10073
10382
|
}
|
|
10074
10383
|
function groupAdjacentItems(items) {
|
|
10075
10384
|
return items.reduce(
|
|
10076
|
-
(groups,
|
|
10077
|
-
const currentGroup =
|
|
10385
|
+
(groups, item3, index) => {
|
|
10386
|
+
const currentGroup = item3.group;
|
|
10078
10387
|
const previous = groups[groups.length - 1];
|
|
10079
10388
|
if (currentGroup && previous?.group === currentGroup) {
|
|
10080
|
-
previous.items.push(
|
|
10389
|
+
previous.items.push(item3);
|
|
10081
10390
|
return groups;
|
|
10082
10391
|
}
|
|
10083
|
-
groups.push({ group: currentGroup, startIndex: index, items: [
|
|
10392
|
+
groups.push({ group: currentGroup, startIndex: index, items: [item3] });
|
|
10084
10393
|
return groups;
|
|
10085
10394
|
},
|
|
10086
10395
|
[]
|
|
@@ -10110,15 +10419,15 @@ var SStepper = /* @__PURE__ */ react.forwardRef(function SStepper2({
|
|
|
10110
10419
|
const verticalItemRefs = react.useRef([]);
|
|
10111
10420
|
const activeIndex = Math.max(
|
|
10112
10421
|
0,
|
|
10113
|
-
items.findIndex((
|
|
10422
|
+
items.findIndex((item3, index) => getItemValue(item3, index) === value)
|
|
10114
10423
|
);
|
|
10115
10424
|
const lastCompletedIndex = items.reduce(
|
|
10116
|
-
(lastIndex,
|
|
10425
|
+
(lastIndex, item3, index) => item3.completed === true ? index : lastIndex,
|
|
10117
10426
|
-1
|
|
10118
10427
|
);
|
|
10119
10428
|
const resolvedClickableIndex = lastCompletedIndex + 1;
|
|
10120
10429
|
const [visitedMaxIndex, setVisitedMaxIndex] = react.useState(activeIndex);
|
|
10121
|
-
const firstErrorIndex = items.findIndex((
|
|
10430
|
+
const firstErrorIndex = items.findIndex((item3) => item3.error === true);
|
|
10122
10431
|
react.useImperativeHandle(
|
|
10123
10432
|
ref,
|
|
10124
10433
|
() => ({
|
|
@@ -10146,18 +10455,18 @@ var SStepper = /* @__PURE__ */ react.forwardRef(function SStepper2({
|
|
|
10146
10455
|
transform: `translateY(${activeItem.offsetTop}px)`
|
|
10147
10456
|
});
|
|
10148
10457
|
}, [activeIndex, vertical, items]);
|
|
10149
|
-
const getState = (
|
|
10458
|
+
const getState = (item3, index) => {
|
|
10150
10459
|
if (index === activeIndex) return "active";
|
|
10151
|
-
if (
|
|
10460
|
+
if (item3.completed != null) return item3.completed ? "completed" : "default";
|
|
10152
10461
|
return "default";
|
|
10153
10462
|
};
|
|
10154
|
-
const emitValueChange = (
|
|
10155
|
-
onValueChange?.(getItemValue(
|
|
10463
|
+
const emitValueChange = (item3, index) => {
|
|
10464
|
+
onValueChange?.(getItemValue(item3, index), item3, index);
|
|
10156
10465
|
};
|
|
10157
10466
|
const isWithinClickableIndex = (index) => index <= resolvedClickableIndex;
|
|
10158
|
-
const renderStepContent = (
|
|
10467
|
+
const renderStepContent = (item3, index, options = {}) => {
|
|
10159
10468
|
const { isVertical = false, roleListItem = true, hovered = false } = options;
|
|
10160
|
-
const state2 = getState(
|
|
10469
|
+
const state2 = getState(item3, index);
|
|
10161
10470
|
const isHorizontalCompleted = !isVertical && state2 === "completed";
|
|
10162
10471
|
const isVerticalCompleted = isVertical && state2 === "completed";
|
|
10163
10472
|
const isVerticalLastActive = isVertical && state2 === "default" && index === visitedMaxIndex;
|
|
@@ -10232,12 +10541,12 @@ var SStepper = /* @__PURE__ */ react.forwardRef(function SStepper2({
|
|
|
10232
10541
|
children: showsCheckIcon ? /* @__PURE__ */ jsxRuntime.jsx(SIcon, { name: "check", size: STEPPER_LAYOUT.sequenceIcon, color: "currentColor" }) : index + 1
|
|
10233
10542
|
}
|
|
10234
10543
|
),
|
|
10235
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children:
|
|
10544
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: item3.label })
|
|
10236
10545
|
]
|
|
10237
10546
|
}
|
|
10238
10547
|
);
|
|
10239
10548
|
};
|
|
10240
|
-
const renderClickableStepContent = (
|
|
10549
|
+
const renderClickableStepContent = (item3, index, isVertical = false) => {
|
|
10241
10550
|
const isDisabled = !isWithinClickableIndex(index);
|
|
10242
10551
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10243
10552
|
"button",
|
|
@@ -10250,9 +10559,9 @@ var SStepper = /* @__PURE__ */ react.forwardRef(function SStepper2({
|
|
|
10250
10559
|
),
|
|
10251
10560
|
style: { font: "inherit", color: "inherit" },
|
|
10252
10561
|
onClick: () => {
|
|
10253
|
-
if (!isDisabled) emitValueChange(
|
|
10562
|
+
if (!isDisabled) emitValueChange(item3, index);
|
|
10254
10563
|
},
|
|
10255
|
-
children: renderStepContent(
|
|
10564
|
+
children: renderStepContent(item3, index, { isVertical, roleListItem: false })
|
|
10256
10565
|
}
|
|
10257
10566
|
);
|
|
10258
10567
|
};
|
|
@@ -10311,10 +10620,10 @@ var SStepper = /* @__PURE__ */ react.forwardRef(function SStepper2({
|
|
|
10311
10620
|
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "whitespace-nowrap", children: group.group })
|
|
10312
10621
|
}
|
|
10313
10622
|
),
|
|
10314
|
-
group.items.map((
|
|
10623
|
+
group.items.map((item3, itemIndex) => {
|
|
10315
10624
|
const index = group.startIndex + itemIndex;
|
|
10316
|
-
const state2 = getState(
|
|
10317
|
-
const itemValue = getItemValue(
|
|
10625
|
+
const state2 = getState(item3, index);
|
|
10626
|
+
const itemValue = getItemValue(item3, index);
|
|
10318
10627
|
const canClickItem = isClickable && isWithinClickableIndex(index);
|
|
10319
10628
|
const isDisabled = !canClickItem;
|
|
10320
10629
|
const isHovered = hoveredIndex === index && canClickItem && state2 !== "active";
|
|
@@ -10332,12 +10641,12 @@ var SStepper = /* @__PURE__ */ react.forwardRef(function SStepper2({
|
|
|
10332
10641
|
const handleMouseLeave = () => {
|
|
10333
10642
|
setHoveredIndex((current) => current === index ? null : current);
|
|
10334
10643
|
};
|
|
10335
|
-
const stepContent = renderStepContent(
|
|
10644
|
+
const stepContent = renderStepContent(item3, index, {
|
|
10336
10645
|
isVertical: true,
|
|
10337
10646
|
roleListItem: false,
|
|
10338
10647
|
hovered: isHovered
|
|
10339
10648
|
});
|
|
10340
|
-
const errorBadge =
|
|
10649
|
+
const errorBadge = item3.error ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10341
10650
|
"span",
|
|
10342
10651
|
{
|
|
10343
10652
|
"aria-hidden": "true",
|
|
@@ -10352,7 +10661,7 @@ var SStepper = /* @__PURE__ */ react.forwardRef(function SStepper2({
|
|
|
10352
10661
|
) : null;
|
|
10353
10662
|
const isTooltipHovered = tooltipHoverValue === itemValue;
|
|
10354
10663
|
const isCustomTooltipOpen = customTooltipOpen && index === firstErrorIndex;
|
|
10355
|
-
const showTooltip =
|
|
10664
|
+
const showTooltip = item3.error === true && (isTooltipHovered || isCustomTooltipOpen);
|
|
10356
10665
|
const handleTooltipMouseEnter = () => setTooltipHoverValue(itemValue);
|
|
10357
10666
|
const handleTooltipMouseLeave = () => {
|
|
10358
10667
|
setTooltipHoverValue((current) => current === itemValue ? null : current);
|
|
@@ -10376,7 +10685,7 @@ var SStepper = /* @__PURE__ */ react.forwardRef(function SStepper2({
|
|
|
10376
10685
|
onMouseEnter: handleTooltipMouseEnter,
|
|
10377
10686
|
onMouseLeave: handleTooltipMouseLeave,
|
|
10378
10687
|
onClick: isClickable ? () => {
|
|
10379
|
-
if (!isDisabled) emitValueChange(
|
|
10688
|
+
if (!isDisabled) emitValueChange(item3, index);
|
|
10380
10689
|
} : void 0,
|
|
10381
10690
|
children: [
|
|
10382
10691
|
stepContent,
|
|
@@ -10408,13 +10717,13 @@ var SStepper = /* @__PURE__ */ react.forwardRef(function SStepper2({
|
|
|
10408
10717
|
{
|
|
10409
10718
|
type: "button",
|
|
10410
10719
|
disabled: isDisabled,
|
|
10411
|
-
"aria-label":
|
|
10720
|
+
"aria-label": item3.label,
|
|
10412
10721
|
className: cn(
|
|
10413
10722
|
"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)",
|
|
10414
10723
|
isDisabled ? "cursor-default" : "cursor-pointer"
|
|
10415
10724
|
),
|
|
10416
10725
|
onClick: () => {
|
|
10417
|
-
if (!isDisabled) emitValueChange(
|
|
10726
|
+
if (!isDisabled) emitValueChange(item3, index);
|
|
10418
10727
|
}
|
|
10419
10728
|
}
|
|
10420
10729
|
),
|
|
@@ -10465,9 +10774,9 @@ var SStepper = /* @__PURE__ */ react.forwardRef(function SStepper2({
|
|
|
10465
10774
|
lineHeight: config.lineHeight,
|
|
10466
10775
|
...style
|
|
10467
10776
|
},
|
|
10468
|
-
children: items.map((
|
|
10469
|
-
const state2 = getState(
|
|
10470
|
-
const content = isClickable ? /* @__PURE__ */ jsxRuntime.jsx("span", { role: "listitem", "aria-current": state2 === "active" ? "step" : void 0, children: renderClickableStepContent(
|
|
10777
|
+
children: items.map((item3, index) => {
|
|
10778
|
+
const state2 = getState(item3, index);
|
|
10779
|
+
const content = isClickable ? /* @__PURE__ */ jsxRuntime.jsx("span", { role: "listitem", "aria-current": state2 === "active" ? "step" : void 0, children: renderClickableStepContent(item3, index) }) : renderStepContent(item3, index);
|
|
10471
10780
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10472
10781
|
"span",
|
|
10473
10782
|
{
|
|
@@ -10501,7 +10810,7 @@ var SStepper = /* @__PURE__ */ react.forwardRef(function SStepper2({
|
|
|
10501
10810
|
)
|
|
10502
10811
|
]
|
|
10503
10812
|
},
|
|
10504
|
-
getItemValue(
|
|
10813
|
+
getItemValue(item3, index)
|
|
10505
10814
|
);
|
|
10506
10815
|
})
|
|
10507
10816
|
}
|
|
@@ -11052,7 +11361,7 @@ var SSelectImpl = /* @__PURE__ */ react.forwardRef(function SSelect({
|
|
|
11052
11361
|
const selectedAnchorIndex = react.useMemo(() => {
|
|
11053
11362
|
if (selected.length === 0) return -1;
|
|
11054
11363
|
const selectedSet = new Set(selected);
|
|
11055
|
-
return navigableItems.findIndex((
|
|
11364
|
+
return navigableItems.findIndex((item3) => item3.value != null && selectedSet.has(item3.value));
|
|
11056
11365
|
}, [navigableItems, selected]);
|
|
11057
11366
|
selectedAnchorRef.current = selectedAnchorIndex;
|
|
11058
11367
|
const triggerText = (() => {
|
|
@@ -11346,7 +11655,7 @@ var SSelectImpl = /* @__PURE__ */ react.forwardRef(function SSelect({
|
|
|
11346
11655
|
setFocusedIndex(-1);
|
|
11347
11656
|
return;
|
|
11348
11657
|
}
|
|
11349
|
-
const index = navigableItems.findIndex((
|
|
11658
|
+
const index = navigableItems.findIndex((item3) => item3.key === key);
|
|
11350
11659
|
if (index >= 0) setFocusedIndex(index);
|
|
11351
11660
|
}
|
|
11352
11661
|
}
|
|
@@ -13424,7 +13733,7 @@ function SCalendar({
|
|
|
13424
13733
|
}) }),
|
|
13425
13734
|
legend.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13426
13735
|
/* @__PURE__ */ jsxRuntime.jsx(SDivider, {}),
|
|
13427
|
-
/* @__PURE__ */ jsxRuntime.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((
|
|
13736
|
+
/* @__PURE__ */ jsxRuntime.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((item3) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13428
13737
|
"span",
|
|
13429
13738
|
{
|
|
13430
13739
|
className: "inline-flex items-center gap-[var(--cmp-datepicker-calendar-legend-gap)]",
|
|
@@ -13433,14 +13742,14 @@ function SCalendar({
|
|
|
13433
13742
|
"span",
|
|
13434
13743
|
{
|
|
13435
13744
|
className: "h-[var(--cmp-datepicker-calendar-day-dot-size)] w-[var(--cmp-datepicker-calendar-day-dot-size)] rounded-full",
|
|
13436
|
-
style: { backgroundColor: resolveColor(
|
|
13745
|
+
style: { backgroundColor: resolveColor(item3.color) },
|
|
13437
13746
|
"aria-hidden": true
|
|
13438
13747
|
}
|
|
13439
13748
|
),
|
|
13440
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children:
|
|
13749
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: item3.label })
|
|
13441
13750
|
]
|
|
13442
13751
|
},
|
|
13443
|
-
`${
|
|
13752
|
+
`${item3.color}|${item3.label}`
|
|
13444
13753
|
)) })
|
|
13445
13754
|
] })
|
|
13446
13755
|
]
|
|
@@ -13996,7 +14305,8 @@ function RangeCalendar({
|
|
|
13996
14305
|
if (e !== "" && d > e) return true;
|
|
13997
14306
|
}
|
|
13998
14307
|
if (maxRange && maxRange > 0 && start && !end) {
|
|
13999
|
-
|
|
14308
|
+
const span = maxRange - 1;
|
|
14309
|
+
if (d < addDays(start, -span) || d > addDays(start, span)) return true;
|
|
14000
14310
|
}
|
|
14001
14311
|
return false;
|
|
14002
14312
|
};
|
|
@@ -16561,19 +16871,19 @@ function EditorToolbarBar({
|
|
|
16561
16871
|
closeLinkEditor();
|
|
16562
16872
|
};
|
|
16563
16873
|
const visible = [];
|
|
16564
|
-
for (const
|
|
16565
|
-
if (
|
|
16566
|
-
if (
|
|
16567
|
-
visible.push(
|
|
16874
|
+
for (const item3 of items) {
|
|
16875
|
+
if (item3 === "image" && !onImageUpload) continue;
|
|
16876
|
+
if (item3 === "|" && (visible.length === 0 || visible[visible.length - 1] === "|")) continue;
|
|
16877
|
+
visible.push(item3);
|
|
16568
16878
|
}
|
|
16569
16879
|
while (visible.length > 0 && visible[visible.length - 1] === "|") visible.pop();
|
|
16570
16880
|
const groups = [[]];
|
|
16571
|
-
for (const
|
|
16572
|
-
if (
|
|
16573
|
-
else groups[groups.length - 1].push(
|
|
16881
|
+
for (const item3 of visible) {
|
|
16882
|
+
if (item3 === "|") groups.push([]);
|
|
16883
|
+
else groups[groups.length - 1].push(item3);
|
|
16574
16884
|
}
|
|
16575
|
-
const node = (
|
|
16576
|
-
switch (
|
|
16885
|
+
const node = (item3) => {
|
|
16886
|
+
switch (item3) {
|
|
16577
16887
|
case "heading":
|
|
16578
16888
|
return /* @__PURE__ */ jsxRuntime.jsxs(RDropdown2__namespace.Root, { modal: !insideModal, children: [
|
|
16579
16889
|
/* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Trigger, { asChild: true, disabled: off, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -16608,7 +16918,7 @@ function EditorToolbarBar({
|
|
|
16608
16918
|
level
|
|
16609
16919
|
))
|
|
16610
16920
|
] }) })
|
|
16611
|
-
] },
|
|
16921
|
+
] }, item3);
|
|
16612
16922
|
case "fontSize":
|
|
16613
16923
|
return /* @__PURE__ */ jsxRuntime.jsxs(RDropdown2__namespace.Root, { modal: !insideModal, children: [
|
|
16614
16924
|
/* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Trigger, { asChild: true, disabled: off, children: /* @__PURE__ */ jsxRuntime.jsxs(ToolbarButton, { label: "\uAE00\uC790 \uD06C\uAE30", disabled: off, className: "px-[6px]", children: [
|
|
@@ -16647,7 +16957,7 @@ function EditorToolbarBar({
|
|
|
16647
16957
|
]
|
|
16648
16958
|
}
|
|
16649
16959
|
) })
|
|
16650
|
-
] },
|
|
16960
|
+
] }, item3);
|
|
16651
16961
|
case "bold":
|
|
16652
16962
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16653
16963
|
ToolbarButton,
|
|
@@ -16659,7 +16969,7 @@ function EditorToolbarBar({
|
|
|
16659
16969
|
onClick: () => chain()?.toggleBold().run(),
|
|
16660
16970
|
children: /* @__PURE__ */ jsxRuntime.jsx(IconBold, { size: ICON_SIZE })
|
|
16661
16971
|
},
|
|
16662
|
-
|
|
16972
|
+
item3
|
|
16663
16973
|
);
|
|
16664
16974
|
case "italic":
|
|
16665
16975
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16672,7 +16982,7 @@ function EditorToolbarBar({
|
|
|
16672
16982
|
onClick: () => chain()?.toggleItalic().run(),
|
|
16673
16983
|
children: /* @__PURE__ */ jsxRuntime.jsx(IconItalic, { size: ICON_SIZE })
|
|
16674
16984
|
},
|
|
16675
|
-
|
|
16985
|
+
item3
|
|
16676
16986
|
);
|
|
16677
16987
|
case "underline":
|
|
16678
16988
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16685,7 +16995,7 @@ function EditorToolbarBar({
|
|
|
16685
16995
|
onClick: () => chain()?.toggleUnderline().run(),
|
|
16686
16996
|
children: /* @__PURE__ */ jsxRuntime.jsx(IconUnderline, { size: ICON_SIZE })
|
|
16687
16997
|
},
|
|
16688
|
-
|
|
16998
|
+
item3
|
|
16689
16999
|
);
|
|
16690
17000
|
case "strike":
|
|
16691
17001
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16698,7 +17008,7 @@ function EditorToolbarBar({
|
|
|
16698
17008
|
onClick: () => chain()?.toggleStrike().run(),
|
|
16699
17009
|
children: /* @__PURE__ */ jsxRuntime.jsx(IconStrike, { size: ICON_SIZE })
|
|
16700
17010
|
},
|
|
16701
|
-
|
|
17011
|
+
item3
|
|
16702
17012
|
);
|
|
16703
17013
|
case "code":
|
|
16704
17014
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16711,7 +17021,7 @@ function EditorToolbarBar({
|
|
|
16711
17021
|
onClick: () => chain()?.toggleCode().run(),
|
|
16712
17022
|
children: /* @__PURE__ */ jsxRuntime.jsx(IconCode, { size: ICON_SIZE })
|
|
16713
17023
|
},
|
|
16714
|
-
|
|
17024
|
+
item3
|
|
16715
17025
|
);
|
|
16716
17026
|
case "color":
|
|
16717
17027
|
if (mobile)
|
|
@@ -16723,7 +17033,7 @@ function EditorToolbarBar({
|
|
|
16723
17033
|
onClick: () => setMobileView("color"),
|
|
16724
17034
|
children: /* @__PURE__ */ jsxRuntime.jsx(ColorIndicator, { color: off ? "currentColor" : activeColor, children: /* @__PURE__ */ jsxRuntime.jsx(IconTextColor, { size: ICON_SIZE }) })
|
|
16725
17035
|
},
|
|
16726
|
-
|
|
17036
|
+
item3
|
|
16727
17037
|
);
|
|
16728
17038
|
return /* @__PURE__ */ jsxRuntime.jsxs(RDropdown2__namespace.Root, { modal: !insideModal, children: [
|
|
16729
17039
|
/* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Trigger, { asChild: true, disabled: off, children: /* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { label: "\uAE00\uC790\uC0C9", disabled: off, children: /* @__PURE__ */ jsxRuntime.jsx(ColorIndicator, { color: off ? "currentColor" : activeColor, children: /* @__PURE__ */ jsxRuntime.jsx(IconTextColor, { size: ICON_SIZE }) }) }) }),
|
|
@@ -16738,7 +17048,7 @@ function EditorToolbarBar({
|
|
|
16738
17048
|
onClear: clearColor
|
|
16739
17049
|
}
|
|
16740
17050
|
) }) })
|
|
16741
|
-
] },
|
|
17051
|
+
] }, item3);
|
|
16742
17052
|
case "alignLeft":
|
|
16743
17053
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16744
17054
|
ToolbarButton,
|
|
@@ -16750,7 +17060,7 @@ function EditorToolbarBar({
|
|
|
16750
17060
|
onClick: () => chain()?.setTextAlign("left").run(),
|
|
16751
17061
|
children: /* @__PURE__ */ jsxRuntime.jsx(IconAlignLeft, { size: ICON_SIZE })
|
|
16752
17062
|
},
|
|
16753
|
-
|
|
17063
|
+
item3
|
|
16754
17064
|
);
|
|
16755
17065
|
case "alignCenter":
|
|
16756
17066
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16763,7 +17073,7 @@ function EditorToolbarBar({
|
|
|
16763
17073
|
onClick: () => chain()?.setTextAlign("center").run(),
|
|
16764
17074
|
children: /* @__PURE__ */ jsxRuntime.jsx(IconAlignCenter, { size: ICON_SIZE })
|
|
16765
17075
|
},
|
|
16766
|
-
|
|
17076
|
+
item3
|
|
16767
17077
|
);
|
|
16768
17078
|
case "alignRight":
|
|
16769
17079
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16776,7 +17086,7 @@ function EditorToolbarBar({
|
|
|
16776
17086
|
onClick: () => chain()?.setTextAlign("right").run(),
|
|
16777
17087
|
children: /* @__PURE__ */ jsxRuntime.jsx(IconAlignRight, { size: ICON_SIZE })
|
|
16778
17088
|
},
|
|
16779
|
-
|
|
17089
|
+
item3
|
|
16780
17090
|
);
|
|
16781
17091
|
case "alignJustify":
|
|
16782
17092
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16789,7 +17099,7 @@ function EditorToolbarBar({
|
|
|
16789
17099
|
onClick: () => chain()?.setTextAlign("justify").run(),
|
|
16790
17100
|
children: /* @__PURE__ */ jsxRuntime.jsx(IconAlignJustify, { size: ICON_SIZE })
|
|
16791
17101
|
},
|
|
16792
|
-
|
|
17102
|
+
item3
|
|
16793
17103
|
);
|
|
16794
17104
|
case "bulletList":
|
|
16795
17105
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16802,7 +17112,7 @@ function EditorToolbarBar({
|
|
|
16802
17112
|
onClick: () => chain()?.toggleBulletList().run(),
|
|
16803
17113
|
children: /* @__PURE__ */ jsxRuntime.jsx(IconBulletList, { size: ICON_SIZE })
|
|
16804
17114
|
},
|
|
16805
|
-
|
|
17115
|
+
item3
|
|
16806
17116
|
);
|
|
16807
17117
|
case "orderedList":
|
|
16808
17118
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16815,7 +17125,7 @@ function EditorToolbarBar({
|
|
|
16815
17125
|
onClick: () => chain()?.toggleOrderedList().run(),
|
|
16816
17126
|
children: /* @__PURE__ */ jsxRuntime.jsx(IconOrderedList, { size: ICON_SIZE })
|
|
16817
17127
|
},
|
|
16818
|
-
|
|
17128
|
+
item3
|
|
16819
17129
|
);
|
|
16820
17130
|
case "taskList":
|
|
16821
17131
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16828,7 +17138,7 @@ function EditorToolbarBar({
|
|
|
16828
17138
|
onClick: () => chain()?.toggleTaskList().run(),
|
|
16829
17139
|
children: /* @__PURE__ */ jsxRuntime.jsx(IconTaskList, { size: ICON_SIZE })
|
|
16830
17140
|
},
|
|
16831
|
-
|
|
17141
|
+
item3
|
|
16832
17142
|
);
|
|
16833
17143
|
case "list": {
|
|
16834
17144
|
const ListIcon = state2.orderedList ? IconOrderedList : state2.taskList ? IconTaskList : IconBulletList;
|
|
@@ -16873,7 +17183,7 @@ function EditorToolbarBar({
|
|
|
16873
17183
|
}
|
|
16874
17184
|
)
|
|
16875
17185
|
] }) })
|
|
16876
|
-
] },
|
|
17186
|
+
] }, item3);
|
|
16877
17187
|
}
|
|
16878
17188
|
case "blockquote":
|
|
16879
17189
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16886,7 +17196,7 @@ function EditorToolbarBar({
|
|
|
16886
17196
|
onClick: () => chain()?.toggleBlockquote().run(),
|
|
16887
17197
|
children: /* @__PURE__ */ jsxRuntime.jsx(IconBlockquote, { size: ICON_SIZE })
|
|
16888
17198
|
},
|
|
16889
|
-
|
|
17199
|
+
item3
|
|
16890
17200
|
);
|
|
16891
17201
|
case "codeBlock":
|
|
16892
17202
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16899,7 +17209,7 @@ function EditorToolbarBar({
|
|
|
16899
17209
|
onClick: () => chain()?.toggleCodeBlock().run(),
|
|
16900
17210
|
children: /* @__PURE__ */ jsxRuntime.jsx(IconCodeBlock, { size: ICON_SIZE })
|
|
16901
17211
|
},
|
|
16902
|
-
|
|
17212
|
+
item3
|
|
16903
17213
|
);
|
|
16904
17214
|
case "horizontalRule":
|
|
16905
17215
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16910,7 +17220,7 @@ function EditorToolbarBar({
|
|
|
16910
17220
|
onClick: () => chain()?.setHorizontalRule().run(),
|
|
16911
17221
|
children: /* @__PURE__ */ jsxRuntime.jsx(IconHorizontalRule, { size: ICON_SIZE })
|
|
16912
17222
|
},
|
|
16913
|
-
|
|
17223
|
+
item3
|
|
16914
17224
|
);
|
|
16915
17225
|
case "link":
|
|
16916
17226
|
if (mobile)
|
|
@@ -16923,7 +17233,7 @@ function EditorToolbarBar({
|
|
|
16923
17233
|
onClick: () => setMobileView("link"),
|
|
16924
17234
|
children: /* @__PURE__ */ jsxRuntime.jsx(IconLink, { size: ICON_SIZE })
|
|
16925
17235
|
},
|
|
16926
|
-
|
|
17236
|
+
item3
|
|
16927
17237
|
);
|
|
16928
17238
|
return /* @__PURE__ */ jsxRuntime.jsxs(RPopover11__namespace.Root, { open: linkOpen, onOpenChange: setLinkOpen, children: [
|
|
16929
17239
|
/* @__PURE__ */ jsxRuntime.jsx(RPopover11__namespace.Trigger, { asChild: true, disabled: off, children: /* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { label: "\uB9C1\uD06C", active: state2.link, disabled: off, children: /* @__PURE__ */ jsxRuntime.jsx(IconLink, { size: ICON_SIZE }) }) }),
|
|
@@ -16948,7 +17258,7 @@ function EditorToolbarBar({
|
|
|
16948
17258
|
)
|
|
16949
17259
|
}
|
|
16950
17260
|
) })
|
|
16951
|
-
] },
|
|
17261
|
+
] }, item3);
|
|
16952
17262
|
case "image":
|
|
16953
17263
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16954
17264
|
ToolbarButton,
|
|
@@ -16962,7 +17272,7 @@ function EditorToolbarBar({
|
|
|
16962
17272
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[12px] leading-[20px]", children: "\uC774\uBBF8\uC9C0" })
|
|
16963
17273
|
]
|
|
16964
17274
|
},
|
|
16965
|
-
|
|
17275
|
+
item3
|
|
16966
17276
|
);
|
|
16967
17277
|
case "table":
|
|
16968
17278
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -17083,7 +17393,7 @@ function EditorToolbarBar({
|
|
|
17083
17393
|
] }) })
|
|
17084
17394
|
]
|
|
17085
17395
|
},
|
|
17086
|
-
|
|
17396
|
+
item3
|
|
17087
17397
|
);
|
|
17088
17398
|
case "undo":
|
|
17089
17399
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17094,7 +17404,7 @@ function EditorToolbarBar({
|
|
|
17094
17404
|
onClick: () => chain()?.undo().run(),
|
|
17095
17405
|
children: /* @__PURE__ */ jsxRuntime.jsx(IconUndo, { size: ICON_SIZE })
|
|
17096
17406
|
},
|
|
17097
|
-
|
|
17407
|
+
item3
|
|
17098
17408
|
);
|
|
17099
17409
|
case "redo":
|
|
17100
17410
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17105,7 +17415,7 @@ function EditorToolbarBar({
|
|
|
17105
17415
|
onClick: () => chain()?.redo().run(),
|
|
17106
17416
|
children: /* @__PURE__ */ jsxRuntime.jsx(IconRedo, { size: ICON_SIZE })
|
|
17107
17417
|
},
|
|
17108
|
-
|
|
17418
|
+
item3
|
|
17109
17419
|
);
|
|
17110
17420
|
default:
|
|
17111
17421
|
return null;
|
|
@@ -17668,12 +17978,12 @@ var DEFAULT_DATE_RANGE_PRESETS = [
|
|
|
17668
17978
|
{
|
|
17669
17979
|
value: "last7",
|
|
17670
17980
|
label: "\uC9C0\uB09C 7\uC77C",
|
|
17671
|
-
resolve: () => [
|
|
17981
|
+
resolve: () => [rangeStartIso(todayIso(), 7), todayIso()]
|
|
17672
17982
|
},
|
|
17673
17983
|
{
|
|
17674
17984
|
value: "last30",
|
|
17675
17985
|
label: "\uC9C0\uB09C 30\uC77C",
|
|
17676
|
-
resolve: () => [
|
|
17986
|
+
resolve: () => [rangeStartIso(todayIso(), 30), todayIso()]
|
|
17677
17987
|
},
|
|
17678
17988
|
{ value: "custom", label: "\uC0AC\uC6A9\uC790 \uC9C0\uC815", custom: true }
|
|
17679
17989
|
];
|
|
@@ -17707,6 +18017,7 @@ var addDaysIso = (iso, n) => {
|
|
|
17707
18017
|
const pad = (v) => String(v).padStart(2, "0");
|
|
17708
18018
|
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;
|
|
17709
18019
|
};
|
|
18020
|
+
var rangeStartIso = (today, days) => addDaysIso(today, -(days - 1));
|
|
17710
18021
|
var isInlineDateField = (field) => field.type === "datepicker-range" && field.radioButton === true && (field.presets?.length ?? 0) > 0;
|
|
17711
18022
|
var getFieldPresets = (field) => {
|
|
17712
18023
|
if (field.type === "datepicker-statistics") return field.presets ?? DEFAULT_PERIOD_PRESETS;
|
|
@@ -17729,7 +18040,7 @@ var getDefaultPeriodInputValue = (unit, maxRange) => {
|
|
|
17729
18040
|
if (unit === "half") return "first";
|
|
17730
18041
|
if (unit === "year") return today.slice(0, 4);
|
|
17731
18042
|
const days = maxRange && maxRange > 0 ? maxRange : DEFAULT_CUSTOM_MAX_RANGE;
|
|
17732
|
-
return [
|
|
18043
|
+
return [rangeStartIso(today, days), today];
|
|
17733
18044
|
};
|
|
17734
18045
|
var createPeriodValue = (unit, maxRange) => ({
|
|
17735
18046
|
unit,
|
|
@@ -17785,6 +18096,7 @@ var isAtResetTarget = (field, value) => {
|
|
|
17785
18096
|
var isInlineField = (field) => isInlineDateField(field) || field.type === "custom";
|
|
17786
18097
|
var isFixedField = (field) => field.fixed === true || field.required === true;
|
|
17787
18098
|
var isAddableField = (field) => !isFixedField(field);
|
|
18099
|
+
var sameKeys = (a, b) => a.length === b.length && a.every((key, index) => key === b[index]);
|
|
17788
18100
|
var isGroupSatisfied = (group, values) => {
|
|
17789
18101
|
if (!group.rule) return true;
|
|
17790
18102
|
const keys = group.fields.map((f) => f.key);
|
|
@@ -17873,8 +18185,6 @@ var SChipFilter = /* @__PURE__ */ react.forwardRef(function SChipFilter2({
|
|
|
17873
18185
|
onValueChange,
|
|
17874
18186
|
onFilterChange,
|
|
17875
18187
|
onSearch,
|
|
17876
|
-
activeKeys,
|
|
17877
|
-
onActiveKeysChange,
|
|
17878
18188
|
onReset,
|
|
17879
18189
|
onAddFilter,
|
|
17880
18190
|
label,
|
|
@@ -17894,6 +18204,7 @@ var SChipFilter = /* @__PURE__ */ react.forwardRef(function SChipFilter2({
|
|
|
17894
18204
|
const pendingOpenKeyRef = react.useRef(null);
|
|
17895
18205
|
const triggerRefs = react.useRef(/* @__PURE__ */ new Map());
|
|
17896
18206
|
const initializedDefaultsRef = react.useRef(/* @__PURE__ */ new Set());
|
|
18207
|
+
const dismissedRef = react.useRef(/* @__PURE__ */ new Set());
|
|
17897
18208
|
const pendingDefaultRef = react.useRef(/* @__PURE__ */ new Set());
|
|
17898
18209
|
const misuseWarningSignatureRef = react.useRef(null);
|
|
17899
18210
|
const prevOpenKeyRef = react.useRef(null);
|
|
@@ -17933,14 +18244,17 @@ var SChipFilter = /* @__PURE__ */ react.forwardRef(function SChipFilter2({
|
|
|
17933
18244
|
prevOpenKeyRef.current = openKey;
|
|
17934
18245
|
}, [openKey, runSearch]);
|
|
17935
18246
|
react.useEffect(() => {
|
|
17936
|
-
|
|
18247
|
+
fields.forEach((field) => {
|
|
18248
|
+
if (isEmptyValue(values[field.key])) dismissedRef.current.delete(field.key);
|
|
18249
|
+
});
|
|
17937
18250
|
setInternalActiveKeys((current) => {
|
|
17938
18251
|
const known = new Set(fields.map((field) => field.key));
|
|
17939
18252
|
const kept = current.filter((key) => known.has(key));
|
|
17940
18253
|
const additions = fields.filter((field) => isFixedField(field) && !kept.includes(field.key)).map((field) => field.key);
|
|
17941
|
-
|
|
18254
|
+
const next = [...kept, ...additions];
|
|
18255
|
+
return sameKeys(current, next) ? current : next;
|
|
17942
18256
|
});
|
|
17943
|
-
}, [
|
|
18257
|
+
}, [fields, values]);
|
|
17944
18258
|
react.useEffect(() => {
|
|
17945
18259
|
const patch = {};
|
|
17946
18260
|
let changed = false;
|
|
@@ -17980,8 +18294,9 @@ var SChipFilter = /* @__PURE__ */ react.forwardRef(function SChipFilter2({
|
|
|
17980
18294
|
}
|
|
17981
18295
|
}, [fields]);
|
|
17982
18296
|
const fixedKeys = fields.filter(isFixedField).map((field) => field.key);
|
|
18297
|
+
const filledKeys = fields.filter((field) => !dismissedRef.current.has(field.key)).filter((field) => !isEmptyValue(values[field.key])).map((field) => field.key);
|
|
17983
18298
|
const resolvedActiveKeys = Array.from(
|
|
17984
|
-
/* @__PURE__ */ new Set([...
|
|
18299
|
+
/* @__PURE__ */ new Set([...internalActiveKeys, ...fixedKeys, ...filledKeys])
|
|
17985
18300
|
);
|
|
17986
18301
|
const activeFields = fields.filter((field) => resolvedActiveKeys.includes(field.key));
|
|
17987
18302
|
const inactiveFields = fields.filter(
|
|
@@ -18005,9 +18320,11 @@ var SChipFilter = /* @__PURE__ */ react.forwardRef(function SChipFilter2({
|
|
|
18005
18320
|
}
|
|
18006
18321
|
return { width: CHIPFILTER_LISTBOX_WIDTH };
|
|
18007
18322
|
}, [currentOpenField]);
|
|
18008
|
-
const
|
|
18009
|
-
if (
|
|
18010
|
-
|
|
18323
|
+
const openField = (key) => {
|
|
18324
|
+
if (key != null) {
|
|
18325
|
+
setInternalActiveKeys((current) => current.includes(key) ? current : [...current, key]);
|
|
18326
|
+
}
|
|
18327
|
+
setOpenKey(key);
|
|
18011
18328
|
};
|
|
18012
18329
|
const emitValue = (key, nextValue) => {
|
|
18013
18330
|
const next = { ...values, [key]: nextValue };
|
|
@@ -18025,7 +18342,8 @@ var SChipFilter = /* @__PURE__ */ react.forwardRef(function SChipFilter2({
|
|
|
18025
18342
|
};
|
|
18026
18343
|
const removeField = (key) => {
|
|
18027
18344
|
const nextValues = emitValue(key, null);
|
|
18028
|
-
|
|
18345
|
+
dismissedRef.current.add(key);
|
|
18346
|
+
setInternalActiveKeys((current) => current.filter((activeKey) => activeKey !== key));
|
|
18029
18347
|
if (openKey === key) setOpenKey(null);
|
|
18030
18348
|
runSearch(nextValues);
|
|
18031
18349
|
};
|
|
@@ -18034,6 +18352,9 @@ var SChipFilter = /* @__PURE__ */ react.forwardRef(function SChipFilter2({
|
|
|
18034
18352
|
acc[field.key] = resetTargetValue(field);
|
|
18035
18353
|
return acc;
|
|
18036
18354
|
}, {});
|
|
18355
|
+
dismissedRef.current.clear();
|
|
18356
|
+
setInternalActiveKeys(fields.filter(isFixedField).map((field) => field.key));
|
|
18357
|
+
setOpenKey(null);
|
|
18037
18358
|
onValueChange?.(next);
|
|
18038
18359
|
runSearch(next);
|
|
18039
18360
|
onReset?.();
|
|
@@ -18042,6 +18363,7 @@ var SChipFilter = /* @__PURE__ */ react.forwardRef(function SChipFilter2({
|
|
|
18042
18363
|
(key) => {
|
|
18043
18364
|
const field = fields.find((f) => f.key === key);
|
|
18044
18365
|
if (!field || isInlineField(field)) return;
|
|
18366
|
+
setInternalActiveKeys((current) => current.includes(key) ? current : [...current, key]);
|
|
18045
18367
|
setOpenKey(key);
|
|
18046
18368
|
},
|
|
18047
18369
|
[fields]
|
|
@@ -18052,8 +18374,8 @@ var SChipFilter = /* @__PURE__ */ react.forwardRef(function SChipFilter2({
|
|
|
18052
18374
|
);
|
|
18053
18375
|
react.useImperativeHandle(ref, () => ({ open, reset, validate }), [open, reset, validate]);
|
|
18054
18376
|
const addField = (key) => {
|
|
18055
|
-
|
|
18056
|
-
|
|
18377
|
+
dismissedRef.current.delete(key);
|
|
18378
|
+
setInternalActiveKeys((current) => current.includes(key) ? current : [...current, key]);
|
|
18057
18379
|
onAddFilter?.(key);
|
|
18058
18380
|
setAddOpen(false);
|
|
18059
18381
|
const field = fields.find((f) => f.key === key);
|
|
@@ -18187,7 +18509,7 @@ var SChipFilter = /* @__PURE__ */ react.forwardRef(function SChipFilter2({
|
|
|
18187
18509
|
showClear,
|
|
18188
18510
|
showClearWhenEmpty: addable,
|
|
18189
18511
|
refCallback: (node2) => triggerRefs.current.set(field.key, node2),
|
|
18190
|
-
onOpen: () =>
|
|
18512
|
+
onOpen: () => openField(openKey === field.key ? null : field.key),
|
|
18191
18513
|
onClear: handleClear
|
|
18192
18514
|
},
|
|
18193
18515
|
field.key
|
|
@@ -18617,7 +18939,7 @@ function DatePresetEditor({
|
|
|
18617
18939
|
}
|
|
18618
18940
|
const today = todayIso();
|
|
18619
18941
|
const days = maxRange && maxRange > 0 ? maxRange : DEFAULT_CUSTOM_MAX_RANGE;
|
|
18620
|
-
onValueChange([
|
|
18942
|
+
onValueChange([rangeStartIso(today, days), today]);
|
|
18621
18943
|
};
|
|
18622
18944
|
if (presets.length === 0) {
|
|
18623
18945
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -19613,8 +19935,8 @@ var SChipInput = /* @__PURE__ */ react.forwardRef(function SChipInput2({
|
|
|
19613
19935
|
onMouseDown: (e) => e.preventDefault(),
|
|
19614
19936
|
children: [
|
|
19615
19937
|
loading2 && /* @__PURE__ */ jsxRuntime.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..." }),
|
|
19616
|
-
!effectiveAutocomplete ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-sd-8 px-sd-12 py-sd-6", children: items.map((
|
|
19617
|
-
const selected = values.includes(
|
|
19938
|
+
!effectiveAutocomplete ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-sd-8 px-sd-12 py-sd-6", children: items.map((item3, i) => {
|
|
19939
|
+
const selected = values.includes(item3);
|
|
19618
19940
|
const active = i === activeIndex && !selected;
|
|
19619
19941
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
19620
19942
|
"div",
|
|
@@ -19625,14 +19947,14 @@ var SChipInput = /* @__PURE__ */ react.forwardRef(function SChipInput2({
|
|
|
19625
19947
|
style: active ? { outline: "2px solid var(--color-border-accent)", outlineOffset: 1 } : void 0,
|
|
19626
19948
|
onMouseDown: (e) => {
|
|
19627
19949
|
e.preventDefault();
|
|
19628
|
-
if (!selected) addChip(
|
|
19950
|
+
if (!selected) addChip(item3);
|
|
19629
19951
|
},
|
|
19630
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(SChip2, { value:
|
|
19952
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(SChip2, { value: item3, disabled: selected, editable: false, showRemove: false })
|
|
19631
19953
|
},
|
|
19632
|
-
|
|
19954
|
+
item3
|
|
19633
19955
|
);
|
|
19634
|
-
}) }) : items.map((
|
|
19635
|
-
const selected = values.includes(
|
|
19956
|
+
}) }) : items.map((item3, i) => {
|
|
19957
|
+
const selected = values.includes(item3);
|
|
19636
19958
|
const active = i === activeIndex && !selected;
|
|
19637
19959
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19638
19960
|
"div",
|
|
@@ -19645,10 +19967,10 @@ var SChipInput = /* @__PURE__ */ react.forwardRef(function SChipInput2({
|
|
|
19645
19967
|
),
|
|
19646
19968
|
onMouseDown: (e) => {
|
|
19647
19969
|
e.preventDefault();
|
|
19648
|
-
if (!selected) addChip(
|
|
19970
|
+
if (!selected) addChip(item3);
|
|
19649
19971
|
},
|
|
19650
19972
|
children: [
|
|
19651
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1", children:
|
|
19973
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1", children: item3 }),
|
|
19652
19974
|
selected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
19653
19975
|
SIcon,
|
|
19654
19976
|
{
|
|
@@ -19659,7 +19981,7 @@ var SChipInput = /* @__PURE__ */ react.forwardRef(function SChipInput2({
|
|
|
19659
19981
|
)
|
|
19660
19982
|
]
|
|
19661
19983
|
},
|
|
19662
|
-
|
|
19984
|
+
item3
|
|
19663
19985
|
);
|
|
19664
19986
|
})
|
|
19665
19987
|
]
|
|
@@ -20043,22 +20365,22 @@ function TimeSelector({
|
|
|
20043
20365
|
style: {
|
|
20044
20366
|
padding: "var(--cmp-timepicker-selector-section-paddingY) var(--cmp-timepicker-selector-section-paddingX)"
|
|
20045
20367
|
},
|
|
20046
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "isolate flex", children: ["AM", "PM"].map((
|
|
20047
|
-
const selected =
|
|
20368
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "isolate flex", children: ["AM", "PM"].map((item3, index) => {
|
|
20369
|
+
const selected = item3 === meridiem;
|
|
20048
20370
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
20049
20371
|
"button",
|
|
20050
20372
|
{
|
|
20051
20373
|
type: "button",
|
|
20052
|
-
onClick: () => setMeridiem(
|
|
20374
|
+
onClick: () => setMeridiem(item3),
|
|
20053
20375
|
className: cn(
|
|
20054
20376
|
"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]",
|
|
20055
20377
|
index === 0 ? "rounded-l-[var(--cmp-select-sm-radius)]" : "rounded-r-[var(--cmp-select-sm-radius)]",
|
|
20056
20378
|
index === 0 ? "-mr-px" : "",
|
|
20057
20379
|
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)]"
|
|
20058
20380
|
),
|
|
20059
|
-
children:
|
|
20381
|
+
children: item3 === "AM" ? "\uC624\uC804" : "\uC624\uD6C4"
|
|
20060
20382
|
},
|
|
20061
|
-
|
|
20383
|
+
item3
|
|
20062
20384
|
);
|
|
20063
20385
|
}) })
|
|
20064
20386
|
}
|
|
@@ -20279,8 +20601,8 @@ function getTimeMinutes(value) {
|
|
|
20279
20601
|
}
|
|
20280
20602
|
function normalizeTimeRangeValue(value, rangeOrder = "strict") {
|
|
20281
20603
|
if (value == null) return null;
|
|
20282
|
-
const normalized = value.map((
|
|
20283
|
-
const parsed = parseTimeValue(
|
|
20604
|
+
const normalized = value.map((item3) => {
|
|
20605
|
+
const parsed = parseTimeValue(item3);
|
|
20284
20606
|
return formatTimeValue(parsed.hour, parsed.minute);
|
|
20285
20607
|
});
|
|
20286
20608
|
if (rangeOrder === "strict" && getTimeMinutes(normalized[0]) > getTimeMinutes(normalized[1])) {
|
|
@@ -20490,21 +20812,21 @@ function RangeTimeSelector({
|
|
|
20490
20812
|
style: { gap: "var(--cmp-timepicker-selector-range-heading-gap)" },
|
|
20491
20813
|
children: [
|
|
20492
20814
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "whitespace-nowrap text-center text-[12px] font-bold leading-[20px] text-[var(--cmp-timepicker-selector-range-heading-color)]", children: title }),
|
|
20493
|
-
useMeridiem && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "isolate flex", children: ["AM", "PM"].map((
|
|
20494
|
-
const selected =
|
|
20815
|
+
useMeridiem && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "isolate flex", children: ["AM", "PM"].map((item3, index) => {
|
|
20816
|
+
const selected = item3 === getMeridiem(side);
|
|
20495
20817
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
20496
20818
|
"button",
|
|
20497
20819
|
{
|
|
20498
20820
|
type: "button",
|
|
20499
|
-
onClick: () => setMeridiem(side,
|
|
20821
|
+
onClick: () => setMeridiem(side, item3),
|
|
20500
20822
|
className: cn(
|
|
20501
20823
|
"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]",
|
|
20502
20824
|
index === 0 ? "rounded-l-[var(--cmp-select-sm-radius)] -mr-px" : "rounded-r-[var(--cmp-select-sm-radius)]",
|
|
20503
20825
|
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)]"
|
|
20504
20826
|
),
|
|
20505
|
-
children:
|
|
20827
|
+
children: item3 === "AM" ? "\uC624\uC804" : "\uC624\uD6C4"
|
|
20506
20828
|
},
|
|
20507
|
-
|
|
20829
|
+
item3
|
|
20508
20830
|
);
|
|
20509
20831
|
}) })
|
|
20510
20832
|
]
|
|
@@ -20754,6 +21076,9 @@ exports.GNB_MENU = GNB_MENU;
|
|
|
20754
21076
|
exports.GNB_MENU_WIDTH = GNB_MENU_WIDTH;
|
|
20755
21077
|
exports.GNB_RAIL = GNB_RAIL;
|
|
20756
21078
|
exports.GNB_RAIL_WIDTH = GNB_RAIL_WIDTH;
|
|
21079
|
+
exports.GNB_SYSTEM_COLORS = GNB_SYSTEM_COLORS;
|
|
21080
|
+
exports.GNB_SYSTEM_COLOR_CONFIG = GNB_SYSTEM_COLOR_CONFIG;
|
|
21081
|
+
exports.GNB_SYSTEM_LAYOUT = GNB_SYSTEM_LAYOUT;
|
|
20757
21082
|
exports.ICONS = ICONS;
|
|
20758
21083
|
exports.IMAGE_FITS = IMAGE_FITS;
|
|
20759
21084
|
exports.PAGE_BACKGROUNDS = PAGE_BACKGROUNDS;
|
|
@@ -20795,6 +21120,8 @@ exports.SFilePicker = SFilePicker;
|
|
|
20795
21120
|
exports.SForm = SForm;
|
|
20796
21121
|
exports.SGhostButton = SGhostButton;
|
|
20797
21122
|
exports.SGnb = SGnb;
|
|
21123
|
+
exports.SGnbSystem = SGnbSystem;
|
|
21124
|
+
exports.SGnbSystemContext = SGnbSystemContext;
|
|
20798
21125
|
exports.SGuide = SGuide;
|
|
20799
21126
|
exports.SIcon = SIcon;
|
|
20800
21127
|
exports.SImage = SImage;
|