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