@stn-uiux/pub-ui-react 0.1.69 → 0.1.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +62 -1
- package/dist/index.js +1176 -801
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3721,17 +3721,386 @@ function StnSegmented(props) {
|
|
|
3721
3721
|
);
|
|
3722
3722
|
}
|
|
3723
3723
|
|
|
3724
|
-
// src/components/
|
|
3724
|
+
// src/components/tabs/StnTabs.tsx
|
|
3725
3725
|
import {
|
|
3726
|
-
|
|
3726
|
+
forwardRef as forwardRef25,
|
|
3727
|
+
useState as useState9,
|
|
3728
|
+
useRef as useRef5,
|
|
3727
3729
|
useEffect as useEffect7,
|
|
3730
|
+
useCallback as useCallback5,
|
|
3731
|
+
useLayoutEffect
|
|
3732
|
+
} from "react";
|
|
3733
|
+
|
|
3734
|
+
// src/components/tabs/StnTabContext.tsx
|
|
3735
|
+
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
3736
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
3737
|
+
var StnTabsContext = createContext3(null);
|
|
3738
|
+
function useStnTabsContext() {
|
|
3739
|
+
return useContext3(StnTabsContext);
|
|
3740
|
+
}
|
|
3741
|
+
function StnTabContextProvider({
|
|
3742
|
+
value,
|
|
3743
|
+
onChange,
|
|
3744
|
+
size = "md",
|
|
3745
|
+
variant = "line",
|
|
3746
|
+
children
|
|
3747
|
+
}) {
|
|
3748
|
+
return /* @__PURE__ */ jsx32(StnTabsContext.Provider, { value: { value, onChange, size, variant }, children });
|
|
3749
|
+
}
|
|
3750
|
+
|
|
3751
|
+
// src/components/tabs/StnTab.tsx
|
|
3752
|
+
import { forwardRef as forwardRef23 } from "react";
|
|
3753
|
+
import { jsx as jsx33, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3754
|
+
var StnTab = forwardRef23(function StnTab2({
|
|
3755
|
+
value,
|
|
3756
|
+
label,
|
|
3757
|
+
icon,
|
|
3758
|
+
iconPosition = "start",
|
|
3759
|
+
iconSize = "md",
|
|
3760
|
+
badge,
|
|
3761
|
+
count,
|
|
3762
|
+
disabled = false,
|
|
3763
|
+
wrapped = false,
|
|
3764
|
+
className = "",
|
|
3765
|
+
children,
|
|
3766
|
+
onClick,
|
|
3767
|
+
...rest
|
|
3768
|
+
}, ref) {
|
|
3769
|
+
const context = useStnTabsContext();
|
|
3770
|
+
const isActive = context ? context.value === value : false;
|
|
3771
|
+
const handleClick = (e) => {
|
|
3772
|
+
if (disabled) return;
|
|
3773
|
+
onClick?.(e);
|
|
3774
|
+
if (!e.defaultPrevented && context?.onChange) {
|
|
3775
|
+
context.onChange(value);
|
|
3776
|
+
}
|
|
3777
|
+
};
|
|
3778
|
+
const content = children ?? label;
|
|
3779
|
+
const isIconOnly = Boolean(icon && !content);
|
|
3780
|
+
const classList = [
|
|
3781
|
+
"stn-tab",
|
|
3782
|
+
isActive && "is-active",
|
|
3783
|
+
disabled && "is-disabled",
|
|
3784
|
+
wrapped && "is-wrapped",
|
|
3785
|
+
icon && `icon-${iconPosition}`,
|
|
3786
|
+
isIconOnly && "icon-only",
|
|
3787
|
+
className
|
|
3788
|
+
].filter(Boolean).join(" ");
|
|
3789
|
+
const iconSizeClass = typeof iconSize === "string" ? `icon-${iconSize}` : void 0;
|
|
3790
|
+
const iconStyle = typeof iconSize === "number" ? { width: `${iconSize}px`, height: `${iconSize}px` } : void 0;
|
|
3791
|
+
const renderedIcon = icon ? /* @__PURE__ */ jsx33(
|
|
3792
|
+
"span",
|
|
3793
|
+
{
|
|
3794
|
+
className: ["stn-tab__icon", iconSizeClass].filter(Boolean).join(" "),
|
|
3795
|
+
style: iconStyle,
|
|
3796
|
+
"aria-hidden": "true",
|
|
3797
|
+
children: icon
|
|
3798
|
+
}
|
|
3799
|
+
) : null;
|
|
3800
|
+
return /* @__PURE__ */ jsxs25(
|
|
3801
|
+
"button",
|
|
3802
|
+
{
|
|
3803
|
+
ref,
|
|
3804
|
+
type: "button",
|
|
3805
|
+
role: "tab",
|
|
3806
|
+
"aria-selected": isActive,
|
|
3807
|
+
"aria-disabled": disabled,
|
|
3808
|
+
tabIndex: isActive ? 0 : -1,
|
|
3809
|
+
disabled,
|
|
3810
|
+
className: classList,
|
|
3811
|
+
"data-value": value,
|
|
3812
|
+
onClick: handleClick,
|
|
3813
|
+
...rest,
|
|
3814
|
+
children: [
|
|
3815
|
+
iconPosition !== "end" && iconPosition !== "bottom" && renderedIcon,
|
|
3816
|
+
content && /* @__PURE__ */ jsx33("span", { className: "stn-tab__label", children: content }),
|
|
3817
|
+
(iconPosition === "end" || iconPosition === "bottom") && renderedIcon,
|
|
3818
|
+
count !== void 0 && /* @__PURE__ */ jsx33("span", { className: "stn-tab__badge", children: count }),
|
|
3819
|
+
badge && /* @__PURE__ */ jsx33("span", { className: "stn-tab__extra", children: badge })
|
|
3820
|
+
]
|
|
3821
|
+
}
|
|
3822
|
+
);
|
|
3823
|
+
});
|
|
3824
|
+
|
|
3825
|
+
// src/components/tabs/StnTabPanel.tsx
|
|
3826
|
+
import { forwardRef as forwardRef24 } from "react";
|
|
3827
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
3828
|
+
var StnTabPanel = forwardRef24(function StnTabPanel2({
|
|
3829
|
+
value,
|
|
3830
|
+
current,
|
|
3831
|
+
padding = "md",
|
|
3832
|
+
keepMounted = false,
|
|
3833
|
+
className = "",
|
|
3834
|
+
children,
|
|
3835
|
+
...rest
|
|
3836
|
+
}, ref) {
|
|
3837
|
+
const context = useStnTabsContext();
|
|
3838
|
+
const activeValue = current !== void 0 ? current : context?.value;
|
|
3839
|
+
const isSelected = activeValue !== void 0 ? activeValue === value : true;
|
|
3840
|
+
if (!isSelected && !keepMounted) {
|
|
3841
|
+
return null;
|
|
3842
|
+
}
|
|
3843
|
+
const classList = [
|
|
3844
|
+
"stn-tab-panel",
|
|
3845
|
+
padding && `padding-${padding}`,
|
|
3846
|
+
className
|
|
3847
|
+
].filter(Boolean).join(" ");
|
|
3848
|
+
return /* @__PURE__ */ jsx34(
|
|
3849
|
+
"div",
|
|
3850
|
+
{
|
|
3851
|
+
ref,
|
|
3852
|
+
role: "tabpanel",
|
|
3853
|
+
hidden: !isSelected,
|
|
3854
|
+
tabIndex: 0,
|
|
3855
|
+
className: classList,
|
|
3856
|
+
...rest,
|
|
3857
|
+
children: isSelected ? children : null
|
|
3858
|
+
}
|
|
3859
|
+
);
|
|
3860
|
+
});
|
|
3861
|
+
|
|
3862
|
+
// src/components/tabs/StnTabs.tsx
|
|
3863
|
+
import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3864
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect7;
|
|
3865
|
+
var StnTabsRoot = forwardRef25(function StnTabs({
|
|
3866
|
+
value: controlledValue,
|
|
3867
|
+
defaultValue,
|
|
3868
|
+
onChange,
|
|
3869
|
+
size: propSize,
|
|
3870
|
+
variant: propVariant,
|
|
3871
|
+
scrollButtons = "auto",
|
|
3872
|
+
fullWidth = false,
|
|
3873
|
+
centered = false,
|
|
3874
|
+
items,
|
|
3875
|
+
className = "",
|
|
3876
|
+
children,
|
|
3877
|
+
...rest
|
|
3878
|
+
}, ref) {
|
|
3879
|
+
const context = useStnTabsContext();
|
|
3880
|
+
const [internalValue, setInternalValue] = useState9(() => {
|
|
3881
|
+
return controlledValue ?? context?.value ?? defaultValue ?? (items && items.length > 0 ? items[0].value : "");
|
|
3882
|
+
});
|
|
3883
|
+
const activeValue = controlledValue ?? context?.value ?? internalValue;
|
|
3884
|
+
const handleValueChange = useCallback5(
|
|
3885
|
+
(newValue) => {
|
|
3886
|
+
if (controlledValue === void 0 && !context?.onChange) {
|
|
3887
|
+
setInternalValue(newValue);
|
|
3888
|
+
}
|
|
3889
|
+
onChange?.(newValue);
|
|
3890
|
+
context?.onChange?.(newValue);
|
|
3891
|
+
},
|
|
3892
|
+
[controlledValue, context, onChange]
|
|
3893
|
+
);
|
|
3894
|
+
const resolvedSize = propSize ?? context?.size ?? "md";
|
|
3895
|
+
const resolvedVariant = propVariant ?? context?.variant ?? "line";
|
|
3896
|
+
const scrollerRef = useRef5(null);
|
|
3897
|
+
const listRef = useRef5(null);
|
|
3898
|
+
const [indicatorStyle, setIndicatorStyle] = useState9({ left: 0, width: 0, opacity: 0 });
|
|
3899
|
+
const [canScrollStart, setCanScrollStart] = useState9(false);
|
|
3900
|
+
const [canScrollEnd, setCanScrollEnd] = useState9(false);
|
|
3901
|
+
const [isScrollable, setIsScrollable] = useState9(false);
|
|
3902
|
+
const updateIndicator = useCallback5(() => {
|
|
3903
|
+
const list = listRef.current;
|
|
3904
|
+
if (!list) return;
|
|
3905
|
+
const activeTab = list.querySelector(
|
|
3906
|
+
`[data-value="${CSS.escape(String(activeValue))}"]`
|
|
3907
|
+
);
|
|
3908
|
+
if (activeTab) {
|
|
3909
|
+
const listRect = list.getBoundingClientRect();
|
|
3910
|
+
const tabRect = activeTab.getBoundingClientRect();
|
|
3911
|
+
setIndicatorStyle({
|
|
3912
|
+
left: tabRect.left - listRect.left,
|
|
3913
|
+
width: tabRect.width,
|
|
3914
|
+
opacity: 1
|
|
3915
|
+
});
|
|
3916
|
+
} else {
|
|
3917
|
+
setIndicatorStyle((prev) => ({ ...prev, opacity: 0 }));
|
|
3918
|
+
}
|
|
3919
|
+
}, [activeValue]);
|
|
3920
|
+
const updateScrollState = useCallback5(() => {
|
|
3921
|
+
const scroller = scrollerRef.current;
|
|
3922
|
+
if (!scroller) return;
|
|
3923
|
+
const { scrollLeft, scrollWidth, clientWidth } = scroller;
|
|
3924
|
+
const scrollMax = scrollWidth - clientWidth;
|
|
3925
|
+
const scrollable = scrollWidth > clientWidth;
|
|
3926
|
+
setIsScrollable(scrollable);
|
|
3927
|
+
setCanScrollStart(scrollLeft > 2);
|
|
3928
|
+
setCanScrollEnd(scrollLeft < scrollMax - 2);
|
|
3929
|
+
}, []);
|
|
3930
|
+
const scrollActiveTabIntoView = useCallback5(() => {
|
|
3931
|
+
const scroller = scrollerRef.current;
|
|
3932
|
+
const list = listRef.current;
|
|
3933
|
+
if (!scroller || !list) return;
|
|
3934
|
+
const activeTab = list.querySelector(
|
|
3935
|
+
`[data-value="${CSS.escape(String(activeValue))}"]`
|
|
3936
|
+
);
|
|
3937
|
+
if (activeTab) {
|
|
3938
|
+
const tabLeft = activeTab.offsetLeft;
|
|
3939
|
+
const tabWidth = activeTab.offsetWidth;
|
|
3940
|
+
const scrollerWidth = scroller.clientWidth;
|
|
3941
|
+
const scrollerScrollLeft = scroller.scrollLeft;
|
|
3942
|
+
if (tabLeft < scrollerScrollLeft) {
|
|
3943
|
+
scroller.scrollTo({ left: tabLeft - 32, behavior: "smooth" });
|
|
3944
|
+
} else if (tabLeft + tabWidth > scrollerScrollLeft + scrollerWidth) {
|
|
3945
|
+
scroller.scrollTo({
|
|
3946
|
+
left: tabLeft + tabWidth - scrollerWidth + 32,
|
|
3947
|
+
behavior: "smooth"
|
|
3948
|
+
});
|
|
3949
|
+
}
|
|
3950
|
+
}
|
|
3951
|
+
}, [activeValue]);
|
|
3952
|
+
useIsomorphicLayoutEffect(() => {
|
|
3953
|
+
updateIndicator();
|
|
3954
|
+
updateScrollState();
|
|
3955
|
+
scrollActiveTabIntoView();
|
|
3956
|
+
}, [activeValue, updateIndicator, updateScrollState, scrollActiveTabIntoView]);
|
|
3957
|
+
useEffect7(() => {
|
|
3958
|
+
const handleResize = () => {
|
|
3959
|
+
updateIndicator();
|
|
3960
|
+
updateScrollState();
|
|
3961
|
+
};
|
|
3962
|
+
window.addEventListener("resize", handleResize);
|
|
3963
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
3964
|
+
}, [updateIndicator, updateScrollState]);
|
|
3965
|
+
const handleScrollLeft = () => {
|
|
3966
|
+
if (scrollerRef.current) {
|
|
3967
|
+
scrollerRef.current.scrollBy({ left: -200, behavior: "smooth" });
|
|
3968
|
+
}
|
|
3969
|
+
};
|
|
3970
|
+
const handleScrollRight = () => {
|
|
3971
|
+
if (scrollerRef.current) {
|
|
3972
|
+
scrollerRef.current.scrollBy({ left: 200, behavior: "smooth" });
|
|
3973
|
+
}
|
|
3974
|
+
};
|
|
3975
|
+
const showScrollButtons = scrollButtons === true || scrollButtons === "auto" && isScrollable;
|
|
3976
|
+
const classList = [
|
|
3977
|
+
"stn-tabs",
|
|
3978
|
+
resolvedSize,
|
|
3979
|
+
resolvedVariant,
|
|
3980
|
+
fullWidth && "full",
|
|
3981
|
+
centered && "centered",
|
|
3982
|
+
isScrollable && "is-scrollable",
|
|
3983
|
+
canScrollStart && "has-scroll-start",
|
|
3984
|
+
canScrollEnd && "has-scroll-end",
|
|
3985
|
+
className
|
|
3986
|
+
].filter(Boolean).join(" ");
|
|
3987
|
+
const content = /* @__PURE__ */ jsxs26("div", { ref, className: classList, ...rest, children: [
|
|
3988
|
+
showScrollButtons && /* @__PURE__ */ jsx35(
|
|
3989
|
+
"button",
|
|
3990
|
+
{
|
|
3991
|
+
type: "button",
|
|
3992
|
+
"aria-label": "\uC774\uC804 \uD0ED \uBCF4\uAE30",
|
|
3993
|
+
disabled: !canScrollStart,
|
|
3994
|
+
className: "stn-tabs__scroll-button start",
|
|
3995
|
+
onClick: handleScrollLeft,
|
|
3996
|
+
children: /* @__PURE__ */ jsx35(
|
|
3997
|
+
"svg",
|
|
3998
|
+
{
|
|
3999
|
+
width: "16",
|
|
4000
|
+
height: "16",
|
|
4001
|
+
viewBox: "0 0 24 24",
|
|
4002
|
+
fill: "none",
|
|
4003
|
+
stroke: "currentColor",
|
|
4004
|
+
strokeWidth: "2",
|
|
4005
|
+
strokeLinecap: "round",
|
|
4006
|
+
strokeLinejoin: "round",
|
|
4007
|
+
children: /* @__PURE__ */ jsx35("polyline", { points: "15 18 9 12 15 6" })
|
|
4008
|
+
}
|
|
4009
|
+
)
|
|
4010
|
+
}
|
|
4011
|
+
),
|
|
4012
|
+
/* @__PURE__ */ jsx35(
|
|
4013
|
+
"div",
|
|
4014
|
+
{
|
|
4015
|
+
ref: scrollerRef,
|
|
4016
|
+
className: "stn-tabs__scroller",
|
|
4017
|
+
onScroll: updateScrollState,
|
|
4018
|
+
children: /* @__PURE__ */ jsxs26("ul", { ref: listRef, role: "tablist", className: "stn-tabs__list", children: [
|
|
4019
|
+
/* @__PURE__ */ jsx35(
|
|
4020
|
+
"div",
|
|
4021
|
+
{
|
|
4022
|
+
className: "stn-tabs__indicator",
|
|
4023
|
+
style: {
|
|
4024
|
+
left: `${indicatorStyle.left}px`,
|
|
4025
|
+
width: `${indicatorStyle.width}px`,
|
|
4026
|
+
opacity: indicatorStyle.opacity
|
|
4027
|
+
}
|
|
4028
|
+
}
|
|
4029
|
+
),
|
|
4030
|
+
items && items.length > 0 ? items.map((item) => /* @__PURE__ */ jsx35(
|
|
4031
|
+
StnTab,
|
|
4032
|
+
{
|
|
4033
|
+
value: item.value,
|
|
4034
|
+
label: item.label,
|
|
4035
|
+
icon: item.icon,
|
|
4036
|
+
iconPosition: item.iconPosition,
|
|
4037
|
+
iconSize: item.iconSize,
|
|
4038
|
+
badge: item.badge,
|
|
4039
|
+
count: item.count,
|
|
4040
|
+
disabled: item.disabled,
|
|
4041
|
+
wrapped: item.wrapped
|
|
4042
|
+
},
|
|
4043
|
+
item.value
|
|
4044
|
+
)) : children
|
|
4045
|
+
] })
|
|
4046
|
+
}
|
|
4047
|
+
),
|
|
4048
|
+
showScrollButtons && /* @__PURE__ */ jsx35(
|
|
4049
|
+
"button",
|
|
4050
|
+
{
|
|
4051
|
+
type: "button",
|
|
4052
|
+
"aria-label": "\uB2E4\uC74C \uD0ED \uBCF4\uAE30",
|
|
4053
|
+
disabled: !canScrollEnd,
|
|
4054
|
+
className: "stn-tabs__scroll-button end",
|
|
4055
|
+
onClick: handleScrollRight,
|
|
4056
|
+
children: /* @__PURE__ */ jsx35(
|
|
4057
|
+
"svg",
|
|
4058
|
+
{
|
|
4059
|
+
width: "16",
|
|
4060
|
+
height: "16",
|
|
4061
|
+
viewBox: "0 0 24 24",
|
|
4062
|
+
fill: "none",
|
|
4063
|
+
stroke: "currentColor",
|
|
4064
|
+
strokeWidth: "2",
|
|
4065
|
+
strokeLinecap: "round",
|
|
4066
|
+
strokeLinejoin: "round",
|
|
4067
|
+
children: /* @__PURE__ */ jsx35("polyline", { points: "9 18 15 12 9 6" })
|
|
4068
|
+
}
|
|
4069
|
+
)
|
|
4070
|
+
}
|
|
4071
|
+
)
|
|
4072
|
+
] });
|
|
4073
|
+
if (!context) {
|
|
4074
|
+
return /* @__PURE__ */ jsx35(
|
|
4075
|
+
StnTabContextProvider,
|
|
4076
|
+
{
|
|
4077
|
+
value: activeValue,
|
|
4078
|
+
onChange: handleValueChange,
|
|
4079
|
+
size: resolvedSize,
|
|
4080
|
+
variant: resolvedVariant,
|
|
4081
|
+
children: content
|
|
4082
|
+
}
|
|
4083
|
+
);
|
|
4084
|
+
}
|
|
4085
|
+
return content;
|
|
4086
|
+
});
|
|
4087
|
+
var StnTabs2 = Object.assign(StnTabsRoot, {
|
|
4088
|
+
Tab: StnTab,
|
|
4089
|
+
Panel: StnTabPanel,
|
|
4090
|
+
Context: StnTabContextProvider
|
|
4091
|
+
});
|
|
4092
|
+
|
|
4093
|
+
// src/components/StnDropdown.tsx
|
|
4094
|
+
import {
|
|
4095
|
+
useCallback as useCallback6,
|
|
4096
|
+
useEffect as useEffect8,
|
|
3728
4097
|
useId as useId9,
|
|
3729
|
-
useRef as
|
|
3730
|
-
useState as
|
|
4098
|
+
useRef as useRef6,
|
|
4099
|
+
useState as useState10
|
|
3731
4100
|
} from "react";
|
|
3732
|
-
import { jsx as
|
|
4101
|
+
import { jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3733
4102
|
function resolveGlyph(node) {
|
|
3734
|
-
if (typeof node === "string") return /* @__PURE__ */
|
|
4103
|
+
if (typeof node === "string") return /* @__PURE__ */ jsx36(StnIcon, { name: node, size: 16, color: "currentColor" });
|
|
3735
4104
|
return node;
|
|
3736
4105
|
}
|
|
3737
4106
|
function modifierClass(modifier) {
|
|
@@ -3759,9 +4128,9 @@ function variantClass(variant = "outline") {
|
|
|
3759
4128
|
return "outline";
|
|
3760
4129
|
}
|
|
3761
4130
|
function useControllable(controlled, defaultValue, onChange) {
|
|
3762
|
-
const [internal, setInternal] =
|
|
4131
|
+
const [internal, setInternal] = useState10(defaultValue);
|
|
3763
4132
|
const value = controlled ?? internal;
|
|
3764
|
-
const setValue =
|
|
4133
|
+
const setValue = useCallback6(
|
|
3765
4134
|
(next) => {
|
|
3766
4135
|
if (controlled === void 0) setInternal(next);
|
|
3767
4136
|
onChange?.(next);
|
|
@@ -3801,8 +4170,8 @@ function StnDropdown({
|
|
|
3801
4170
|
const autoId = useId9();
|
|
3802
4171
|
const rootId = idProp ?? `stn-dropdown-${autoId.replace(/:/g, "")}`;
|
|
3803
4172
|
const [value, setValue] = useControllable(valueProp, defaultValue, onChange);
|
|
3804
|
-
const [open, setOpen] =
|
|
3805
|
-
const rootRef =
|
|
4173
|
+
const [open, setOpen] = useState10(false);
|
|
4174
|
+
const rootRef = useRef6(null);
|
|
3806
4175
|
const selected = options.find((o) => o.value === value);
|
|
3807
4176
|
const hasValue = selected !== void 0 && value !== "";
|
|
3808
4177
|
const displayLabel = hasValue ? selected.label : placeholder ?? (options[0]?.label ?? "");
|
|
@@ -3828,10 +4197,10 @@ function StnDropdown({
|
|
|
3828
4197
|
open && "on",
|
|
3829
4198
|
shouldApplyWidthToDropdown && className
|
|
3830
4199
|
);
|
|
3831
|
-
|
|
4200
|
+
useEffect8(() => {
|
|
3832
4201
|
if (disabled || readOnly) setOpen(false);
|
|
3833
4202
|
}, [disabled, readOnly]);
|
|
3834
|
-
|
|
4203
|
+
useEffect8(() => {
|
|
3835
4204
|
if (!open) return;
|
|
3836
4205
|
const onDoc = (e) => {
|
|
3837
4206
|
if (rootRef.current && !rootRef.current.contains(e.target)) setOpen(false);
|
|
@@ -3873,7 +4242,7 @@ function StnDropdown({
|
|
|
3873
4242
|
setValue(enabledOptions[nextIndex].value);
|
|
3874
4243
|
}
|
|
3875
4244
|
};
|
|
3876
|
-
const dropdownNode = /* @__PURE__ */
|
|
4245
|
+
const dropdownNode = /* @__PURE__ */ jsxs27(
|
|
3877
4246
|
"div",
|
|
3878
4247
|
{
|
|
3879
4248
|
ref: rootRef,
|
|
@@ -3885,7 +4254,7 @@ function StnDropdown({
|
|
|
3885
4254
|
"aria-invalid": error || void 0,
|
|
3886
4255
|
...!hasHelper ? divRest : {},
|
|
3887
4256
|
children: [
|
|
3888
|
-
/* @__PURE__ */
|
|
4257
|
+
/* @__PURE__ */ jsx36(
|
|
3889
4258
|
"div",
|
|
3890
4259
|
{
|
|
3891
4260
|
className: cn("selected", !hasValue && placeholder && "is-placeholder"),
|
|
@@ -3902,7 +4271,7 @@ function StnDropdown({
|
|
|
3902
4271
|
children: displayLabel
|
|
3903
4272
|
}
|
|
3904
4273
|
),
|
|
3905
|
-
/* @__PURE__ */
|
|
4274
|
+
/* @__PURE__ */ jsx36(
|
|
3906
4275
|
"ul",
|
|
3907
4276
|
{
|
|
3908
4277
|
className: cn("select_option", "stn-scroll", "vertical", "thin"),
|
|
@@ -3910,7 +4279,7 @@ function StnDropdown({
|
|
|
3910
4279
|
"aria-label": ariaLabel,
|
|
3911
4280
|
children: options.map((opt) => {
|
|
3912
4281
|
const isSelected = opt.value === value;
|
|
3913
|
-
return /* @__PURE__ */
|
|
4282
|
+
return /* @__PURE__ */ jsxs27(
|
|
3914
4283
|
"li",
|
|
3915
4284
|
{
|
|
3916
4285
|
role: "option",
|
|
@@ -3925,15 +4294,15 @@ function StnDropdown({
|
|
|
3925
4294
|
if (e.key === "Enter" && !opt.disabled) pick(opt.value);
|
|
3926
4295
|
},
|
|
3927
4296
|
children: [
|
|
3928
|
-
/* @__PURE__ */
|
|
4297
|
+
/* @__PURE__ */ jsx36(
|
|
3929
4298
|
"span",
|
|
3930
4299
|
{
|
|
3931
4300
|
className: cn("stn-dropdown__check", isSelected && "is-checked"),
|
|
3932
4301
|
"aria-hidden": "true",
|
|
3933
|
-
children: isSelected ? /* @__PURE__ */
|
|
4302
|
+
children: isSelected ? /* @__PURE__ */ jsx36(StnIcon, { name: "line/check", size: 14, color: "currentColor" }) : null
|
|
3934
4303
|
}
|
|
3935
4304
|
),
|
|
3936
|
-
/* @__PURE__ */
|
|
4305
|
+
/* @__PURE__ */ jsx36("span", { className: "stn-dropdown__item-label", children: opt.label })
|
|
3937
4306
|
]
|
|
3938
4307
|
},
|
|
3939
4308
|
opt.value
|
|
@@ -3948,13 +4317,13 @@ function StnDropdown({
|
|
|
3948
4317
|
const hasWrap = hasLabel || hasHelper;
|
|
3949
4318
|
if (!hasWrap) return dropdownNode;
|
|
3950
4319
|
const resolvedLabelIcon = labelIcon ?? icon;
|
|
3951
|
-
const labelElement = hasLabel ? /* @__PURE__ */
|
|
3952
|
-
resolvedLabelIcon ? /* @__PURE__ */
|
|
3953
|
-
/* @__PURE__ */
|
|
3954
|
-
required && /* @__PURE__ */
|
|
4320
|
+
const labelElement = hasLabel ? /* @__PURE__ */ jsxs27("label", { htmlFor: rootId, className: "stn-dropdown__label", children: [
|
|
4321
|
+
resolvedLabelIcon ? /* @__PURE__ */ jsx36("span", { className: "stn-dropdown__label-icon", "aria-hidden": "true", children: resolveGlyph(resolvedLabelIcon) }) : null,
|
|
4322
|
+
/* @__PURE__ */ jsx36("span", { className: "stn-dropdown__label-text", children: label }),
|
|
4323
|
+
required && /* @__PURE__ */ jsx36("span", { className: "stn-dropdown__required", "aria-hidden": "true", children: "*" })
|
|
3955
4324
|
] }) : null;
|
|
3956
4325
|
const isRow = labelPosition === "left" || labelPosition === "right";
|
|
3957
|
-
return /* @__PURE__ */
|
|
4326
|
+
return /* @__PURE__ */ jsxs27(
|
|
3958
4327
|
"div",
|
|
3959
4328
|
{
|
|
3960
4329
|
className: cn(
|
|
@@ -3972,9 +4341,9 @@ function StnDropdown({
|
|
|
3972
4341
|
...divRest,
|
|
3973
4342
|
children: [
|
|
3974
4343
|
hasLabel && (labelPosition === "left" || labelPosition === "top") ? labelElement : null,
|
|
3975
|
-
/* @__PURE__ */
|
|
4344
|
+
/* @__PURE__ */ jsxs27("div", { className: "stn-dropdown-wrap__body", children: [
|
|
3976
4345
|
dropdownNode,
|
|
3977
|
-
hasHelper && /* @__PURE__ */
|
|
4346
|
+
hasHelper && /* @__PURE__ */ jsx36(
|
|
3978
4347
|
"span",
|
|
3979
4348
|
{
|
|
3980
4349
|
id: helperId,
|
|
@@ -3990,12 +4359,12 @@ function StnDropdown({
|
|
|
3990
4359
|
}
|
|
3991
4360
|
|
|
3992
4361
|
// src/components/StnDropdownMenu.tsx
|
|
3993
|
-
import { jsx as
|
|
4362
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
3994
4363
|
function StnDropdownMenu({
|
|
3995
4364
|
className,
|
|
3996
4365
|
...rest
|
|
3997
4366
|
}) {
|
|
3998
|
-
return /* @__PURE__ */
|
|
4367
|
+
return /* @__PURE__ */ jsx37(
|
|
3999
4368
|
StnDropdown,
|
|
4000
4369
|
{
|
|
4001
4370
|
size: "xl",
|
|
@@ -4006,8 +4375,8 @@ function StnDropdownMenu({
|
|
|
4006
4375
|
}
|
|
4007
4376
|
|
|
4008
4377
|
// src/components/StnTextField.tsx
|
|
4009
|
-
import { forwardRef as
|
|
4010
|
-
import { jsx as
|
|
4378
|
+
import { forwardRef as forwardRef26, useId as useId10 } from "react";
|
|
4379
|
+
import { jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4011
4380
|
function normalizeSize(size) {
|
|
4012
4381
|
if (!size) return "M";
|
|
4013
4382
|
const u = String(size).toUpperCase();
|
|
@@ -4034,10 +4403,10 @@ function colorClass(color) {
|
|
|
4034
4403
|
return color;
|
|
4035
4404
|
}
|
|
4036
4405
|
function resolveGlyph2(node) {
|
|
4037
|
-
if (typeof node === "string") return /* @__PURE__ */
|
|
4406
|
+
if (typeof node === "string") return /* @__PURE__ */ jsx38(StnIcon, { name: node, size: 16, color: "currentColor" });
|
|
4038
4407
|
return node;
|
|
4039
4408
|
}
|
|
4040
|
-
var StnTextField =
|
|
4409
|
+
var StnTextField = forwardRef26(function StnTextField2({
|
|
4041
4410
|
size = "M",
|
|
4042
4411
|
variant = "outlined",
|
|
4043
4412
|
color,
|
|
@@ -4083,7 +4452,7 @@ var StnTextField = forwardRef23(function StnTextField2({
|
|
|
4083
4452
|
hasSlot && "with-icon",
|
|
4084
4453
|
className
|
|
4085
4454
|
);
|
|
4086
|
-
const input = /* @__PURE__ */
|
|
4455
|
+
const input = /* @__PURE__ */ jsx38(
|
|
4087
4456
|
"input",
|
|
4088
4457
|
{
|
|
4089
4458
|
ref,
|
|
@@ -4098,19 +4467,19 @@ var StnTextField = forwardRef23(function StnTextField2({
|
|
|
4098
4467
|
...rest
|
|
4099
4468
|
}
|
|
4100
4469
|
);
|
|
4101
|
-
const field = hasSlot ? /* @__PURE__ */
|
|
4102
|
-
hasLeft ? /* @__PURE__ */
|
|
4470
|
+
const field = hasSlot ? /* @__PURE__ */ jsxs28("div", { className: fieldClass, style: hasWrap ? void 0 : widthProps.style, children: [
|
|
4471
|
+
hasLeft ? /* @__PURE__ */ jsx38("span", { className: "stn-text-field__icon-left", "aria-hidden": true, children: /* @__PURE__ */ jsx38("span", { className: "stn-text-field__icon-box", children: resolveGlyph2(leftNode) }) }) : null,
|
|
4103
4472
|
input,
|
|
4104
|
-
hasRight ? /* @__PURE__ */
|
|
4473
|
+
hasRight ? /* @__PURE__ */ jsx38("span", { className: "stn-text-field__icon-right", "aria-hidden": true, children: /* @__PURE__ */ jsx38("span", { className: "stn-text-field__icon-box", children: resolveGlyph2(rightNode) }) }) : null
|
|
4105
4474
|
] }) : input;
|
|
4106
4475
|
if (!hasWrap) return field;
|
|
4107
|
-
const labelElement = hasLabel ? /* @__PURE__ */
|
|
4108
|
-
labelIcon ? /* @__PURE__ */
|
|
4109
|
-
/* @__PURE__ */
|
|
4110
|
-
required && /* @__PURE__ */
|
|
4476
|
+
const labelElement = hasLabel ? /* @__PURE__ */ jsxs28("label", { htmlFor: id, className: "stn-text-field__label", children: [
|
|
4477
|
+
labelIcon ? /* @__PURE__ */ jsx38("span", { className: "stn-text-field__label-icon", "aria-hidden": "true", children: resolveGlyph2(labelIcon) }) : null,
|
|
4478
|
+
/* @__PURE__ */ jsx38("span", { className: "stn-text-field__label-text", children: label }),
|
|
4479
|
+
required && /* @__PURE__ */ jsx38("span", { className: "stn-text-field__required", "aria-hidden": "true", children: "*" })
|
|
4111
4480
|
] }) : null;
|
|
4112
4481
|
const isRow = labelPosition === "left" || labelPosition === "right";
|
|
4113
|
-
return /* @__PURE__ */
|
|
4482
|
+
return /* @__PURE__ */ jsxs28(
|
|
4114
4483
|
"div",
|
|
4115
4484
|
{
|
|
4116
4485
|
className: cn(
|
|
@@ -4124,9 +4493,9 @@ var StnTextField = forwardRef23(function StnTextField2({
|
|
|
4124
4493
|
style: widthProps.style,
|
|
4125
4494
|
children: [
|
|
4126
4495
|
hasLabel && (labelPosition === "left" || labelPosition === "top") ? labelElement : null,
|
|
4127
|
-
/* @__PURE__ */
|
|
4496
|
+
/* @__PURE__ */ jsxs28("div", { className: "stn-text-field-wrap__body", children: [
|
|
4128
4497
|
field,
|
|
4129
|
-
hasHelper && /* @__PURE__ */
|
|
4498
|
+
hasHelper && /* @__PURE__ */ jsx38(
|
|
4130
4499
|
"p",
|
|
4131
4500
|
{
|
|
4132
4501
|
id: helperId,
|
|
@@ -4143,11 +4512,11 @@ var StnTextField = forwardRef23(function StnTextField2({
|
|
|
4143
4512
|
|
|
4144
4513
|
// src/components/StnTextArea.tsx
|
|
4145
4514
|
import {
|
|
4146
|
-
forwardRef as
|
|
4515
|
+
forwardRef as forwardRef27,
|
|
4147
4516
|
useId as useId11,
|
|
4148
|
-
useState as
|
|
4517
|
+
useState as useState11
|
|
4149
4518
|
} from "react";
|
|
4150
|
-
import { jsx as
|
|
4519
|
+
import { jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4151
4520
|
function normalizeSize2(size) {
|
|
4152
4521
|
return size ?? "md";
|
|
4153
4522
|
}
|
|
@@ -4168,10 +4537,10 @@ function resizeClass(resize) {
|
|
|
4168
4537
|
return "resize-vertical";
|
|
4169
4538
|
}
|
|
4170
4539
|
function resolveGlyph3(node) {
|
|
4171
|
-
if (typeof node === "string") return /* @__PURE__ */
|
|
4540
|
+
if (typeof node === "string") return /* @__PURE__ */ jsx39(StnIcon, { name: node, size: 16, color: "currentColor" });
|
|
4172
4541
|
return node;
|
|
4173
4542
|
}
|
|
4174
|
-
var StnTextArea =
|
|
4543
|
+
var StnTextArea = forwardRef27(function StnTextArea2({
|
|
4175
4544
|
size = "md",
|
|
4176
4545
|
variant = "outlined",
|
|
4177
4546
|
color,
|
|
@@ -4200,7 +4569,7 @@ var StnTextArea = forwardRef24(function StnTextArea2({
|
|
|
4200
4569
|
const autoId = useId11();
|
|
4201
4570
|
const id = idProp ?? autoId;
|
|
4202
4571
|
const isControlled = value !== void 0;
|
|
4203
|
-
const [uncontrolledLength, setUncontrolledLength] =
|
|
4572
|
+
const [uncontrolledLength, setUncontrolledLength] = useState11(() => {
|
|
4204
4573
|
if (defaultValue != null) return String(defaultValue).length;
|
|
4205
4574
|
return 0;
|
|
4206
4575
|
});
|
|
@@ -4228,7 +4597,7 @@ var StnTextArea = forwardRef24(function StnTextArea2({
|
|
|
4228
4597
|
invalid && "invalid",
|
|
4229
4598
|
className
|
|
4230
4599
|
);
|
|
4231
|
-
const textareaElement = /* @__PURE__ */
|
|
4600
|
+
const textareaElement = /* @__PURE__ */ jsx39(
|
|
4232
4601
|
"textarea",
|
|
4233
4602
|
{
|
|
4234
4603
|
ref,
|
|
@@ -4250,13 +4619,13 @@ var StnTextArea = forwardRef24(function StnTextArea2({
|
|
|
4250
4619
|
if (!hasWrap) {
|
|
4251
4620
|
return textareaElement;
|
|
4252
4621
|
}
|
|
4253
|
-
const labelElement = hasLabel ? /* @__PURE__ */
|
|
4254
|
-
labelIcon ? /* @__PURE__ */
|
|
4255
|
-
/* @__PURE__ */
|
|
4256
|
-
required && /* @__PURE__ */
|
|
4622
|
+
const labelElement = hasLabel ? /* @__PURE__ */ jsxs29("label", { htmlFor: id, className: "stn-text-area__label", children: [
|
|
4623
|
+
labelIcon ? /* @__PURE__ */ jsx39("span", { className: "stn-text-area__label-icon", "aria-hidden": "true", children: resolveGlyph3(labelIcon) }) : null,
|
|
4624
|
+
/* @__PURE__ */ jsx39("span", { className: "stn-text-area__label-text", children: label }),
|
|
4625
|
+
required && /* @__PURE__ */ jsx39("span", { className: "stn-text-area__required", "aria-hidden": "true", children: "*" })
|
|
4257
4626
|
] }) : null;
|
|
4258
4627
|
const isRow = labelPosition === "left" || labelPosition === "right";
|
|
4259
|
-
return /* @__PURE__ */
|
|
4628
|
+
return /* @__PURE__ */ jsxs29(
|
|
4260
4629
|
"div",
|
|
4261
4630
|
{
|
|
4262
4631
|
className: cn(
|
|
@@ -4270,18 +4639,18 @@ var StnTextArea = forwardRef24(function StnTextArea2({
|
|
|
4270
4639
|
style: widthProps.style,
|
|
4271
4640
|
children: [
|
|
4272
4641
|
hasLabel && (labelPosition === "left" || labelPosition === "top") ? labelElement : null,
|
|
4273
|
-
/* @__PURE__ */
|
|
4642
|
+
/* @__PURE__ */ jsxs29("div", { className: "stn-text-area-wrap__body", children: [
|
|
4274
4643
|
textareaElement,
|
|
4275
|
-
hasFooter && /* @__PURE__ */
|
|
4276
|
-
hasHelper ? /* @__PURE__ */
|
|
4644
|
+
hasFooter && /* @__PURE__ */ jsxs29("div", { className: "stn-text-area__footer", children: [
|
|
4645
|
+
hasHelper ? /* @__PURE__ */ jsx39(
|
|
4277
4646
|
"p",
|
|
4278
4647
|
{
|
|
4279
4648
|
id: helperId,
|
|
4280
4649
|
className: cn("stn-text-area__helper", invalid && "stn-text-area__helper--error"),
|
|
4281
4650
|
children: helperText
|
|
4282
4651
|
}
|
|
4283
|
-
) : /* @__PURE__ */
|
|
4284
|
-
showCount && /* @__PURE__ */
|
|
4652
|
+
) : /* @__PURE__ */ jsx39("span", {}),
|
|
4653
|
+
showCount && /* @__PURE__ */ jsxs29("span", { className: "stn-text-area__count", children: [
|
|
4285
4654
|
currentLength,
|
|
4286
4655
|
maxLength != null ? ` / ${maxLength}` : ""
|
|
4287
4656
|
] })
|
|
@@ -4295,13 +4664,13 @@ var StnTextArea = forwardRef24(function StnTextArea2({
|
|
|
4295
4664
|
StnTextArea.displayName = "StnTextArea";
|
|
4296
4665
|
|
|
4297
4666
|
// src/components/StnDateRangeField.tsx
|
|
4298
|
-
import { forwardRef as
|
|
4667
|
+
import { forwardRef as forwardRef28, useId as useId12 } from "react";
|
|
4299
4668
|
import {
|
|
4300
4669
|
formatStnDateRangeFieldValue
|
|
4301
4670
|
} from "@stn-uiux/pub-ui/data/stnDateRangeField";
|
|
4302
|
-
import { jsx as
|
|
4671
|
+
import { jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4303
4672
|
function resolveGlyph4(node) {
|
|
4304
|
-
if (typeof node === "string") return /* @__PURE__ */
|
|
4673
|
+
if (typeof node === "string") return /* @__PURE__ */ jsx40(StnIcon, { name: node, size: 16, color: "currentColor" });
|
|
4305
4674
|
return node;
|
|
4306
4675
|
}
|
|
4307
4676
|
function normalizeSize3(size) {
|
|
@@ -4325,7 +4694,7 @@ function resolveValue(value, format) {
|
|
|
4325
4694
|
const trimmed = value.trim();
|
|
4326
4695
|
return trimmed || null;
|
|
4327
4696
|
}
|
|
4328
|
-
var StnDateRangeField =
|
|
4697
|
+
var StnDateRangeField = forwardRef28(function StnDateRangeField2({
|
|
4329
4698
|
size = "md",
|
|
4330
4699
|
variant = "outline",
|
|
4331
4700
|
start,
|
|
@@ -4359,7 +4728,7 @@ var StnDateRangeField = forwardRef25(function StnDateRangeField2({
|
|
|
4359
4728
|
const hasLabel = label != null && label !== "";
|
|
4360
4729
|
const hasHelper = helperText != null && helperText !== "";
|
|
4361
4730
|
const hasWrap = hasLabel || hasHelper;
|
|
4362
|
-
const buttonNode = /* @__PURE__ */
|
|
4731
|
+
const buttonNode = /* @__PURE__ */ jsx40(
|
|
4363
4732
|
"button",
|
|
4364
4733
|
{
|
|
4365
4734
|
ref,
|
|
@@ -4379,25 +4748,25 @@ var StnDateRangeField = forwardRef25(function StnDateRangeField2({
|
|
|
4379
4748
|
),
|
|
4380
4749
|
style: !hasWrap ? widthProps.style ?? style : void 0,
|
|
4381
4750
|
...rest,
|
|
4382
|
-
children: /* @__PURE__ */
|
|
4383
|
-
/* @__PURE__ */
|
|
4384
|
-
/* @__PURE__ */
|
|
4385
|
-
/* @__PURE__ */
|
|
4386
|
-
/* @__PURE__ */
|
|
4751
|
+
children: /* @__PURE__ */ jsxs30("span", { className: "stn-date-range-field__inner", children: [
|
|
4752
|
+
/* @__PURE__ */ jsxs30("span", { className: "stn-date-range-field__text", children: [
|
|
4753
|
+
/* @__PURE__ */ jsx40("span", { className: cn("stn-date-range-field__value", !startText && "is-placeholder"), children: startText ?? startPlaceholder }),
|
|
4754
|
+
/* @__PURE__ */ jsx40("span", { className: "stn-date-range-field__sep", "aria-hidden": "true", children: "~" }),
|
|
4755
|
+
/* @__PURE__ */ jsx40("span", { className: cn("stn-date-range-field__value", !endText && "is-placeholder"), children: endText ?? endPlaceholder })
|
|
4387
4756
|
] }),
|
|
4388
|
-
/* @__PURE__ */
|
|
4757
|
+
/* @__PURE__ */ jsx40("span", { className: "stn-date-range-field__icon", "aria-hidden": "true" })
|
|
4389
4758
|
] })
|
|
4390
4759
|
}
|
|
4391
4760
|
);
|
|
4392
4761
|
if (!hasWrap) return buttonNode;
|
|
4393
4762
|
const resolvedLabelIcon = labelIcon ?? icon;
|
|
4394
|
-
const labelElement = hasLabel ? /* @__PURE__ */
|
|
4395
|
-
resolvedLabelIcon ? /* @__PURE__ */
|
|
4396
|
-
/* @__PURE__ */
|
|
4397
|
-
required && /* @__PURE__ */
|
|
4763
|
+
const labelElement = hasLabel ? /* @__PURE__ */ jsxs30("label", { htmlFor: rootId, className: "stn-date-range-field__label", children: [
|
|
4764
|
+
resolvedLabelIcon ? /* @__PURE__ */ jsx40("span", { className: "stn-date-range-field__label-icon", "aria-hidden": "true", children: resolveGlyph4(resolvedLabelIcon) }) : null,
|
|
4765
|
+
/* @__PURE__ */ jsx40("span", { className: "stn-date-range-field__label-text", children: label }),
|
|
4766
|
+
required && /* @__PURE__ */ jsx40("span", { className: "stn-date-range-field__required", "aria-hidden": "true", children: "*" })
|
|
4398
4767
|
] }) : null;
|
|
4399
4768
|
const isRow = labelPosition === "left" || labelPosition === "right";
|
|
4400
|
-
return /* @__PURE__ */
|
|
4769
|
+
return /* @__PURE__ */ jsxs30(
|
|
4401
4770
|
"div",
|
|
4402
4771
|
{
|
|
4403
4772
|
className: cn(
|
|
@@ -4413,9 +4782,9 @@ var StnDateRangeField = forwardRef25(function StnDateRangeField2({
|
|
|
4413
4782
|
style: widthProps.style ?? style,
|
|
4414
4783
|
children: [
|
|
4415
4784
|
hasLabel && (labelPosition === "left" || labelPosition === "top") ? labelElement : null,
|
|
4416
|
-
/* @__PURE__ */
|
|
4785
|
+
/* @__PURE__ */ jsxs30("div", { className: "stn-date-range-field-wrap__body", children: [
|
|
4417
4786
|
buttonNode,
|
|
4418
|
-
hasHelper && /* @__PURE__ */
|
|
4787
|
+
hasHelper && /* @__PURE__ */ jsx40(
|
|
4419
4788
|
"span",
|
|
4420
4789
|
{
|
|
4421
4790
|
id: `${rootId}-helper`,
|
|
@@ -4436,11 +4805,11 @@ var StnDateRangeField = forwardRef25(function StnDateRangeField2({
|
|
|
4436
4805
|
// src/components/StnLabelPrefix.tsx
|
|
4437
4806
|
import {
|
|
4438
4807
|
useId as useId13,
|
|
4439
|
-
useState as
|
|
4808
|
+
useState as useState12,
|
|
4440
4809
|
isValidElement as isValidElement4,
|
|
4441
4810
|
cloneElement as cloneElement4
|
|
4442
4811
|
} from "react";
|
|
4443
|
-
import { jsx as
|
|
4812
|
+
import { jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4444
4813
|
function sizeClass4(size) {
|
|
4445
4814
|
return size;
|
|
4446
4815
|
}
|
|
@@ -4480,7 +4849,7 @@ function StnLabelPrefix({
|
|
|
4480
4849
|
const isError = error || invalid || color === "error";
|
|
4481
4850
|
const hasHelper = helperText != null && helperText !== "";
|
|
4482
4851
|
const helperId = hasHelper ? `${id}-helper` : void 0;
|
|
4483
|
-
const [internalChecked, setInternalChecked] =
|
|
4852
|
+
const [internalChecked, setInternalChecked] = useState12(defaultChecked ?? false);
|
|
4484
4853
|
const isChecked = checked !== void 0 ? checked : internalChecked;
|
|
4485
4854
|
const handleCheckboxChange = (nextChecked) => {
|
|
4486
4855
|
if (checked === void 0) {
|
|
@@ -4505,7 +4874,7 @@ function StnLabelPrefix({
|
|
|
4505
4874
|
);
|
|
4506
4875
|
const defaultCheckboxSize = size === "lg" ? "md" : "sm";
|
|
4507
4876
|
const resolvedCheckboxSize = checkboxSize ?? defaultCheckboxSize;
|
|
4508
|
-
const checkboxNode = checkboxSlot ?? (checkbox ? /* @__PURE__ */
|
|
4877
|
+
const checkboxNode = checkboxSlot ?? (checkbox ? /* @__PURE__ */ jsx41("span", { className: "stn-label-prefix__checkbox", children: /* @__PURE__ */ jsx41(
|
|
4509
4878
|
StnCheckbox,
|
|
4510
4879
|
{
|
|
4511
4880
|
size: resolvedCheckboxSize,
|
|
@@ -4516,14 +4885,14 @@ function StnLabelPrefix({
|
|
|
4516
4885
|
"aria-label": typeof label === "string" ? `${label} \uC120\uD0DD` : void 0
|
|
4517
4886
|
}
|
|
4518
4887
|
) }) : null);
|
|
4519
|
-
const labelSection = /* @__PURE__ */
|
|
4888
|
+
const labelSection = /* @__PURE__ */ jsxs31("span", { className: "stn-label-prefix__label", children: [
|
|
4520
4889
|
checkboxNode,
|
|
4521
|
-
labelIcon != null && /* @__PURE__ */
|
|
4522
|
-
/* @__PURE__ */
|
|
4890
|
+
labelIcon != null && /* @__PURE__ */ jsx41("span", { className: "stn-label-prefix__icon", "aria-hidden": "true", children: labelIcon }),
|
|
4891
|
+
/* @__PURE__ */ jsxs31("span", { className: "stn-label-prefix__text", children: [
|
|
4523
4892
|
label,
|
|
4524
|
-
required && /* @__PURE__ */
|
|
4893
|
+
required && /* @__PURE__ */ jsx41("span", { className: "stn-label-prefix__required", "aria-hidden": "true", children: "*" })
|
|
4525
4894
|
] }),
|
|
4526
|
-
/* @__PURE__ */
|
|
4895
|
+
/* @__PURE__ */ jsx41("span", { className: "stn-label-prefix__divider", "aria-hidden": "true" })
|
|
4527
4896
|
] });
|
|
4528
4897
|
let renderedControl = children;
|
|
4529
4898
|
if (isControlDisabled && isValidElement4(children) && typeof children.type !== "string") {
|
|
@@ -4531,7 +4900,7 @@ function StnLabelPrefix({
|
|
|
4531
4900
|
disabled: true
|
|
4532
4901
|
});
|
|
4533
4902
|
}
|
|
4534
|
-
const prefixNode = /* @__PURE__ */
|
|
4903
|
+
const prefixNode = /* @__PURE__ */ jsxs31(
|
|
4535
4904
|
"div",
|
|
4536
4905
|
{
|
|
4537
4906
|
id: !hasHelper ? id : void 0,
|
|
@@ -4543,14 +4912,14 @@ function StnLabelPrefix({
|
|
|
4543
4912
|
...!hasHelper ? rest : {},
|
|
4544
4913
|
children: [
|
|
4545
4914
|
labelSection,
|
|
4546
|
-
/* @__PURE__ */
|
|
4915
|
+
/* @__PURE__ */ jsx41("span", { className: "stn-label-prefix__control", children: renderedControl })
|
|
4547
4916
|
]
|
|
4548
4917
|
}
|
|
4549
4918
|
);
|
|
4550
4919
|
if (!hasHelper) {
|
|
4551
4920
|
return prefixNode;
|
|
4552
4921
|
}
|
|
4553
|
-
return /* @__PURE__ */
|
|
4922
|
+
return /* @__PURE__ */ jsxs31(
|
|
4554
4923
|
"div",
|
|
4555
4924
|
{
|
|
4556
4925
|
id,
|
|
@@ -4564,7 +4933,7 @@ function StnLabelPrefix({
|
|
|
4564
4933
|
...rest,
|
|
4565
4934
|
children: [
|
|
4566
4935
|
prefixNode,
|
|
4567
|
-
/* @__PURE__ */
|
|
4936
|
+
/* @__PURE__ */ jsx41(
|
|
4568
4937
|
"p",
|
|
4569
4938
|
{
|
|
4570
4939
|
id: helperId,
|
|
@@ -4630,14 +4999,14 @@ import {
|
|
|
4630
4999
|
} from "@stn-uiux/pub-ui/data/stnSearchRequirement";
|
|
4631
5000
|
|
|
4632
5001
|
// src/patterns/search/StnSearchRequirementBar.tsx
|
|
4633
|
-
import { jsx as
|
|
5002
|
+
import { jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4634
5003
|
function StnSearchRequirementBar({
|
|
4635
5004
|
children,
|
|
4636
5005
|
className,
|
|
4637
5006
|
density = "default",
|
|
4638
5007
|
...rest
|
|
4639
5008
|
}) {
|
|
4640
|
-
return /* @__PURE__ */
|
|
5009
|
+
return /* @__PURE__ */ jsx42(
|
|
4641
5010
|
"div",
|
|
4642
5011
|
{
|
|
4643
5012
|
className: cn(
|
|
@@ -4653,7 +5022,7 @@ function StnSearchRequirementBar({
|
|
|
4653
5022
|
);
|
|
4654
5023
|
}
|
|
4655
5024
|
function StnSearchRequirementBarFields({ children, className, ...rest }) {
|
|
4656
|
-
return /* @__PURE__ */
|
|
5025
|
+
return /* @__PURE__ */ jsx42("div", { className: cn("stn-search-requirement__fields", className), "data-stn-search-requirement": "fields", ...rest, children });
|
|
4657
5026
|
}
|
|
4658
5027
|
function StnSearchRequirementBarField({
|
|
4659
5028
|
label,
|
|
@@ -4663,20 +5032,20 @@ function StnSearchRequirementBarField({
|
|
|
4663
5032
|
controlClassName,
|
|
4664
5033
|
...rest
|
|
4665
5034
|
}) {
|
|
4666
|
-
return /* @__PURE__ */
|
|
4667
|
-
/* @__PURE__ */
|
|
4668
|
-
/* @__PURE__ */
|
|
5035
|
+
return /* @__PURE__ */ jsxs32("div", { className: cn("stn-search-requirement__field", className), "data-stn-search-requirement": "field", ...rest, children: [
|
|
5036
|
+
/* @__PURE__ */ jsx42("span", { className: cn("stn-search-requirement__label", labelClassName), children: label }),
|
|
5037
|
+
/* @__PURE__ */ jsx42("div", { className: cn("stn-search-requirement__control", controlClassName), children })
|
|
4669
5038
|
] });
|
|
4670
5039
|
}
|
|
4671
5040
|
function StnSearchRequirementBarSearchButton({
|
|
4672
5041
|
children = "\uAC80\uC0C9",
|
|
4673
5042
|
size = "md",
|
|
4674
5043
|
variant = "outlined",
|
|
4675
|
-
icon = /* @__PURE__ */
|
|
5044
|
+
icon = /* @__PURE__ */ jsx42(StnIcon, { name: "line/search", size: 16, color: "currentColor" }),
|
|
4676
5045
|
className,
|
|
4677
5046
|
...rest
|
|
4678
5047
|
}) {
|
|
4679
|
-
return /* @__PURE__ */
|
|
5048
|
+
return /* @__PURE__ */ jsx42(
|
|
4680
5049
|
StnButton,
|
|
4681
5050
|
{
|
|
4682
5051
|
size,
|
|
@@ -4698,10 +5067,10 @@ function StnSearchRequirementBarExport({
|
|
|
4698
5067
|
"aria-label": ariaLabel = "Excel\uBCF4\uB0B4\uAE30",
|
|
4699
5068
|
...rest
|
|
4700
5069
|
}) {
|
|
4701
|
-
return /* @__PURE__ */
|
|
5070
|
+
return /* @__PURE__ */ jsx42(
|
|
4702
5071
|
StnButton,
|
|
4703
5072
|
{
|
|
4704
|
-
icon: icon ?? /* @__PURE__ */
|
|
5073
|
+
icon: icon ?? /* @__PURE__ */ jsx42(StnIcon, { name, size: 24, color: "currentColor" }),
|
|
4705
5074
|
variant,
|
|
4706
5075
|
size,
|
|
4707
5076
|
"aria-label": ariaLabel,
|
|
@@ -4712,7 +5081,7 @@ function StnSearchRequirementBarExport({
|
|
|
4712
5081
|
);
|
|
4713
5082
|
}
|
|
4714
5083
|
function StnSearchRequirementBarDivider({ className, ...rest }) {
|
|
4715
|
-
return /* @__PURE__ */
|
|
5084
|
+
return /* @__PURE__ */ jsx42(
|
|
4716
5085
|
"span",
|
|
4717
5086
|
{
|
|
4718
5087
|
className: cn("stn-search-requirement__divider", className),
|
|
@@ -4734,17 +5103,17 @@ import { STN_SEARCH_REQUIREMENT_DEMO_FIELDS } from "@stn-uiux/pub-ui/data/stnSea
|
|
|
4734
5103
|
|
|
4735
5104
|
// src/components/datePicker/StnDateRangePickerField.tsx
|
|
4736
5105
|
import {
|
|
4737
|
-
useCallback as
|
|
4738
|
-
useEffect as
|
|
4739
|
-
useLayoutEffect,
|
|
4740
|
-
useRef as
|
|
4741
|
-
useState as
|
|
5106
|
+
useCallback as useCallback8,
|
|
5107
|
+
useEffect as useEffect10,
|
|
5108
|
+
useLayoutEffect as useLayoutEffect2,
|
|
5109
|
+
useRef as useRef7,
|
|
5110
|
+
useState as useState14
|
|
4742
5111
|
} from "react";
|
|
4743
5112
|
import { createPortal as createPortal2 } from "react-dom";
|
|
4744
5113
|
import { formatStnDateRangeFieldValue as formatStnDateRangeFieldValue2 } from "@stn-uiux/pub-ui/data/stnDateRangeField";
|
|
4745
5114
|
|
|
4746
5115
|
// src/components/datePicker/StnDateRangePicker.tsx
|
|
4747
|
-
import { useCallback as
|
|
5116
|
+
import { useCallback as useCallback7, useEffect as useEffect9, useId as useId14, useMemo as useMemo3, useState as useState13 } from "react";
|
|
4748
5117
|
import {
|
|
4749
5118
|
STN_DATE_PICKER_WEEKDAYS
|
|
4750
5119
|
} from "@stn-uiux/pub-ui/data/stnDatePicker";
|
|
@@ -4804,10 +5173,10 @@ function normalizeRange(start, end) {
|
|
|
4804
5173
|
}
|
|
4805
5174
|
|
|
4806
5175
|
// src/components/datePicker/StnDateRangePicker.tsx
|
|
4807
|
-
import { jsx as
|
|
5176
|
+
import { jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4808
5177
|
function useDraftRange(value, open) {
|
|
4809
|
-
const [draft, setDraft] =
|
|
4810
|
-
|
|
5178
|
+
const [draft, setDraft] = useState13(value);
|
|
5179
|
+
useEffect9(() => {
|
|
4811
5180
|
if (open) setDraft(value);
|
|
4812
5181
|
}, [open, value]);
|
|
4813
5182
|
return [draft, setDraft];
|
|
@@ -4815,19 +5184,19 @@ function useDraftRange(value, open) {
|
|
|
4815
5184
|
function CalendarPanel({ month, range, onPick, onPrev, onNext, showPrev = true, showNext = true }) {
|
|
4816
5185
|
const days = useMemo3(() => buildMonthGrid(month), [month]);
|
|
4817
5186
|
const { start, end } = range;
|
|
4818
|
-
return /* @__PURE__ */
|
|
4819
|
-
/* @__PURE__ */
|
|
4820
|
-
showPrev ? /* @__PURE__ */
|
|
4821
|
-
/* @__PURE__ */
|
|
4822
|
-
showNext ? /* @__PURE__ */
|
|
5187
|
+
return /* @__PURE__ */ jsxs33("div", { className: "stn-date-picker-panel", children: [
|
|
5188
|
+
/* @__PURE__ */ jsxs33("div", { className: "stn-date-picker-panel__header", children: [
|
|
5189
|
+
showPrev ? /* @__PURE__ */ jsx43("button", { type: "button", className: "stn-date-picker-panel__nav", onClick: onPrev, "aria-label": "Previous month", children: "\u2039" }) : /* @__PURE__ */ jsx43("span", { className: "stn-date-picker-panel__nav", "aria-hidden": "true" }),
|
|
5190
|
+
/* @__PURE__ */ jsx43("p", { className: "stn-date-picker-panel__title", children: formatMonthTitle(month) }),
|
|
5191
|
+
showNext ? /* @__PURE__ */ jsx43("button", { type: "button", className: "stn-date-picker-panel__nav", onClick: onNext, "aria-label": "Next month", children: "\u203A" }) : /* @__PURE__ */ jsx43("span", { className: "stn-date-picker-panel__nav", "aria-hidden": "true" })
|
|
4823
5192
|
] }),
|
|
4824
|
-
/* @__PURE__ */
|
|
4825
|
-
/* @__PURE__ */
|
|
4826
|
-
/* @__PURE__ */
|
|
5193
|
+
/* @__PURE__ */ jsxs33("table", { className: "stn-date-picker-content", children: [
|
|
5194
|
+
/* @__PURE__ */ jsx43("thead", { children: /* @__PURE__ */ jsx43("tr", { children: STN_DATE_PICKER_WEEKDAYS.map((label) => /* @__PURE__ */ jsx43("th", { scope: "col", children: label }, label)) }) }),
|
|
5195
|
+
/* @__PURE__ */ jsx43("tbody", { children: Array.from({ length: 6 }, (_, row) => /* @__PURE__ */ jsx43("tr", { children: days.slice(row * 7, row * 7 + 7).map((cell) => {
|
|
4827
5196
|
const inRange = start && end && isBetweenDays(cell.date, start, end);
|
|
4828
5197
|
const isStart = start ? isSameDay(cell.date, start) : false;
|
|
4829
5198
|
const isEnd = end ? isSameDay(cell.date, end) : false;
|
|
4830
|
-
return /* @__PURE__ */
|
|
5199
|
+
return /* @__PURE__ */ jsx43(
|
|
4831
5200
|
"td",
|
|
4832
5201
|
{
|
|
4833
5202
|
className: cn(
|
|
@@ -4837,7 +5206,7 @@ function CalendarPanel({ month, range, onPick, onPrev, onNext, showPrev = true,
|
|
|
4837
5206
|
isStart && "stn-date-picker-cell--range-start",
|
|
4838
5207
|
isEnd && "stn-date-picker-cell--range-end"
|
|
4839
5208
|
),
|
|
4840
|
-
children: /* @__PURE__ */
|
|
5209
|
+
children: /* @__PURE__ */ jsx43(
|
|
4841
5210
|
"button",
|
|
4842
5211
|
{
|
|
4843
5212
|
type: "button",
|
|
@@ -4859,16 +5228,16 @@ function TimeColumns({ label, value, onChange }) {
|
|
|
4859
5228
|
const seconds = value?.getSeconds() ?? 0;
|
|
4860
5229
|
const base = value ?? /* @__PURE__ */ new Date();
|
|
4861
5230
|
const patch = (h, m, s) => onChange(setTimePart(base, h, m, s));
|
|
4862
|
-
return /* @__PURE__ */
|
|
4863
|
-
/* @__PURE__ */
|
|
4864
|
-
/* @__PURE__ */
|
|
4865
|
-
/* @__PURE__ */
|
|
5231
|
+
return /* @__PURE__ */ jsxs33("div", { className: "stn-date-picker-time__side", children: [
|
|
5232
|
+
/* @__PURE__ */ jsx43("span", { className: "stn-date-picker-time__label", children: label }),
|
|
5233
|
+
/* @__PURE__ */ jsxs33("div", { className: "stn-date-picker-time__columns", children: [
|
|
5234
|
+
/* @__PURE__ */ jsx43(
|
|
4866
5235
|
StnScroll,
|
|
4867
5236
|
{
|
|
4868
5237
|
variant: "arrows",
|
|
4869
5238
|
size: "thin",
|
|
4870
5239
|
className: "stn-date-picker-time__scroll",
|
|
4871
|
-
children: /* @__PURE__ */
|
|
5240
|
+
children: /* @__PURE__ */ jsx43("ul", { className: "stn-date-picker-time__column", "aria-label": `${label} hour`, children: Array.from({ length: 24 }, (_, h) => /* @__PURE__ */ jsx43("li", { children: /* @__PURE__ */ jsx43(
|
|
4872
5241
|
"button",
|
|
4873
5242
|
{
|
|
4874
5243
|
type: "button",
|
|
@@ -4879,13 +5248,13 @@ function TimeColumns({ label, value, onChange }) {
|
|
|
4879
5248
|
) }, h)) })
|
|
4880
5249
|
}
|
|
4881
5250
|
),
|
|
4882
|
-
/* @__PURE__ */
|
|
5251
|
+
/* @__PURE__ */ jsx43(
|
|
4883
5252
|
StnScroll,
|
|
4884
5253
|
{
|
|
4885
5254
|
variant: "arrows",
|
|
4886
5255
|
size: "thin",
|
|
4887
5256
|
className: "stn-date-picker-time__scroll",
|
|
4888
|
-
children: /* @__PURE__ */
|
|
5257
|
+
children: /* @__PURE__ */ jsx43("ul", { className: "stn-date-picker-time__column", "aria-label": `${label} minute`, children: Array.from({ length: 60 }, (_, m) => /* @__PURE__ */ jsx43("li", { children: /* @__PURE__ */ jsx43(
|
|
4889
5258
|
"button",
|
|
4890
5259
|
{
|
|
4891
5260
|
type: "button",
|
|
@@ -4896,13 +5265,13 @@ function TimeColumns({ label, value, onChange }) {
|
|
|
4896
5265
|
) }, m)) })
|
|
4897
5266
|
}
|
|
4898
5267
|
),
|
|
4899
|
-
/* @__PURE__ */
|
|
5268
|
+
/* @__PURE__ */ jsx43(
|
|
4900
5269
|
StnScroll,
|
|
4901
5270
|
{
|
|
4902
5271
|
variant: "arrows",
|
|
4903
5272
|
size: "thin",
|
|
4904
5273
|
className: "stn-date-picker-time__scroll",
|
|
4905
|
-
children: /* @__PURE__ */
|
|
5274
|
+
children: /* @__PURE__ */ jsx43("ul", { className: "stn-date-picker-time__column", "aria-label": `${label} second`, children: Array.from({ length: 60 }, (_, s) => /* @__PURE__ */ jsx43("li", { children: /* @__PURE__ */ jsx43(
|
|
4906
5275
|
"button",
|
|
4907
5276
|
{
|
|
4908
5277
|
type: "button",
|
|
@@ -4929,21 +5298,21 @@ function StnDateRangePicker({
|
|
|
4929
5298
|
}) {
|
|
4930
5299
|
const titleId = useId14();
|
|
4931
5300
|
const [draft, setDraft] = useDraftRange(value, open);
|
|
4932
|
-
const [leftMonth, setLeftMonth] =
|
|
4933
|
-
|
|
5301
|
+
const [leftMonth, setLeftMonth] = useState13(() => startOfMonth(draft.start ?? draft.end ?? /* @__PURE__ */ new Date()));
|
|
5302
|
+
useEffect9(() => {
|
|
4934
5303
|
if (!open) return;
|
|
4935
5304
|
const anchor = draft.start ?? draft.end ?? /* @__PURE__ */ new Date();
|
|
4936
5305
|
setLeftMonth(startOfMonth(anchor));
|
|
4937
5306
|
}, [open, draft.start, draft.end]);
|
|
4938
5307
|
const rightMonth = useMemo3(() => addMonths(leftMonth, 1), [leftMonth]);
|
|
4939
|
-
const updateDraft =
|
|
5308
|
+
const updateDraft = useCallback7(
|
|
4940
5309
|
(next) => {
|
|
4941
5310
|
setDraft(next);
|
|
4942
5311
|
onChange?.(next);
|
|
4943
5312
|
},
|
|
4944
5313
|
[onChange]
|
|
4945
5314
|
);
|
|
4946
|
-
const pickDay =
|
|
5315
|
+
const pickDay = useCallback7(
|
|
4947
5316
|
(day) => {
|
|
4948
5317
|
const nextStart = cloneDate(day);
|
|
4949
5318
|
if (!showTime) {
|
|
@@ -4981,7 +5350,7 @@ function StnDateRangePicker({
|
|
|
4981
5350
|
left: anchorRect.left,
|
|
4982
5351
|
...style
|
|
4983
5352
|
} : style ?? {};
|
|
4984
|
-
return /* @__PURE__ */
|
|
5353
|
+
return /* @__PURE__ */ jsx43(
|
|
4985
5354
|
"div",
|
|
4986
5355
|
{
|
|
4987
5356
|
className: cn("stn-date-picker-dropdown", className),
|
|
@@ -4989,10 +5358,10 @@ function StnDateRangePicker({
|
|
|
4989
5358
|
role: "dialog",
|
|
4990
5359
|
"aria-modal": "false",
|
|
4991
5360
|
"aria-labelledby": titleId,
|
|
4992
|
-
children: /* @__PURE__ */
|
|
4993
|
-
/* @__PURE__ */
|
|
4994
|
-
/* @__PURE__ */
|
|
4995
|
-
/* @__PURE__ */
|
|
5361
|
+
children: /* @__PURE__ */ jsxs33("div", { className: "stn-date-picker-dropdown__body", children: [
|
|
5362
|
+
/* @__PURE__ */ jsx43("span", { id: titleId, className: "stn-sf__visually-hidden", children: "Date range picker" }),
|
|
5363
|
+
/* @__PURE__ */ jsxs33("div", { className: "stn-date-picker-dropdown__panels", children: [
|
|
5364
|
+
/* @__PURE__ */ jsx43(
|
|
4996
5365
|
CalendarPanel,
|
|
4997
5366
|
{
|
|
4998
5367
|
month: leftMonth,
|
|
@@ -5003,7 +5372,7 @@ function StnDateRangePicker({
|
|
|
5003
5372
|
showNext: false
|
|
5004
5373
|
}
|
|
5005
5374
|
),
|
|
5006
|
-
/* @__PURE__ */
|
|
5375
|
+
/* @__PURE__ */ jsx43(
|
|
5007
5376
|
CalendarPanel,
|
|
5008
5377
|
{
|
|
5009
5378
|
month: rightMonth,
|
|
@@ -5015,8 +5384,8 @@ function StnDateRangePicker({
|
|
|
5015
5384
|
}
|
|
5016
5385
|
)
|
|
5017
5386
|
] }),
|
|
5018
|
-
showTime ? /* @__PURE__ */
|
|
5019
|
-
/* @__PURE__ */
|
|
5387
|
+
showTime ? /* @__PURE__ */ jsxs33("div", { className: "stn-date-picker-time", children: [
|
|
5388
|
+
/* @__PURE__ */ jsx43(
|
|
5020
5389
|
TimeColumns,
|
|
5021
5390
|
{
|
|
5022
5391
|
label: "\uC2DC\uC791",
|
|
@@ -5024,7 +5393,7 @@ function StnDateRangePicker({
|
|
|
5024
5393
|
onChange: (start) => updateDraft({ ...draft, start })
|
|
5025
5394
|
}
|
|
5026
5395
|
),
|
|
5027
|
-
/* @__PURE__ */
|
|
5396
|
+
/* @__PURE__ */ jsx43(
|
|
5028
5397
|
TimeColumns,
|
|
5029
5398
|
{
|
|
5030
5399
|
label: "\uC885\uB8CC",
|
|
@@ -5033,18 +5402,18 @@ function StnDateRangePicker({
|
|
|
5033
5402
|
}
|
|
5034
5403
|
)
|
|
5035
5404
|
] }) : null,
|
|
5036
|
-
/* @__PURE__ */
|
|
5405
|
+
/* @__PURE__ */ jsx43("div", { className: "stn-date-picker-footer", children: /* @__PURE__ */ jsx43(StnButton, { size: "md", variant: "contained", onClick: handleApply, disabled: !draft.start || !draft.end, children: "\uD655\uC778" }) })
|
|
5037
5406
|
] })
|
|
5038
5407
|
}
|
|
5039
5408
|
);
|
|
5040
5409
|
}
|
|
5041
5410
|
|
|
5042
5411
|
// src/components/datePicker/StnDateRangePickerField.tsx
|
|
5043
|
-
import { jsx as
|
|
5412
|
+
import { jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
5044
5413
|
function useControllableRange(controlled, defaultValue, onChange) {
|
|
5045
|
-
const [internal, setInternal] =
|
|
5414
|
+
const [internal, setInternal] = useState14(defaultValue);
|
|
5046
5415
|
const value = controlled ?? internal;
|
|
5047
|
-
const setValue =
|
|
5416
|
+
const setValue = useCallback8(
|
|
5048
5417
|
(next) => {
|
|
5049
5418
|
if (controlled === void 0) setInternal(next);
|
|
5050
5419
|
onChange?.(next);
|
|
@@ -5074,15 +5443,15 @@ function StnDateRangePickerField({
|
|
|
5074
5443
|
}) {
|
|
5075
5444
|
const format = formatProp ?? (showTime ? formatStnDateRangeFieldValue2 : formatDateOnly);
|
|
5076
5445
|
const [value, setValue] = useControllableRange(valueProp, defaultValue, onChange);
|
|
5077
|
-
const [open, setOpen] =
|
|
5078
|
-
const [anchorRect, setAnchorRect] =
|
|
5079
|
-
const rootRef =
|
|
5080
|
-
const triggerRef =
|
|
5081
|
-
const panelRef =
|
|
5082
|
-
const updateAnchor =
|
|
5446
|
+
const [open, setOpen] = useState14(false);
|
|
5447
|
+
const [anchorRect, setAnchorRect] = useState14(null);
|
|
5448
|
+
const rootRef = useRef7(null);
|
|
5449
|
+
const triggerRef = useRef7(null);
|
|
5450
|
+
const panelRef = useRef7(null);
|
|
5451
|
+
const updateAnchor = useCallback8(() => {
|
|
5083
5452
|
setAnchorRect(triggerRef.current?.getBoundingClientRect() ?? null);
|
|
5084
5453
|
}, []);
|
|
5085
|
-
|
|
5454
|
+
useLayoutEffect2(() => {
|
|
5086
5455
|
if (!open) return;
|
|
5087
5456
|
updateAnchor();
|
|
5088
5457
|
const onReflow = () => updateAnchor();
|
|
@@ -5093,7 +5462,7 @@ function StnDateRangePickerField({
|
|
|
5093
5462
|
window.removeEventListener("scroll", onReflow, true);
|
|
5094
5463
|
};
|
|
5095
5464
|
}, [open, updateAnchor]);
|
|
5096
|
-
|
|
5465
|
+
useEffect10(() => {
|
|
5097
5466
|
if (!open) return;
|
|
5098
5467
|
const onDocMouseDown = (event) => {
|
|
5099
5468
|
const target = event.target;
|
|
@@ -5104,7 +5473,7 @@ function StnDateRangePickerField({
|
|
|
5104
5473
|
document.addEventListener("mousedown", onDocMouseDown);
|
|
5105
5474
|
return () => document.removeEventListener("mousedown", onDocMouseDown);
|
|
5106
5475
|
}, [open]);
|
|
5107
|
-
|
|
5476
|
+
useEffect10(() => {
|
|
5108
5477
|
if (!open) return;
|
|
5109
5478
|
const onKeyDown = (event) => {
|
|
5110
5479
|
if (event.key === "Escape") setOpen(false);
|
|
@@ -5112,8 +5481,8 @@ function StnDateRangePickerField({
|
|
|
5112
5481
|
document.addEventListener("keydown", onKeyDown);
|
|
5113
5482
|
return () => document.removeEventListener("keydown", onKeyDown);
|
|
5114
5483
|
}, [open]);
|
|
5115
|
-
return /* @__PURE__ */
|
|
5116
|
-
/* @__PURE__ */
|
|
5484
|
+
return /* @__PURE__ */ jsxs34("div", { ref: rootRef, className: cn("stn-date-picker-field", className), children: [
|
|
5485
|
+
/* @__PURE__ */ jsx44(
|
|
5117
5486
|
StnDateRangeField,
|
|
5118
5487
|
{
|
|
5119
5488
|
ref: triggerRef,
|
|
@@ -5133,7 +5502,7 @@ function StnDateRangePickerField({
|
|
|
5133
5502
|
}
|
|
5134
5503
|
),
|
|
5135
5504
|
open && typeof document !== "undefined" ? createPortal2(
|
|
5136
|
-
/* @__PURE__ */
|
|
5505
|
+
/* @__PURE__ */ jsx44("div", { ref: panelRef, children: /* @__PURE__ */ jsx44(
|
|
5137
5506
|
StnDateRangePicker,
|
|
5138
5507
|
{
|
|
5139
5508
|
open: true,
|
|
@@ -5152,13 +5521,13 @@ function StnDateRangePickerField({
|
|
|
5152
5521
|
}
|
|
5153
5522
|
|
|
5154
5523
|
// src/patterns/search/StnSearchRequirementBarDemo.tsx
|
|
5155
|
-
import { jsx as
|
|
5524
|
+
import { jsx as jsx45, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
5156
5525
|
var ALL_OPTIONS = [{ value: "", label: "\uC804\uCCB4" }];
|
|
5157
5526
|
function StnSearchRequirementBarDemo({ onSearch, onExport, className }) {
|
|
5158
5527
|
const demo = STN_SEARCH_REQUIREMENT_DEMO_FIELDS;
|
|
5159
|
-
return /* @__PURE__ */
|
|
5160
|
-
/* @__PURE__ */
|
|
5161
|
-
/* @__PURE__ */
|
|
5528
|
+
return /* @__PURE__ */ jsxs35(StnSearchRequirementBar, { className, children: [
|
|
5529
|
+
/* @__PURE__ */ jsxs35(StnSearchRequirementBar.Fields, { children: [
|
|
5530
|
+
/* @__PURE__ */ jsx45(
|
|
5162
5531
|
StnTextField,
|
|
5163
5532
|
{
|
|
5164
5533
|
label: demo.reportTypeText.label,
|
|
@@ -5168,7 +5537,7 @@ function StnSearchRequirementBarDemo({ onSearch, onExport, className }) {
|
|
|
5168
5537
|
"aria-label": demo.reportTypeText.label
|
|
5169
5538
|
}
|
|
5170
5539
|
),
|
|
5171
|
-
/* @__PURE__ */
|
|
5540
|
+
/* @__PURE__ */ jsx45(
|
|
5172
5541
|
StnDropdown,
|
|
5173
5542
|
{
|
|
5174
5543
|
label: demo.reportTypeSelect.label,
|
|
@@ -5179,7 +5548,7 @@ function StnSearchRequirementBarDemo({ onSearch, onExport, className }) {
|
|
|
5179
5548
|
"aria-label": demo.reportTypeSelect.label
|
|
5180
5549
|
}
|
|
5181
5550
|
),
|
|
5182
|
-
/* @__PURE__ */
|
|
5551
|
+
/* @__PURE__ */ jsx45(
|
|
5183
5552
|
StnDropdown,
|
|
5184
5553
|
{
|
|
5185
5554
|
label: demo.periodType.label,
|
|
@@ -5190,7 +5559,7 @@ function StnSearchRequirementBarDemo({ onSearch, onExport, className }) {
|
|
|
5190
5559
|
"aria-label": demo.periodType.label
|
|
5191
5560
|
}
|
|
5192
5561
|
),
|
|
5193
|
-
/* @__PURE__ */
|
|
5562
|
+
/* @__PURE__ */ jsx45(
|
|
5194
5563
|
StnDateRangePickerField,
|
|
5195
5564
|
{
|
|
5196
5565
|
label: demo.period.label,
|
|
@@ -5204,8 +5573,8 @@ function StnSearchRequirementBarDemo({ onSearch, onExport, className }) {
|
|
|
5204
5573
|
}
|
|
5205
5574
|
)
|
|
5206
5575
|
] }),
|
|
5207
|
-
/* @__PURE__ */
|
|
5208
|
-
/* @__PURE__ */
|
|
5576
|
+
/* @__PURE__ */ jsx45(StnSearchRequirementBar.SearchButton, { onClick: onSearch }),
|
|
5577
|
+
/* @__PURE__ */ jsx45(StnSearchRequirementBar.Export, { onClick: onExport })
|
|
5209
5578
|
] });
|
|
5210
5579
|
}
|
|
5211
5580
|
|
|
@@ -5219,7 +5588,7 @@ import {
|
|
|
5219
5588
|
} from "@stn-uiux/pub-ui/data/stnHeader";
|
|
5220
5589
|
|
|
5221
5590
|
// src/patterns/header/StnHeader.tsx
|
|
5222
|
-
import { jsx as
|
|
5591
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
5223
5592
|
function variantClass6(variant) {
|
|
5224
5593
|
if (variant === "page") return "stn-header--page";
|
|
5225
5594
|
return void 0;
|
|
@@ -5246,7 +5615,7 @@ function StnHeader({
|
|
|
5246
5615
|
...dynamicStyles,
|
|
5247
5616
|
...style
|
|
5248
5617
|
};
|
|
5249
|
-
return /* @__PURE__ */
|
|
5618
|
+
return /* @__PURE__ */ jsx46(
|
|
5250
5619
|
"header",
|
|
5251
5620
|
{
|
|
5252
5621
|
className: cn(
|
|
@@ -5264,20 +5633,20 @@ function StnHeader({
|
|
|
5264
5633
|
);
|
|
5265
5634
|
}
|
|
5266
5635
|
function StnHeaderLeft({ children, className, ...rest }) {
|
|
5267
|
-
return /* @__PURE__ */
|
|
5636
|
+
return /* @__PURE__ */ jsx46("div", { className: cn("stn-header__left", className), "data-stn-header-region": "left", ...rest, children });
|
|
5268
5637
|
}
|
|
5269
5638
|
function StnHeaderCenter({ children, className, ...rest }) {
|
|
5270
|
-
return /* @__PURE__ */
|
|
5639
|
+
return /* @__PURE__ */ jsx46("div", { className: cn("stn-header__center", className), "data-stn-header-region": "center", ...rest, children });
|
|
5271
5640
|
}
|
|
5272
5641
|
function StnHeaderRight({ children, className, ...rest }) {
|
|
5273
|
-
return /* @__PURE__ */
|
|
5642
|
+
return /* @__PURE__ */ jsx46("div", { className: cn("stn-header__right", className), "data-stn-header-region": "right", ...rest, children });
|
|
5274
5643
|
}
|
|
5275
5644
|
StnHeader.Left = StnHeaderLeft;
|
|
5276
5645
|
StnHeader.Center = StnHeaderCenter;
|
|
5277
5646
|
StnHeader.Right = StnHeaderRight;
|
|
5278
5647
|
function StnHeaderPageTitle({ children, className, title, ...rest }) {
|
|
5279
5648
|
const autoTitle = typeof children === "string" ? children : void 0;
|
|
5280
|
-
return /* @__PURE__ */
|
|
5649
|
+
return /* @__PURE__ */ jsx46(
|
|
5281
5650
|
"h1",
|
|
5282
5651
|
{
|
|
5283
5652
|
className: cn("stn-header__page-title", className),
|
|
@@ -5289,7 +5658,7 @@ function StnHeaderPageTitle({ children, className, title, ...rest }) {
|
|
|
5289
5658
|
}
|
|
5290
5659
|
function StnHeaderSubTitle({ children, className, title, ...rest }) {
|
|
5291
5660
|
const autoTitle = typeof children === "string" ? children : void 0;
|
|
5292
|
-
return /* @__PURE__ */
|
|
5661
|
+
return /* @__PURE__ */ jsx46(
|
|
5293
5662
|
"span",
|
|
5294
5663
|
{
|
|
5295
5664
|
className: cn("stn-header__subtitle", className),
|
|
@@ -5301,7 +5670,7 @@ function StnHeaderSubTitle({ children, className, title, ...rest }) {
|
|
|
5301
5670
|
}
|
|
5302
5671
|
function StnHeaderContextTitle({ children, className, title, ...rest }) {
|
|
5303
5672
|
const autoTitle = typeof children === "string" ? children : void 0;
|
|
5304
|
-
return /* @__PURE__ */
|
|
5673
|
+
return /* @__PURE__ */ jsx46(
|
|
5305
5674
|
"span",
|
|
5306
5675
|
{
|
|
5307
5676
|
className: cn("stn-header__context-title", className),
|
|
@@ -5312,7 +5681,7 @@ function StnHeaderContextTitle({ children, className, title, ...rest }) {
|
|
|
5312
5681
|
);
|
|
5313
5682
|
}
|
|
5314
5683
|
function StnHeaderToolbar({ children, className, ...rest }) {
|
|
5315
|
-
return /* @__PURE__ */
|
|
5684
|
+
return /* @__PURE__ */ jsx46("div", { className: cn("stn-header-toolbar", className), "data-stn-header-toolbar": true, ...rest, children });
|
|
5316
5685
|
}
|
|
5317
5686
|
|
|
5318
5687
|
// src/index.ts
|
|
@@ -5330,7 +5699,7 @@ import {
|
|
|
5330
5699
|
STN_LAYER0_BACKGROUND_DEMO_IMAGES,
|
|
5331
5700
|
STN_LAYER0_MAP_LIGHT_OVERLAY
|
|
5332
5701
|
} from "@stn-uiux/pub-ui/data/stnLayer0Background";
|
|
5333
|
-
import { jsx as
|
|
5702
|
+
import { jsx as jsx47, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
5334
5703
|
function overlayStyle(overlay) {
|
|
5335
5704
|
if (overlay == null || overlay <= 0) return void 0;
|
|
5336
5705
|
const pct = `${Math.min(100, Math.max(0, overlay * 100))}%`;
|
|
@@ -5385,15 +5754,15 @@ function StnLayer0Background({
|
|
|
5385
5754
|
const isImage = kind === "image" || Boolean(src || srcDark);
|
|
5386
5755
|
if (isImage) {
|
|
5387
5756
|
const paired = Boolean(src && srcDark);
|
|
5388
|
-
return /* @__PURE__ */
|
|
5757
|
+
return /* @__PURE__ */ jsx47(
|
|
5389
5758
|
"div",
|
|
5390
5759
|
{
|
|
5391
5760
|
className: cn("stn-layer0-bg", "image", className),
|
|
5392
5761
|
"aria-hidden": alt === "" ? true : void 0,
|
|
5393
5762
|
style: { ...overlayStyle(overlay), ...style },
|
|
5394
5763
|
...rest,
|
|
5395
|
-
children: /* @__PURE__ */
|
|
5396
|
-
src ? /* @__PURE__ */
|
|
5764
|
+
children: /* @__PURE__ */ jsxs36("div", { className: "stn-layer0-bg__media", children: [
|
|
5765
|
+
src ? /* @__PURE__ */ jsx47(
|
|
5397
5766
|
"img",
|
|
5398
5767
|
{
|
|
5399
5768
|
className: cn("stn-layer0-bg__img", paired && "light"),
|
|
@@ -5410,7 +5779,7 @@ function StnLayer0Background({
|
|
|
5410
5779
|
}
|
|
5411
5780
|
}
|
|
5412
5781
|
) : null,
|
|
5413
|
-
srcDark ? /* @__PURE__ */
|
|
5782
|
+
srcDark ? /* @__PURE__ */ jsx47(
|
|
5414
5783
|
"img",
|
|
5415
5784
|
{
|
|
5416
5785
|
className: cn("stn-layer0-bg__img", paired ? "dark" : void 0),
|
|
@@ -5427,15 +5796,15 @@ function StnLayer0Background({
|
|
|
5427
5796
|
}
|
|
5428
5797
|
}
|
|
5429
5798
|
) : null,
|
|
5430
|
-
overlay != null && overlay > 0 ? /* @__PURE__ */
|
|
5431
|
-
overlayDarkRadial ? /* @__PURE__ */
|
|
5799
|
+
overlay != null && overlay > 0 ? /* @__PURE__ */ jsx47("div", { className: "stn-layer0-bg__overlay", "aria-hidden": "true" }) : null,
|
|
5800
|
+
overlayDarkRadial ? /* @__PURE__ */ jsx47("div", { className: "stn-layer0-bg__overlay radial", "aria-hidden": "true" }) : null
|
|
5432
5801
|
] })
|
|
5433
5802
|
}
|
|
5434
5803
|
);
|
|
5435
5804
|
}
|
|
5436
5805
|
const isGradient = kind === "gradient" || variant === "gradient";
|
|
5437
5806
|
if (isGradient) {
|
|
5438
|
-
return /* @__PURE__ */
|
|
5807
|
+
return /* @__PURE__ */ jsx47(
|
|
5439
5808
|
"div",
|
|
5440
5809
|
{
|
|
5441
5810
|
className: cn("stn-layer0-bg", "gradient", className),
|
|
@@ -5445,7 +5814,7 @@ function StnLayer0Background({
|
|
|
5445
5814
|
}
|
|
5446
5815
|
);
|
|
5447
5816
|
}
|
|
5448
|
-
return /* @__PURE__ */
|
|
5817
|
+
return /* @__PURE__ */ jsx47(
|
|
5449
5818
|
"div",
|
|
5450
5819
|
{
|
|
5451
5820
|
className: cn("stn-layer0-bg", "color", color, className),
|
|
@@ -5482,7 +5851,7 @@ import {
|
|
|
5482
5851
|
|
|
5483
5852
|
// src/components/StnEventBanner.tsx
|
|
5484
5853
|
import React2 from "react";
|
|
5485
|
-
import { jsx as
|
|
5854
|
+
import { jsx as jsx48, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5486
5855
|
var SEVERITY_ICONS2 = {
|
|
5487
5856
|
critical: "fill/alert4",
|
|
5488
5857
|
major: "fill/alert3",
|
|
@@ -5490,7 +5859,7 @@ var SEVERITY_ICONS2 = {
|
|
|
5490
5859
|
warning: "fill/alert1"
|
|
5491
5860
|
};
|
|
5492
5861
|
function DefaultTriangleIcon() {
|
|
5493
|
-
return /* @__PURE__ */
|
|
5862
|
+
return /* @__PURE__ */ jsxs37(
|
|
5494
5863
|
"svg",
|
|
5495
5864
|
{
|
|
5496
5865
|
width: "20",
|
|
@@ -5500,7 +5869,7 @@ function DefaultTriangleIcon() {
|
|
|
5500
5869
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5501
5870
|
"aria-hidden": "true",
|
|
5502
5871
|
children: [
|
|
5503
|
-
/* @__PURE__ */
|
|
5872
|
+
/* @__PURE__ */ jsx48(
|
|
5504
5873
|
"path",
|
|
5505
5874
|
{
|
|
5506
5875
|
d: "M10.29 3.86L1.82 18A2 2 0 0 0 3.54 21H20.46A2 2 0 0 0 22.18 18L13.71 3.86A2 2 0 0 0 10.29 3.86Z",
|
|
@@ -5510,17 +5879,17 @@ function DefaultTriangleIcon() {
|
|
|
5510
5879
|
strokeLinejoin: "round"
|
|
5511
5880
|
}
|
|
5512
5881
|
),
|
|
5513
|
-
/* @__PURE__ */
|
|
5514
|
-
/* @__PURE__ */
|
|
5882
|
+
/* @__PURE__ */ jsx48("line", { x1: "12", y1: "9", x2: "12", y2: "13", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }),
|
|
5883
|
+
/* @__PURE__ */ jsx48("circle", { cx: "12", cy: "17", r: "1", fill: "currentColor" })
|
|
5515
5884
|
]
|
|
5516
5885
|
}
|
|
5517
5886
|
);
|
|
5518
5887
|
}
|
|
5519
5888
|
function resolveDefaultIcon(severity) {
|
|
5520
5889
|
if (severity === "critical") {
|
|
5521
|
-
return /* @__PURE__ */
|
|
5890
|
+
return /* @__PURE__ */ jsx48(DefaultTriangleIcon, {});
|
|
5522
5891
|
}
|
|
5523
|
-
return /* @__PURE__ */
|
|
5892
|
+
return /* @__PURE__ */ jsx48(StnIcon, { name: SEVERITY_ICONS2[severity] || "fill/alert4", size: 20 });
|
|
5524
5893
|
}
|
|
5525
5894
|
var StnEventBanner = React2.forwardRef(
|
|
5526
5895
|
({
|
|
@@ -5539,7 +5908,7 @@ var StnEventBanner = React2.forwardRef(
|
|
|
5539
5908
|
id,
|
|
5540
5909
|
...restProps
|
|
5541
5910
|
}, ref) => {
|
|
5542
|
-
return /* @__PURE__ */
|
|
5911
|
+
return /* @__PURE__ */ jsxs37(
|
|
5543
5912
|
"div",
|
|
5544
5913
|
{
|
|
5545
5914
|
ref,
|
|
@@ -5556,16 +5925,16 @@ var StnEventBanner = React2.forwardRef(
|
|
|
5556
5925
|
),
|
|
5557
5926
|
...restProps,
|
|
5558
5927
|
children: [
|
|
5559
|
-
/* @__PURE__ */
|
|
5560
|
-
/* @__PURE__ */
|
|
5561
|
-
/* @__PURE__ */
|
|
5562
|
-
title && /* @__PURE__ */
|
|
5563
|
-
time && /* @__PURE__ */
|
|
5928
|
+
/* @__PURE__ */ jsxs37("div", { className: "stn-event-banner__left", children: [
|
|
5929
|
+
/* @__PURE__ */ jsx48("div", { className: "stn-event-banner__icon-wrap", children: icon ?? resolveDefaultIcon(severity) }),
|
|
5930
|
+
/* @__PURE__ */ jsxs37("div", { className: "stn-event-banner__text", children: [
|
|
5931
|
+
title && /* @__PURE__ */ jsx48("span", { className: "stn-event-banner__title", title: typeof title === "string" ? title : void 0, children: title }),
|
|
5932
|
+
time && /* @__PURE__ */ jsx48("span", { className: "stn-event-banner__time", title: typeof time === "string" ? time : void 0, children: time })
|
|
5564
5933
|
] })
|
|
5565
5934
|
] }),
|
|
5566
|
-
/* @__PURE__ */
|
|
5935
|
+
/* @__PURE__ */ jsxs37("div", { className: "stn-event-banner__actions", children: [
|
|
5567
5936
|
actions,
|
|
5568
|
-
actionText && /* @__PURE__ */
|
|
5937
|
+
actionText && /* @__PURE__ */ jsx48(
|
|
5569
5938
|
"button",
|
|
5570
5939
|
{
|
|
5571
5940
|
type: "button",
|
|
@@ -5574,7 +5943,7 @@ var StnEventBanner = React2.forwardRef(
|
|
|
5574
5943
|
children: actionText
|
|
5575
5944
|
}
|
|
5576
5945
|
),
|
|
5577
|
-
onClose && /* @__PURE__ */
|
|
5946
|
+
onClose && /* @__PURE__ */ jsx48(
|
|
5578
5947
|
"button",
|
|
5579
5948
|
{
|
|
5580
5949
|
type: "button",
|
|
@@ -5593,9 +5962,9 @@ var StnEventBanner = React2.forwardRef(
|
|
|
5593
5962
|
StnEventBanner.displayName = "StnEventBanner";
|
|
5594
5963
|
|
|
5595
5964
|
// src/patterns/scaffold/StnLoadingSkeleton.tsx
|
|
5596
|
-
import { jsx as
|
|
5965
|
+
import { jsx as jsx49, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
5597
5966
|
function StnLoadingSkeletonLine({ width = "full", className, style, ...rest }) {
|
|
5598
|
-
return /* @__PURE__ */
|
|
5967
|
+
return /* @__PURE__ */ jsx49(
|
|
5599
5968
|
"div",
|
|
5600
5969
|
{
|
|
5601
5970
|
className: cn(
|
|
@@ -5611,7 +5980,7 @@ function StnLoadingSkeletonLine({ width = "full", className, style, ...rest }) {
|
|
|
5611
5980
|
);
|
|
5612
5981
|
}
|
|
5613
5982
|
function StnLoadingSkeletonBlock({ minHeight = 48, className, style, ...rest }) {
|
|
5614
|
-
return /* @__PURE__ */
|
|
5983
|
+
return /* @__PURE__ */ jsx49(
|
|
5615
5984
|
"div",
|
|
5616
5985
|
{
|
|
5617
5986
|
className: cn("stn-loading-skeleton__block", className),
|
|
@@ -5622,7 +5991,7 @@ function StnLoadingSkeletonBlock({ minHeight = 48, className, style, ...rest })
|
|
|
5622
5991
|
);
|
|
5623
5992
|
}
|
|
5624
5993
|
function StnLoadingSkeletonCircle({ size = 40, className, style, ...rest }) {
|
|
5625
|
-
return /* @__PURE__ */
|
|
5994
|
+
return /* @__PURE__ */ jsx49(
|
|
5626
5995
|
"div",
|
|
5627
5996
|
{
|
|
5628
5997
|
className: cn("stn-loading-skeleton__circle", className),
|
|
@@ -5633,7 +6002,7 @@ function StnLoadingSkeletonCircle({ size = 40, className, style, ...rest }) {
|
|
|
5633
6002
|
);
|
|
5634
6003
|
}
|
|
5635
6004
|
function StnLoadingSkeletonProfile({ avatarSize = 40, className, style, ...rest }) {
|
|
5636
|
-
return /* @__PURE__ */
|
|
6005
|
+
return /* @__PURE__ */ jsxs38(
|
|
5637
6006
|
"div",
|
|
5638
6007
|
{
|
|
5639
6008
|
className: cn("stn-loading-skeleton--profile", className),
|
|
@@ -5642,17 +6011,17 @@ function StnLoadingSkeletonProfile({ avatarSize = 40, className, style, ...rest
|
|
|
5642
6011
|
"aria-label": "\uD504\uB85C\uD544 \uB85C\uB529 \uC911",
|
|
5643
6012
|
...rest,
|
|
5644
6013
|
children: [
|
|
5645
|
-
/* @__PURE__ */
|
|
5646
|
-
/* @__PURE__ */
|
|
5647
|
-
/* @__PURE__ */
|
|
5648
|
-
/* @__PURE__ */
|
|
6014
|
+
/* @__PURE__ */ jsx49(StnLoadingSkeletonCircle, { size: avatarSize }),
|
|
6015
|
+
/* @__PURE__ */ jsxs38("div", { className: "stn-loading-skeleton__profile-content", children: [
|
|
6016
|
+
/* @__PURE__ */ jsx49(StnLoadingSkeletonLine, { width: "medium" }),
|
|
6017
|
+
/* @__PURE__ */ jsx49(StnLoadingSkeletonLine, { width: "short" })
|
|
5649
6018
|
] })
|
|
5650
6019
|
]
|
|
5651
6020
|
}
|
|
5652
6021
|
);
|
|
5653
6022
|
}
|
|
5654
6023
|
function StnLoadingSkeletonWidget({ lines = 4, className, style, ...rest }) {
|
|
5655
|
-
return /* @__PURE__ */
|
|
6024
|
+
return /* @__PURE__ */ jsx49(
|
|
5656
6025
|
"div",
|
|
5657
6026
|
{
|
|
5658
6027
|
className: cn("stn-loading-skeleton", "stn-loading-skeleton--widget", className),
|
|
@@ -5660,12 +6029,12 @@ function StnLoadingSkeletonWidget({ lines = 4, className, style, ...rest }) {
|
|
|
5660
6029
|
"aria-busy": "true",
|
|
5661
6030
|
"aria-label": "\uB85C\uB529 \uC911",
|
|
5662
6031
|
...rest,
|
|
5663
|
-
children: Array.from({ length: lines }, (_, i) => /* @__PURE__ */
|
|
6032
|
+
children: Array.from({ length: lines }, (_, i) => /* @__PURE__ */ jsx49(StnLoadingSkeletonLine, { width: i % 3 === 0 ? "short" : i % 2 === 0 ? "medium" : "full" }, i))
|
|
5664
6033
|
}
|
|
5665
6034
|
);
|
|
5666
6035
|
}
|
|
5667
6036
|
function StnLoadingSkeletonTable({ rows = 5, cols = 4, className, style, ...rest }) {
|
|
5668
|
-
return /* @__PURE__ */
|
|
6037
|
+
return /* @__PURE__ */ jsx49(
|
|
5669
6038
|
"div",
|
|
5670
6039
|
{
|
|
5671
6040
|
className: cn("stn-loading-skeleton", "stn-loading-skeleton--table", className),
|
|
@@ -5673,7 +6042,7 @@ function StnLoadingSkeletonTable({ rows = 5, cols = 4, className, style, ...rest
|
|
|
5673
6042
|
"aria-busy": "true",
|
|
5674
6043
|
"aria-label": "\uD14C\uC774\uBE14 \uB85C\uB529 \uC911",
|
|
5675
6044
|
...rest,
|
|
5676
|
-
children: Array.from({ length: rows }, (_, row) => /* @__PURE__ */
|
|
6045
|
+
children: Array.from({ length: rows }, (_, row) => /* @__PURE__ */ jsx49("div", { className: "stn-loading-skeleton__table-row", children: Array.from({ length: cols }, (_2, col) => /* @__PURE__ */ jsx49(StnLoadingSkeletonLine, {}, col)) }, row))
|
|
5677
6046
|
}
|
|
5678
6047
|
);
|
|
5679
6048
|
}
|
|
@@ -5692,23 +6061,23 @@ function StnLoadingSkeletonRoot({
|
|
|
5692
6061
|
...rest
|
|
5693
6062
|
}) {
|
|
5694
6063
|
if (children != null) {
|
|
5695
|
-
return /* @__PURE__ */
|
|
6064
|
+
return /* @__PURE__ */ jsx49("div", { className: cn("stn-loading-skeleton", className), style, "aria-busy": "true", ...rest, children });
|
|
5696
6065
|
}
|
|
5697
6066
|
const resolvedVariant = variant ?? "line";
|
|
5698
6067
|
switch (resolvedVariant) {
|
|
5699
6068
|
case "circle":
|
|
5700
|
-
return /* @__PURE__ */
|
|
6069
|
+
return /* @__PURE__ */ jsx49(StnLoadingSkeletonCircle, { size, className, style, ...rest });
|
|
5701
6070
|
case "block":
|
|
5702
|
-
return /* @__PURE__ */
|
|
6071
|
+
return /* @__PURE__ */ jsx49(StnLoadingSkeletonBlock, { minHeight, className, style, ...rest });
|
|
5703
6072
|
case "profile":
|
|
5704
|
-
return /* @__PURE__ */
|
|
6073
|
+
return /* @__PURE__ */ jsx49(StnLoadingSkeletonProfile, { avatarSize: avatarSize ?? size, className, style, ...rest });
|
|
5705
6074
|
case "widget":
|
|
5706
|
-
return /* @__PURE__ */
|
|
6075
|
+
return /* @__PURE__ */ jsx49(StnLoadingSkeletonWidget, { lines, className, style, ...rest });
|
|
5707
6076
|
case "table":
|
|
5708
|
-
return /* @__PURE__ */
|
|
6077
|
+
return /* @__PURE__ */ jsx49(StnLoadingSkeletonTable, { rows, cols, className, style, ...rest });
|
|
5709
6078
|
case "line":
|
|
5710
6079
|
default:
|
|
5711
|
-
return /* @__PURE__ */
|
|
6080
|
+
return /* @__PURE__ */ jsx49(StnLoadingSkeletonLine, { width, className, style, ...rest });
|
|
5712
6081
|
}
|
|
5713
6082
|
}
|
|
5714
6083
|
var StnLoadingSkeleton = Object.assign(StnLoadingSkeletonRoot, {
|
|
@@ -5829,7 +6198,7 @@ function ringOrbitRadius(orbit, ringCount, baseRadius, gap = 36) {
|
|
|
5829
6198
|
}
|
|
5830
6199
|
|
|
5831
6200
|
// src/components/topology/StnTopologyNodeMark.tsx
|
|
5832
|
-
import { jsx as
|
|
6201
|
+
import { jsx as jsx50, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
5833
6202
|
function renderTopologyIcon(icon, color, px) {
|
|
5834
6203
|
if (!icon) return null;
|
|
5835
6204
|
if (typeof icon !== "string") return icon;
|
|
@@ -5845,56 +6214,56 @@ function renderTopologyIcon(icon, color, px) {
|
|
|
5845
6214
|
};
|
|
5846
6215
|
switch (icon) {
|
|
5847
6216
|
case "server":
|
|
5848
|
-
return /* @__PURE__ */
|
|
5849
|
-
/* @__PURE__ */
|
|
5850
|
-
/* @__PURE__ */
|
|
5851
|
-
/* @__PURE__ */
|
|
5852
|
-
/* @__PURE__ */
|
|
6217
|
+
return /* @__PURE__ */ jsxs39("svg", { ...iconProps, children: [
|
|
6218
|
+
/* @__PURE__ */ jsx50("rect", { x: "2", y: "2", width: "20", height: "8", rx: "2", ry: "2" }),
|
|
6219
|
+
/* @__PURE__ */ jsx50("rect", { x: "2", y: "14", width: "20", height: "8", rx: "2", ry: "2" }),
|
|
6220
|
+
/* @__PURE__ */ jsx50("line", { x1: "6", y1: "6", x2: "6.01", y2: "6" }),
|
|
6221
|
+
/* @__PURE__ */ jsx50("line", { x1: "6", y1: "18", x2: "6.01", y2: "18" })
|
|
5853
6222
|
] });
|
|
5854
6223
|
case "cloud":
|
|
5855
|
-
return /* @__PURE__ */
|
|
6224
|
+
return /* @__PURE__ */ jsx50("svg", { ...iconProps, children: /* @__PURE__ */ jsx50("path", { d: "M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z" }) });
|
|
5856
6225
|
case "ai":
|
|
5857
|
-
return /* @__PURE__ */
|
|
5858
|
-
/* @__PURE__ */
|
|
5859
|
-
/* @__PURE__ */
|
|
5860
|
-
/* @__PURE__ */
|
|
5861
|
-
/* @__PURE__ */
|
|
5862
|
-
/* @__PURE__ */
|
|
5863
|
-
/* @__PURE__ */
|
|
5864
|
-
/* @__PURE__ */
|
|
5865
|
-
/* @__PURE__ */
|
|
5866
|
-
/* @__PURE__ */
|
|
5867
|
-
/* @__PURE__ */
|
|
6226
|
+
return /* @__PURE__ */ jsxs39("svg", { ...iconProps, children: [
|
|
6227
|
+
/* @__PURE__ */ jsx50("rect", { x: "4", y: "4", width: "16", height: "16", rx: "2" }),
|
|
6228
|
+
/* @__PURE__ */ jsx50("rect", { x: "9", y: "9", width: "6", height: "6" }),
|
|
6229
|
+
/* @__PURE__ */ jsx50("line", { x1: "9", y1: "1", x2: "9", y2: "4" }),
|
|
6230
|
+
/* @__PURE__ */ jsx50("line", { x1: "15", y1: "1", x2: "15", y2: "4" }),
|
|
6231
|
+
/* @__PURE__ */ jsx50("line", { x1: "9", y1: "20", x2: "9", y2: "23" }),
|
|
6232
|
+
/* @__PURE__ */ jsx50("line", { x1: "15", y1: "20", x2: "15", y2: "23" }),
|
|
6233
|
+
/* @__PURE__ */ jsx50("line", { x1: "20", y1: "9", x2: "23", y2: "9" }),
|
|
6234
|
+
/* @__PURE__ */ jsx50("line", { x1: "20", y1: "14", x2: "23", y2: "14" }),
|
|
6235
|
+
/* @__PURE__ */ jsx50("line", { x1: "1", y1: "9", x2: "4", y2: "9" }),
|
|
6236
|
+
/* @__PURE__ */ jsx50("line", { x1: "1", y1: "14", x2: "4", y2: "14" })
|
|
5868
6237
|
] });
|
|
5869
6238
|
case "network":
|
|
5870
|
-
return /* @__PURE__ */
|
|
5871
|
-
/* @__PURE__ */
|
|
5872
|
-
/* @__PURE__ */
|
|
5873
|
-
/* @__PURE__ */
|
|
5874
|
-
/* @__PURE__ */
|
|
5875
|
-
/* @__PURE__ */
|
|
5876
|
-
/* @__PURE__ */
|
|
5877
|
-
/* @__PURE__ */
|
|
6239
|
+
return /* @__PURE__ */ jsxs39("svg", { ...iconProps, children: [
|
|
6240
|
+
/* @__PURE__ */ jsx50("rect", { x: "2", y: "2", width: "6", height: "6", rx: "1" }),
|
|
6241
|
+
/* @__PURE__ */ jsx50("rect", { x: "16", y: "2", width: "6", height: "6", rx: "1" }),
|
|
6242
|
+
/* @__PURE__ */ jsx50("rect", { x: "9", y: "16", width: "6", height: "6", rx: "1" }),
|
|
6243
|
+
/* @__PURE__ */ jsx50("line", { x1: "5", y1: "8", x2: "5", y2: "12" }),
|
|
6244
|
+
/* @__PURE__ */ jsx50("line", { x1: "19", y1: "8", x2: "19", y2: "12" }),
|
|
6245
|
+
/* @__PURE__ */ jsx50("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
|
|
6246
|
+
/* @__PURE__ */ jsx50("line", { x1: "12", y1: "12", x2: "12", y2: "16" })
|
|
5878
6247
|
] });
|
|
5879
6248
|
case "shield":
|
|
5880
|
-
return /* @__PURE__ */
|
|
6249
|
+
return /* @__PURE__ */ jsx50("svg", { ...iconProps, children: /* @__PURE__ */ jsx50("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }) });
|
|
5881
6250
|
case "user":
|
|
5882
|
-
return /* @__PURE__ */
|
|
5883
|
-
/* @__PURE__ */
|
|
5884
|
-
/* @__PURE__ */
|
|
6251
|
+
return /* @__PURE__ */ jsxs39("svg", { ...iconProps, children: [
|
|
6252
|
+
/* @__PURE__ */ jsx50("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
|
|
6253
|
+
/* @__PURE__ */ jsx50("circle", { cx: "12", cy: "7", r: "4" })
|
|
5885
6254
|
] });
|
|
5886
6255
|
case "database":
|
|
5887
|
-
return /* @__PURE__ */
|
|
5888
|
-
/* @__PURE__ */
|
|
5889
|
-
/* @__PURE__ */
|
|
5890
|
-
/* @__PURE__ */
|
|
6256
|
+
return /* @__PURE__ */ jsxs39("svg", { ...iconProps, children: [
|
|
6257
|
+
/* @__PURE__ */ jsx50("ellipse", { cx: "12", cy: "5", rx: "9", ry: "3" }),
|
|
6258
|
+
/* @__PURE__ */ jsx50("path", { d: "M21 12c0 1.66-4 3-9 3s-9-1.34-9-3" }),
|
|
6259
|
+
/* @__PURE__ */ jsx50("path", { d: "M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5" })
|
|
5891
6260
|
] });
|
|
5892
6261
|
case "wifi":
|
|
5893
|
-
return /* @__PURE__ */
|
|
5894
|
-
/* @__PURE__ */
|
|
5895
|
-
/* @__PURE__ */
|
|
5896
|
-
/* @__PURE__ */
|
|
5897
|
-
/* @__PURE__ */
|
|
6262
|
+
return /* @__PURE__ */ jsxs39("svg", { ...iconProps, children: [
|
|
6263
|
+
/* @__PURE__ */ jsx50("path", { d: "M5 12.55a11 11 0 0 1 14.08 0" }),
|
|
6264
|
+
/* @__PURE__ */ jsx50("path", { d: "M1.42 9a16 16 0 0 1 21.16 0" }),
|
|
6265
|
+
/* @__PURE__ */ jsx50("path", { d: "M8.53 16.11a6 6 0 0 1 6.95 0" }),
|
|
6266
|
+
/* @__PURE__ */ jsx50("line", { x1: "12", y1: "20", x2: "12.01", y2: "20" })
|
|
5898
6267
|
] });
|
|
5899
6268
|
default:
|
|
5900
6269
|
return null;
|
|
@@ -5912,11 +6281,11 @@ function NodeShape({
|
|
|
5912
6281
|
}) {
|
|
5913
6282
|
const filter = glow ? `drop-shadow(0 0 8px ${glow})` : "drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4))";
|
|
5914
6283
|
if (shape === "circle") {
|
|
5915
|
-
return /* @__PURE__ */
|
|
6284
|
+
return /* @__PURE__ */ jsx50("circle", { cx: x, cy: y, r, fill, stroke, strokeWidth, style: { filter } });
|
|
5916
6285
|
}
|
|
5917
6286
|
if (shape === "square") {
|
|
5918
6287
|
const size = r * 2;
|
|
5919
|
-
return /* @__PURE__ */
|
|
6288
|
+
return /* @__PURE__ */ jsx50(
|
|
5920
6289
|
"rect",
|
|
5921
6290
|
{
|
|
5922
6291
|
x: x - r,
|
|
@@ -5931,7 +6300,7 @@ function NodeShape({
|
|
|
5931
6300
|
}
|
|
5932
6301
|
);
|
|
5933
6302
|
}
|
|
5934
|
-
return /* @__PURE__ */
|
|
6303
|
+
return /* @__PURE__ */ jsx50(
|
|
5935
6304
|
"polygon",
|
|
5936
6305
|
{
|
|
5937
6306
|
points: topologyShapePoints(shape, x, y, r),
|
|
@@ -5974,7 +6343,7 @@ function StnTopologyNodeMark({
|
|
|
5974
6343
|
const countText = formatTopologyCount(count);
|
|
5975
6344
|
const iconPx = metrics.icon;
|
|
5976
6345
|
const showCornerBadge = !isCount && count != null && count !== "";
|
|
5977
|
-
return /* @__PURE__ */
|
|
6346
|
+
return /* @__PURE__ */ jsxs39(
|
|
5978
6347
|
"g",
|
|
5979
6348
|
{
|
|
5980
6349
|
className: cn("stn-topology-node", selected && "stn-topology-node--selected", className),
|
|
@@ -5986,7 +6355,7 @@ function StnTopologyNodeMark({
|
|
|
5986
6355
|
style: { cursor: onClick ? "pointer" : "default" },
|
|
5987
6356
|
...rest,
|
|
5988
6357
|
children: [
|
|
5989
|
-
isAlert && /* @__PURE__ */
|
|
6358
|
+
isAlert && /* @__PURE__ */ jsxs39(
|
|
5990
6359
|
"circle",
|
|
5991
6360
|
{
|
|
5992
6361
|
className: "stn-topology-node__pulse",
|
|
@@ -5998,13 +6367,13 @@ function StnTopologyNodeMark({
|
|
|
5998
6367
|
strokeWidth: "1.5",
|
|
5999
6368
|
opacity: "0.55",
|
|
6000
6369
|
children: [
|
|
6001
|
-
/* @__PURE__ */
|
|
6002
|
-
/* @__PURE__ */
|
|
6370
|
+
/* @__PURE__ */ jsx50("animate", { attributeName: "r", values: `${r + 4};${r + 12};${r + 4}`, dur: "2s", repeatCount: "indefinite" }),
|
|
6371
|
+
/* @__PURE__ */ jsx50("animate", { attributeName: "opacity", values: "0.75;0.15;0.75", dur: "2s", repeatCount: "indefinite" })
|
|
6003
6372
|
]
|
|
6004
6373
|
}
|
|
6005
6374
|
),
|
|
6006
|
-
selected && /* @__PURE__ */
|
|
6007
|
-
/* @__PURE__ */
|
|
6375
|
+
selected && /* @__PURE__ */ jsx50("circle", { cx: x, cy: y, r: r + 6, fill: "none", stroke: "#00e5ff", strokeWidth: "1.5", strokeDasharray: "3 3" }),
|
|
6376
|
+
/* @__PURE__ */ jsx50(
|
|
6008
6377
|
NodeShape,
|
|
6009
6378
|
{
|
|
6010
6379
|
shape,
|
|
@@ -6017,7 +6386,7 @@ function StnTopologyNodeMark({
|
|
|
6017
6386
|
glow: isAlert || isCount ? tone.glow : ""
|
|
6018
6387
|
}
|
|
6019
6388
|
),
|
|
6020
|
-
isCount ? /* @__PURE__ */
|
|
6389
|
+
isCount ? /* @__PURE__ */ jsx50(
|
|
6021
6390
|
"text",
|
|
6022
6391
|
{
|
|
6023
6392
|
x,
|
|
@@ -6030,10 +6399,10 @@ function StnTopologyNodeMark({
|
|
|
6030
6399
|
style: { textShadow: "0 1px 2px rgba(0, 0, 0, 0.85)" },
|
|
6031
6400
|
children: countText
|
|
6032
6401
|
}
|
|
6033
|
-
) : /* @__PURE__ */
|
|
6034
|
-
showCornerBadge && /* @__PURE__ */
|
|
6035
|
-
/* @__PURE__ */
|
|
6036
|
-
/* @__PURE__ */
|
|
6402
|
+
) : /* @__PURE__ */ jsx50("g", { transform: `translate(${x - iconPx / 2}, ${y - iconPx / 2})`, children: renderTopologyIcon(icon, stroke, iconPx) }),
|
|
6403
|
+
showCornerBadge && /* @__PURE__ */ jsxs39("g", { className: "stn-topology-node__badge", children: [
|
|
6404
|
+
/* @__PURE__ */ jsx50("circle", { cx: x + r * 0.72, cy: y - r * 0.72, r: Math.max(6, r * 0.38), fill: stroke, stroke: "rgba(6,7,15,0.9)", strokeWidth: "1" }),
|
|
6405
|
+
/* @__PURE__ */ jsx50(
|
|
6037
6406
|
"text",
|
|
6038
6407
|
{
|
|
6039
6408
|
x: x + r * 0.72,
|
|
@@ -6047,7 +6416,7 @@ function StnTopologyNodeMark({
|
|
|
6047
6416
|
}
|
|
6048
6417
|
)
|
|
6049
6418
|
] }),
|
|
6050
|
-
showLabel && label && /* @__PURE__ */
|
|
6419
|
+
showLabel && label && /* @__PURE__ */ jsx50(
|
|
6051
6420
|
"text",
|
|
6052
6421
|
{
|
|
6053
6422
|
x,
|
|
@@ -6060,7 +6429,7 @@ function StnTopologyNodeMark({
|
|
|
6060
6429
|
children: label
|
|
6061
6430
|
}
|
|
6062
6431
|
),
|
|
6063
|
-
showStatus && resolvedStatusLabel && /* @__PURE__ */
|
|
6432
|
+
showStatus && resolvedStatusLabel && /* @__PURE__ */ jsxs39(
|
|
6064
6433
|
"text",
|
|
6065
6434
|
{
|
|
6066
6435
|
x,
|
|
@@ -6091,11 +6460,11 @@ function StnTopologyNodePreview({
|
|
|
6091
6460
|
const r = STN_TOPOLOGY_NODE_SIZE[size].r;
|
|
6092
6461
|
const w = width ?? r * 2 + (showLabel ? 88 : 28);
|
|
6093
6462
|
const h = height ?? r * 2 + (showLabel || showStatus ? 56 : 28);
|
|
6094
|
-
return /* @__PURE__ */
|
|
6463
|
+
return /* @__PURE__ */ jsx50("svg", { className: "stn-topology-node-preview", width: w, height: h, viewBox: `0 0 ${w} ${h}`, overflow: "visible", children: /* @__PURE__ */ jsx50(StnTopologyNodeMark, { x: w / 2, y: h / 2, size, showLabel, showStatus, ...rest }) });
|
|
6095
6464
|
}
|
|
6096
6465
|
|
|
6097
6466
|
// src/components/topology/StnTopologyRing.tsx
|
|
6098
|
-
import { jsx as
|
|
6467
|
+
import { jsx as jsx51, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
6099
6468
|
function StnTopologyRing({
|
|
6100
6469
|
core = {
|
|
6101
6470
|
title: "\uC5D0\uC2A4\uD2F0\uC5D4\uC778\uD3EC\uD14D",
|
|
@@ -6154,17 +6523,17 @@ function StnTopologyRing({
|
|
|
6154
6523
|
};
|
|
6155
6524
|
});
|
|
6156
6525
|
if (loading) {
|
|
6157
|
-
return /* @__PURE__ */
|
|
6526
|
+
return /* @__PURE__ */ jsx51(
|
|
6158
6527
|
"div",
|
|
6159
6528
|
{
|
|
6160
6529
|
className: cn("stn-topology-ring", "stn-topology-ring--loading", className),
|
|
6161
6530
|
style,
|
|
6162
6531
|
...rest,
|
|
6163
|
-
children: /* @__PURE__ */
|
|
6532
|
+
children: /* @__PURE__ */ jsx51("div", { className: "stn-topology-ring__loading-label", children: "\uD1A0\uD3F4\uB85C\uC9C0 \uB9C1 \uB370\uC774\uD130\uB97C \uBD88\uB7EC\uC624\uB294 \uC911..." })
|
|
6164
6533
|
}
|
|
6165
6534
|
);
|
|
6166
6535
|
}
|
|
6167
|
-
return /* @__PURE__ */
|
|
6536
|
+
return /* @__PURE__ */ jsx51(
|
|
6168
6537
|
"div",
|
|
6169
6538
|
{
|
|
6170
6539
|
className: cn("stn-topology-ring", className),
|
|
@@ -6172,7 +6541,7 @@ function StnTopologyRing({
|
|
|
6172
6541
|
"data-stn-topology-ring": true,
|
|
6173
6542
|
"data-ring-count": safeRingCount,
|
|
6174
6543
|
...rest,
|
|
6175
|
-
children: /* @__PURE__ */
|
|
6544
|
+
children: /* @__PURE__ */ jsxs40(
|
|
6176
6545
|
"svg",
|
|
6177
6546
|
{
|
|
6178
6547
|
className: "stn-topology-ring__svg",
|
|
@@ -6181,19 +6550,19 @@ function StnTopologyRing({
|
|
|
6181
6550
|
viewBox: `0 0 ${vb} ${vb}`,
|
|
6182
6551
|
overflow: "visible",
|
|
6183
6552
|
children: [
|
|
6184
|
-
/* @__PURE__ */
|
|
6185
|
-
/* @__PURE__ */
|
|
6186
|
-
/* @__PURE__ */
|
|
6187
|
-
/* @__PURE__ */
|
|
6553
|
+
/* @__PURE__ */ jsxs40("defs", { children: [
|
|
6554
|
+
/* @__PURE__ */ jsxs40("radialGradient", { id: coreGlowId, cx: "50%", cy: "50%", r: "50%", children: [
|
|
6555
|
+
/* @__PURE__ */ jsx51("stop", { offset: "0%", stopColor: "#722ed1", stopOpacity: "0.8" }),
|
|
6556
|
+
/* @__PURE__ */ jsx51("stop", { offset: "100%", stopColor: "#120338", stopOpacity: "0" })
|
|
6188
6557
|
] }),
|
|
6189
|
-
/* @__PURE__ */
|
|
6190
|
-
/* @__PURE__ */
|
|
6191
|
-
/* @__PURE__ */
|
|
6558
|
+
/* @__PURE__ */ jsxs40("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [
|
|
6559
|
+
/* @__PURE__ */ jsx51("stop", { offset: "0%", stopColor: "#00e5ff", stopOpacity: "0.4" }),
|
|
6560
|
+
/* @__PURE__ */ jsx51("stop", { offset: "100%", stopColor: "#722ed1", stopOpacity: "0.4" })
|
|
6192
6561
|
] })
|
|
6193
6562
|
] }),
|
|
6194
6563
|
radii.map((r, idx) => {
|
|
6195
6564
|
const isMain = idx + 1 === mainOrbit;
|
|
6196
|
-
return /* @__PURE__ */
|
|
6565
|
+
return /* @__PURE__ */ jsx51(
|
|
6197
6566
|
"circle",
|
|
6198
6567
|
{
|
|
6199
6568
|
cx: centerX,
|
|
@@ -6207,7 +6576,7 @@ function StnTopologyRing({
|
|
|
6207
6576
|
`orbit-${idx}`
|
|
6208
6577
|
);
|
|
6209
6578
|
}),
|
|
6210
|
-
connectionLineStyle !== "none" && calculatedNodes.map((node) => /* @__PURE__ */
|
|
6579
|
+
connectionLineStyle !== "none" && calculatedNodes.map((node) => /* @__PURE__ */ jsx51(
|
|
6211
6580
|
"line",
|
|
6212
6581
|
{
|
|
6213
6582
|
x1: centerX,
|
|
@@ -6220,9 +6589,9 @@ function StnTopologyRing({
|
|
|
6220
6589
|
},
|
|
6221
6590
|
`line-${node.id}`
|
|
6222
6591
|
)),
|
|
6223
|
-
/* @__PURE__ */
|
|
6224
|
-
/* @__PURE__ */
|
|
6225
|
-
/* @__PURE__ */
|
|
6592
|
+
/* @__PURE__ */ jsxs40("g", { className: "stn-topology-ring__core", children: [
|
|
6593
|
+
/* @__PURE__ */ jsx51("circle", { cx: centerX, cy: centerY, r: 54, fill: `url(#${coreGlowId})` }),
|
|
6594
|
+
/* @__PURE__ */ jsx51(
|
|
6226
6595
|
"circle",
|
|
6227
6596
|
{
|
|
6228
6597
|
cx: centerX,
|
|
@@ -6234,7 +6603,7 @@ function StnTopologyRing({
|
|
|
6234
6603
|
style: { filter: "drop-shadow(0 0 12px rgba(114, 46, 209, 0.6))" }
|
|
6235
6604
|
}
|
|
6236
6605
|
),
|
|
6237
|
-
core.subTitle && /* @__PURE__ */
|
|
6606
|
+
core.subTitle && /* @__PURE__ */ jsx51(
|
|
6238
6607
|
"text",
|
|
6239
6608
|
{
|
|
6240
6609
|
x: centerX,
|
|
@@ -6247,13 +6616,13 @@ function StnTopologyRing({
|
|
|
6247
6616
|
children: core.subTitle
|
|
6248
6617
|
}
|
|
6249
6618
|
),
|
|
6250
|
-
core.title && /* @__PURE__ */
|
|
6251
|
-
/* @__PURE__ */
|
|
6619
|
+
core.title && /* @__PURE__ */ jsx51("text", { x: centerX, y: centerY + 8, textAnchor: "middle", fill: "#f0f2f5", fontSize: "10", fontWeight: "600", children: core.title }),
|
|
6620
|
+
/* @__PURE__ */ jsxs40("text", { x: centerX, y: centerY + 22, textAnchor: "middle", fill: coreColor, fontSize: "9", fontWeight: "500", children: [
|
|
6252
6621
|
"\u25CF ",
|
|
6253
6622
|
coreStatusLabel
|
|
6254
6623
|
] })
|
|
6255
6624
|
] }),
|
|
6256
|
-
calculatedNodes.map((node) => /* @__PURE__ */
|
|
6625
|
+
calculatedNodes.map((node) => /* @__PURE__ */ jsx51(
|
|
6257
6626
|
StnTopologyNodeMark,
|
|
6258
6627
|
{
|
|
6259
6628
|
x: node.x,
|
|
@@ -6281,8 +6650,8 @@ function StnTopologyRing({
|
|
|
6281
6650
|
}
|
|
6282
6651
|
|
|
6283
6652
|
// src/components/topology/StnTopologyGraph.tsx
|
|
6284
|
-
import { useState as
|
|
6285
|
-
import { jsx as
|
|
6653
|
+
import { useState as useState15 } from "react";
|
|
6654
|
+
import { jsx as jsx52, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
6286
6655
|
var DEFAULT_GRAPH_NODES = [
|
|
6287
6656
|
{ id: "n1", x: 200, y: 58, status: "minor", label: "GW-01", shape: "circle", content: "icon", icon: "wifi" },
|
|
6288
6657
|
{ id: "n2", x: 118, y: 118, status: "critical", label: "BACKUP", shape: "hexagon", content: "count", count: 4, pulse: true },
|
|
@@ -6316,12 +6685,12 @@ function StnTopologyGraph({
|
|
|
6316
6685
|
style,
|
|
6317
6686
|
...rest
|
|
6318
6687
|
}) {
|
|
6319
|
-
const [viewMode, setViewMode] =
|
|
6688
|
+
const [viewMode, setViewMode] = useState15(defaultMode);
|
|
6320
6689
|
if (loading) {
|
|
6321
|
-
return /* @__PURE__ */
|
|
6690
|
+
return /* @__PURE__ */ jsx52("div", { className: cn("stn-topology-graph", "stn-topology-graph--loading", className), style, ...rest, children: /* @__PURE__ */ jsx52("div", { className: "stn-topology-graph__loading-label", children: "\uD1A0\uD3F4\uB85C\uC9C0 \uCE94\uBC84\uC2A4 \uB370\uC774\uD130\uB97C \uBD88\uB7EC\uC624\uB294 \uC911..." }) });
|
|
6322
6691
|
}
|
|
6323
6692
|
const nodeMap = new Map(nodes.map((n) => [n.id, n]));
|
|
6324
|
-
return /* @__PURE__ */
|
|
6693
|
+
return /* @__PURE__ */ jsxs41(
|
|
6325
6694
|
"div",
|
|
6326
6695
|
{
|
|
6327
6696
|
className: cn("stn-topology-graph", className),
|
|
@@ -6330,7 +6699,7 @@ function StnTopologyGraph({
|
|
|
6330
6699
|
"data-view-mode": viewMode,
|
|
6331
6700
|
...rest,
|
|
6332
6701
|
children: [
|
|
6333
|
-
showModeToggle && /* @__PURE__ */
|
|
6702
|
+
showModeToggle && /* @__PURE__ */ jsx52("div", { className: "stn-topology-graph__mode", children: /* @__PURE__ */ jsx52(
|
|
6334
6703
|
StnSegmented,
|
|
6335
6704
|
{
|
|
6336
6705
|
size: "sm",
|
|
@@ -6342,23 +6711,23 @@ function StnTopologyGraph({
|
|
|
6342
6711
|
]
|
|
6343
6712
|
}
|
|
6344
6713
|
) }),
|
|
6345
|
-
/* @__PURE__ */
|
|
6346
|
-
viewMode === "3D" ? /* @__PURE__ */
|
|
6347
|
-
/* @__PURE__ */
|
|
6348
|
-
/* @__PURE__ */
|
|
6349
|
-
/* @__PURE__ */
|
|
6350
|
-
/* @__PURE__ */
|
|
6351
|
-
/* @__PURE__ */
|
|
6352
|
-
/* @__PURE__ */
|
|
6353
|
-
/* @__PURE__ */
|
|
6354
|
-
/* @__PURE__ */
|
|
6355
|
-
] }) : /* @__PURE__ */
|
|
6356
|
-
/* @__PURE__ */
|
|
6357
|
-
/* @__PURE__ */
|
|
6358
|
-
/* @__PURE__ */
|
|
6359
|
-
/* @__PURE__ */
|
|
6360
|
-
/* @__PURE__ */
|
|
6361
|
-
/* @__PURE__ */
|
|
6714
|
+
/* @__PURE__ */ jsxs41("svg", { className: "stn-topology-graph__svg", width: "100%", height: "100%", viewBox: "0 0 400 300", overflow: "visible", children: [
|
|
6715
|
+
viewMode === "3D" ? /* @__PURE__ */ jsxs41("g", { opacity: "0.6", children: [
|
|
6716
|
+
/* @__PURE__ */ jsx52("line", { x1: "60", y1: "260", x2: "200", y2: "80", stroke: "rgba(255,255,255,0.06)", strokeDasharray: "3 3" }),
|
|
6717
|
+
/* @__PURE__ */ jsx52("line", { x1: "130", y1: "260", x2: "200", y2: "80", stroke: "rgba(255,255,255,0.08)", strokeDasharray: "3 3" }),
|
|
6718
|
+
/* @__PURE__ */ jsx52("line", { x1: "200", y1: "260", x2: "200", y2: "80", stroke: "rgba(255,255,255,0.14)", strokeDasharray: "3 3" }),
|
|
6719
|
+
/* @__PURE__ */ jsx52("line", { x1: "270", y1: "260", x2: "200", y2: "80", stroke: "rgba(255,255,255,0.08)", strokeDasharray: "3 3" }),
|
|
6720
|
+
/* @__PURE__ */ jsx52("line", { x1: "340", y1: "260", x2: "200", y2: "80", stroke: "rgba(255,255,255,0.06)", strokeDasharray: "3 3" }),
|
|
6721
|
+
/* @__PURE__ */ jsx52("line", { x1: "100", y1: "230", x2: "300", y2: "230", stroke: "rgba(255,255,255,0.06)" }),
|
|
6722
|
+
/* @__PURE__ */ jsx52("line", { x1: "130", y1: "190", x2: "270", y2: "190", stroke: "rgba(255,255,255,0.06)" }),
|
|
6723
|
+
/* @__PURE__ */ jsx52("line", { x1: "160", y1: "140", x2: "240", y2: "140", stroke: "rgba(255,255,255,0.06)" })
|
|
6724
|
+
] }) : /* @__PURE__ */ jsxs41("g", { opacity: "0.3", children: [
|
|
6725
|
+
/* @__PURE__ */ jsx52("line", { x1: "40", y1: "60", x2: "360", y2: "60", stroke: "rgba(255,255,255,0.08)", strokeDasharray: "4 4" }),
|
|
6726
|
+
/* @__PURE__ */ jsx52("line", { x1: "40", y1: "150", x2: "360", y2: "150", stroke: "rgba(255,255,255,0.08)", strokeDasharray: "4 4" }),
|
|
6727
|
+
/* @__PURE__ */ jsx52("line", { x1: "40", y1: "240", x2: "360", y2: "240", stroke: "rgba(255,255,255,0.08)", strokeDasharray: "4 4" }),
|
|
6728
|
+
/* @__PURE__ */ jsx52("line", { x1: "100", y1: "20", x2: "100", y2: "280", stroke: "rgba(255,255,255,0.08)", strokeDasharray: "4 4" }),
|
|
6729
|
+
/* @__PURE__ */ jsx52("line", { x1: "200", y1: "20", x2: "200", y2: "280", stroke: "rgba(255,255,255,0.08)", strokeDasharray: "4 4" }),
|
|
6730
|
+
/* @__PURE__ */ jsx52("line", { x1: "300", y1: "20", x2: "300", y2: "280", stroke: "rgba(255,255,255,0.08)", strokeDasharray: "4 4" })
|
|
6362
6731
|
] }),
|
|
6363
6732
|
links.map((link, idx) => {
|
|
6364
6733
|
const s = nodeMap.get(link.source);
|
|
@@ -6366,7 +6735,7 @@ function StnTopologyGraph({
|
|
|
6366
6735
|
if (!s || !t) return null;
|
|
6367
6736
|
const isAlert = s.status === "critical" || t.status === "critical" || link.status === "critical";
|
|
6368
6737
|
const strokeColor = isAlert ? "rgba(255, 77, 79, 0.65)" : "rgba(255, 255, 255, 0.2)";
|
|
6369
|
-
return /* @__PURE__ */
|
|
6738
|
+
return /* @__PURE__ */ jsx52(
|
|
6370
6739
|
"line",
|
|
6371
6740
|
{
|
|
6372
6741
|
x1: s.x,
|
|
@@ -6383,7 +6752,7 @@ function StnTopologyGraph({
|
|
|
6383
6752
|
nodes.map((node) => {
|
|
6384
6753
|
const status = node.status ?? "normal";
|
|
6385
6754
|
const isCore = Boolean(node.isCore);
|
|
6386
|
-
return /* @__PURE__ */
|
|
6755
|
+
return /* @__PURE__ */ jsx52(
|
|
6387
6756
|
StnTopologyNodeMark,
|
|
6388
6757
|
{
|
|
6389
6758
|
x: node.x,
|
|
@@ -6406,17 +6775,17 @@ function StnTopologyGraph({
|
|
|
6406
6775
|
);
|
|
6407
6776
|
})
|
|
6408
6777
|
] }),
|
|
6409
|
-
showMinimap && /* @__PURE__ */
|
|
6410
|
-
/* @__PURE__ */
|
|
6411
|
-
/* @__PURE__ */
|
|
6412
|
-
/* @__PURE__ */
|
|
6778
|
+
showMinimap && /* @__PURE__ */ jsxs41("div", { className: "stn-topology-graph__minimap", children: [
|
|
6779
|
+
/* @__PURE__ */ jsxs41("div", { className: "stn-topology-graph__minimap-head", children: [
|
|
6780
|
+
/* @__PURE__ */ jsx52("span", { children: "\uBBF8\uB9AC\uBCF4\uAE30" }),
|
|
6781
|
+
/* @__PURE__ */ jsx52("span", { children: "\u2014" })
|
|
6413
6782
|
] }),
|
|
6414
|
-
/* @__PURE__ */
|
|
6415
|
-
/* @__PURE__ */
|
|
6416
|
-
/* @__PURE__ */
|
|
6417
|
-
/* @__PURE__ */
|
|
6418
|
-
/* @__PURE__ */
|
|
6419
|
-
/* @__PURE__ */
|
|
6783
|
+
/* @__PURE__ */ jsxs41("svg", { width: "100%", height: "40", viewBox: "0 0 100 50", children: [
|
|
6784
|
+
/* @__PURE__ */ jsx52("polyline", { points: "50,10 40,25 50,40 60,30", fill: "none", stroke: "rgba(255,77,79,0.5)", strokeWidth: "1" }),
|
|
6785
|
+
/* @__PURE__ */ jsx52("circle", { cx: "50", cy: "10", r: "2", fill: STN_TOPOLOGY_STATUS_COLORS.critical.main }),
|
|
6786
|
+
/* @__PURE__ */ jsx52("circle", { cx: "40", cy: "25", r: "2.5", fill: STN_TOPOLOGY_STATUS_COLORS.critical.main }),
|
|
6787
|
+
/* @__PURE__ */ jsx52("circle", { cx: "50", cy: "40", r: "2", fill: "#00e5ff" }),
|
|
6788
|
+
/* @__PURE__ */ jsx52("circle", { cx: "60", cy: "30", r: "2", fill: STN_TOPOLOGY_STATUS_COLORS.normal.main })
|
|
6420
6789
|
] })
|
|
6421
6790
|
] })
|
|
6422
6791
|
]
|
|
@@ -6425,7 +6794,7 @@ function StnTopologyGraph({
|
|
|
6425
6794
|
}
|
|
6426
6795
|
|
|
6427
6796
|
// src/components/StnWidget.tsx
|
|
6428
|
-
import { Fragment as Fragment5, jsx as
|
|
6797
|
+
import { Fragment as Fragment5, jsx as jsx53, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
6429
6798
|
var SHELL_PUB_CLASS = {
|
|
6430
6799
|
card: "",
|
|
6431
6800
|
"fault-panel": "",
|
|
@@ -6508,20 +6877,20 @@ function StnWidgetPeriodText({
|
|
|
6508
6877
|
className,
|
|
6509
6878
|
...rest
|
|
6510
6879
|
}) {
|
|
6511
|
-
return /* @__PURE__ */
|
|
6880
|
+
return /* @__PURE__ */ jsx53("span", { className: cn("stn-widget__period-text", className), ...rest, children });
|
|
6512
6881
|
}
|
|
6513
6882
|
function StnWidgetPeriodSelect({
|
|
6514
6883
|
label,
|
|
6515
6884
|
className,
|
|
6516
6885
|
...rest
|
|
6517
6886
|
}) {
|
|
6518
|
-
return /* @__PURE__ */
|
|
6887
|
+
return /* @__PURE__ */ jsx53(
|
|
6519
6888
|
StnButton,
|
|
6520
6889
|
{
|
|
6521
6890
|
variant: "ghost",
|
|
6522
6891
|
size: "sm",
|
|
6523
6892
|
shape: "square",
|
|
6524
|
-
icon: /* @__PURE__ */
|
|
6893
|
+
icon: /* @__PURE__ */ jsx53(StnIcon, { name: "line/chevron-down" }),
|
|
6525
6894
|
iconPosition: "right",
|
|
6526
6895
|
className,
|
|
6527
6896
|
...rest,
|
|
@@ -6538,26 +6907,26 @@ function StnWidgetPeriodPager({
|
|
|
6538
6907
|
nextLabel = "\uB2E4\uC74C",
|
|
6539
6908
|
...rest
|
|
6540
6909
|
}) {
|
|
6541
|
-
return /* @__PURE__ */
|
|
6542
|
-
/* @__PURE__ */
|
|
6910
|
+
return /* @__PURE__ */ jsxs42("div", { className: cn("stn-widget__period-pager", className), ...rest, children: [
|
|
6911
|
+
/* @__PURE__ */ jsx53(
|
|
6543
6912
|
StnButton,
|
|
6544
6913
|
{
|
|
6545
6914
|
variant: "ghost",
|
|
6546
6915
|
size: "sm",
|
|
6547
6916
|
shape: "square",
|
|
6548
|
-
icon: /* @__PURE__ */
|
|
6917
|
+
icon: /* @__PURE__ */ jsx53(StnIcon, { name: "line/arrow-narrow-left" }),
|
|
6549
6918
|
onClick: onPrev,
|
|
6550
6919
|
"aria-label": prevLabel
|
|
6551
6920
|
}
|
|
6552
6921
|
),
|
|
6553
|
-
/* @__PURE__ */
|
|
6554
|
-
/* @__PURE__ */
|
|
6922
|
+
/* @__PURE__ */ jsx53("span", { className: "stn-widget__period-pager-label", children: label }),
|
|
6923
|
+
/* @__PURE__ */ jsx53(
|
|
6555
6924
|
StnButton,
|
|
6556
6925
|
{
|
|
6557
6926
|
variant: "ghost",
|
|
6558
6927
|
size: "sm",
|
|
6559
6928
|
shape: "square",
|
|
6560
|
-
icon: /* @__PURE__ */
|
|
6929
|
+
icon: /* @__PURE__ */ jsx53(StnIcon, { name: "line/arrow-narrow-right" }),
|
|
6561
6930
|
onClick: onNext,
|
|
6562
6931
|
"aria-label": nextLabel
|
|
6563
6932
|
}
|
|
@@ -6584,18 +6953,18 @@ function StnWidgetHeaderInner({
|
|
|
6584
6953
|
return null;
|
|
6585
6954
|
}
|
|
6586
6955
|
const resolvedIconName = headerIconName ?? defaultHeaderIconName(appearance);
|
|
6587
|
-
return /* @__PURE__ */
|
|
6588
|
-
/* @__PURE__ */
|
|
6589
|
-
showHeaderIcon ? headerIcon != null ? /* @__PURE__ */
|
|
6590
|
-
title != null || badge != null ? typeof title === "string" || title == null ? /* @__PURE__ */
|
|
6591
|
-
typeof title === "string" ? /* @__PURE__ */
|
|
6956
|
+
return /* @__PURE__ */ jsxs42("div", { className: cn("stn-widget__head", wrapActions && "stn-widget__head--wrap"), children: [
|
|
6957
|
+
/* @__PURE__ */ jsxs42("div", { className: "stn-widget__head-start", children: [
|
|
6958
|
+
showHeaderIcon ? headerIcon != null ? /* @__PURE__ */ jsx53(StnWidgetInsetIcon, { size: "sm", children: headerIcon }) : resolvedIconName ? /* @__PURE__ */ jsx53(StnWidgetInsetIcon, { size: "sm", icon: resolvedIconName }) : null : null,
|
|
6959
|
+
title != null || badge != null ? typeof title === "string" || title == null ? /* @__PURE__ */ jsxs42("div", { className: "stn-widget__title-wrap", children: [
|
|
6960
|
+
typeof title === "string" ? /* @__PURE__ */ jsx53("p", { className: cn("stn-widget__title", titleSize, titleWeight), title, children: title }) : null,
|
|
6592
6961
|
badge
|
|
6593
|
-
] }) : /* @__PURE__ */
|
|
6962
|
+
] }) : /* @__PURE__ */ jsxs42(Fragment5, { children: [
|
|
6594
6963
|
title,
|
|
6595
6964
|
badge
|
|
6596
6965
|
] }) : null
|
|
6597
6966
|
] }),
|
|
6598
|
-
titleActions != null || periodActions != null || periodLabel != null && periodLabel !== "" ? /* @__PURE__ */
|
|
6967
|
+
titleActions != null || periodActions != null || periodLabel != null && periodLabel !== "" ? /* @__PURE__ */ jsx53("div", { className: "stn-widget__head-end", children: titleActions ?? (periodActions != null ? periodActions : periodLabel != null && periodLabel !== "" ? /* @__PURE__ */ jsx53(StnWidgetPeriodText, { children: periodLabel }) : null) }) : null
|
|
6599
6968
|
] });
|
|
6600
6969
|
}
|
|
6601
6970
|
function StnWidgetRoot({
|
|
@@ -6678,10 +7047,10 @@ function StnWidgetRoot({
|
|
|
6678
7047
|
...rest
|
|
6679
7048
|
};
|
|
6680
7049
|
const slots = partitionWidgetChildren(children);
|
|
6681
|
-
const propHead = shell === "fault-panel" && !isFigmaShell ? title != null || titleActions ? /* @__PURE__ */
|
|
6682
|
-
/* @__PURE__ */
|
|
7050
|
+
const propHead = shell === "fault-panel" && !isFigmaShell ? title != null || titleActions ? /* @__PURE__ */ jsxs42("div", { className: "app_bar", children: [
|
|
7051
|
+
/* @__PURE__ */ jsx53("div", { className: "fault_title_box", children: typeof title === "string" ? /* @__PURE__ */ jsx53("span", { children: title }) : title }),
|
|
6683
7052
|
titleActions
|
|
6684
|
-
] }) : null : shell === "board" || shell === "board-item" ? title != null ? /* @__PURE__ */
|
|
7053
|
+
] }) : null : shell === "board" || shell === "board-item" ? title != null ? /* @__PURE__ */ jsx53("div", { className: "stn-widget__head", children: typeof title === "string" ? /* @__PURE__ */ jsx53("p", { children: title }) : title }) : null : isFigmaShell ? /* @__PURE__ */ jsx53(
|
|
6685
7054
|
StnWidgetHeaderInner,
|
|
6686
7055
|
{
|
|
6687
7056
|
appearance,
|
|
@@ -6697,40 +7066,40 @@ function StnWidgetRoot({
|
|
|
6697
7066
|
headerIcon,
|
|
6698
7067
|
wrapActions
|
|
6699
7068
|
}
|
|
6700
|
-
) : title != null || badge != null || titleActions ? /* @__PURE__ */
|
|
6701
|
-
/* @__PURE__ */
|
|
6702
|
-
title != null ? typeof title === "string" ? /* @__PURE__ */
|
|
7069
|
+
) : title != null || badge != null || titleActions ? /* @__PURE__ */ jsxs42("div", { className: cn("stn-widget__head", wrapActions && "stn-widget__head--wrap"), children: [
|
|
7070
|
+
/* @__PURE__ */ jsxs42("div", { className: "stn-widget__head-start", children: [
|
|
7071
|
+
title != null ? typeof title === "string" ? /* @__PURE__ */ jsx53("p", { className: cn("stn-widget__title", titleSize, titleWeight), title, children: title }) : title : null,
|
|
6703
7072
|
badge
|
|
6704
7073
|
] }),
|
|
6705
|
-
titleActions ? /* @__PURE__ */
|
|
7074
|
+
titleActions ? /* @__PURE__ */ jsx53("div", { className: "stn-widget__head-end", children: titleActions }) : null
|
|
6706
7075
|
] }) : null;
|
|
6707
7076
|
const head = slots.headers.length > 0 ? slots.headers : propHead;
|
|
6708
7077
|
const autoBodyClass = shell === "fault-panel" && !isFigmaShell ? "table_area" : void 0;
|
|
6709
7078
|
let body;
|
|
6710
7079
|
if (loading) {
|
|
6711
|
-
body = /* @__PURE__ */
|
|
7080
|
+
body = /* @__PURE__ */ jsx53("div", { className: cn("stn-widget__body", autoBodyClass, contentClassName), children: /* @__PURE__ */ jsx53(StnWidgetLoading, {}) });
|
|
6712
7081
|
} else if (slots.bodies.length > 0) {
|
|
6713
7082
|
body = slots.bodies.map(
|
|
6714
7083
|
(slot, index) => mergeBodySlot(slot, index === 0 ? slots.rest : [], contentClassName, isEmptyState, emptyStyle)
|
|
6715
7084
|
);
|
|
6716
7085
|
} else {
|
|
6717
|
-
body = /* @__PURE__ */
|
|
7086
|
+
body = /* @__PURE__ */ jsx53("div", { className: cn("stn-widget__body", autoBodyClass, isEmptyState && "empty", contentClassName), style: emptyStyle, children: slots.rest });
|
|
6718
7087
|
}
|
|
6719
|
-
const footerNode = slots.footers.length > 0 ? slots.footers : footer ? /* @__PURE__ */
|
|
6720
|
-
const card = /* @__PURE__ */
|
|
6721
|
-
isFigmaShell && appearanceShell === "overlay" ? /* @__PURE__ */
|
|
7088
|
+
const footerNode = slots.footers.length > 0 ? slots.footers : footer ? /* @__PURE__ */ jsx53("div", { className: "stn-widget__footer", children: footer }) : null;
|
|
7089
|
+
const card = /* @__PURE__ */ jsxs42("div", { ...rootProps, children: [
|
|
7090
|
+
isFigmaShell && appearanceShell === "overlay" ? /* @__PURE__ */ jsx53("div", { className: "stn-widget__map-deco", "aria-hidden": true }) : null,
|
|
6722
7091
|
head,
|
|
6723
7092
|
body,
|
|
6724
7093
|
footerNode
|
|
6725
7094
|
] });
|
|
6726
7095
|
if (banner == null || banner === false) return card;
|
|
6727
|
-
return /* @__PURE__ */
|
|
7096
|
+
return /* @__PURE__ */ jsxs42("div", { className: "stn-widget-anchor", children: [
|
|
6728
7097
|
withBannerSeverity(banner, bannerSeverityFromStatus(status, isCritical)),
|
|
6729
7098
|
card
|
|
6730
7099
|
] });
|
|
6731
7100
|
}
|
|
6732
7101
|
function StnWidgetHeader({ className, wrap = false, children, ...rest }) {
|
|
6733
|
-
return /* @__PURE__ */
|
|
7102
|
+
return /* @__PURE__ */ jsx53("div", { className: cn("stn-widget__head", wrap && "stn-widget__head--wrap", className), ...rest, children });
|
|
6734
7103
|
}
|
|
6735
7104
|
markWidgetSlot(StnWidgetHeader, "header");
|
|
6736
7105
|
function StnWidgetTitle({
|
|
@@ -6742,10 +7111,10 @@ function StnWidgetTitle({
|
|
|
6742
7111
|
...rest
|
|
6743
7112
|
}) {
|
|
6744
7113
|
const titleAttr = title ?? (typeof children === "string" ? children : void 0);
|
|
6745
|
-
return /* @__PURE__ */
|
|
7114
|
+
return /* @__PURE__ */ jsx53("p", { className: cn("stn-widget__title", size, weight, className), title: titleAttr, ...rest, children });
|
|
6746
7115
|
}
|
|
6747
7116
|
function StnWidgetActions({ className, children, ...rest }) {
|
|
6748
|
-
return /* @__PURE__ */
|
|
7117
|
+
return /* @__PURE__ */ jsx53("div", { className: cn("stn-widget__head-end", className), ...rest, children });
|
|
6749
7118
|
}
|
|
6750
7119
|
function StnWidgetBody({
|
|
6751
7120
|
padding,
|
|
@@ -6759,7 +7128,7 @@ function StnWidgetBody({
|
|
|
6759
7128
|
}) {
|
|
6760
7129
|
const emptyText = typeof empty === "string" ? empty : void 0;
|
|
6761
7130
|
const mergedStyle = emptyText ? { ["--stn-widget-empty-text"]: `"${emptyText}"`, ...style } : style;
|
|
6762
|
-
return /* @__PURE__ */
|
|
7131
|
+
return /* @__PURE__ */ jsx53(
|
|
6763
7132
|
"div",
|
|
6764
7133
|
{
|
|
6765
7134
|
className: cn(
|
|
@@ -6781,7 +7150,7 @@ function StnWidgetBody({
|
|
|
6781
7150
|
}
|
|
6782
7151
|
markWidgetSlot(StnWidgetBody, "body");
|
|
6783
7152
|
function StnWidgetChartSlot({ label = "select chart", className, children, ...rest }) {
|
|
6784
|
-
return /* @__PURE__ */
|
|
7153
|
+
return /* @__PURE__ */ jsx53("div", { className: cn("stn-widget__chart-slot", className), "data-stn-widget-chart-slot": true, ...rest, children: children ?? /* @__PURE__ */ jsx53("span", { className: "stn-widget__chart-slot-label", children: label }) });
|
|
6785
7154
|
}
|
|
6786
7155
|
function StnWidgetStatusItem({
|
|
6787
7156
|
label,
|
|
@@ -6793,9 +7162,9 @@ function StnWidgetStatusItem({
|
|
|
6793
7162
|
...rest
|
|
6794
7163
|
}) {
|
|
6795
7164
|
const grade = gradeProp ?? (status === "warning" ? "minor" : status) ?? "normal";
|
|
6796
|
-
return /* @__PURE__ */
|
|
6797
|
-
/* @__PURE__ */
|
|
6798
|
-
showDot ? /* @__PURE__ */
|
|
7165
|
+
return /* @__PURE__ */ jsxs42("div", { className: cn("stn-widget__status-item", className), ...rest, children: [
|
|
7166
|
+
/* @__PURE__ */ jsxs42("span", { className: "stn-widget__status-label", children: [
|
|
7167
|
+
showDot ? /* @__PURE__ */ jsx53(
|
|
6799
7168
|
"span",
|
|
6800
7169
|
{
|
|
6801
7170
|
className: cn("stn-widget__status-dot", `stn-widget__status-dot--${grade}`),
|
|
@@ -6804,23 +7173,23 @@ function StnWidgetStatusItem({
|
|
|
6804
7173
|
) : null,
|
|
6805
7174
|
label
|
|
6806
7175
|
] }),
|
|
6807
|
-
/* @__PURE__ */
|
|
7176
|
+
/* @__PURE__ */ jsx53("span", { className: "stn-widget__status-val", children: value })
|
|
6808
7177
|
] });
|
|
6809
7178
|
}
|
|
6810
7179
|
function StnWidgetStatusList({ className, children, ...rest }) {
|
|
6811
|
-
return /* @__PURE__ */
|
|
7180
|
+
return /* @__PURE__ */ jsx53("div", { className: cn("stn-widget__status-list", className), ...rest, children });
|
|
6812
7181
|
}
|
|
6813
7182
|
function StnWidgetStatGroup({ className, children, ...rest }) {
|
|
6814
|
-
return /* @__PURE__ */
|
|
7183
|
+
return /* @__PURE__ */ jsx53("div", { className: cn("stn-widget__stat-group", className), ...rest, children });
|
|
6815
7184
|
}
|
|
6816
7185
|
function StnWidgetStatCard({ label, count, className, ...rest }) {
|
|
6817
|
-
return /* @__PURE__ */
|
|
6818
|
-
/* @__PURE__ */
|
|
6819
|
-
/* @__PURE__ */
|
|
7186
|
+
return /* @__PURE__ */ jsxs42("div", { className: cn("stn-widget__stat-card", className), ...rest, children: [
|
|
7187
|
+
/* @__PURE__ */ jsx53("span", { className: "stn-widget__stat-label", children: label }),
|
|
7188
|
+
/* @__PURE__ */ jsx53("span", { className: "stn-widget__stat-count", children: count })
|
|
6820
7189
|
] });
|
|
6821
7190
|
}
|
|
6822
7191
|
function StnWidgetPlaceholder({ label = "\uCF58\uD150\uCE20 \uC601\uC5ED" }) {
|
|
6823
|
-
return /* @__PURE__ */
|
|
7192
|
+
return /* @__PURE__ */ jsx53("div", { className: "stn-widget__placeholder", children: label });
|
|
6824
7193
|
}
|
|
6825
7194
|
var GRADE_ROW_ICON = {
|
|
6826
7195
|
critical: "fill/alert4",
|
|
@@ -6843,42 +7212,42 @@ function StnWidgetGradeRow({
|
|
|
6843
7212
|
}) {
|
|
6844
7213
|
const clamped = Math.max(0, Math.min(100, percent));
|
|
6845
7214
|
const resolvedPercentLabel = percentLabel ?? formatGradePercent(clamped);
|
|
6846
|
-
return /* @__PURE__ */
|
|
6847
|
-
/* @__PURE__ */
|
|
6848
|
-
/* @__PURE__ */
|
|
6849
|
-
/* @__PURE__ */
|
|
7215
|
+
return /* @__PURE__ */ jsxs42("div", { className: cn("stn-widget__grade-row", `stn-widget__grade-row--${grade}`, className), ...rest, children: [
|
|
7216
|
+
/* @__PURE__ */ jsxs42("div", { className: "stn-widget__grade-row-left", children: [
|
|
7217
|
+
/* @__PURE__ */ jsxs42("span", { className: "stn-widget__grade-row-label", children: [
|
|
7218
|
+
/* @__PURE__ */ jsx53(StnIcon, { name: GRADE_ROW_ICON[grade], size: 20, className: "stn-widget__grade-row-icon", "aria-hidden": true }),
|
|
6850
7219
|
label
|
|
6851
7220
|
] }),
|
|
6852
|
-
/* @__PURE__ */
|
|
7221
|
+
/* @__PURE__ */ jsx53("div", { className: "stn-widget__grade-row-track", "aria-hidden": true, children: /* @__PURE__ */ jsx53("span", { className: "stn-widget__grade-row-fill", style: { width: `${clamped}%` } }) })
|
|
6853
7222
|
] }),
|
|
6854
|
-
/* @__PURE__ */
|
|
6855
|
-
/* @__PURE__ */
|
|
6856
|
-
/* @__PURE__ */
|
|
7223
|
+
/* @__PURE__ */ jsxs42("div", { className: "stn-widget__grade-row-right", children: [
|
|
7224
|
+
/* @__PURE__ */ jsx53("span", { className: "stn-widget__grade-row-value", children: value }),
|
|
7225
|
+
/* @__PURE__ */ jsx53("span", { className: "stn-widget__grade-row-percent", children: resolvedPercentLabel })
|
|
6857
7226
|
] })
|
|
6858
7227
|
] });
|
|
6859
7228
|
}
|
|
6860
7229
|
function StnWidgetGradeRowList({ className, children, ...rest }) {
|
|
6861
|
-
return /* @__PURE__ */
|
|
7230
|
+
return /* @__PURE__ */ jsx53("div", { className: cn("stn-widget__grade-row-list", className), ...rest, children });
|
|
6862
7231
|
}
|
|
6863
7232
|
function StnWidgetFooter({ className, children, ...rest }) {
|
|
6864
|
-
return /* @__PURE__ */
|
|
7233
|
+
return /* @__PURE__ */ jsx53("div", { className: cn("stn-widget__footer", className), ...rest, children });
|
|
6865
7234
|
}
|
|
6866
7235
|
markWidgetSlot(StnWidgetFooter, "footer");
|
|
6867
7236
|
function StnWidgetEmpty({ className, children, ...rest }) {
|
|
6868
|
-
return /* @__PURE__ */
|
|
6869
|
-
/* @__PURE__ */
|
|
6870
|
-
/* @__PURE__ */
|
|
6871
|
-
/* @__PURE__ */
|
|
6872
|
-
/* @__PURE__ */
|
|
7237
|
+
return /* @__PURE__ */ jsxs42("div", { className: cn("stn-widget__empty", className), ...rest, children: [
|
|
7238
|
+
/* @__PURE__ */ jsxs42("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", style: { opacity: 0.6 }, children: [
|
|
7239
|
+
/* @__PURE__ */ jsx53("circle", { cx: "12", cy: "12", r: "10" }),
|
|
7240
|
+
/* @__PURE__ */ jsx53("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
|
|
7241
|
+
/* @__PURE__ */ jsx53("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
|
|
6873
7242
|
] }),
|
|
6874
|
-
/* @__PURE__ */
|
|
7243
|
+
/* @__PURE__ */ jsx53("div", { children: children ?? "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4." })
|
|
6875
7244
|
] });
|
|
6876
7245
|
}
|
|
6877
7246
|
function StnWidgetLoading({ lines = 3, className, children, ...rest }) {
|
|
6878
|
-
return /* @__PURE__ */
|
|
7247
|
+
return /* @__PURE__ */ jsx53("div", { className: cn("stn-widget__loading", className), ...rest, children: children ?? /* @__PURE__ */ jsx53(StnLoadingSkeleton.Widget, { lines }) });
|
|
6879
7248
|
}
|
|
6880
7249
|
function StnWidgetInsetIcon({ className, size = "sm", ...rest }) {
|
|
6881
|
-
return /* @__PURE__ */
|
|
7250
|
+
return /* @__PURE__ */ jsx53(StnIconBox, { size, className: cn("stn-widget__inset-icon", className), ...rest });
|
|
6882
7251
|
}
|
|
6883
7252
|
var StnWidget = Object.assign(StnWidgetRoot, {
|
|
6884
7253
|
Header: StnWidgetHeader,
|
|
@@ -6925,11 +7294,11 @@ import {
|
|
|
6925
7294
|
// src/layouts/StnStack.tsx
|
|
6926
7295
|
import {
|
|
6927
7296
|
Children as Children3,
|
|
6928
|
-
forwardRef as
|
|
7297
|
+
forwardRef as forwardRef29,
|
|
6929
7298
|
Fragment as Fragment6,
|
|
6930
7299
|
isValidElement as isValidElement6
|
|
6931
7300
|
} from "react";
|
|
6932
|
-
import { jsx as
|
|
7301
|
+
import { jsx as jsx54, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
6933
7302
|
var BREAKPOINTS = ["xs", "sm", "md", "lg", "xl"];
|
|
6934
7303
|
var DIRECTION_CLASS = /* @__PURE__ */ new Set(["row", "row-reverse", "column", "column-reverse"]);
|
|
6935
7304
|
var STACK_SPACE_TOKENS = /* @__PURE__ */ new Set([2, 4, 6, 8, 10, 12, 14, 16, 20, 24, 32, 36, 40, 44, 48, 56, 64, 80, 84]);
|
|
@@ -7022,7 +7391,7 @@ function spacingClassesAndStyle(spacing) {
|
|
|
7022
7391
|
}
|
|
7023
7392
|
return { classes, inlineGap };
|
|
7024
7393
|
}
|
|
7025
|
-
var StnStack =
|
|
7394
|
+
var StnStack = forwardRef29(function StnStack2({
|
|
7026
7395
|
component,
|
|
7027
7396
|
as,
|
|
7028
7397
|
direction = "column",
|
|
@@ -7052,12 +7421,12 @@ var StnStack = forwardRef26(function StnStack2({
|
|
|
7052
7421
|
const validChildren = Children3.toArray(children).filter(Boolean);
|
|
7053
7422
|
const renderedChildren = divider ? validChildren.map((child, index) => {
|
|
7054
7423
|
const key = isValidElement6(child) && child.key != null ? child.key : index;
|
|
7055
|
-
return /* @__PURE__ */
|
|
7424
|
+
return /* @__PURE__ */ jsxs43(Fragment6, { children: [
|
|
7056
7425
|
index > 0 ? divider : null,
|
|
7057
7426
|
child
|
|
7058
7427
|
] }, key);
|
|
7059
7428
|
}) : children;
|
|
7060
|
-
return /* @__PURE__ */
|
|
7429
|
+
return /* @__PURE__ */ jsx54(
|
|
7061
7430
|
Component,
|
|
7062
7431
|
{
|
|
7063
7432
|
ref,
|
|
@@ -7081,7 +7450,7 @@ var StnStack = forwardRef26(function StnStack2({
|
|
|
7081
7450
|
});
|
|
7082
7451
|
|
|
7083
7452
|
// src/patterns/dashboard/AlertCenterDashboard.tsx
|
|
7084
|
-
import { jsx as
|
|
7453
|
+
import { jsx as jsx55, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
7085
7454
|
var TOP5_ROWS = [
|
|
7086
7455
|
{ label: "\uADF8\uB791\uC2DC\uC544", percent: 80, value: "80\uAC74", grade: "critical" },
|
|
7087
7456
|
{ label: "\uC5F0\uB9BD\uC8FC\uD0DD 15\uC138\uB300", percent: 74, value: "74\uAC74", grade: "major" },
|
|
@@ -7090,7 +7459,7 @@ var TOP5_ROWS = [
|
|
|
7090
7459
|
{ label: "PRADA", percent: 68, value: "68\uAC74", grade: "default" }
|
|
7091
7460
|
];
|
|
7092
7461
|
function AlertCenterDashboard({ className, appearance = "translucent", loading = false }) {
|
|
7093
|
-
return /* @__PURE__ */
|
|
7462
|
+
return /* @__PURE__ */ jsxs44(
|
|
7094
7463
|
StnStack,
|
|
7095
7464
|
{
|
|
7096
7465
|
direction: "column",
|
|
@@ -7099,17 +7468,17 @@ function AlertCenterDashboard({ className, appearance = "translucent", loading =
|
|
|
7099
7468
|
style: { flex: "1 1 0%", minHeight: 0, height: "100%", width: "100%" },
|
|
7100
7469
|
"data-stn-dashboard": "alert-widgets",
|
|
7101
7470
|
children: [
|
|
7102
|
-
/* @__PURE__ */
|
|
7103
|
-
/* @__PURE__ */
|
|
7104
|
-
/* @__PURE__ */
|
|
7105
|
-
/* @__PURE__ */
|
|
7471
|
+
/* @__PURE__ */ jsx55(StnWidget, { title: "\uC2DC\uC124 \uD604\uD669", appearance, interactive: true, children: loading ? /* @__PURE__ */ jsx55(StnLoadingSkeleton.Widget, { lines: 3 }) : /* @__PURE__ */ jsxs44(StnWidget.StatusList, { children: [
|
|
7472
|
+
/* @__PURE__ */ jsx55(StnWidget.StatusItem, { label: "PTN", value: "179", showDot: false }),
|
|
7473
|
+
/* @__PURE__ */ jsx55(StnWidget.StatusItem, { label: "MSPP", value: "63", showDot: false }),
|
|
7474
|
+
/* @__PURE__ */ jsx55(StnWidget.StatusItem, { label: "L3\uC2A4\uC704\uCE58", value: "27", showDot: false })
|
|
7106
7475
|
] }) }),
|
|
7107
|
-
/* @__PURE__ */
|
|
7108
|
-
/* @__PURE__ */
|
|
7109
|
-
/* @__PURE__ */
|
|
7110
|
-
/* @__PURE__ */
|
|
7476
|
+
/* @__PURE__ */ jsx55(StnWidget, { title: "\uC7A5\uC560 \uD604\uD669", appearance, interactive: true, children: loading ? /* @__PURE__ */ jsx55(StnLoadingSkeleton.Widget, { lines: 3 }) : /* @__PURE__ */ jsxs44(StnWidget.StatusList, { children: [
|
|
7477
|
+
/* @__PURE__ */ jsx55(StnWidget.StatusItem, { label: "Critical", value: "43", grade: "critical" }),
|
|
7478
|
+
/* @__PURE__ */ jsx55(StnWidget.StatusItem, { label: "Major", value: "79", grade: "major" }),
|
|
7479
|
+
/* @__PURE__ */ jsx55(StnWidget.StatusItem, { label: "Minor", value: "3", grade: "minor" })
|
|
7111
7480
|
] }) }),
|
|
7112
|
-
/* @__PURE__ */
|
|
7481
|
+
/* @__PURE__ */ jsx55(StnWidget, { title: "\uC77C\uC77C \uC7A5\uBE44\uBCC4 \uC7A5\uC560 TOP5", appearance, interactive: true, children: loading ? /* @__PURE__ */ jsx55(StnLoadingSkeleton.Widget, { lines: 4 }) : /* @__PURE__ */ jsx55(StnWidget.GradeRowList, { children: TOP5_ROWS.map((row) => /* @__PURE__ */ jsx55(
|
|
7113
7482
|
StnWidget.GradeRow,
|
|
7114
7483
|
{
|
|
7115
7484
|
grade: row.grade,
|
|
@@ -7119,50 +7488,50 @@ function AlertCenterDashboard({ className, appearance = "translucent", loading =
|
|
|
7119
7488
|
},
|
|
7120
7489
|
row.label
|
|
7121
7490
|
)) }) }),
|
|
7122
|
-
/* @__PURE__ */
|
|
7491
|
+
/* @__PURE__ */ jsx55(StnWidget, { title: "\uC77C\uC77C \uC7A5\uC560 \uD1B5\uACC4", appearance, interactive: true, children: loading ? /* @__PURE__ */ jsx55(StnLoadingSkeleton.Widget, { lines: 3 }) : /* @__PURE__ */ jsx55(StnWidget.ChartSlot, { label: "\uC77C\uC77C \uC7A5\uC560 \uD1B5\uACC4 \uCC28\uD2B8" }) })
|
|
7123
7492
|
]
|
|
7124
7493
|
}
|
|
7125
7494
|
);
|
|
7126
7495
|
}
|
|
7127
7496
|
|
|
7128
7497
|
// src/patterns/dashboard/PubDashboardWidgetBodies.tsx
|
|
7129
|
-
import { jsx as
|
|
7498
|
+
import { jsx as jsx56, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
7130
7499
|
function PubDisabilityStatusList({ items, summary }) {
|
|
7131
|
-
return /* @__PURE__ */
|
|
7132
|
-
/* @__PURE__ */
|
|
7500
|
+
return /* @__PURE__ */ jsxs45("div", { className: "ds-disability-status", children: [
|
|
7501
|
+
/* @__PURE__ */ jsx56("ul", { className: "ds-disability-status__list", children: items.map((item, i) => /* @__PURE__ */ jsxs45(
|
|
7133
7502
|
"li",
|
|
7134
7503
|
{
|
|
7135
7504
|
className: ["ds-disability-status__item", item.grade].filter(Boolean).join(" "),
|
|
7136
7505
|
children: [
|
|
7137
|
-
/* @__PURE__ */
|
|
7138
|
-
item.showDot !== false && item.grade ? /* @__PURE__ */
|
|
7506
|
+
/* @__PURE__ */ jsxs45("span", { children: [
|
|
7507
|
+
item.showDot !== false && item.grade ? /* @__PURE__ */ jsx56("span", { className: "dot", "aria-hidden": true }) : null,
|
|
7139
7508
|
item.label
|
|
7140
7509
|
] }),
|
|
7141
|
-
/* @__PURE__ */
|
|
7510
|
+
/* @__PURE__ */ jsx56("p", { children: item.value })
|
|
7142
7511
|
]
|
|
7143
7512
|
},
|
|
7144
7513
|
i
|
|
7145
7514
|
)) }),
|
|
7146
|
-
summary && summary.length > 0 ? /* @__PURE__ */
|
|
7515
|
+
summary && summary.length > 0 ? /* @__PURE__ */ jsx56("div", { className: "ds-disability-status__summary", children: summary.map((row, i) => /* @__PURE__ */ jsxs45("p", { className: "ds-disability-status__value", children: [
|
|
7147
7516
|
row.label,
|
|
7148
|
-
/* @__PURE__ */
|
|
7517
|
+
/* @__PURE__ */ jsx56("span", { children: row.value })
|
|
7149
7518
|
] }, i)) }) : null
|
|
7150
7519
|
] });
|
|
7151
7520
|
}
|
|
7152
7521
|
function PubTrafficTop5Bars({ rows }) {
|
|
7153
7522
|
const maxPercent = Math.max(...rows.map((row) => row.percent), 0);
|
|
7154
|
-
return /* @__PURE__ */
|
|
7155
|
-
/* @__PURE__ */
|
|
7156
|
-
/* @__PURE__ */
|
|
7157
|
-
/* @__PURE__ */
|
|
7523
|
+
return /* @__PURE__ */ jsx56("div", { className: "ds-bar-group", children: rows.map((row) => /* @__PURE__ */ jsxs45("div", { className: ["ds-bar", row.percent === maxPercent ? "max" : ""].filter(Boolean).join(" "), children: [
|
|
7524
|
+
/* @__PURE__ */ jsx56("p", { className: "ds-bar-name", title: row.label, children: row.label }),
|
|
7525
|
+
/* @__PURE__ */ jsx56("div", { className: "ds-bar-con", title: `${row.percent}%`, children: /* @__PURE__ */ jsx56("span", { className: "ds-bar-gauge", style: { "--percent": `${row.percent}%` } }) }),
|
|
7526
|
+
/* @__PURE__ */ jsx56("p", { className: "ds-bar-value", title: row.value, children: row.value })
|
|
7158
7527
|
] }, row.label)) });
|
|
7159
7528
|
}
|
|
7160
7529
|
function PubTop5EquipmentBars({ rows }) {
|
|
7161
|
-
return /* @__PURE__ */
|
|
7162
|
-
/* @__PURE__ */
|
|
7163
|
-
/* @__PURE__ */
|
|
7164
|
-
/* @__PURE__ */
|
|
7165
|
-
/* @__PURE__ */
|
|
7530
|
+
return /* @__PURE__ */ jsxs45("div", { className: "ds-group", children: [
|
|
7531
|
+
/* @__PURE__ */ jsx56("div", { className: "ds-group-box", children: /* @__PURE__ */ jsx56("div", { className: "ds-equipment-ico", children: /* @__PURE__ */ jsx56("span", { className: "blind", children: "\uC7A5\uBE44 \uC774\uBBF8\uC9C0" }) }) }),
|
|
7532
|
+
/* @__PURE__ */ jsx56("div", { className: "ds-group-box", children: /* @__PURE__ */ jsx56("div", { className: "ds-bar-group", children: rows.map((row) => /* @__PURE__ */ jsx56("div", { className: "ds-bar type-2", children: /* @__PURE__ */ jsxs45("div", { className: "ds-bar-con", title: `${row.percent}%`, children: [
|
|
7533
|
+
/* @__PURE__ */ jsx56("span", { className: "ds-bar-gauge", style: { "--percent": `${row.percent}%` } }),
|
|
7534
|
+
/* @__PURE__ */ jsx56("div", { className: "ds-bar-status", children: row.status })
|
|
7166
7535
|
] }) }, row.label)) }) })
|
|
7167
7536
|
] });
|
|
7168
7537
|
}
|
|
@@ -7171,15 +7540,15 @@ function PubChartSample({
|
|
|
7171
7540
|
alt = "\uCC28\uD2B8",
|
|
7172
7541
|
onError
|
|
7173
7542
|
}) {
|
|
7174
|
-
return /* @__PURE__ */
|
|
7543
|
+
return /* @__PURE__ */ jsx56("div", { className: "ds-chart", children: /* @__PURE__ */ jsx56("img", { src, alt, className: "chart_sample", onError }) });
|
|
7175
7544
|
}
|
|
7176
7545
|
|
|
7177
7546
|
// src/patterns/alertCenter/StnAlertCenterPanel.tsx
|
|
7178
|
-
import { useState as
|
|
7547
|
+
import { useState as useState16 } from "react";
|
|
7179
7548
|
import {
|
|
7180
7549
|
STN_ALERT_CENTER_TABS
|
|
7181
7550
|
} from "@stn-uiux/pub-ui/data/stnAlertCenter";
|
|
7182
|
-
import { jsx as
|
|
7551
|
+
import { jsx as jsx57, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
7183
7552
|
function resolveAlertIcon(item) {
|
|
7184
7553
|
if (item.icon) {
|
|
7185
7554
|
if (item.icon === "line/arrow-down") return "line/arrow-narrow-down";
|
|
@@ -7206,7 +7575,7 @@ function StnAlertCard({
|
|
|
7206
7575
|
}) {
|
|
7207
7576
|
const iconNode = resolveAlertIcon(item);
|
|
7208
7577
|
const gradeLabel = resolveGradeLabel(item.grade);
|
|
7209
|
-
return /* @__PURE__ */
|
|
7578
|
+
return /* @__PURE__ */ jsx57(
|
|
7210
7579
|
StnCard,
|
|
7211
7580
|
{
|
|
7212
7581
|
variant: "elevated",
|
|
@@ -7215,8 +7584,8 @@ function StnAlertCard({
|
|
|
7215
7584
|
interactive: true,
|
|
7216
7585
|
className: cn("stn-alert-card", className),
|
|
7217
7586
|
onClick,
|
|
7218
|
-
children: /* @__PURE__ */
|
|
7219
|
-
/* @__PURE__ */
|
|
7587
|
+
children: /* @__PURE__ */ jsxs46("div", { className: "stn-alert-card__row", children: [
|
|
7588
|
+
/* @__PURE__ */ jsx57(
|
|
7220
7589
|
StnIcon,
|
|
7221
7590
|
{
|
|
7222
7591
|
name: iconNode,
|
|
@@ -7225,9 +7594,9 @@ function StnAlertCard({
|
|
|
7225
7594
|
className: "stn-alert-card__icon"
|
|
7226
7595
|
}
|
|
7227
7596
|
),
|
|
7228
|
-
/* @__PURE__ */
|
|
7229
|
-
/* @__PURE__ */
|
|
7230
|
-
/* @__PURE__ */
|
|
7597
|
+
/* @__PURE__ */ jsxs46("div", { className: "stn-alert-card__body", children: [
|
|
7598
|
+
/* @__PURE__ */ jsxs46(StnStack, { direction: "row", alignItems: "center", spacing: 1, className: "stn-alert-card__header-line", children: [
|
|
7599
|
+
/* @__PURE__ */ jsx57(
|
|
7231
7600
|
StnChip,
|
|
7232
7601
|
{
|
|
7233
7602
|
shape: "pill",
|
|
@@ -7237,25 +7606,25 @@ function StnAlertCard({
|
|
|
7237
7606
|
children: gradeLabel
|
|
7238
7607
|
}
|
|
7239
7608
|
),
|
|
7240
|
-
/* @__PURE__ */
|
|
7609
|
+
/* @__PURE__ */ jsx57(
|
|
7241
7610
|
"span",
|
|
7242
7611
|
{
|
|
7243
7612
|
className: cn("stn-alert-card__title", titleOverflow),
|
|
7244
7613
|
title: item.title,
|
|
7245
|
-
children: /* @__PURE__ */
|
|
7614
|
+
children: /* @__PURE__ */ jsx57("span", { className: "stn-alert-card__text-inner", children: item.title })
|
|
7246
7615
|
}
|
|
7247
7616
|
)
|
|
7248
7617
|
] }),
|
|
7249
|
-
/* @__PURE__ */
|
|
7250
|
-
/* @__PURE__ */
|
|
7618
|
+
/* @__PURE__ */ jsxs46(StnStack, { direction: "row", alignItems: "center", spacing: 2, wrap: "wrap", className: "stn-alert-card__desc-line", children: [
|
|
7619
|
+
/* @__PURE__ */ jsx57(
|
|
7251
7620
|
"span",
|
|
7252
7621
|
{
|
|
7253
7622
|
className: cn("stn-alert-card__desc", descOverflow),
|
|
7254
7623
|
title: item.description,
|
|
7255
|
-
children: /* @__PURE__ */
|
|
7624
|
+
children: /* @__PURE__ */ jsx57("span", { className: "stn-alert-card__text-inner", children: item.description })
|
|
7256
7625
|
}
|
|
7257
7626
|
),
|
|
7258
|
-
item.occurredAt && /* @__PURE__ */
|
|
7627
|
+
item.occurredAt && /* @__PURE__ */ jsxs46(
|
|
7259
7628
|
StnChip,
|
|
7260
7629
|
{
|
|
7261
7630
|
shape: "pill",
|
|
@@ -7271,9 +7640,9 @@ function StnAlertCard({
|
|
|
7271
7640
|
)
|
|
7272
7641
|
] })
|
|
7273
7642
|
] }),
|
|
7274
|
-
/* @__PURE__ */
|
|
7275
|
-
/* @__PURE__ */
|
|
7276
|
-
item.unread !== false && /* @__PURE__ */
|
|
7643
|
+
/* @__PURE__ */ jsxs46("div", { className: "stn-alert-card__meta", children: [
|
|
7644
|
+
/* @__PURE__ */ jsx57("span", { className: "stn-alert-card__time", children: item.time }),
|
|
7645
|
+
item.unread !== false && /* @__PURE__ */ jsx57(
|
|
7277
7646
|
"span",
|
|
7278
7647
|
{
|
|
7279
7648
|
className: cn(
|
|
@@ -7307,11 +7676,11 @@ function StnAlertCenterPanel({
|
|
|
7307
7676
|
closeLabel = "\uB2EB\uAE30",
|
|
7308
7677
|
className
|
|
7309
7678
|
}) {
|
|
7310
|
-
const [activeTab, setActiveTab] =
|
|
7679
|
+
const [activeTab, setActiveTab] = useState16(defaultTab);
|
|
7311
7680
|
const alertCount = alerts.length;
|
|
7312
7681
|
const resolvedTitleOverflow = titleOverflow ?? textOverflow;
|
|
7313
7682
|
const resolvedDescOverflow = descOverflow ?? textOverflow;
|
|
7314
|
-
return /* @__PURE__ */
|
|
7683
|
+
return /* @__PURE__ */ jsxs46(
|
|
7315
7684
|
"div",
|
|
7316
7685
|
{
|
|
7317
7686
|
className: cn(
|
|
@@ -7323,13 +7692,13 @@ function StnAlertCenterPanel({
|
|
|
7323
7692
|
),
|
|
7324
7693
|
"data-stn-alert-center": true,
|
|
7325
7694
|
children: [
|
|
7326
|
-
/* @__PURE__ */
|
|
7327
|
-
/* @__PURE__ */
|
|
7328
|
-
/* @__PURE__ */
|
|
7329
|
-
/* @__PURE__ */
|
|
7330
|
-
alertCount > 0 && /* @__PURE__ */
|
|
7695
|
+
/* @__PURE__ */ jsxs46("div", { className: "stn-alert-center__header", children: [
|
|
7696
|
+
/* @__PURE__ */ jsxs46("div", { className: "stn-alert-center__header-left", children: [
|
|
7697
|
+
/* @__PURE__ */ jsx57(StnIcon, { name: "line/bell", size: 20, color: "var(--stn-primary)" }),
|
|
7698
|
+
/* @__PURE__ */ jsx57("span", { className: "stn-alert-center__title", children: title }),
|
|
7699
|
+
alertCount > 0 && /* @__PURE__ */ jsx57(StnChip, { shape: "pill", size: "sm", variant: "subtle", color: "primary", children: alertCount })
|
|
7331
7700
|
] }),
|
|
7332
|
-
/* @__PURE__ */
|
|
7701
|
+
/* @__PURE__ */ jsx57(
|
|
7333
7702
|
StnSegmented,
|
|
7334
7703
|
{
|
|
7335
7704
|
size: "md",
|
|
@@ -7342,8 +7711,8 @@ function StnAlertCenterPanel({
|
|
|
7342
7711
|
}))
|
|
7343
7712
|
}
|
|
7344
7713
|
),
|
|
7345
|
-
/* @__PURE__ */
|
|
7346
|
-
/* @__PURE__ */
|
|
7714
|
+
/* @__PURE__ */ jsxs46("div", { className: "stn-alert-center__header-right", children: [
|
|
7715
|
+
/* @__PURE__ */ jsx57(
|
|
7347
7716
|
StnButton,
|
|
7348
7717
|
{
|
|
7349
7718
|
variant: "text",
|
|
@@ -7353,8 +7722,8 @@ function StnAlertCenterPanel({
|
|
|
7353
7722
|
children: "\uBAA8\uB450 \uC77D\uC74C"
|
|
7354
7723
|
}
|
|
7355
7724
|
),
|
|
7356
|
-
/* @__PURE__ */
|
|
7357
|
-
/* @__PURE__ */
|
|
7725
|
+
/* @__PURE__ */ jsx57("div", { className: "stn-alert-center__divider", "aria-hidden": true }),
|
|
7726
|
+
/* @__PURE__ */ jsx57(
|
|
7358
7727
|
StnButton,
|
|
7359
7728
|
{
|
|
7360
7729
|
icon: "line/x",
|
|
@@ -7366,14 +7735,14 @@ function StnAlertCenterPanel({
|
|
|
7366
7735
|
)
|
|
7367
7736
|
] })
|
|
7368
7737
|
] }),
|
|
7369
|
-
/* @__PURE__ */
|
|
7738
|
+
/* @__PURE__ */ jsxs46(
|
|
7370
7739
|
StnScroll,
|
|
7371
7740
|
{
|
|
7372
7741
|
orientation: "vertical",
|
|
7373
7742
|
size: "thin",
|
|
7374
7743
|
className: "stn-alert-center__list-wrap",
|
|
7375
7744
|
children: [
|
|
7376
|
-
activeTab === "error" && /* @__PURE__ */
|
|
7745
|
+
activeTab === "error" && /* @__PURE__ */ jsx57("ul", { className: "stn-alert-center__list", children: alerts.map((item) => /* @__PURE__ */ jsx57("li", { children: /* @__PURE__ */ jsx57(
|
|
7377
7746
|
StnAlertCard,
|
|
7378
7747
|
{
|
|
7379
7748
|
item,
|
|
@@ -7382,35 +7751,35 @@ function StnAlertCenterPanel({
|
|
|
7382
7751
|
onClick: () => onItemClick?.(item)
|
|
7383
7752
|
}
|
|
7384
7753
|
) }, item.id ?? item.title)) }),
|
|
7385
|
-
activeTab === "work" && /* @__PURE__ */
|
|
7386
|
-
/* @__PURE__ */
|
|
7387
|
-
/* @__PURE__ */
|
|
7388
|
-
/* @__PURE__ */
|
|
7389
|
-
/* @__PURE__ */
|
|
7754
|
+
activeTab === "work" && /* @__PURE__ */ jsx57("ul", { className: "stn-alert-center__list", children: workItems.map((row) => /* @__PURE__ */ jsx57("li", { children: /* @__PURE__ */ jsx57(StnCard, { variant: "elevated", radius: "md", padding: "md", interactive: true, className: "stn-alert-card", children: /* @__PURE__ */ jsxs46("div", { className: "stn-alert-card__row", children: [
|
|
7755
|
+
/* @__PURE__ */ jsx57(StnIcon, { name: "line/clock", size: 24, color: "var(--stn-text-secondary)", className: "stn-alert-card__icon" }),
|
|
7756
|
+
/* @__PURE__ */ jsxs46("div", { className: "stn-alert-card__body", children: [
|
|
7757
|
+
/* @__PURE__ */ jsx57("span", { className: "stn-alert-card__type-label work", children: row.typeLabel }),
|
|
7758
|
+
/* @__PURE__ */ jsx57("span", { className: cn("stn-alert-card__desc", resolvedDescOverflow), title: row.text, children: /* @__PURE__ */ jsx57("span", { className: "stn-alert-card__text-inner", children: row.text }) })
|
|
7390
7759
|
] }),
|
|
7391
|
-
/* @__PURE__ */
|
|
7760
|
+
/* @__PURE__ */ jsx57("span", { className: "stn-alert-card__time", children: row.time })
|
|
7392
7761
|
] }) }) }, row.id ?? row.text)) }),
|
|
7393
|
-
activeTab === "deploy" && /* @__PURE__ */
|
|
7394
|
-
/* @__PURE__ */
|
|
7395
|
-
/* @__PURE__ */
|
|
7396
|
-
/* @__PURE__ */
|
|
7397
|
-
/* @__PURE__ */
|
|
7762
|
+
activeTab === "deploy" && /* @__PURE__ */ jsx57("ul", { className: "stn-alert-center__list", children: deployItems.map((row) => /* @__PURE__ */ jsx57("li", { children: /* @__PURE__ */ jsx57(StnCard, { variant: "elevated", radius: "md", padding: "md", interactive: true, className: "stn-alert-card", children: /* @__PURE__ */ jsxs46("div", { className: "stn-alert-card__row", children: [
|
|
7763
|
+
/* @__PURE__ */ jsx57(StnIcon, { name: "line/settings", size: 24, color: "var(--stn-secondary)", className: "stn-alert-card__icon" }),
|
|
7764
|
+
/* @__PURE__ */ jsxs46("div", { className: "stn-alert-card__body", children: [
|
|
7765
|
+
/* @__PURE__ */ jsx57("span", { className: "stn-alert-card__type-label stn-alert-card__type-label--deploy", children: row.typeLabel }),
|
|
7766
|
+
/* @__PURE__ */ jsx57("span", { className: cn("stn-alert-card__desc", resolvedDescOverflow), title: row.text, children: /* @__PURE__ */ jsx57("span", { className: "stn-alert-card__text-inner", children: row.text }) })
|
|
7398
7767
|
] }),
|
|
7399
|
-
/* @__PURE__ */
|
|
7768
|
+
/* @__PURE__ */ jsx57("span", { className: "stn-alert-card__time", children: row.time })
|
|
7400
7769
|
] }) }) }, row.id ?? row.text)) })
|
|
7401
7770
|
]
|
|
7402
7771
|
}
|
|
7403
7772
|
),
|
|
7404
|
-
/* @__PURE__ */
|
|
7773
|
+
/* @__PURE__ */ jsx57("div", { className: "stn-alert-center__footer", children: /* @__PURE__ */ jsxs46(
|
|
7405
7774
|
"button",
|
|
7406
7775
|
{
|
|
7407
7776
|
type: "button",
|
|
7408
7777
|
className: "stn-alert-center__footer-link",
|
|
7409
7778
|
onClick: onManageSettings,
|
|
7410
7779
|
children: [
|
|
7411
|
-
/* @__PURE__ */
|
|
7412
|
-
/* @__PURE__ */
|
|
7413
|
-
/* @__PURE__ */
|
|
7780
|
+
/* @__PURE__ */ jsx57("span", { children: "\uC54C\uB9BC \uC124\uC815 \uAD00\uB9AC" }),
|
|
7781
|
+
/* @__PURE__ */ jsx57(StnIcon, { name: "line/settings", size: 14 }),
|
|
7782
|
+
/* @__PURE__ */ jsx57(StnIcon, { name: "line/chevron-right", size: 14 })
|
|
7414
7783
|
]
|
|
7415
7784
|
}
|
|
7416
7785
|
) })
|
|
@@ -7420,18 +7789,18 @@ function StnAlertCenterPanel({
|
|
|
7420
7789
|
}
|
|
7421
7790
|
|
|
7422
7791
|
// src/patterns/alertCenter/StnAlertCenterDocPreview.tsx
|
|
7423
|
-
import { jsx as
|
|
7792
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
7424
7793
|
function StnAlertCenterDocPreview({
|
|
7425
7794
|
theme = "light",
|
|
7426
7795
|
withDocChrome = true,
|
|
7427
7796
|
children,
|
|
7428
7797
|
...panelProps
|
|
7429
7798
|
}) {
|
|
7430
|
-
const panel = children ?? /* @__PURE__ */
|
|
7799
|
+
const panel = children ?? /* @__PURE__ */ jsx58(StnAlertCenterPanel, { ...panelProps });
|
|
7431
7800
|
if (!withDocChrome) {
|
|
7432
|
-
return /* @__PURE__ */
|
|
7801
|
+
return /* @__PURE__ */ jsx58(StnProvider, { theme, applyThemeToDocument: false, children: panel });
|
|
7433
7802
|
}
|
|
7434
|
-
return /* @__PURE__ */
|
|
7803
|
+
return /* @__PURE__ */ jsx58("div", { className: "stn-doc-frame stn-doc-frame--alert-center", "data-theme": theme, children: /* @__PURE__ */ jsx58("div", { className: "stn-alert-center-preview-shell", children: panel }) });
|
|
7435
7804
|
}
|
|
7436
7805
|
|
|
7437
7806
|
// src/index.ts
|
|
@@ -7448,21 +7817,21 @@ import {
|
|
|
7448
7817
|
} from "@stn-uiux/pub-ui/data/stnAlertCenter";
|
|
7449
7818
|
|
|
7450
7819
|
// src/components/sideNav/SideNavContext.ts
|
|
7451
|
-
import { createContext as
|
|
7452
|
-
var SideNavContext =
|
|
7820
|
+
import { createContext as createContext4, useContext as useContext4 } from "react";
|
|
7821
|
+
var SideNavContext = createContext4({
|
|
7453
7822
|
collapsed: false,
|
|
7454
7823
|
mobileOpen: false
|
|
7455
7824
|
});
|
|
7456
|
-
var useSideNav = () =>
|
|
7825
|
+
var useSideNav = () => useContext4(SideNavContext);
|
|
7457
7826
|
|
|
7458
7827
|
// src/components/sideNav/StnSideNavItem.tsx
|
|
7459
|
-
import { forwardRef as
|
|
7828
|
+
import { forwardRef as forwardRef30 } from "react";
|
|
7460
7829
|
import { STN_NAV_MENU_SUB_ICON } from "@stn-uiux/pub-ui/data/stnSideNavItem";
|
|
7461
|
-
import { jsx as
|
|
7830
|
+
import { jsx as jsx59, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
7462
7831
|
function maskStyle2(src) {
|
|
7463
7832
|
return { maskImage: `url('${src}')`, WebkitMaskImage: `url('${src}')` };
|
|
7464
7833
|
}
|
|
7465
|
-
var StnSideNavItem =
|
|
7834
|
+
var StnSideNavItem = forwardRef30(function StnSideNavItem2({
|
|
7466
7835
|
label,
|
|
7467
7836
|
id,
|
|
7468
7837
|
iconSrc,
|
|
@@ -7505,13 +7874,13 @@ var StnSideNavItem = forwardRef27(function StnSideNavItem2({
|
|
|
7505
7874
|
sideNav.onSelect(id);
|
|
7506
7875
|
}
|
|
7507
7876
|
};
|
|
7508
|
-
const iconElement = hasIcon && !isSub ? /* @__PURE__ */
|
|
7509
|
-
/* @__PURE__ */
|
|
7510
|
-
showDot ? /* @__PURE__ */
|
|
7877
|
+
const iconElement = hasIcon && !isSub ? /* @__PURE__ */ jsxs47("span", { className: "stn-side-nav-item__icon-wrap", children: [
|
|
7878
|
+
/* @__PURE__ */ jsx59("span", { className: "stn-side-nav-item__icon", "aria-hidden": "true", children: icon ?? (resolvedIconSrc ? /* @__PURE__ */ jsx59("span", { className: "stn-side-nav-item__icon-glyph", style: maskStyle2(resolvedIconSrc) }) : null) }),
|
|
7879
|
+
showDot ? /* @__PURE__ */ jsx59("span", { className: "stn-side-nav-item__dot-wrap", "aria-hidden": "true", children: /* @__PURE__ */ jsx59(StnBadge, { variant: "dot", color: "error" }) }) : null
|
|
7511
7880
|
] }) : null;
|
|
7512
|
-
const subIconElement = hasIcon && isSub ? /* @__PURE__ */
|
|
7881
|
+
const subIconElement = hasIcon && isSub ? /* @__PURE__ */ jsx59("span", { className: "stn-side-nav-item__sub-icon", "aria-hidden": "true", children: icon ?? (resolvedIconSrc ? /* @__PURE__ */ jsx59("span", { className: "stn-side-nav-item__icon-glyph", style: maskStyle2(resolvedIconSrc) }) : null) }) : null;
|
|
7513
7882
|
const activeIconElement = isSub ? subIconElement : iconElement;
|
|
7514
|
-
return /* @__PURE__ */
|
|
7883
|
+
return /* @__PURE__ */ jsx59(
|
|
7515
7884
|
"button",
|
|
7516
7885
|
{
|
|
7517
7886
|
ref,
|
|
@@ -7530,10 +7899,10 @@ var StnSideNavItem = forwardRef27(function StnSideNavItem2({
|
|
|
7530
7899
|
title: collapsed ? label : void 0,
|
|
7531
7900
|
onClick: handleClick,
|
|
7532
7901
|
...rest,
|
|
7533
|
-
children: /* @__PURE__ */
|
|
7534
|
-
/* @__PURE__ */
|
|
7535
|
-
isSub && showSubIndent ? /* @__PURE__ */
|
|
7536
|
-
shouldShowSubDot ? /* @__PURE__ */
|
|
7902
|
+
children: /* @__PURE__ */ jsxs47("span", { className: cn("stn-side-nav-item__inner", spreadTrail && "spread"), children: [
|
|
7903
|
+
/* @__PURE__ */ jsxs47("span", { className: "stn-side-nav-item__lead", children: [
|
|
7904
|
+
isSub && showSubIndent ? /* @__PURE__ */ jsx59("span", { className: "stn-side-nav-item__sub-indent", "aria-hidden": "true" }) : null,
|
|
7905
|
+
shouldShowSubDot ? /* @__PURE__ */ jsx59(
|
|
7537
7906
|
"span",
|
|
7538
7907
|
{
|
|
7539
7908
|
className: cn(
|
|
@@ -7541,14 +7910,14 @@ var StnSideNavItem = forwardRef27(function StnSideNavItem2({
|
|
|
7541
7910
|
hasIcon && iconPosition === "left" && "compact"
|
|
7542
7911
|
),
|
|
7543
7912
|
"aria-hidden": "true",
|
|
7544
|
-
children: /* @__PURE__ */
|
|
7913
|
+
children: /* @__PURE__ */ jsx59("span", { className: "stn-side-nav-item__sub-dot-glyph", style: maskStyle2(STN_NAV_MENU_SUB_ICON) })
|
|
7545
7914
|
}
|
|
7546
7915
|
) : null,
|
|
7547
7916
|
iconPosition === "left" ? activeIconElement : null,
|
|
7548
|
-
/* @__PURE__ */
|
|
7917
|
+
/* @__PURE__ */ jsx59("span", { className: "stn-side-nav-item__label", children: label })
|
|
7549
7918
|
] }),
|
|
7550
7919
|
iconPosition === "right" ? activeIconElement : null,
|
|
7551
|
-
renderBadge ? typeof badge === "string" || typeof badge === "number" ? /* @__PURE__ */
|
|
7920
|
+
renderBadge ? typeof badge === "string" || typeof badge === "number" ? /* @__PURE__ */ jsx59(
|
|
7552
7921
|
StnBadge,
|
|
7553
7922
|
{
|
|
7554
7923
|
badgeContent: badge,
|
|
@@ -7556,7 +7925,7 @@ var StnSideNavItem = forwardRef27(function StnSideNavItem2({
|
|
|
7556
7925
|
appearance: "subtle",
|
|
7557
7926
|
className: "stn-side-nav-item__badge"
|
|
7558
7927
|
}
|
|
7559
|
-
) : badge ? /* @__PURE__ */
|
|
7928
|
+
) : badge ? /* @__PURE__ */ jsx59("span", { className: "stn-side-nav-item__badge", children: badge }) : showBadgeDot ? /* @__PURE__ */ jsx59(
|
|
7560
7929
|
StnBadge,
|
|
7561
7930
|
{
|
|
7562
7931
|
variant: "dot",
|
|
@@ -7564,7 +7933,7 @@ var StnSideNavItem = forwardRef27(function StnSideNavItem2({
|
|
|
7564
7933
|
className: "stn-side-nav-item__badge"
|
|
7565
7934
|
}
|
|
7566
7935
|
) : null : null,
|
|
7567
|
-
!isSub && showChevron && !collapsed ? /* @__PURE__ */
|
|
7936
|
+
!isSub && showChevron && !collapsed ? /* @__PURE__ */ jsx59(
|
|
7568
7937
|
"span",
|
|
7569
7938
|
{
|
|
7570
7939
|
className: cn(
|
|
@@ -7581,15 +7950,15 @@ var StnSideNavItem = forwardRef27(function StnSideNavItem2({
|
|
|
7581
7950
|
});
|
|
7582
7951
|
|
|
7583
7952
|
// src/components/sideNav/StnSideNavHeader.tsx
|
|
7584
|
-
import { forwardRef as
|
|
7953
|
+
import { forwardRef as forwardRef32 } from "react";
|
|
7585
7954
|
|
|
7586
7955
|
// src/components/sideNav/StnSideNavLogo.tsx
|
|
7587
|
-
import { forwardRef as
|
|
7588
|
-
import { jsx as
|
|
7589
|
-
var StnSideNavLogo =
|
|
7956
|
+
import { forwardRef as forwardRef31 } from "react";
|
|
7957
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
7958
|
+
var StnSideNavLogo = forwardRef31(
|
|
7590
7959
|
function StnSideNavLogo2({ className, logoProps, ...rest }, ref) {
|
|
7591
7960
|
const { collapsed } = useSideNav();
|
|
7592
|
-
return /* @__PURE__ */
|
|
7961
|
+
return /* @__PURE__ */ jsx60(
|
|
7593
7962
|
"div",
|
|
7594
7963
|
{
|
|
7595
7964
|
ref,
|
|
@@ -7600,7 +7969,7 @@ var StnSideNavLogo = forwardRef28(
|
|
|
7600
7969
|
),
|
|
7601
7970
|
title: "InfoMap",
|
|
7602
7971
|
...rest,
|
|
7603
|
-
children: /* @__PURE__ */
|
|
7972
|
+
children: /* @__PURE__ */ jsx60(
|
|
7604
7973
|
StnLogo,
|
|
7605
7974
|
{
|
|
7606
7975
|
variant: collapsed ? "onlyimg" : "horizontal",
|
|
@@ -7614,8 +7983,8 @@ var StnSideNavLogo = forwardRef28(
|
|
|
7614
7983
|
);
|
|
7615
7984
|
|
|
7616
7985
|
// src/components/sideNav/StnSideNavHeader.tsx
|
|
7617
|
-
import { Fragment as Fragment7, jsx as
|
|
7618
|
-
var StnSideNavHeader =
|
|
7986
|
+
import { Fragment as Fragment7, jsx as jsx61, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
7987
|
+
var StnSideNavHeader = forwardRef32(function StnSideNavHeader2({
|
|
7619
7988
|
children,
|
|
7620
7989
|
border = false,
|
|
7621
7990
|
hasBorder = false,
|
|
@@ -7627,7 +7996,7 @@ var StnSideNavHeader = forwardRef29(function StnSideNavHeader2({
|
|
|
7627
7996
|
const { collapsed, onToggleCollapse, isDrawer, setMobileOpen } = useSideNav();
|
|
7628
7997
|
const withBorder = Boolean(border || hasBorder);
|
|
7629
7998
|
const shouldShowClose = showClose ?? Boolean(isDrawer);
|
|
7630
|
-
return /* @__PURE__ */
|
|
7999
|
+
return /* @__PURE__ */ jsx61(
|
|
7631
8000
|
"div",
|
|
7632
8001
|
{
|
|
7633
8002
|
ref,
|
|
@@ -7638,9 +8007,9 @@ var StnSideNavHeader = forwardRef29(function StnSideNavHeader2({
|
|
|
7638
8007
|
className
|
|
7639
8008
|
),
|
|
7640
8009
|
...rest,
|
|
7641
|
-
children: children ?? /* @__PURE__ */
|
|
7642
|
-
/* @__PURE__ */
|
|
7643
|
-
shouldShowClose ? /* @__PURE__ */
|
|
8010
|
+
children: children ?? /* @__PURE__ */ jsxs48(Fragment7, { children: [
|
|
8011
|
+
/* @__PURE__ */ jsx61(StnSideNavLogo, {}),
|
|
8012
|
+
shouldShowClose ? /* @__PURE__ */ jsx61(
|
|
7644
8013
|
StnButton,
|
|
7645
8014
|
{
|
|
7646
8015
|
size: "sm",
|
|
@@ -7652,7 +8021,7 @@ var StnSideNavHeader = forwardRef29(function StnSideNavHeader2({
|
|
|
7652
8021
|
className: "stn-side-nav__collapse-btn",
|
|
7653
8022
|
onClick: () => setMobileOpen?.(false)
|
|
7654
8023
|
}
|
|
7655
|
-
) : showToggle ? /* @__PURE__ */
|
|
8024
|
+
) : showToggle ? /* @__PURE__ */ jsx61(
|
|
7656
8025
|
StnButton,
|
|
7657
8026
|
{
|
|
7658
8027
|
size: "sm",
|
|
@@ -7671,16 +8040,16 @@ var StnSideNavHeader = forwardRef29(function StnSideNavHeader2({
|
|
|
7671
8040
|
});
|
|
7672
8041
|
|
|
7673
8042
|
// src/components/sideNav/StnSideNavMenu.tsx
|
|
7674
|
-
import { forwardRef as
|
|
7675
|
-
import { jsx as
|
|
7676
|
-
var StnSideNavMenu =
|
|
8043
|
+
import { forwardRef as forwardRef33 } from "react";
|
|
8044
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
8045
|
+
var StnSideNavMenu = forwardRef33(function StnSideNavMenu2({
|
|
7677
8046
|
children,
|
|
7678
8047
|
className,
|
|
7679
8048
|
scrollSize = "thin",
|
|
7680
8049
|
scrollColor = "fade",
|
|
7681
8050
|
...rest
|
|
7682
8051
|
}, ref) {
|
|
7683
|
-
return /* @__PURE__ */
|
|
8052
|
+
return /* @__PURE__ */ jsx62(
|
|
7684
8053
|
"nav",
|
|
7685
8054
|
{
|
|
7686
8055
|
ref,
|
|
@@ -7701,13 +8070,13 @@ var StnSideNavMenu = forwardRef30(function StnSideNavMenu2({
|
|
|
7701
8070
|
|
|
7702
8071
|
// src/components/sideNav/StnSideNavGroup.tsx
|
|
7703
8072
|
import {
|
|
7704
|
-
forwardRef as
|
|
7705
|
-
useEffect as
|
|
7706
|
-
useRef as
|
|
7707
|
-
useState as
|
|
8073
|
+
forwardRef as forwardRef34,
|
|
8074
|
+
useEffect as useEffect11,
|
|
8075
|
+
useRef as useRef8,
|
|
8076
|
+
useState as useState17
|
|
7708
8077
|
} from "react";
|
|
7709
|
-
import { jsx as
|
|
7710
|
-
var StnSideNavGroup =
|
|
8078
|
+
import { jsx as jsx63, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
8079
|
+
var StnSideNavGroup = forwardRef34(function StnSideNavGroup2({
|
|
7711
8080
|
label,
|
|
7712
8081
|
parent,
|
|
7713
8082
|
direction = "down",
|
|
@@ -7723,13 +8092,13 @@ var StnSideNavGroup = forwardRef31(function StnSideNavGroup2({
|
|
|
7723
8092
|
...rest
|
|
7724
8093
|
}, ref) {
|
|
7725
8094
|
const { collapsed } = useSideNav();
|
|
7726
|
-
const [internalOpen, setInternalOpen] =
|
|
8095
|
+
const [internalOpen, setInternalOpen] = useState17(defaultOpen);
|
|
7727
8096
|
const isOpen = openProp ?? internalOpen;
|
|
7728
8097
|
const isDropdown = Boolean(dropdown || variant === "dropdown");
|
|
7729
8098
|
const isTransparent = dropdownVariant === "transparent" || dropdownBackground === false;
|
|
7730
8099
|
const isUp = direction === "up";
|
|
7731
|
-
const groupRef =
|
|
7732
|
-
|
|
8100
|
+
const groupRef = useRef8(null);
|
|
8101
|
+
useEffect11(() => {
|
|
7733
8102
|
if (!isDropdown || !isOpen) return;
|
|
7734
8103
|
const handlePointerDown = (e) => {
|
|
7735
8104
|
if (groupRef.current && !groupRef.current.contains(e.target)) {
|
|
@@ -7751,7 +8120,7 @@ var StnSideNavGroup = forwardRef31(function StnSideNavGroup2({
|
|
|
7751
8120
|
}
|
|
7752
8121
|
onOpenChange?.(next);
|
|
7753
8122
|
};
|
|
7754
|
-
const subnavNode = children && (!collapsed && isOpen) ? /* @__PURE__ */
|
|
8123
|
+
const subnavNode = children && (!collapsed && isOpen) ? /* @__PURE__ */ jsx63(
|
|
7755
8124
|
"div",
|
|
7756
8125
|
{
|
|
7757
8126
|
className: cn(
|
|
@@ -7766,7 +8135,7 @@ var StnSideNavGroup = forwardRef31(function StnSideNavGroup2({
|
|
|
7766
8135
|
children
|
|
7767
8136
|
}
|
|
7768
8137
|
) : null;
|
|
7769
|
-
return /* @__PURE__ */
|
|
8138
|
+
return /* @__PURE__ */ jsxs49(
|
|
7770
8139
|
"div",
|
|
7771
8140
|
{
|
|
7772
8141
|
ref: (node) => {
|
|
@@ -7787,7 +8156,7 @@ var StnSideNavGroup = forwardRef31(function StnSideNavGroup2({
|
|
|
7787
8156
|
"aria-label": typeof label === "string" ? label : void 0,
|
|
7788
8157
|
...rest,
|
|
7789
8158
|
children: [
|
|
7790
|
-
label && !collapsed ? /* @__PURE__ */
|
|
8159
|
+
label && !collapsed ? /* @__PURE__ */ jsx63("span", { className: "stn-side-nav__group-label", onClick: handleToggle, children: label }) : null,
|
|
7791
8160
|
isUp ? subnavNode : null,
|
|
7792
8161
|
parent,
|
|
7793
8162
|
!isUp ? subnavNode : null
|
|
@@ -7797,10 +8166,10 @@ var StnSideNavGroup = forwardRef31(function StnSideNavGroup2({
|
|
|
7797
8166
|
});
|
|
7798
8167
|
|
|
7799
8168
|
// src/components/sideNav/StnSideNavSpacer.tsx
|
|
7800
|
-
import { forwardRef as
|
|
7801
|
-
import { jsx as
|
|
7802
|
-
var StnSideNavSpacer =
|
|
7803
|
-
return /* @__PURE__ */
|
|
8169
|
+
import { forwardRef as forwardRef35 } from "react";
|
|
8170
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
8171
|
+
var StnSideNavSpacer = forwardRef35(function StnSideNavSpacer2({ className, style, ...rest }, ref) {
|
|
8172
|
+
return /* @__PURE__ */ jsx64(
|
|
7804
8173
|
"div",
|
|
7805
8174
|
{
|
|
7806
8175
|
ref,
|
|
@@ -7813,10 +8182,10 @@ var StnSideNavSpacer = forwardRef32(function StnSideNavSpacer2({ className, styl
|
|
|
7813
8182
|
});
|
|
7814
8183
|
|
|
7815
8184
|
// src/components/sideNav/StnSideNavFooter.tsx
|
|
7816
|
-
import { forwardRef as
|
|
7817
|
-
import { jsx as
|
|
7818
|
-
var StnSideNavFooter =
|
|
7819
|
-
return /* @__PURE__ */
|
|
8185
|
+
import { forwardRef as forwardRef36 } from "react";
|
|
8186
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
8187
|
+
var StnSideNavFooter = forwardRef36(function StnSideNavFooter2({ curved = false, children, className, ...rest }, ref) {
|
|
8188
|
+
return /* @__PURE__ */ jsx65(
|
|
7820
8189
|
"nav",
|
|
7821
8190
|
{
|
|
7822
8191
|
ref,
|
|
@@ -7829,12 +8198,12 @@ var StnSideNavFooter = forwardRef33(function StnSideNavFooter2({ curved = false,
|
|
|
7829
8198
|
});
|
|
7830
8199
|
|
|
7831
8200
|
// src/components/sideNav/StnSideNavToggle.tsx
|
|
7832
|
-
import { forwardRef as
|
|
7833
|
-
import { jsx as
|
|
7834
|
-
var StnSideNavToggle =
|
|
8201
|
+
import { forwardRef as forwardRef37 } from "react";
|
|
8202
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
8203
|
+
var StnSideNavToggle = forwardRef37(
|
|
7835
8204
|
function StnSideNavToggle2({ className, onClick, ...rest }, ref) {
|
|
7836
8205
|
const { collapsed, onToggleCollapse } = useSideNav();
|
|
7837
|
-
return /* @__PURE__ */
|
|
8206
|
+
return /* @__PURE__ */ jsx66(
|
|
7838
8207
|
"button",
|
|
7839
8208
|
{
|
|
7840
8209
|
ref,
|
|
@@ -7847,7 +8216,7 @@ var StnSideNavToggle = forwardRef34(
|
|
|
7847
8216
|
"aria-label": collapsed ? "\uC0AC\uC774\uB4DC\uBC14 \uD3BC\uCE58\uAE30" : "\uC0AC\uC774\uB4DC\uBC14 \uC811\uAE30",
|
|
7848
8217
|
title: collapsed ? "\uC0AC\uC774\uB4DC\uBC14 \uD3BC\uCE58\uAE30" : "\uC0AC\uC774\uB4DC\uBC14 \uC811\uAE30",
|
|
7849
8218
|
...rest,
|
|
7850
|
-
children: /* @__PURE__ */
|
|
8219
|
+
children: /* @__PURE__ */ jsx66(
|
|
7851
8220
|
"svg",
|
|
7852
8221
|
{
|
|
7853
8222
|
width: "12",
|
|
@@ -7858,7 +8227,7 @@ var StnSideNavToggle = forwardRef34(
|
|
|
7858
8227
|
strokeWidth: "2.5",
|
|
7859
8228
|
strokeLinecap: "round",
|
|
7860
8229
|
strokeLinejoin: "round",
|
|
7861
|
-
children: /* @__PURE__ */
|
|
8230
|
+
children: /* @__PURE__ */ jsx66("path", { d: "M9 18l6-6-6-6" })
|
|
7862
8231
|
}
|
|
7863
8232
|
)
|
|
7864
8233
|
}
|
|
@@ -7867,30 +8236,30 @@ var StnSideNavToggle = forwardRef34(
|
|
|
7867
8236
|
);
|
|
7868
8237
|
|
|
7869
8238
|
// src/components/sideNav/StnSideNavWatermark.tsx
|
|
7870
|
-
import { forwardRef as
|
|
7871
|
-
import { jsx as
|
|
7872
|
-
var StnSideNavWatermark =
|
|
8239
|
+
import { forwardRef as forwardRef38 } from "react";
|
|
8240
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
8241
|
+
var StnSideNavWatermark = forwardRef38(
|
|
7873
8242
|
function StnSideNavWatermark2({ size = "xl", theme, className, ...rest }, ref) {
|
|
7874
|
-
return /* @__PURE__ */
|
|
8243
|
+
return /* @__PURE__ */ jsx67(
|
|
7875
8244
|
"div",
|
|
7876
8245
|
{
|
|
7877
8246
|
ref,
|
|
7878
8247
|
className: cn("stn-side-nav__watermark", className),
|
|
7879
8248
|
"aria-hidden": "true",
|
|
7880
8249
|
...rest,
|
|
7881
|
-
children: /* @__PURE__ */
|
|
8250
|
+
children: /* @__PURE__ */ jsx67(StnLogo, { variant: "watermark", size, theme })
|
|
7882
8251
|
}
|
|
7883
8252
|
);
|
|
7884
8253
|
}
|
|
7885
8254
|
);
|
|
7886
8255
|
|
|
7887
8256
|
// src/components/sideNav/StnSideNavMobileTrigger.tsx
|
|
7888
|
-
import { forwardRef as
|
|
7889
|
-
import { jsx as
|
|
7890
|
-
var StnSideNavMobileTrigger =
|
|
8257
|
+
import { forwardRef as forwardRef39 } from "react";
|
|
8258
|
+
import { jsx as jsx68, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
8259
|
+
var StnSideNavMobileTrigger = forwardRef39(
|
|
7891
8260
|
function StnSideNavMobileTrigger2({ floating = false, className, children, onClick, ...rest }, ref) {
|
|
7892
8261
|
const { onToggleMobileOpen, mobileOpen } = useSideNav();
|
|
7893
|
-
return /* @__PURE__ */
|
|
8262
|
+
return /* @__PURE__ */ jsx68(
|
|
7894
8263
|
"button",
|
|
7895
8264
|
{
|
|
7896
8265
|
ref,
|
|
@@ -7908,10 +8277,10 @@ var StnSideNavMobileTrigger = forwardRef36(
|
|
|
7908
8277
|
onToggleMobileOpen?.();
|
|
7909
8278
|
},
|
|
7910
8279
|
...rest,
|
|
7911
|
-
children: children ?? /* @__PURE__ */
|
|
7912
|
-
/* @__PURE__ */
|
|
7913
|
-
/* @__PURE__ */
|
|
7914
|
-
/* @__PURE__ */
|
|
8280
|
+
children: children ?? /* @__PURE__ */ jsxs50("span", { className: "stn-side-nav__hamburger-bars", "aria-hidden": "true", children: [
|
|
8281
|
+
/* @__PURE__ */ jsx68("span", {}),
|
|
8282
|
+
/* @__PURE__ */ jsx68("span", {}),
|
|
8283
|
+
/* @__PURE__ */ jsx68("span", {})
|
|
7915
8284
|
] })
|
|
7916
8285
|
}
|
|
7917
8286
|
);
|
|
@@ -7920,12 +8289,12 @@ var StnSideNavMobileTrigger = forwardRef36(
|
|
|
7920
8289
|
|
|
7921
8290
|
// src/components/sideNav/StnSideNavSub.tsx
|
|
7922
8291
|
import {
|
|
7923
|
-
forwardRef as
|
|
8292
|
+
forwardRef as forwardRef40
|
|
7924
8293
|
} from "react";
|
|
7925
|
-
import { jsx as
|
|
7926
|
-
var StnSideNavSub =
|
|
8294
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
8295
|
+
var StnSideNavSub = forwardRef40(
|
|
7927
8296
|
function StnSideNavSub2({ children, className, ...rest }, ref) {
|
|
7928
|
-
return /* @__PURE__ */
|
|
8297
|
+
return /* @__PURE__ */ jsx69(
|
|
7929
8298
|
"div",
|
|
7930
8299
|
{
|
|
7931
8300
|
ref,
|
|
@@ -7938,7 +8307,7 @@ var StnSideNavSub = forwardRef37(
|
|
|
7938
8307
|
);
|
|
7939
8308
|
}
|
|
7940
8309
|
);
|
|
7941
|
-
var StnSideNavSubItem =
|
|
8310
|
+
var StnSideNavSubItem = forwardRef40(
|
|
7942
8311
|
function StnSideNavSubItem2({
|
|
7943
8312
|
variant = "ghost",
|
|
7944
8313
|
size = "md",
|
|
@@ -7954,14 +8323,14 @@ var StnSideNavSubItem = forwardRef37(
|
|
|
7954
8323
|
const { collapsed } = useSideNav();
|
|
7955
8324
|
const content = children ?? label;
|
|
7956
8325
|
const computedTitle = title ?? (typeof content === "string" ? content : void 0);
|
|
7957
|
-
const resolvedIcon = icon ?? (iconSrc ? /* @__PURE__ */
|
|
8326
|
+
const resolvedIcon = icon ?? (iconSrc ? /* @__PURE__ */ jsx69("span", { className: "stn-side-nav__sub-icon", children: /* @__PURE__ */ jsx69(
|
|
7958
8327
|
"span",
|
|
7959
8328
|
{
|
|
7960
8329
|
className: "stn-side-nav__sub-glyph",
|
|
7961
8330
|
style: { maskImage: `url('${iconSrc}')`, WebkitMaskImage: `url('${iconSrc}')` }
|
|
7962
8331
|
}
|
|
7963
8332
|
) }) : null);
|
|
7964
|
-
return /* @__PURE__ */
|
|
8333
|
+
return /* @__PURE__ */ jsx69(
|
|
7965
8334
|
StnButton,
|
|
7966
8335
|
{
|
|
7967
8336
|
ref,
|
|
@@ -7980,9 +8349,9 @@ var StnSideNavSubItem = forwardRef37(
|
|
|
7980
8349
|
);
|
|
7981
8350
|
|
|
7982
8351
|
// src/components/sideNav/StnSideNavSubNav.tsx
|
|
7983
|
-
import { forwardRef as
|
|
7984
|
-
import { jsx as
|
|
7985
|
-
var StnSideNavSubNav =
|
|
8352
|
+
import { forwardRef as forwardRef41 } from "react";
|
|
8353
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
8354
|
+
var StnSideNavSubNav = forwardRef41(
|
|
7986
8355
|
function StnSideNavSubNav2({
|
|
7987
8356
|
dropdown = false,
|
|
7988
8357
|
direction = "down",
|
|
@@ -7994,7 +8363,7 @@ var StnSideNavSubNav = forwardRef38(
|
|
|
7994
8363
|
}, ref) {
|
|
7995
8364
|
const isUp = direction === "up";
|
|
7996
8365
|
const isTransparent = variant === "transparent" || background === false;
|
|
7997
|
-
return /* @__PURE__ */
|
|
8366
|
+
return /* @__PURE__ */ jsx70(
|
|
7998
8367
|
"div",
|
|
7999
8368
|
{
|
|
8000
8369
|
ref,
|
|
@@ -8017,17 +8386,17 @@ var StnSideNavSubNav = forwardRef38(
|
|
|
8017
8386
|
|
|
8018
8387
|
// src/patterns/sideNav/StnSideNavigation.tsx
|
|
8019
8388
|
import {
|
|
8020
|
-
forwardRef as
|
|
8021
|
-
useCallback as
|
|
8389
|
+
forwardRef as forwardRef42,
|
|
8390
|
+
useCallback as useCallback9,
|
|
8022
8391
|
useMemo as useMemo4,
|
|
8023
|
-
useState as
|
|
8392
|
+
useState as useState18
|
|
8024
8393
|
} from "react";
|
|
8025
|
-
import { jsx as
|
|
8394
|
+
import { jsx as jsx71, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
8026
8395
|
function useControllableState(controlledValue, defaultValue, onChange) {
|
|
8027
|
-
const [internalState, setInternalState] =
|
|
8396
|
+
const [internalState, setInternalState] = useState18(defaultValue);
|
|
8028
8397
|
const isControlled = controlledValue !== void 0;
|
|
8029
8398
|
const value = isControlled ? controlledValue : internalState;
|
|
8030
|
-
const setValue =
|
|
8399
|
+
const setValue = useCallback9(
|
|
8031
8400
|
(next) => {
|
|
8032
8401
|
if (!isControlled) {
|
|
8033
8402
|
setInternalState(next);
|
|
@@ -8038,7 +8407,7 @@ function useControllableState(controlledValue, defaultValue, onChange) {
|
|
|
8038
8407
|
);
|
|
8039
8408
|
return [value, setValue];
|
|
8040
8409
|
}
|
|
8041
|
-
var StnSideNavigationRoot =
|
|
8410
|
+
var StnSideNavigationRoot = forwardRef42(function StnSideNavigationRoot2({
|
|
8042
8411
|
variant: variantProp,
|
|
8043
8412
|
appearance,
|
|
8044
8413
|
drawerVariant: drawerVariantProp,
|
|
@@ -8076,10 +8445,10 @@ var StnSideNavigationRoot = forwardRef39(function StnSideNavigationRoot2({
|
|
|
8076
8445
|
defaultMobileOpen,
|
|
8077
8446
|
onMobileOpenChange
|
|
8078
8447
|
);
|
|
8079
|
-
const handleToggleCollapse =
|
|
8448
|
+
const handleToggleCollapse = useCallback9(() => {
|
|
8080
8449
|
setCollapsed(!collapsed);
|
|
8081
8450
|
}, [collapsed, setCollapsed]);
|
|
8082
|
-
const handleToggleMobileOpen =
|
|
8451
|
+
const handleToggleMobileOpen = useCallback9(() => {
|
|
8083
8452
|
setMobileOpen(!mobileOpen);
|
|
8084
8453
|
}, [mobileOpen, setMobileOpen]);
|
|
8085
8454
|
const isDrawerMode = Boolean(drawer || responsiveDrawer && mobileOpen);
|
|
@@ -8099,9 +8468,9 @@ var StnSideNavigationRoot = forwardRef39(function StnSideNavigationRoot2({
|
|
|
8099
8468
|
}),
|
|
8100
8469
|
[isEffectiveCollapsed, activeId, setActiveId, handleToggleCollapse, mobileOpen, handleToggleMobileOpen, setMobileOpen, isDrawerMode]
|
|
8101
8470
|
);
|
|
8102
|
-
return /* @__PURE__ */
|
|
8103
|
-
showMobileTrigger && /* @__PURE__ */
|
|
8104
|
-
(drawer || responsiveDrawer) && /* @__PURE__ */
|
|
8471
|
+
return /* @__PURE__ */ jsxs51(SideNavContext.Provider, { value: contextValue, children: [
|
|
8472
|
+
showMobileTrigger && /* @__PURE__ */ jsx71(StnSideNavMobileTrigger, { floating: true }),
|
|
8473
|
+
(drawer || responsiveDrawer) && /* @__PURE__ */ jsx71(
|
|
8105
8474
|
"div",
|
|
8106
8475
|
{
|
|
8107
8476
|
className: cn("stn-side-nav__backdrop", mobileOpen && "is-open"),
|
|
@@ -8109,7 +8478,7 @@ var StnSideNavigationRoot = forwardRef39(function StnSideNavigationRoot2({
|
|
|
8109
8478
|
"aria-hidden": !mobileOpen
|
|
8110
8479
|
}
|
|
8111
8480
|
),
|
|
8112
|
-
/* @__PURE__ */
|
|
8481
|
+
/* @__PURE__ */ jsx71(
|
|
8113
8482
|
"aside",
|
|
8114
8483
|
{
|
|
8115
8484
|
ref,
|
|
@@ -8150,15 +8519,15 @@ var StnSideNavigation = Object.assign(StnSideNavigationRoot, {
|
|
|
8150
8519
|
// src/components/StnBreadcrumb.tsx
|
|
8151
8520
|
import {
|
|
8152
8521
|
Fragment as Fragment8,
|
|
8153
|
-
useEffect as
|
|
8522
|
+
useEffect as useEffect12,
|
|
8154
8523
|
useId as useId16,
|
|
8155
|
-
useRef as
|
|
8156
|
-
useState as
|
|
8524
|
+
useRef as useRef9,
|
|
8525
|
+
useState as useState19
|
|
8157
8526
|
} from "react";
|
|
8158
8527
|
import {
|
|
8159
8528
|
STN_BREADCRUMB_ICON_SRC
|
|
8160
8529
|
} from "@stn-uiux/pub-ui/data/stnBreadcrumb";
|
|
8161
|
-
import { Fragment as Fragment9, jsx as
|
|
8530
|
+
import { Fragment as Fragment9, jsx as jsx72, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
8162
8531
|
function maskStyle3(src) {
|
|
8163
8532
|
return { maskImage: `url('${src}')`, WebkitMaskImage: `url('${src}')` };
|
|
8164
8533
|
}
|
|
@@ -8171,13 +8540,13 @@ function hasSegmentMenu(item) {
|
|
|
8171
8540
|
return Boolean(item.menu || item.menuItems && item.menuItems.length > 0);
|
|
8172
8541
|
}
|
|
8173
8542
|
function BreadcrumbSeparator() {
|
|
8174
|
-
return /* @__PURE__ */
|
|
8543
|
+
return /* @__PURE__ */ jsx72("li", { className: "separator", "aria-hidden": "true", children: /* @__PURE__ */ jsx72("span", { style: maskStyle3(STN_BREADCRUMB_ICON_SRC.separator) }) });
|
|
8175
8544
|
}
|
|
8176
8545
|
function BreadcrumbIcon({ src }) {
|
|
8177
|
-
return /* @__PURE__ */
|
|
8546
|
+
return /* @__PURE__ */ jsx72("span", { className: "stn-breadcrumb__icon-glyph", style: maskStyle3(src), "aria-hidden": "true" });
|
|
8178
8547
|
}
|
|
8179
8548
|
function BreadcrumbCaret() {
|
|
8180
|
-
return /* @__PURE__ */
|
|
8549
|
+
return /* @__PURE__ */ jsx72(
|
|
8181
8550
|
"span",
|
|
8182
8551
|
{
|
|
8183
8552
|
className: "stn-breadcrumb__caret",
|
|
@@ -8191,10 +8560,10 @@ function SegmentContent({
|
|
|
8191
8560
|
label,
|
|
8192
8561
|
menu
|
|
8193
8562
|
}) {
|
|
8194
|
-
return /* @__PURE__ */
|
|
8195
|
-
iconSrc ? /* @__PURE__ */
|
|
8196
|
-
/* @__PURE__ */
|
|
8197
|
-
menu ? /* @__PURE__ */
|
|
8563
|
+
return /* @__PURE__ */ jsxs52(Fragment9, { children: [
|
|
8564
|
+
iconSrc ? /* @__PURE__ */ jsx72(BreadcrumbIcon, { src: iconSrc }) : null,
|
|
8565
|
+
/* @__PURE__ */ jsx72("span", { className: "stn-breadcrumb__label", children: label }),
|
|
8566
|
+
menu ? /* @__PURE__ */ jsx72(BreadcrumbCaret, {}) : null
|
|
8198
8567
|
] });
|
|
8199
8568
|
}
|
|
8200
8569
|
function BreadcrumbMenuList({
|
|
@@ -8202,7 +8571,7 @@ function BreadcrumbMenuList({
|
|
|
8202
8571
|
items,
|
|
8203
8572
|
onPick
|
|
8204
8573
|
}) {
|
|
8205
|
-
return /* @__PURE__ */
|
|
8574
|
+
return /* @__PURE__ */ jsx72("ul", { id, className: "stn-breadcrumb__menu", role: "menu", children: items.map((option) => /* @__PURE__ */ jsx72("li", { role: "none", children: option.href ? /* @__PURE__ */ jsx72(
|
|
8206
8575
|
"a",
|
|
8207
8576
|
{
|
|
8208
8577
|
role: "menuitem",
|
|
@@ -8214,7 +8583,7 @@ function BreadcrumbMenuList({
|
|
|
8214
8583
|
},
|
|
8215
8584
|
children: option.label
|
|
8216
8585
|
}
|
|
8217
|
-
) : /* @__PURE__ */
|
|
8586
|
+
) : /* @__PURE__ */ jsx72(
|
|
8218
8587
|
"button",
|
|
8219
8588
|
{
|
|
8220
8589
|
type: "button",
|
|
@@ -8229,8 +8598,8 @@ function BreadcrumbMenuList({
|
|
|
8229
8598
|
) }, option.id)) });
|
|
8230
8599
|
}
|
|
8231
8600
|
function useDismissibleMenu(open, onClose) {
|
|
8232
|
-
const rootRef =
|
|
8233
|
-
|
|
8601
|
+
const rootRef = useRef9(null);
|
|
8602
|
+
useEffect12(() => {
|
|
8234
8603
|
if (!open) return;
|
|
8235
8604
|
const onPointerDown = (event) => {
|
|
8236
8605
|
if (!rootRef.current?.contains(event.target)) onClose();
|
|
@@ -8252,19 +8621,19 @@ function BreadcrumbSegment({
|
|
|
8252
8621
|
isCurrent
|
|
8253
8622
|
}) {
|
|
8254
8623
|
const menuId = useId16();
|
|
8255
|
-
const [open, setOpen] =
|
|
8624
|
+
const [open, setOpen] = useState19(false);
|
|
8256
8625
|
const menuItems = item.menuItems ?? [];
|
|
8257
8626
|
const showMenu = hasSegmentMenu(item) && !isCurrent;
|
|
8258
8627
|
const canOpenMenu = showMenu && menuItems.length > 0;
|
|
8259
8628
|
const rootRef = useDismissibleMenu(open, () => setOpen(false));
|
|
8260
8629
|
const iconSrc = resolveIconSrc(item);
|
|
8261
|
-
const content = /* @__PURE__ */
|
|
8630
|
+
const content = /* @__PURE__ */ jsx72(SegmentContent, { iconSrc, label: item.label, menu: showMenu });
|
|
8262
8631
|
if (isCurrent) {
|
|
8263
|
-
return /* @__PURE__ */
|
|
8632
|
+
return /* @__PURE__ */ jsx72("span", { className: "stn-breadcrumb__segment", "aria-current": "page", "aria-label": item.label, children: content });
|
|
8264
8633
|
}
|
|
8265
8634
|
if (canOpenMenu) {
|
|
8266
|
-
return /* @__PURE__ */
|
|
8267
|
-
/* @__PURE__ */
|
|
8635
|
+
return /* @__PURE__ */ jsxs52("span", { ref: rootRef, className: "stn-breadcrumb__segment-wrap", children: [
|
|
8636
|
+
/* @__PURE__ */ jsx72(
|
|
8268
8637
|
"button",
|
|
8269
8638
|
{
|
|
8270
8639
|
type: "button",
|
|
@@ -8280,7 +8649,7 @@ function BreadcrumbSegment({
|
|
|
8280
8649
|
children: content
|
|
8281
8650
|
}
|
|
8282
8651
|
),
|
|
8283
|
-
open ? /* @__PURE__ */
|
|
8652
|
+
open ? /* @__PURE__ */ jsx72(BreadcrumbMenuList, { id: menuId, items: menuItems, onPick: () => setOpen(false) }) : null
|
|
8284
8653
|
] });
|
|
8285
8654
|
}
|
|
8286
8655
|
if (item.menu || item.onClick) {
|
|
@@ -8292,7 +8661,7 @@ function BreadcrumbSegment({
|
|
|
8292
8661
|
"aria-haspopup": item.menu ? "menu" : void 0,
|
|
8293
8662
|
"aria-expanded": item.menu ? false : void 0
|
|
8294
8663
|
};
|
|
8295
|
-
return /* @__PURE__ */
|
|
8664
|
+
return /* @__PURE__ */ jsx72("button", { ...buttonProps, children: content });
|
|
8296
8665
|
}
|
|
8297
8666
|
if (item.href) {
|
|
8298
8667
|
const linkProps = {
|
|
@@ -8301,17 +8670,17 @@ function BreadcrumbSegment({
|
|
|
8301
8670
|
onClick: item.onClick,
|
|
8302
8671
|
"aria-label": item.label
|
|
8303
8672
|
};
|
|
8304
|
-
return /* @__PURE__ */
|
|
8673
|
+
return /* @__PURE__ */ jsx72("a", { ...linkProps, children: content });
|
|
8305
8674
|
}
|
|
8306
|
-
return /* @__PURE__ */
|
|
8675
|
+
return /* @__PURE__ */ jsx72("span", { className: "stn-breadcrumb__segment", "aria-label": item.label, children: content });
|
|
8307
8676
|
}
|
|
8308
8677
|
function BreadcrumbBack({
|
|
8309
8678
|
label,
|
|
8310
8679
|
href,
|
|
8311
8680
|
onClick
|
|
8312
8681
|
}) {
|
|
8313
|
-
const content = /* @__PURE__ */
|
|
8314
|
-
/* @__PURE__ */
|
|
8682
|
+
const content = /* @__PURE__ */ jsxs52(Fragment9, { children: [
|
|
8683
|
+
/* @__PURE__ */ jsx72(
|
|
8315
8684
|
"span",
|
|
8316
8685
|
{
|
|
8317
8686
|
className: "stn-breadcrumb__back-glyph",
|
|
@@ -8319,12 +8688,12 @@ function BreadcrumbBack({
|
|
|
8319
8688
|
"aria-hidden": "true"
|
|
8320
8689
|
}
|
|
8321
8690
|
),
|
|
8322
|
-
/* @__PURE__ */
|
|
8691
|
+
/* @__PURE__ */ jsx72("span", { className: "stn-breadcrumb__label", children: label })
|
|
8323
8692
|
] });
|
|
8324
8693
|
if (href) {
|
|
8325
|
-
return /* @__PURE__ */
|
|
8694
|
+
return /* @__PURE__ */ jsx72("a", { className: "stn-breadcrumb__back", href, onClick, "aria-label": `\uB4A4\uB85C: ${label}`, children: content });
|
|
8326
8695
|
}
|
|
8327
|
-
return /* @__PURE__ */
|
|
8696
|
+
return /* @__PURE__ */ jsx72("button", { type: "button", className: "stn-breadcrumb__back", onClick, "aria-label": `\uB4A4\uB85C: ${label}`, children: content });
|
|
8328
8697
|
}
|
|
8329
8698
|
function splitCollapsedItems(items, maxItems, itemsBeforeCollapse, itemsAfterCollapse) {
|
|
8330
8699
|
if (!maxItems || items.length <= maxItems) {
|
|
@@ -8346,7 +8715,7 @@ function BreadcrumbCollapsed({
|
|
|
8346
8715
|
items,
|
|
8347
8716
|
menuId
|
|
8348
8717
|
}) {
|
|
8349
|
-
const [open, setOpen] =
|
|
8718
|
+
const [open, setOpen] = useState19(false);
|
|
8350
8719
|
const rootRef = useDismissibleMenu(open, () => setOpen(false));
|
|
8351
8720
|
const menuItems = items.map((item) => ({
|
|
8352
8721
|
id: item.id,
|
|
@@ -8355,8 +8724,8 @@ function BreadcrumbCollapsed({
|
|
|
8355
8724
|
onClick: item.onClick,
|
|
8356
8725
|
current: item.current
|
|
8357
8726
|
}));
|
|
8358
|
-
return /* @__PURE__ */
|
|
8359
|
-
/* @__PURE__ */
|
|
8727
|
+
return /* @__PURE__ */ jsxs52("li", { className: "stn-breadcrumb__item", ref: rootRef, children: [
|
|
8728
|
+
/* @__PURE__ */ jsx72(
|
|
8360
8729
|
"button",
|
|
8361
8730
|
{
|
|
8362
8731
|
type: "button",
|
|
@@ -8369,7 +8738,7 @@ function BreadcrumbCollapsed({
|
|
|
8369
8738
|
children: "\u22EF"
|
|
8370
8739
|
}
|
|
8371
8740
|
),
|
|
8372
|
-
open ? /* @__PURE__ */
|
|
8741
|
+
open ? /* @__PURE__ */ jsx72(BreadcrumbMenuList, { id: menuId, items: menuItems, onPick: () => setOpen(false) }) : null
|
|
8373
8742
|
] });
|
|
8374
8743
|
}
|
|
8375
8744
|
function StnBreadcrumb({
|
|
@@ -8401,8 +8770,8 @@ function StnBreadcrumb({
|
|
|
8401
8770
|
const lastId = items[items.length - 1]?.id;
|
|
8402
8771
|
const renderTrailItem = (item) => {
|
|
8403
8772
|
const isCurrent = Boolean(item.current) || item.id === lastId;
|
|
8404
|
-
const segment = /* @__PURE__ */
|
|
8405
|
-
return /* @__PURE__ */
|
|
8773
|
+
const segment = /* @__PURE__ */ jsx72(BreadcrumbSegment, { item, isCurrent });
|
|
8774
|
+
return /* @__PURE__ */ jsx72(
|
|
8406
8775
|
"li",
|
|
8407
8776
|
{
|
|
8408
8777
|
className: cn(
|
|
@@ -8413,27 +8782,27 @@ function StnBreadcrumb({
|
|
|
8413
8782
|
}
|
|
8414
8783
|
);
|
|
8415
8784
|
};
|
|
8416
|
-
return /* @__PURE__ */
|
|
8785
|
+
return /* @__PURE__ */ jsx72(
|
|
8417
8786
|
"nav",
|
|
8418
8787
|
{
|
|
8419
8788
|
className: cn("stn-breadcrumb", size, variant === "chip" && "chip", className),
|
|
8420
8789
|
"aria-label": "Breadcrumb",
|
|
8421
|
-
children: /* @__PURE__ */
|
|
8422
|
-
currentItem ? /* @__PURE__ */
|
|
8423
|
-
showHome ? /* @__PURE__ */
|
|
8424
|
-
/* @__PURE__ */
|
|
8425
|
-
/* @__PURE__ */
|
|
8790
|
+
children: /* @__PURE__ */ jsxs52("ol", { className: "stn-breadcrumb__list", children: [
|
|
8791
|
+
currentItem ? /* @__PURE__ */ jsx72("li", { className: "stn-breadcrumb__item stn-breadcrumb__item--back", children: /* @__PURE__ */ jsx72(BreadcrumbBack, { label: currentItem.label, href: backHref, onClick: backOnClick }) }) : null,
|
|
8792
|
+
showHome ? /* @__PURE__ */ jsx72("li", { className: "stn-breadcrumb__item stn-breadcrumb__item--home", children: /* @__PURE__ */ jsxs52("a", { className: "stn-breadcrumb__home", href: homeHref, onClick: onHomeClick, children: [
|
|
8793
|
+
/* @__PURE__ */ jsx72(BreadcrumbIcon, { src: STN_BREADCRUMB_ICON_SRC.home }),
|
|
8794
|
+
/* @__PURE__ */ jsx72("span", { className: "blind", children: homeLabel })
|
|
8426
8795
|
] }) }) : null,
|
|
8427
|
-
head.map((item, index) => /* @__PURE__ */
|
|
8428
|
-
showHome || index > 0 ? /* @__PURE__ */
|
|
8796
|
+
head.map((item, index) => /* @__PURE__ */ jsxs52(Fragment8, { children: [
|
|
8797
|
+
showHome || index > 0 ? /* @__PURE__ */ jsx72(BreadcrumbSeparator, {}) : null,
|
|
8429
8798
|
renderTrailItem(item)
|
|
8430
8799
|
] }, item.id)),
|
|
8431
|
-
hidden.length > 0 ? /* @__PURE__ */
|
|
8432
|
-
/* @__PURE__ */
|
|
8433
|
-
/* @__PURE__ */
|
|
8800
|
+
hidden.length > 0 ? /* @__PURE__ */ jsxs52(Fragment9, { children: [
|
|
8801
|
+
/* @__PURE__ */ jsx72(BreadcrumbSeparator, {}),
|
|
8802
|
+
/* @__PURE__ */ jsx72(BreadcrumbCollapsed, { items: hidden, menuId })
|
|
8434
8803
|
] }) : null,
|
|
8435
|
-
tail.map((item) => /* @__PURE__ */
|
|
8436
|
-
/* @__PURE__ */
|
|
8804
|
+
tail.map((item) => /* @__PURE__ */ jsxs52(Fragment8, { children: [
|
|
8805
|
+
/* @__PURE__ */ jsx72(BreadcrumbSeparator, {}),
|
|
8437
8806
|
renderTrailItem(item)
|
|
8438
8807
|
] }, item.id))
|
|
8439
8808
|
] })
|
|
@@ -8442,9 +8811,9 @@ function StnBreadcrumb({
|
|
|
8442
8811
|
}
|
|
8443
8812
|
|
|
8444
8813
|
// src/components/StnHeaderTitle.tsx
|
|
8445
|
-
import { useEffect as
|
|
8814
|
+
import { useEffect as useEffect13, useState as useState20 } from "react";
|
|
8446
8815
|
import { STN_HEADER_TITLE_FRAME } from "@stn-uiux/pub-ui/data/stnHeaderTitle";
|
|
8447
|
-
import { jsx as
|
|
8816
|
+
import { jsx as jsx73, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
8448
8817
|
var KO_WEEKDAY_SHORT = ["\uC77C", "\uC6D4", "\uD654", "\uC218", "\uBAA9", "\uAE08", "\uD1A0"];
|
|
8449
8818
|
var KO_WEEKDAY_LONG = [
|
|
8450
8819
|
"\uC77C\uC694\uC77C",
|
|
@@ -8483,8 +8852,8 @@ function formatStnHeaderTitleTime(date, options) {
|
|
|
8483
8852
|
}
|
|
8484
8853
|
function HeaderTitleFrame({ preview = false }) {
|
|
8485
8854
|
const frameClass = preview ? "stn-header-title__frame-preview" : "stn-header-title__frame";
|
|
8486
|
-
return /* @__PURE__ */
|
|
8487
|
-
/* @__PURE__ */
|
|
8855
|
+
return /* @__PURE__ */ jsxs53("div", { className: frameClass, "aria-hidden": "true", children: [
|
|
8856
|
+
/* @__PURE__ */ jsx73("div", { className: "stn-header-title__frame-bleed stn-header-title__frame-bleed--outer", children: /* @__PURE__ */ jsx73(
|
|
8488
8857
|
"img",
|
|
8489
8858
|
{
|
|
8490
8859
|
className: "stn-header-title__frame-img",
|
|
@@ -8493,8 +8862,8 @@ function HeaderTitleFrame({ preview = false }) {
|
|
|
8493
8862
|
draggable: false
|
|
8494
8863
|
}
|
|
8495
8864
|
) }),
|
|
8496
|
-
/* @__PURE__ */
|
|
8497
|
-
/* @__PURE__ */
|
|
8865
|
+
/* @__PURE__ */ jsxs53("div", { className: "stn-header-title__frame-bleed stn-header-title__frame-bleed--inner", children: [
|
|
8866
|
+
/* @__PURE__ */ jsx73(
|
|
8498
8867
|
"img",
|
|
8499
8868
|
{
|
|
8500
8869
|
className: "stn-header-title__frame-img stn-header-title__frame-img--dark",
|
|
@@ -8503,7 +8872,7 @@ function HeaderTitleFrame({ preview = false }) {
|
|
|
8503
8872
|
draggable: false
|
|
8504
8873
|
}
|
|
8505
8874
|
),
|
|
8506
|
-
/* @__PURE__ */
|
|
8875
|
+
/* @__PURE__ */ jsx73(
|
|
8507
8876
|
"img",
|
|
8508
8877
|
{
|
|
8509
8878
|
className: "stn-header-title__frame-img stn-header-title__frame-img--light",
|
|
@@ -8516,11 +8885,11 @@ function HeaderTitleFrame({ preview = false }) {
|
|
|
8516
8885
|
] });
|
|
8517
8886
|
}
|
|
8518
8887
|
function StnHeaderTitleFramePreview({ className }) {
|
|
8519
|
-
return /* @__PURE__ */
|
|
8888
|
+
return /* @__PURE__ */ jsx73("div", { className: cn("stn-header-title__frame-only", className), children: /* @__PURE__ */ jsx73(HeaderTitleFrame, { preview: true }) });
|
|
8520
8889
|
}
|
|
8521
8890
|
function useLiveClock(enabled) {
|
|
8522
|
-
const [now, setNow] =
|
|
8523
|
-
|
|
8891
|
+
const [now, setNow] = useState20(() => /* @__PURE__ */ new Date());
|
|
8892
|
+
useEffect13(() => {
|
|
8524
8893
|
if (!enabled) return;
|
|
8525
8894
|
const id = window.setInterval(() => setNow(/* @__PURE__ */ new Date()), 1e3);
|
|
8526
8895
|
return () => window.clearInterval(id);
|
|
@@ -8532,35 +8901,35 @@ function StnHeaderTitleMainText({
|
|
|
8532
8901
|
children,
|
|
8533
8902
|
...rest
|
|
8534
8903
|
}) {
|
|
8535
|
-
return /* @__PURE__ */
|
|
8904
|
+
return /* @__PURE__ */ jsx73("h1", { className: cn("stn-header-title__text", className), ...rest, children });
|
|
8536
8905
|
}
|
|
8537
8906
|
function StnHeaderTitleSubText({
|
|
8538
8907
|
className,
|
|
8539
8908
|
children,
|
|
8540
8909
|
...rest
|
|
8541
8910
|
}) {
|
|
8542
|
-
return /* @__PURE__ */
|
|
8911
|
+
return /* @__PURE__ */ jsx73("span", { className: cn("stn-header-title__sub-text", className), ...rest, children });
|
|
8543
8912
|
}
|
|
8544
8913
|
function StnHeaderTitleDate({
|
|
8545
8914
|
className,
|
|
8546
8915
|
children,
|
|
8547
8916
|
...rest
|
|
8548
8917
|
}) {
|
|
8549
|
-
return /* @__PURE__ */
|
|
8918
|
+
return /* @__PURE__ */ jsx73("time", { className: cn("stn-header-title__date", className), ...rest, children });
|
|
8550
8919
|
}
|
|
8551
8920
|
function StnHeaderTitleWeekday({
|
|
8552
8921
|
className,
|
|
8553
8922
|
children,
|
|
8554
8923
|
...rest
|
|
8555
8924
|
}) {
|
|
8556
|
-
return /* @__PURE__ */
|
|
8925
|
+
return /* @__PURE__ */ jsx73("span", { className: cn("stn-header-title__weekday", className), ...rest, children });
|
|
8557
8926
|
}
|
|
8558
8927
|
function StnHeaderTitleTime({
|
|
8559
8928
|
className,
|
|
8560
8929
|
children,
|
|
8561
8930
|
...rest
|
|
8562
8931
|
}) {
|
|
8563
|
-
return /* @__PURE__ */
|
|
8932
|
+
return /* @__PURE__ */ jsx73("span", { className: cn("stn-header-title__time", className), "aria-label": "\uD604\uC7AC \uC2DC\uAC01", ...rest, children });
|
|
8564
8933
|
}
|
|
8565
8934
|
function StnHeaderTitleClock({
|
|
8566
8935
|
className,
|
|
@@ -8583,7 +8952,7 @@ function StnHeaderTitleClock({
|
|
|
8583
8952
|
}) {
|
|
8584
8953
|
const now = useLiveClock(live);
|
|
8585
8954
|
if (children != null) {
|
|
8586
|
-
return /* @__PURE__ */
|
|
8955
|
+
return /* @__PURE__ */ jsxs53(
|
|
8587
8956
|
"header",
|
|
8588
8957
|
{
|
|
8589
8958
|
className: cn(
|
|
@@ -8595,8 +8964,8 @@ function StnHeaderTitleClock({
|
|
|
8595
8964
|
),
|
|
8596
8965
|
...rest,
|
|
8597
8966
|
children: [
|
|
8598
|
-
framed ? /* @__PURE__ */
|
|
8599
|
-
/* @__PURE__ */
|
|
8967
|
+
framed ? /* @__PURE__ */ jsx73(HeaderTitleFrame, {}) : null,
|
|
8968
|
+
/* @__PURE__ */ jsx73("div", { className: "stn-header-title__content", children })
|
|
8600
8969
|
]
|
|
8601
8970
|
}
|
|
8602
8971
|
);
|
|
@@ -8626,7 +8995,7 @@ function StnHeaderTitleClock({
|
|
|
8626
8995
|
resolvedTime = formatStnHeaderTitleTime(now, { showSeconds });
|
|
8627
8996
|
}
|
|
8628
8997
|
}
|
|
8629
|
-
return /* @__PURE__ */
|
|
8998
|
+
return /* @__PURE__ */ jsxs53(
|
|
8630
8999
|
"header",
|
|
8631
9000
|
{
|
|
8632
9001
|
className: cn(
|
|
@@ -8638,11 +9007,11 @@ function StnHeaderTitleClock({
|
|
|
8638
9007
|
),
|
|
8639
9008
|
...rest,
|
|
8640
9009
|
children: [
|
|
8641
|
-
framed ? /* @__PURE__ */
|
|
8642
|
-
/* @__PURE__ */
|
|
8643
|
-
resolvedDate ? /* @__PURE__ */
|
|
8644
|
-
showWeekdayOnly ? /* @__PURE__ */
|
|
8645
|
-
resolvedTime ? /* @__PURE__ */
|
|
9010
|
+
framed ? /* @__PURE__ */ jsx73(HeaderTitleFrame, {}) : null,
|
|
9011
|
+
/* @__PURE__ */ jsxs53("div", { className: "stn-header-title__content", children: [
|
|
9012
|
+
resolvedDate ? /* @__PURE__ */ jsx73("time", { className: "stn-header-title__date", dateTime: resolvedDate, children: resolvedDate }) : null,
|
|
9013
|
+
showWeekdayOnly ? /* @__PURE__ */ jsx73("span", { className: "stn-header-title__weekday", children: resolvedWeekday }) : null,
|
|
9014
|
+
resolvedTime ? /* @__PURE__ */ jsx73("span", { className: "stn-header-title__time", "aria-label": "\uD604\uC7AC \uC2DC\uAC01", children: resolvedTime }) : null
|
|
8646
9015
|
] })
|
|
8647
9016
|
]
|
|
8648
9017
|
}
|
|
@@ -8659,7 +9028,7 @@ function StnHeaderTitleDual({
|
|
|
8659
9028
|
...rest
|
|
8660
9029
|
}) {
|
|
8661
9030
|
const resolvedMain = mainText ?? title ?? children;
|
|
8662
|
-
return /* @__PURE__ */
|
|
9031
|
+
return /* @__PURE__ */ jsxs53(
|
|
8663
9032
|
"header",
|
|
8664
9033
|
{
|
|
8665
9034
|
className: cn(
|
|
@@ -8671,10 +9040,10 @@ function StnHeaderTitleDual({
|
|
|
8671
9040
|
),
|
|
8672
9041
|
...rest,
|
|
8673
9042
|
children: [
|
|
8674
|
-
framed ? /* @__PURE__ */
|
|
8675
|
-
/* @__PURE__ */
|
|
8676
|
-
subText != null ? /* @__PURE__ */
|
|
8677
|
-
resolvedMain != null ? typeof resolvedMain === "string" || typeof resolvedMain === "number" ? /* @__PURE__ */
|
|
9043
|
+
framed ? /* @__PURE__ */ jsx73(HeaderTitleFrame, {}) : null,
|
|
9044
|
+
/* @__PURE__ */ jsxs53("div", { className: "stn-header-title__content", children: [
|
|
9045
|
+
subText != null ? /* @__PURE__ */ jsx73("span", { className: "stn-header-title__sub-text", children: subText }) : null,
|
|
9046
|
+
resolvedMain != null ? typeof resolvedMain === "string" || typeof resolvedMain === "number" ? /* @__PURE__ */ jsx73("h1", { className: "stn-header-title__text", children: resolvedMain }) : resolvedMain : null
|
|
8678
9047
|
] })
|
|
8679
9048
|
]
|
|
8680
9049
|
}
|
|
@@ -8689,7 +9058,7 @@ function StnHeaderTitleText({
|
|
|
8689
9058
|
...rest
|
|
8690
9059
|
}) {
|
|
8691
9060
|
const resolved = title ?? children;
|
|
8692
|
-
return /* @__PURE__ */
|
|
9061
|
+
return /* @__PURE__ */ jsxs53(
|
|
8693
9062
|
"header",
|
|
8694
9063
|
{
|
|
8695
9064
|
className: cn(
|
|
@@ -8701,20 +9070,20 @@ function StnHeaderTitleText({
|
|
|
8701
9070
|
),
|
|
8702
9071
|
...rest,
|
|
8703
9072
|
children: [
|
|
8704
|
-
framed ? /* @__PURE__ */
|
|
8705
|
-
/* @__PURE__ */
|
|
9073
|
+
framed ? /* @__PURE__ */ jsx73(HeaderTitleFrame, {}) : null,
|
|
9074
|
+
/* @__PURE__ */ jsx73("div", { className: "stn-header-title__content", children: typeof resolved === "string" || typeof resolved === "number" ? /* @__PURE__ */ jsx73("h1", { className: "stn-header-title__text", children: resolved }) : resolved })
|
|
8706
9075
|
]
|
|
8707
9076
|
}
|
|
8708
9077
|
);
|
|
8709
9078
|
}
|
|
8710
9079
|
function StnHeaderTitleRoot(props) {
|
|
8711
9080
|
if (props.variant === "clock") {
|
|
8712
|
-
return /* @__PURE__ */
|
|
9081
|
+
return /* @__PURE__ */ jsx73(StnHeaderTitleClock, { ...props });
|
|
8713
9082
|
}
|
|
8714
9083
|
if (props.variant === "dual" || "subText" in props && props.subText != null) {
|
|
8715
|
-
return /* @__PURE__ */
|
|
9084
|
+
return /* @__PURE__ */ jsx73(StnHeaderTitleDual, { ...props });
|
|
8716
9085
|
}
|
|
8717
|
-
return /* @__PURE__ */
|
|
9086
|
+
return /* @__PURE__ */ jsx73(StnHeaderTitleText, { ...props });
|
|
8718
9087
|
}
|
|
8719
9088
|
var StnHeaderTitle = Object.assign(StnHeaderTitleRoot, {
|
|
8720
9089
|
Text: StnHeaderTitleMainText,
|
|
@@ -8727,10 +9096,10 @@ var StnHeaderTitle = Object.assign(StnHeaderTitleRoot, {
|
|
|
8727
9096
|
|
|
8728
9097
|
// src/layouts/StnContainer.tsx
|
|
8729
9098
|
import {
|
|
8730
|
-
forwardRef as
|
|
9099
|
+
forwardRef as forwardRef43
|
|
8731
9100
|
} from "react";
|
|
8732
|
-
import { jsx as
|
|
8733
|
-
var StnContainer =
|
|
9101
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
9102
|
+
var StnContainer = forwardRef43(function StnContainer2({
|
|
8734
9103
|
component,
|
|
8735
9104
|
as,
|
|
8736
9105
|
maxWidth = "lg",
|
|
@@ -8745,7 +9114,7 @@ var StnContainer = forwardRef40(function StnContainer2({
|
|
|
8745
9114
|
const Component = component ?? as ?? "div";
|
|
8746
9115
|
const maxWidthClass = maxWidth ? `stn-container--${maxWidth} stn-container--max-width-${maxWidth}` : "stn-container--fluid stn-container--max-width-false";
|
|
8747
9116
|
const classKey = maxWidth ? `maxWidth${maxWidth.charAt(0).toUpperCase() + maxWidth.slice(1)}` : "maxWidthFalse";
|
|
8748
|
-
return /* @__PURE__ */
|
|
9117
|
+
return /* @__PURE__ */ jsx74(
|
|
8749
9118
|
Component,
|
|
8750
9119
|
{
|
|
8751
9120
|
ref,
|
|
@@ -8768,8 +9137,8 @@ var StnContainer = forwardRef40(function StnContainer2({
|
|
|
8768
9137
|
});
|
|
8769
9138
|
|
|
8770
9139
|
// src/layouts/StnGrid.tsx
|
|
8771
|
-
import { forwardRef as
|
|
8772
|
-
import { jsx as
|
|
9140
|
+
import { forwardRef as forwardRef44 } from "react";
|
|
9141
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
8773
9142
|
var BREAKPOINTS2 = ["xs", "sm", "md", "lg", "xl"];
|
|
8774
9143
|
var SPACING_CLASS = {
|
|
8775
9144
|
"0": "0",
|
|
@@ -8835,7 +9204,7 @@ function sizeClasses(size) {
|
|
|
8835
9204
|
}
|
|
8836
9205
|
return classes;
|
|
8837
9206
|
}
|
|
8838
|
-
var StnGrid =
|
|
9207
|
+
var StnGrid = forwardRef44(function StnGrid2({
|
|
8839
9208
|
component,
|
|
8840
9209
|
as,
|
|
8841
9210
|
container = false,
|
|
@@ -8855,7 +9224,7 @@ var StnGrid = forwardRef41(function StnGrid2({
|
|
|
8855
9224
|
const Component = component ?? as ?? "div";
|
|
8856
9225
|
const justify = typeof justifyContent === "string" && JUSTIFY_CLASS2.has(justifyContent) ? justifyContent : void 0;
|
|
8857
9226
|
const align = typeof alignItems === "string" && ALIGN_CLASS2.has(alignItems) ? alignItems : void 0;
|
|
8858
|
-
return /* @__PURE__ */
|
|
9227
|
+
return /* @__PURE__ */ jsx75(
|
|
8859
9228
|
Component,
|
|
8860
9229
|
{
|
|
8861
9230
|
ref,
|
|
@@ -8879,7 +9248,7 @@ var StnGrid = forwardRef41(function StnGrid2({
|
|
|
8879
9248
|
});
|
|
8880
9249
|
|
|
8881
9250
|
// src/layouts/StnLayerShell.tsx
|
|
8882
|
-
import { jsx as
|
|
9251
|
+
import { jsx as jsx76, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
8883
9252
|
function StnLayerShell({
|
|
8884
9253
|
gnb,
|
|
8885
9254
|
gnbSide = "left",
|
|
@@ -8900,7 +9269,7 @@ function StnLayerShell({
|
|
|
8900
9269
|
const resolvedMainContent = layer1 ?? children;
|
|
8901
9270
|
const resolvedModal = layer2;
|
|
8902
9271
|
const isGnbRight = gnbSide === "right";
|
|
8903
|
-
return /* @__PURE__ */
|
|
9272
|
+
return /* @__PURE__ */ jsxs54(
|
|
8904
9273
|
"div",
|
|
8905
9274
|
{
|
|
8906
9275
|
id: wrapId,
|
|
@@ -8909,8 +9278,8 @@ function StnLayerShell({
|
|
|
8909
9278
|
className: cn("stn-wrap", isGnbRight && "stn-wrap--gnb-right", wrapClassName),
|
|
8910
9279
|
children: [
|
|
8911
9280
|
layer0,
|
|
8912
|
-
utilities ? /* @__PURE__ */
|
|
8913
|
-
/* @__PURE__ */
|
|
9281
|
+
utilities ? /* @__PURE__ */ jsx76("div", { className: "stn-page-utilities", "data-stn-layer-role": "utility", children: utilities }) : null,
|
|
9282
|
+
/* @__PURE__ */ jsxs54(
|
|
8914
9283
|
"main",
|
|
8915
9284
|
{
|
|
8916
9285
|
id: containerId,
|
|
@@ -8919,9 +9288,9 @@ function StnLayerShell({
|
|
|
8919
9288
|
className: cn("stn-layer-1", scrollable && "scroll", containerClassName),
|
|
8920
9289
|
children: [
|
|
8921
9290
|
!isGnbRight && gnb,
|
|
8922
|
-
/* @__PURE__ */
|
|
8923
|
-
header ? /* @__PURE__ */
|
|
8924
|
-
/* @__PURE__ */
|
|
9291
|
+
/* @__PURE__ */ jsxs54("div", { className: "stn-layer-1__main", children: [
|
|
9292
|
+
header ? /* @__PURE__ */ jsx76("header", { className: "stn-layer-1__header", children: header }) : null,
|
|
9293
|
+
/* @__PURE__ */ jsx76("div", { className: cn("stn-layer-1__body", scrollable && "stn-scroll", contentClassName), children: resolvedMainContent })
|
|
8925
9294
|
] }),
|
|
8926
9295
|
isGnbRight && gnb
|
|
8927
9296
|
]
|
|
@@ -8934,7 +9303,7 @@ function StnLayerShell({
|
|
|
8934
9303
|
}
|
|
8935
9304
|
|
|
8936
9305
|
// src/layouts/StnListViewLayout.tsx
|
|
8937
|
-
import { jsx as
|
|
9306
|
+
import { jsx as jsx77, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
8938
9307
|
function StnListViewLayoutBody({
|
|
8939
9308
|
search,
|
|
8940
9309
|
sidebar,
|
|
@@ -8945,13 +9314,13 @@ function StnListViewLayoutBody({
|
|
|
8945
9314
|
className
|
|
8946
9315
|
}) {
|
|
8947
9316
|
const lnbClass = lnbSide === "right" ? "stn-page-scaffold__lnb lnb_box lnb_box_right" : "stn-page-scaffold__lnb lnb_box";
|
|
8948
|
-
const sidebarAside = sidebar ? /* @__PURE__ */
|
|
8949
|
-
return /* @__PURE__ */
|
|
9317
|
+
const sidebarAside = sidebar ? /* @__PURE__ */ jsx77("aside", { className: lnbClass, children: sidebar }) : null;
|
|
9318
|
+
return /* @__PURE__ */ jsx77(
|
|
8950
9319
|
StnContainer,
|
|
8951
9320
|
{
|
|
8952
9321
|
maxWidth: false,
|
|
8953
9322
|
className: cn("stn-list-view-layout__body", className),
|
|
8954
|
-
children: /* @__PURE__ */
|
|
9323
|
+
children: /* @__PURE__ */ jsxs55(
|
|
8955
9324
|
StnStack,
|
|
8956
9325
|
{
|
|
8957
9326
|
direction: "row",
|
|
@@ -8959,19 +9328,19 @@ function StnListViewLayoutBody({
|
|
|
8959
9328
|
className: "stn-list-view__main",
|
|
8960
9329
|
children: [
|
|
8961
9330
|
lnbSide === "left" ? sidebarAside : null,
|
|
8962
|
-
/* @__PURE__ */
|
|
9331
|
+
/* @__PURE__ */ jsxs55(
|
|
8963
9332
|
StnStack,
|
|
8964
9333
|
{
|
|
8965
9334
|
direction: "column",
|
|
8966
9335
|
spacing: 2,
|
|
8967
9336
|
className: "stn-list-view__content-stack",
|
|
8968
9337
|
children: [
|
|
8969
|
-
search ? /* @__PURE__ */
|
|
8970
|
-
/* @__PURE__ */
|
|
9338
|
+
search ? /* @__PURE__ */ jsx77("div", { className: "stn-page-scaffold__search search_area", children: search }) : null,
|
|
9339
|
+
/* @__PURE__ */ jsx77(
|
|
8971
9340
|
"div",
|
|
8972
9341
|
{
|
|
8973
9342
|
className: "stn-page-scaffold__content content_box",
|
|
8974
|
-
children: children ?? /* @__PURE__ */
|
|
9343
|
+
children: children ?? /* @__PURE__ */ jsxs55("div", { className: "stn-table stn-table--fill", children: [
|
|
8975
9344
|
table,
|
|
8976
9345
|
pagination
|
|
8977
9346
|
] })
|
|
@@ -9003,7 +9372,7 @@ function StnListViewLayoutRoot({
|
|
|
9003
9372
|
}) {
|
|
9004
9373
|
const bare = bareProp ?? noShell ?? false;
|
|
9005
9374
|
const hasLnbClass = lnbSide === "right" ? "has_lnb_right" : "has_lnb";
|
|
9006
|
-
const body = /* @__PURE__ */
|
|
9375
|
+
const body = /* @__PURE__ */ jsx77(
|
|
9007
9376
|
StnListViewLayoutBody,
|
|
9008
9377
|
{
|
|
9009
9378
|
search,
|
|
@@ -9018,10 +9387,10 @@ function StnListViewLayoutRoot({
|
|
|
9018
9387
|
if (bare) {
|
|
9019
9388
|
return body;
|
|
9020
9389
|
}
|
|
9021
|
-
const renderedHeader = header === null ? null : header !== void 0 ? header : /* @__PURE__ */
|
|
9022
|
-
return /* @__PURE__ */
|
|
9390
|
+
const renderedHeader = header === null ? null : header !== void 0 ? header : /* @__PURE__ */ jsx77("div", { className: "stn-layer-1__header", children: /* @__PURE__ */ jsx77(StnHeader, { variant: "page", children: /* @__PURE__ */ jsx77(StnHeader.Left, { children: /* @__PURE__ */ jsx77(StnHeaderPageTitle, { children: title }) }) }) });
|
|
9391
|
+
return /* @__PURE__ */ jsxs55("div", { className: cn("stn-list-view-layout", "stn-layer-1", className), ...rest, children: [
|
|
9023
9392
|
renderedHeader,
|
|
9024
|
-
/* @__PURE__ */
|
|
9393
|
+
/* @__PURE__ */ jsx77(
|
|
9025
9394
|
"div",
|
|
9026
9395
|
{
|
|
9027
9396
|
className: cn("stn-content-area", sidebar ? hasLnbClass : null, search ? "has_sch" : null),
|
|
@@ -9031,10 +9400,10 @@ function StnListViewLayoutRoot({
|
|
|
9031
9400
|
] });
|
|
9032
9401
|
}
|
|
9033
9402
|
function StnListViewLayoutHeader({ className, children, ...rest }) {
|
|
9034
|
-
return /* @__PURE__ */
|
|
9403
|
+
return /* @__PURE__ */ jsx77("div", { className: cn("stn-layer-1__header", className), ...rest, children });
|
|
9035
9404
|
}
|
|
9036
9405
|
function StnListViewLayoutSearch({ className, children, ...rest }) {
|
|
9037
|
-
return /* @__PURE__ */
|
|
9406
|
+
return /* @__PURE__ */ jsx77("div", { className: cn("search_area", className), ...rest, children });
|
|
9038
9407
|
}
|
|
9039
9408
|
function StnListViewLayoutSidebar({
|
|
9040
9409
|
side = "left",
|
|
@@ -9043,16 +9412,16 @@ function StnListViewLayoutSidebar({
|
|
|
9043
9412
|
...rest
|
|
9044
9413
|
}) {
|
|
9045
9414
|
const lnbClass = side === "right" ? "lnb_box_right" : "lnb_box";
|
|
9046
|
-
return /* @__PURE__ */
|
|
9415
|
+
return /* @__PURE__ */ jsx77("aside", { className: cn(lnbClass, className), ...rest, children });
|
|
9047
9416
|
}
|
|
9048
9417
|
function StnListViewLayoutContent({ className, children, ...rest }) {
|
|
9049
|
-
return /* @__PURE__ */
|
|
9418
|
+
return /* @__PURE__ */ jsx77("div", { className: cn("content_box", className), ...rest, children });
|
|
9050
9419
|
}
|
|
9051
9420
|
function StnListViewLayoutTable({ className, children, ...rest }) {
|
|
9052
|
-
return /* @__PURE__ */
|
|
9421
|
+
return /* @__PURE__ */ jsx77("div", { className: cn("stn-table", className), ...rest, children });
|
|
9053
9422
|
}
|
|
9054
9423
|
function StnListViewLayoutPagination({ className, children, ...rest }) {
|
|
9055
|
-
return /* @__PURE__ */
|
|
9424
|
+
return /* @__PURE__ */ jsx77("div", { className: cn("stn-list-view-layout__pagination-wrap", className), ...rest, children });
|
|
9056
9425
|
}
|
|
9057
9426
|
var StnListViewLayout = Object.assign(StnListViewLayoutRoot, {
|
|
9058
9427
|
Body: StnListViewLayoutBody,
|
|
@@ -9086,13 +9455,13 @@ import {
|
|
|
9086
9455
|
} from "@stn-uiux/pub-ui/data/stnLayout";
|
|
9087
9456
|
|
|
9088
9457
|
// src/patterns/dashboard/StnMapCanvas.tsx
|
|
9089
|
-
import { jsx as
|
|
9458
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
9090
9459
|
function StnMapCanvas({
|
|
9091
9460
|
children,
|
|
9092
9461
|
className,
|
|
9093
9462
|
...rest
|
|
9094
9463
|
}) {
|
|
9095
|
-
return /* @__PURE__ */
|
|
9464
|
+
return /* @__PURE__ */ jsx78(
|
|
9096
9465
|
"div",
|
|
9097
9466
|
{
|
|
9098
9467
|
className: cn("stn-map-canvas", className),
|
|
@@ -9104,7 +9473,7 @@ function StnMapCanvas({
|
|
|
9104
9473
|
}
|
|
9105
9474
|
|
|
9106
9475
|
// src/patterns/dashboard/StnDashboard.tsx
|
|
9107
|
-
import { jsx as
|
|
9476
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
9108
9477
|
var fillStyle = {
|
|
9109
9478
|
flex: "1 1 0%",
|
|
9110
9479
|
minHeight: 0,
|
|
@@ -9123,7 +9492,7 @@ function StnDashboardRoot({
|
|
|
9123
9492
|
}) {
|
|
9124
9493
|
const isLeft = widgetPosition === "left";
|
|
9125
9494
|
const isBoth = widgetPosition === "both";
|
|
9126
|
-
return /* @__PURE__ */
|
|
9495
|
+
return /* @__PURE__ */ jsx79(
|
|
9127
9496
|
"div",
|
|
9128
9497
|
{
|
|
9129
9498
|
className: cn(
|
|
@@ -9152,7 +9521,7 @@ function StnDashboardLeft({
|
|
|
9152
9521
|
style,
|
|
9153
9522
|
...rest
|
|
9154
9523
|
}) {
|
|
9155
|
-
return /* @__PURE__ */
|
|
9524
|
+
return /* @__PURE__ */ jsx79(
|
|
9156
9525
|
"div",
|
|
9157
9526
|
{
|
|
9158
9527
|
className: cn("stn-dashboard__left", className),
|
|
@@ -9178,7 +9547,7 @@ function StnDashboardRight({
|
|
|
9178
9547
|
style,
|
|
9179
9548
|
...rest
|
|
9180
9549
|
}) {
|
|
9181
|
-
return /* @__PURE__ */
|
|
9550
|
+
return /* @__PURE__ */ jsx79(
|
|
9182
9551
|
"div",
|
|
9183
9552
|
{
|
|
9184
9553
|
className: cn("stn-dashboard__right", className),
|
|
@@ -9206,7 +9575,7 @@ function StnDashboardTopRight({
|
|
|
9206
9575
|
className,
|
|
9207
9576
|
...rest
|
|
9208
9577
|
}) {
|
|
9209
|
-
return /* @__PURE__ */
|
|
9578
|
+
return /* @__PURE__ */ jsx79(
|
|
9210
9579
|
"div",
|
|
9211
9580
|
{
|
|
9212
9581
|
className: cn("stn-dashboard__top-right", className),
|
|
@@ -9225,9 +9594,9 @@ var StnDashboard = Object.assign(StnDashboardRoot, {
|
|
|
9225
9594
|
});
|
|
9226
9595
|
|
|
9227
9596
|
// src/patterns/scaffold/StnPageScaffold.tsx
|
|
9228
|
-
import { jsx as
|
|
9597
|
+
import { jsx as jsx80, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
9229
9598
|
function StnPageScaffoldRoot({ children, className, ...rest }) {
|
|
9230
|
-
return /* @__PURE__ */
|
|
9599
|
+
return /* @__PURE__ */ jsx80(
|
|
9231
9600
|
"div",
|
|
9232
9601
|
{
|
|
9233
9602
|
className: cn("stn-page-scaffold", className),
|
|
@@ -9244,9 +9613,9 @@ function StnPageScaffoldRegion({
|
|
|
9244
9613
|
className,
|
|
9245
9614
|
...rest
|
|
9246
9615
|
}) {
|
|
9247
|
-
return /* @__PURE__ */
|
|
9248
|
-
/* @__PURE__ */
|
|
9249
|
-
hint ? /* @__PURE__ */
|
|
9616
|
+
return /* @__PURE__ */ jsxs56("div", { className: cn("stn-page-scaffold__region", className), "data-stn-page-scaffold": "region", ...rest, children: [
|
|
9617
|
+
/* @__PURE__ */ jsx80("span", { className: "stn-page-scaffold__region-label", children: label }),
|
|
9618
|
+
hint ? /* @__PURE__ */ jsx80("span", { className: "stn-page-scaffold__region-hint", children: hint }) : null,
|
|
9250
9619
|
children
|
|
9251
9620
|
] });
|
|
9252
9621
|
}
|
|
@@ -9257,7 +9626,7 @@ function StnPageScaffoldMapPlaceholder({
|
|
|
9257
9626
|
children,
|
|
9258
9627
|
...rest
|
|
9259
9628
|
}) {
|
|
9260
|
-
return /* @__PURE__ */
|
|
9629
|
+
return /* @__PURE__ */ jsx80("div", { className: "stn-widget shell-canvas stn-map-canvas", "data-stn-dashboard": "canvas", children: /* @__PURE__ */ jsxs56(
|
|
9261
9630
|
"div",
|
|
9262
9631
|
{
|
|
9263
9632
|
className: cn("stn-page-scaffold__canvas-placeholder", className),
|
|
@@ -9265,8 +9634,8 @@ function StnPageScaffoldMapPlaceholder({
|
|
|
9265
9634
|
role: "status",
|
|
9266
9635
|
...rest,
|
|
9267
9636
|
children: [
|
|
9268
|
-
/* @__PURE__ */
|
|
9269
|
-
note ? /* @__PURE__ */
|
|
9637
|
+
/* @__PURE__ */ jsx80("p", { className: "stn-page-scaffold__canvas-placeholder-title", children: message }),
|
|
9638
|
+
note ? /* @__PURE__ */ jsx80("p", { className: "stn-page-scaffold__canvas-placeholder-note", children: note }) : null,
|
|
9270
9639
|
children
|
|
9271
9640
|
]
|
|
9272
9641
|
}
|
|
@@ -9277,7 +9646,7 @@ function StnPageScaffoldMapCanvas({
|
|
|
9277
9646
|
children,
|
|
9278
9647
|
...rest
|
|
9279
9648
|
}) {
|
|
9280
|
-
return /* @__PURE__ */
|
|
9649
|
+
return /* @__PURE__ */ jsx80(
|
|
9281
9650
|
"div",
|
|
9282
9651
|
{
|
|
9283
9652
|
className: cn("stn-widget", "shell-canvas", "stn-map-canvas", "stn-page-scaffold__canvas", className),
|
|
@@ -9290,7 +9659,7 @@ function StnPageScaffoldMapCanvas({
|
|
|
9290
9659
|
}
|
|
9291
9660
|
function StnPageScaffoldLayer({ label, hint, children, className, ...layerProps }) {
|
|
9292
9661
|
const labelText = label ? hint ? `${label} \xB7 ${hint}` : label : void 0;
|
|
9293
|
-
return /* @__PURE__ */
|
|
9662
|
+
return /* @__PURE__ */ jsx80(
|
|
9294
9663
|
StnLayer2,
|
|
9295
9664
|
{
|
|
9296
9665
|
className: cn(
|
|
@@ -9337,25 +9706,25 @@ function DashboardPageScaffold({
|
|
|
9337
9706
|
const isLeft = widgetPosition === "left";
|
|
9338
9707
|
const isBoth = widgetPosition === "both";
|
|
9339
9708
|
const isNone = widgetPosition === "none" || !showRightRegion;
|
|
9340
|
-
const mapColumn = /* @__PURE__ */
|
|
9341
|
-
/* @__PURE__ */
|
|
9709
|
+
const mapColumn = /* @__PURE__ */ jsxs56(StnDashboard.Left, { children: [
|
|
9710
|
+
/* @__PURE__ */ jsx80(StnPageScaffold.MapPlaceholder, { message: finalMapMessage, note: finalMapNote }),
|
|
9342
9711
|
faultPanel
|
|
9343
9712
|
] });
|
|
9344
|
-
const rightWidgets = right ?? /* @__PURE__ */
|
|
9345
|
-
const leftWidgets = left ?? right ?? /* @__PURE__ */
|
|
9346
|
-
const dashboardGrid = bodyEmpty ? /* @__PURE__ */
|
|
9347
|
-
/* @__PURE__ */
|
|
9713
|
+
const rightWidgets = right ?? /* @__PURE__ */ jsx80(StnPageScaffold.Region, { label: "dashboard_right", hint: "\uC704\uC82F\xB7\uC7A5\uC560 \uD328\uB110" });
|
|
9714
|
+
const leftWidgets = left ?? right ?? /* @__PURE__ */ jsx80(StnPageScaffold.Region, { label: "dashboard_right", hint: "\uC88C\uCE21 \uC704\uC82F\xB7\uC7A5\uC560 \uD328\uB110" });
|
|
9715
|
+
const dashboardGrid = bodyEmpty ? /* @__PURE__ */ jsx80(StnDashboard, { empty: true, widgetPosition, "data-stn-page-scaffold": "dashboard-empty" }) : isBoth ? /* @__PURE__ */ jsxs56(StnDashboard, { widgetPosition: "both", children: [
|
|
9716
|
+
/* @__PURE__ */ jsx80(StnDashboard.Right, { children: leftWidgets }),
|
|
9348
9717
|
mapColumn,
|
|
9349
|
-
/* @__PURE__ */
|
|
9350
|
-
] }) : isLeft ? /* @__PURE__ */
|
|
9351
|
-
/* @__PURE__ */
|
|
9718
|
+
/* @__PURE__ */ jsx80(StnDashboard.Right, { children: rightWidgets })
|
|
9719
|
+
] }) : isLeft ? /* @__PURE__ */ jsxs56(StnDashboard, { widgetPosition: "left", children: [
|
|
9720
|
+
/* @__PURE__ */ jsx80(StnDashboard.Right, { children: leftWidgets }),
|
|
9352
9721
|
mapColumn
|
|
9353
|
-
] }) : /* @__PURE__ */
|
|
9722
|
+
] }) : /* @__PURE__ */ jsxs56(StnDashboard, { widgetPosition: isNone ? "none" : "right", children: [
|
|
9354
9723
|
mapColumn,
|
|
9355
|
-
!isNone ? /* @__PURE__ */
|
|
9724
|
+
!isNone ? /* @__PURE__ */ jsx80(StnDashboard.Right, { children: rightWidgets }) : null
|
|
9356
9725
|
] });
|
|
9357
9726
|
const contentNode = children ?? dashboardGrid;
|
|
9358
|
-
return /* @__PURE__ */
|
|
9727
|
+
return /* @__PURE__ */ jsx80(
|
|
9359
9728
|
StnLayerShell,
|
|
9360
9729
|
{
|
|
9361
9730
|
gnb,
|
|
@@ -9364,7 +9733,7 @@ function DashboardPageScaffold({
|
|
|
9364
9733
|
layer0,
|
|
9365
9734
|
layer2,
|
|
9366
9735
|
...shellProps,
|
|
9367
|
-
children: /* @__PURE__ */
|
|
9736
|
+
children: /* @__PURE__ */ jsx80(
|
|
9368
9737
|
StnContainer,
|
|
9369
9738
|
{
|
|
9370
9739
|
maxWidth: false,
|
|
@@ -9378,16 +9747,16 @@ function DashboardPageScaffold({
|
|
|
9378
9747
|
}
|
|
9379
9748
|
|
|
9380
9749
|
// src/patterns/scaffold/AlertCenterPageScaffold.tsx
|
|
9381
|
-
import { useMemo as useMemo5, useState as
|
|
9750
|
+
import { useMemo as useMemo5, useState as useState21 } from "react";
|
|
9382
9751
|
import {
|
|
9383
9752
|
STN_ALERT_CENTER_DEMO_ALERTS,
|
|
9384
9753
|
STN_ALERT_CENTER_DEMO_DEPLOY,
|
|
9385
9754
|
STN_ALERT_CENTER_DEMO_WORK
|
|
9386
9755
|
} from "@stn-uiux/pub-ui/data/stnAlertCenter";
|
|
9387
9756
|
import { systemIconSrc } from "@stn-uiux/pub-ui/data/stnSystemIcons";
|
|
9388
|
-
import { Fragment as Fragment10, jsx as
|
|
9757
|
+
import { Fragment as Fragment10, jsx as jsx81, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
9389
9758
|
function defaultTopologyHeader(_clock) {
|
|
9390
|
-
return /* @__PURE__ */
|
|
9759
|
+
return /* @__PURE__ */ jsx81(StnHeader, { variant: "widget" });
|
|
9391
9760
|
}
|
|
9392
9761
|
function AlertCenterPageScaffold({
|
|
9393
9762
|
gnbAlertPanel,
|
|
@@ -9404,9 +9773,9 @@ function AlertCenterPageScaffold({
|
|
|
9404
9773
|
defaultGnbOpen = true,
|
|
9405
9774
|
...shellProps
|
|
9406
9775
|
}) {
|
|
9407
|
-
const [gnbOpen, setGnbOpen] =
|
|
9776
|
+
const [gnbOpen, setGnbOpen] = useState21(defaultGnbOpen);
|
|
9408
9777
|
const panel = useMemo5(
|
|
9409
|
-
() => gnbAlertPanel ?? /* @__PURE__ */
|
|
9778
|
+
() => gnbAlertPanel ?? /* @__PURE__ */ jsx81(
|
|
9410
9779
|
StnAlertCenterPanel,
|
|
9411
9780
|
{
|
|
9412
9781
|
alerts: STN_ALERT_CENTER_DEMO_ALERTS,
|
|
@@ -9417,26 +9786,26 @@ function AlertCenterPageScaffold({
|
|
|
9417
9786
|
[gnbAlertPanel]
|
|
9418
9787
|
);
|
|
9419
9788
|
const sideNav = useMemo5(
|
|
9420
|
-
() => gnbProp ?? /* @__PURE__ */
|
|
9421
|
-
/* @__PURE__ */
|
|
9789
|
+
() => gnbProp ?? /* @__PURE__ */ jsxs57(Fragment10, { children: [
|
|
9790
|
+
/* @__PURE__ */ jsxs57(
|
|
9422
9791
|
StnSideNavigation,
|
|
9423
9792
|
{
|
|
9424
9793
|
collapsed: !gnbOpen,
|
|
9425
9794
|
onCollapseChange: (col) => setGnbOpen(!col),
|
|
9426
9795
|
children: [
|
|
9427
|
-
/* @__PURE__ */
|
|
9428
|
-
/* @__PURE__ */
|
|
9429
|
-
/* @__PURE__ */
|
|
9796
|
+
/* @__PURE__ */ jsxs57(StnSideNavigation.Header, { children: [
|
|
9797
|
+
/* @__PURE__ */ jsx81(StnSideNavigation.Logo, {}),
|
|
9798
|
+
/* @__PURE__ */ jsx81(StnSideNavigation.Toggle, {})
|
|
9430
9799
|
] }),
|
|
9431
|
-
/* @__PURE__ */
|
|
9432
|
-
/* @__PURE__ */
|
|
9433
|
-
/* @__PURE__ */
|
|
9434
|
-
/* @__PURE__ */
|
|
9800
|
+
/* @__PURE__ */ jsxs57(StnSideNavigation.Menu, { children: [
|
|
9801
|
+
/* @__PURE__ */ jsx81(StnSideNavigation.Item, { iconSrc: systemIconSrc("line/layout-grid"), label: "\uBA54\uC778 \uB300\uC2DC\uBCF4\uB4DC", active: true }),
|
|
9802
|
+
/* @__PURE__ */ jsx81(StnSideNavigation.Item, { iconSrc: systemIconSrc("line/server_2"), label: "\uC11C\uBC84 \uBAA8\uB2C8\uD130\uB9C1" }),
|
|
9803
|
+
/* @__PURE__ */ jsx81(StnSideNavigation.Item, { iconSrc: systemIconSrc("line/activity"), label: "\uB124\uD2B8\uC6CC\uD06C \uBD84\uC11D" })
|
|
9435
9804
|
] }),
|
|
9436
|
-
/* @__PURE__ */
|
|
9437
|
-
/* @__PURE__ */
|
|
9438
|
-
/* @__PURE__ */
|
|
9439
|
-
/* @__PURE__ */
|
|
9805
|
+
/* @__PURE__ */ jsx81(StnSideNavigation.Spacer, {}),
|
|
9806
|
+
/* @__PURE__ */ jsxs57(StnSideNavigation.Footer, { curved: true, children: [
|
|
9807
|
+
/* @__PURE__ */ jsx81(StnSideNavigation.Watermark, {}),
|
|
9808
|
+
/* @__PURE__ */ jsx81(
|
|
9440
9809
|
StnSideNavigation.Item,
|
|
9441
9810
|
{
|
|
9442
9811
|
iconSrc: systemIconSrc("line/bell"),
|
|
@@ -9445,7 +9814,7 @@ function AlertCenterPageScaffold({
|
|
|
9445
9814
|
onClick: void 0
|
|
9446
9815
|
}
|
|
9447
9816
|
),
|
|
9448
|
-
/* @__PURE__ */
|
|
9817
|
+
/* @__PURE__ */ jsx81(StnSideNavigation.Item, { iconSrc: systemIconSrc("line/settings"), label: "\uC124\uC815" })
|
|
9449
9818
|
] })
|
|
9450
9819
|
]
|
|
9451
9820
|
}
|
|
@@ -9454,8 +9823,8 @@ function AlertCenterPageScaffold({
|
|
|
9454
9823
|
] }),
|
|
9455
9824
|
[gnbProp, gnbOpen, panel]
|
|
9456
9825
|
);
|
|
9457
|
-
const faultSlot = faultPanel ?? (showFaultPanelPlaceholder ? /* @__PURE__ */
|
|
9458
|
-
return /* @__PURE__ */
|
|
9826
|
+
const faultSlot = faultPanel ?? (showFaultPanelPlaceholder ? /* @__PURE__ */ jsx81("div", { className: "wrap_real_time stn-page-scaffold__fault-ph", children: /* @__PURE__ */ jsx81(StnPageScaffold.Region, { label: "\uC2E4\uC2DC\uAC04 \uC7A5\uC560 \uD604\uD669", hint: "StnWidget shell=fault-panel \xB7 \uC120\uD0DD" }) }) : null);
|
|
9827
|
+
return /* @__PURE__ */ jsx81(
|
|
9459
9828
|
DashboardPageScaffold,
|
|
9460
9829
|
{
|
|
9461
9830
|
gnb: sideNav,
|
|
@@ -9463,7 +9832,7 @@ function AlertCenterPageScaffold({
|
|
|
9463
9832
|
mapMessage,
|
|
9464
9833
|
mapNote,
|
|
9465
9834
|
faultPanel: faultSlot,
|
|
9466
|
-
right: right ?? /* @__PURE__ */
|
|
9835
|
+
right: right ?? /* @__PURE__ */ jsx81(AlertCenterDashboard, {}),
|
|
9467
9836
|
wrapId,
|
|
9468
9837
|
wrapClassName: "stn-page--map-bg",
|
|
9469
9838
|
...shellProps
|
|
@@ -9472,8 +9841,8 @@ function AlertCenterPageScaffold({
|
|
|
9472
9841
|
}
|
|
9473
9842
|
|
|
9474
9843
|
// src/patterns/scaffold/LoginPageScaffold.tsx
|
|
9475
|
-
import { useState as
|
|
9476
|
-
import { jsx as
|
|
9844
|
+
import { useState as useState22 } from "react";
|
|
9845
|
+
import { jsx as jsx82, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
9477
9846
|
var LOGIN_TABS = [
|
|
9478
9847
|
{ value: "normal", label: "\uC77C\uBC18 \uB85C\uADF8\uC778" },
|
|
9479
9848
|
{ value: "social", label: "\uC18C\uC15C \uB85C\uADF8\uC778" }
|
|
@@ -9484,15 +9853,15 @@ function DefaultLoginForm({
|
|
|
9484
9853
|
signUpHref = "#",
|
|
9485
9854
|
recoverHref = "#"
|
|
9486
9855
|
}) {
|
|
9487
|
-
const [mode, setMode] =
|
|
9488
|
-
const [userId, setUserId] =
|
|
9489
|
-
const [password, setPassword] =
|
|
9856
|
+
const [mode, setMode] = useState22("normal");
|
|
9857
|
+
const [userId, setUserId] = useState22("");
|
|
9858
|
+
const [password, setPassword] = useState22("");
|
|
9490
9859
|
function handleSubmit(e) {
|
|
9491
9860
|
e.preventDefault();
|
|
9492
9861
|
onLogin?.(userId, password);
|
|
9493
9862
|
}
|
|
9494
|
-
return /* @__PURE__ */
|
|
9495
|
-
/* @__PURE__ */
|
|
9863
|
+
return /* @__PURE__ */ jsxs58(StnLoginFormStack, { onSubmit: handleSubmit, children: [
|
|
9864
|
+
/* @__PURE__ */ jsx82(
|
|
9496
9865
|
StnSegmented,
|
|
9497
9866
|
{
|
|
9498
9867
|
"aria-label": "\uB85C\uADF8\uC778 \uBC29\uC2DD",
|
|
@@ -9501,8 +9870,8 @@ function DefaultLoginForm({
|
|
|
9501
9870
|
options: LOGIN_TABS
|
|
9502
9871
|
}
|
|
9503
9872
|
),
|
|
9504
|
-
mode === "normal" ? /* @__PURE__ */
|
|
9505
|
-
/* @__PURE__ */
|
|
9873
|
+
mode === "normal" ? /* @__PURE__ */ jsxs58(StnLoginFormFields, { children: [
|
|
9874
|
+
/* @__PURE__ */ jsx82(
|
|
9506
9875
|
StnLoginTextField,
|
|
9507
9876
|
{
|
|
9508
9877
|
icon: "line/user",
|
|
@@ -9514,7 +9883,7 @@ function DefaultLoginForm({
|
|
|
9514
9883
|
"aria-label": "\uC544\uC774\uB514"
|
|
9515
9884
|
}
|
|
9516
9885
|
),
|
|
9517
|
-
/* @__PURE__ */
|
|
9886
|
+
/* @__PURE__ */ jsx82(
|
|
9518
9887
|
StnLoginTextField,
|
|
9519
9888
|
{
|
|
9520
9889
|
icon: "line/lock",
|
|
@@ -9527,11 +9896,11 @@ function DefaultLoginForm({
|
|
|
9527
9896
|
"aria-label": "\uBE44\uBC00\uBC88\uD638"
|
|
9528
9897
|
}
|
|
9529
9898
|
)
|
|
9530
|
-
] }) : socialContent ?? /* @__PURE__ */
|
|
9531
|
-
/* @__PURE__ */
|
|
9532
|
-
/* @__PURE__ */
|
|
9533
|
-
/* @__PURE__ */
|
|
9534
|
-
/* @__PURE__ */
|
|
9899
|
+
] }) : socialContent ?? /* @__PURE__ */ jsx82(StnLoginPlaceholder, {}),
|
|
9900
|
+
/* @__PURE__ */ jsx82(StnButton, { type: "submit", size: "xl", fullWidth: true, children: "\uB85C\uADF8\uC778" }),
|
|
9901
|
+
/* @__PURE__ */ jsxs58(StnLoginFormLinks, { children: [
|
|
9902
|
+
/* @__PURE__ */ jsx82("a", { href: signUpHref, children: "\uD68C\uC6D0\uAC00\uC785" }),
|
|
9903
|
+
/* @__PURE__ */ jsx82("a", { href: recoverHref, children: "\uC544\uC774\uB514 / \uBE44\uBC00\uBC88\uD638 \uCC3E\uAE30" })
|
|
9535
9904
|
] })
|
|
9536
9905
|
] });
|
|
9537
9906
|
}
|
|
@@ -9545,16 +9914,16 @@ function DefaultLoginCard({
|
|
|
9545
9914
|
signUpHref,
|
|
9546
9915
|
recoverHref
|
|
9547
9916
|
}) {
|
|
9548
|
-
return /* @__PURE__ */
|
|
9917
|
+
return /* @__PURE__ */ jsx82(
|
|
9549
9918
|
StnLoginCard,
|
|
9550
9919
|
{
|
|
9551
9920
|
glow,
|
|
9552
9921
|
variant,
|
|
9553
|
-
brand: /* @__PURE__ */
|
|
9554
|
-
logo ?? /* @__PURE__ */
|
|
9555
|
-
/* @__PURE__ */
|
|
9922
|
+
brand: /* @__PURE__ */ jsxs58(StnLoginBrandStack, { children: [
|
|
9923
|
+
logo ?? /* @__PURE__ */ jsx82(StnLogo, { variant: "vertical", size: "xl" }),
|
|
9924
|
+
/* @__PURE__ */ jsx82("p", { className: "stn-login-card__caption", children: productCaption })
|
|
9556
9925
|
] }),
|
|
9557
|
-
children: /* @__PURE__ */
|
|
9926
|
+
children: /* @__PURE__ */ jsx82(
|
|
9558
9927
|
DefaultLoginForm,
|
|
9559
9928
|
{
|
|
9560
9929
|
onLogin,
|
|
@@ -9580,8 +9949,8 @@ function LoginPageScaffold({
|
|
|
9580
9949
|
recoverHref,
|
|
9581
9950
|
...shellProps
|
|
9582
9951
|
}) {
|
|
9583
|
-
const resolvedLayer0 = layer0 ?? /* @__PURE__ */
|
|
9584
|
-
const resolvedCard = children ?? /* @__PURE__ */
|
|
9952
|
+
const resolvedLayer0 = layer0 ?? /* @__PURE__ */ jsx82(StnLayer0Background, { variant: "login" });
|
|
9953
|
+
const resolvedCard = children ?? /* @__PURE__ */ jsx82(
|
|
9585
9954
|
DefaultLoginCard,
|
|
9586
9955
|
{
|
|
9587
9956
|
logo,
|
|
@@ -9594,7 +9963,7 @@ function LoginPageScaffold({
|
|
|
9594
9963
|
recoverHref
|
|
9595
9964
|
}
|
|
9596
9965
|
);
|
|
9597
|
-
return /* @__PURE__ */
|
|
9966
|
+
return /* @__PURE__ */ jsxs58(
|
|
9598
9967
|
"div",
|
|
9599
9968
|
{
|
|
9600
9969
|
className: cn("stn-wrap stn-page--login", wrapClassName),
|
|
@@ -9602,7 +9971,7 @@ function LoginPageScaffold({
|
|
|
9602
9971
|
...shellProps,
|
|
9603
9972
|
children: [
|
|
9604
9973
|
resolvedLayer0,
|
|
9605
|
-
/* @__PURE__ */
|
|
9974
|
+
/* @__PURE__ */ jsx82("div", { className: "stn-login", children: resolvedCard })
|
|
9606
9975
|
]
|
|
9607
9976
|
}
|
|
9608
9977
|
);
|
|
@@ -9631,7 +10000,7 @@ import {
|
|
|
9631
10000
|
|
|
9632
10001
|
// src/patterns/toolbar/StnFloatingToolbar.tsx
|
|
9633
10002
|
import React3 from "react";
|
|
9634
|
-
import { jsx as
|
|
10003
|
+
import { jsx as jsx83, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
9635
10004
|
var DEFAULT_MAP_MODES = [
|
|
9636
10005
|
{ value: "sphere", label: "\uAD6C\uBA74" },
|
|
9637
10006
|
{ value: "plane", label: "\uD3C9\uBA74" },
|
|
@@ -9641,7 +10010,7 @@ var StnFloatingToolbar = React3.forwardRef(
|
|
|
9641
10010
|
({ placement = "none", orientation = "horizontal", className, children, ...restProps }, ref) => {
|
|
9642
10011
|
const placementClass = placement !== "none" ? `stn-floating-toolbar--${placement}` : "";
|
|
9643
10012
|
const orientationClass = orientation === "vertical" ? "stn-floating-toolbar--vertical" : "";
|
|
9644
|
-
return /* @__PURE__ */
|
|
10013
|
+
return /* @__PURE__ */ jsx83(
|
|
9645
10014
|
"div",
|
|
9646
10015
|
{
|
|
9647
10016
|
ref,
|
|
@@ -9674,7 +10043,7 @@ var StnMapToolbar = React3.forwardRef(
|
|
|
9674
10043
|
children,
|
|
9675
10044
|
...restProps
|
|
9676
10045
|
}, ref) => {
|
|
9677
|
-
return /* @__PURE__ */
|
|
10046
|
+
return /* @__PURE__ */ jsxs59(
|
|
9678
10047
|
StnFloatingToolbar,
|
|
9679
10048
|
{
|
|
9680
10049
|
ref,
|
|
@@ -9684,7 +10053,7 @@ var StnMapToolbar = React3.forwardRef(
|
|
|
9684
10053
|
"aria-label": "\uC9C0\uB3C4 \uBC0F \uD1A0\uD3F4\uB85C\uC9C0 \uB3C4\uAD6C \uBAA8\uC74C",
|
|
9685
10054
|
...restProps,
|
|
9686
10055
|
children: [
|
|
9687
|
-
modeOptions && modeOptions.length > 0 && /* @__PURE__ */
|
|
10056
|
+
modeOptions && modeOptions.length > 0 && /* @__PURE__ */ jsx83(
|
|
9688
10057
|
StnDropdown,
|
|
9689
10058
|
{
|
|
9690
10059
|
size: "md",
|
|
@@ -9695,75 +10064,75 @@ var StnMapToolbar = React3.forwardRef(
|
|
|
9695
10064
|
"aria-label": "\uD22C\uC601 \uBAA8\uB4DC \uC120\uD0DD"
|
|
9696
10065
|
}
|
|
9697
10066
|
),
|
|
9698
|
-
onRestore && /* @__PURE__ */
|
|
10067
|
+
onRestore && /* @__PURE__ */ jsx83(
|
|
9699
10068
|
StnButton,
|
|
9700
10069
|
{
|
|
9701
10070
|
variant: buttonVariant,
|
|
9702
10071
|
size: "md",
|
|
9703
10072
|
shape: "square",
|
|
9704
|
-
icon: /* @__PURE__ */
|
|
9705
|
-
/* @__PURE__ */
|
|
9706
|
-
/* @__PURE__ */
|
|
9707
|
-
/* @__PURE__ */
|
|
10073
|
+
icon: /* @__PURE__ */ jsxs59("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
10074
|
+
/* @__PURE__ */ jsx83("path", { d: "M3.06006 13C3.30547 15.1939 4.34865 17.221 5.9912 18.696C7.63374 20.1709 9.76108 20.9907 11.9686 20.9994C14.1762 21.0081 16.3099 20.2052 17.9641 18.7434C19.6183 17.2815 20.6775 15.2627 20.9403 13.0708C21.2031 10.879 20.6511 8.66696 19.3894 6.85551C18.1276 5.04406 16.2441 3.75951 14.0971 3.24618C11.95 2.73284 9.68922 3.02652 7.74457 4.07135C5.79993 5.11619 4.30712 6.83931 3.55006 8.913" }),
|
|
10075
|
+
/* @__PURE__ */ jsx83("path", { d: "M3 4.00098V9.00098H8" }),
|
|
10076
|
+
/* @__PURE__ */ jsx83("circle", { cx: "12", cy: "12", r: "1", fill: "currentColor" })
|
|
9708
10077
|
] }),
|
|
9709
10078
|
"aria-label": "\uCD08\uAE30\uD654 (Restore)",
|
|
9710
10079
|
title: "\uCD08\uAE30\uD654 (Restore)",
|
|
9711
10080
|
onClick: onRestore
|
|
9712
10081
|
}
|
|
9713
10082
|
),
|
|
9714
|
-
onFullscreen && /* @__PURE__ */
|
|
10083
|
+
onFullscreen && /* @__PURE__ */ jsx83(
|
|
9715
10084
|
StnButton,
|
|
9716
10085
|
{
|
|
9717
10086
|
variant: buttonVariant,
|
|
9718
10087
|
size: "md",
|
|
9719
10088
|
shape: "square",
|
|
9720
|
-
icon: /* @__PURE__ */
|
|
9721
|
-
/* @__PURE__ */
|
|
9722
|
-
/* @__PURE__ */
|
|
9723
|
-
/* @__PURE__ */
|
|
9724
|
-
/* @__PURE__ */
|
|
10089
|
+
icon: /* @__PURE__ */ jsxs59("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
10090
|
+
/* @__PURE__ */ jsx83("path", { d: "M16 4H20V8" }),
|
|
10091
|
+
/* @__PURE__ */ jsx83("path", { d: "M14 10L20 4" }),
|
|
10092
|
+
/* @__PURE__ */ jsx83("path", { d: "M8 20H4V16" }),
|
|
10093
|
+
/* @__PURE__ */ jsx83("path", { d: "M4 20L10 14" })
|
|
9725
10094
|
] }),
|
|
9726
10095
|
"aria-label": "\uC804\uCCB4\uD654\uBA74",
|
|
9727
10096
|
title: "\uC804\uCCB4\uD654\uBA74",
|
|
9728
10097
|
onClick: onFullscreen
|
|
9729
10098
|
}
|
|
9730
10099
|
),
|
|
9731
|
-
onZoomIn && /* @__PURE__ */
|
|
10100
|
+
onZoomIn && /* @__PURE__ */ jsx83(
|
|
9732
10101
|
StnButton,
|
|
9733
10102
|
{
|
|
9734
10103
|
variant: buttonVariant,
|
|
9735
10104
|
size: "md",
|
|
9736
10105
|
shape: "square",
|
|
9737
|
-
icon: /* @__PURE__ */
|
|
9738
|
-
/* @__PURE__ */
|
|
9739
|
-
/* @__PURE__ */
|
|
10106
|
+
icon: /* @__PURE__ */ jsxs59("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
10107
|
+
/* @__PURE__ */ jsx83("path", { d: "M12 5V19" }),
|
|
10108
|
+
/* @__PURE__ */ jsx83("path", { d: "M5 12H19" })
|
|
9740
10109
|
] }),
|
|
9741
10110
|
"aria-label": "\uD655\uB300",
|
|
9742
10111
|
title: "\uD655\uB300",
|
|
9743
10112
|
onClick: onZoomIn
|
|
9744
10113
|
}
|
|
9745
10114
|
),
|
|
9746
|
-
onZoomOut && /* @__PURE__ */
|
|
10115
|
+
onZoomOut && /* @__PURE__ */ jsx83(
|
|
9747
10116
|
StnButton,
|
|
9748
10117
|
{
|
|
9749
10118
|
variant: buttonVariant,
|
|
9750
10119
|
size: "md",
|
|
9751
10120
|
shape: "square",
|
|
9752
|
-
icon: /* @__PURE__ */
|
|
10121
|
+
icon: /* @__PURE__ */ jsx83("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx83("path", { d: "M5 12H19" }) }),
|
|
9753
10122
|
"aria-label": "\uCD95\uC18C",
|
|
9754
10123
|
title: "\uCD95\uC18C",
|
|
9755
10124
|
onClick: onZoomOut
|
|
9756
10125
|
}
|
|
9757
10126
|
),
|
|
9758
|
-
onRefresh && /* @__PURE__ */
|
|
10127
|
+
onRefresh && /* @__PURE__ */ jsx83(
|
|
9759
10128
|
StnButton,
|
|
9760
10129
|
{
|
|
9761
10130
|
variant: buttonVariant,
|
|
9762
10131
|
size: "md",
|
|
9763
10132
|
shape: "square",
|
|
9764
|
-
icon: /* @__PURE__ */
|
|
9765
|
-
/* @__PURE__ */
|
|
9766
|
-
/* @__PURE__ */
|
|
10133
|
+
icon: /* @__PURE__ */ jsxs59("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
10134
|
+
/* @__PURE__ */ jsx83("path", { d: "M20 11C19.7554 9.24023 18.9391 7.60967 17.6766 6.35951C16.4142 5.10934 14.7758 4.30893 13.0137 4.08156C11.2516 3.8542 9.46362 4.21249 7.9252 5.10126C6.38678 5.99002 5.18325 7.35995 4.5 9.00001M4 5.00001V9.00001H8" }),
|
|
10135
|
+
/* @__PURE__ */ jsx83("path", { d: "M4 13C4.24456 14.7598 5.06093 16.3903 6.32336 17.6405C7.58579 18.8907 9.22424 19.6911 10.9863 19.9184C12.7484 20.1458 14.5364 19.7875 16.0748 18.8988C17.6132 18.01 18.8168 16.6401 19.5 15M20 19V15H16" })
|
|
9767
10136
|
] }),
|
|
9768
10137
|
"aria-label": "\uC0C8\uB85C\uACE0\uCE68",
|
|
9769
10138
|
title: "\uC0C8\uB85C\uACE0\uCE68",
|
|
@@ -10020,6 +10389,9 @@ export {
|
|
|
10020
10389
|
StnStatusSeverity,
|
|
10021
10390
|
StnStatusSwitch,
|
|
10022
10391
|
StnSwitch,
|
|
10392
|
+
StnTab,
|
|
10393
|
+
StnTabContextProvider,
|
|
10394
|
+
StnTabPanel,
|
|
10023
10395
|
StnTable,
|
|
10024
10396
|
StnTableBody,
|
|
10025
10397
|
StnTableGrid,
|
|
@@ -10030,6 +10402,8 @@ export {
|
|
|
10030
10402
|
StnTableTdCheck,
|
|
10031
10403
|
StnTableTh,
|
|
10032
10404
|
StnTableThCheck,
|
|
10405
|
+
StnTabs2 as StnTabs,
|
|
10406
|
+
StnTabsRoot,
|
|
10033
10407
|
StnTextArea,
|
|
10034
10408
|
StnTextField,
|
|
10035
10409
|
StnToastCloseButton,
|
|
@@ -10080,6 +10454,7 @@ export {
|
|
|
10080
10454
|
systemIconSrc2 as systemIconSrc,
|
|
10081
10455
|
useSideNav,
|
|
10082
10456
|
useStn,
|
|
10083
|
-
useStnOptional
|
|
10457
|
+
useStnOptional,
|
|
10458
|
+
useStnTabsContext
|
|
10084
10459
|
};
|
|
10085
10460
|
//# sourceMappingURL=index.js.map
|