sellmate-design-system-react 0.1.7 → 0.1.9
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/components/SActionModal/SActionModal.cjs +11 -3
- package/dist/components/SActionModal/SActionModal.cjs.map +1 -1
- package/dist/components/SActionModal/SActionModal.js +11 -3
- package/dist/components/SActionModal/SActionModal.js.map +1 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.cjs +226 -209
- package/dist/components/SBarcodeInput/SBarcodeInput.cjs.map +1 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.js +226 -209
- package/dist/components/SBarcodeInput/SBarcodeInput.js.map +1 -1
- package/dist/components/SCalendar/SCalendar.cjs +9 -1
- package/dist/components/SCalendar/SCalendar.cjs.map +1 -1
- package/dist/components/SCalendar/SCalendar.js +9 -1
- package/dist/components/SCalendar/SCalendar.js.map +1 -1
- package/dist/components/SChip/SChip.cjs +9 -1
- package/dist/components/SChip/SChip.cjs.map +1 -1
- package/dist/components/SChip/SChip.d.ts +1 -1
- package/dist/components/SChip/SChip.js +9 -1
- package/dist/components/SChip/SChip.js.map +1 -1
- package/dist/components/SChipInput/SChipInput.cjs +260 -235
- package/dist/components/SChipInput/SChipInput.cjs.map +1 -1
- package/dist/components/SChipInput/SChipInput.js +259 -235
- package/dist/components/SChipInput/SChipInput.js.map +1 -1
- package/dist/components/SCircleProgress/SCircleProgress.cjs +56 -58
- package/dist/components/SCircleProgress/SCircleProgress.cjs.map +1 -1
- package/dist/components/SCircleProgress/SCircleProgress.js +56 -58
- package/dist/components/SCircleProgress/SCircleProgress.js.map +1 -1
- package/dist/components/SConfirmModal/SConfirmModal.cjs +9 -1
- package/dist/components/SConfirmModal/SConfirmModal.cjs.map +1 -1
- package/dist/components/SConfirmModal/SConfirmModal.js +9 -1
- package/dist/components/SConfirmModal/SConfirmModal.js.map +1 -1
- package/dist/components/SDatePicker/SDatePicker.cjs +247 -221
- package/dist/components/SDatePicker/SDatePicker.cjs.map +1 -1
- package/dist/components/SDatePicker/SDatePicker.js +247 -221
- package/dist/components/SDatePicker/SDatePicker.js.map +1 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.cjs +308 -256
- package/dist/components/SDateRangePicker/SDateRangePicker.cjs.map +1 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.js +308 -256
- package/dist/components/SDateRangePicker/SDateRangePicker.js.map +1 -1
- package/dist/components/SDropdownButton/SDropdownButton.cjs +51 -4
- package/dist/components/SDropdownButton/SDropdownButton.cjs.map +1 -1
- package/dist/components/SDropdownButton/SDropdownButton.js +52 -5
- package/dist/components/SDropdownButton/SDropdownButton.js.map +1 -1
- package/dist/components/SField/SField.cjs +226 -21
- package/dist/components/SField/SField.cjs.map +1 -1
- package/dist/components/SField/SField.d.ts +11 -0
- package/dist/components/SField/SField.js +226 -21
- package/dist/components/SField/SField.js.map +1 -1
- package/dist/components/SFilePicker/SFilePicker.cjs +306 -278
- package/dist/components/SFilePicker/SFilePicker.cjs.map +1 -1
- package/dist/components/SFilePicker/SFilePicker.d.ts +4 -2
- package/dist/components/SFilePicker/SFilePicker.js +306 -278
- package/dist/components/SFilePicker/SFilePicker.js.map +1 -1
- package/dist/components/SGhostButton/SGhostButton.cjs +8 -0
- package/dist/components/SGhostButton/SGhostButton.cjs.map +1 -1
- package/dist/components/SGhostButton/SGhostButton.js +8 -0
- package/dist/components/SGhostButton/SGhostButton.js.map +1 -1
- package/dist/components/SGuide/SGuide.cjs +12 -1
- package/dist/components/SGuide/SGuide.cjs.map +1 -1
- package/dist/components/SGuide/SGuide.js +12 -1
- package/dist/components/SGuide/SGuide.js.map +1 -1
- package/dist/components/SInput/SInput.cjs +226 -209
- package/dist/components/SInput/SInput.cjs.map +1 -1
- package/dist/components/SInput/SInput.js +226 -209
- package/dist/components/SInput/SInput.js.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs +640 -453
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.d.ts +3 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.js +640 -453
- package/dist/components/SKeyValueTable/SKeyValueTable.js.map +1 -1
- package/dist/components/SLoadingContainer/SLoadingContainer.cjs +64 -58
- package/dist/components/SLoadingContainer/SLoadingContainer.cjs.map +1 -1
- package/dist/components/SLoadingContainer/SLoadingContainer.js +64 -58
- package/dist/components/SLoadingContainer/SLoadingContainer.js.map +1 -1
- package/dist/components/SLoadingContainer/loading.cjs +64 -58
- package/dist/components/SLoadingContainer/loading.cjs.map +1 -1
- package/dist/components/SLoadingContainer/loading.js +64 -58
- package/dist/components/SLoadingContainer/loading.js.map +1 -1
- package/dist/components/SLoadingModal/SLoadingModal.cjs +68 -61
- package/dist/components/SLoadingModal/SLoadingModal.cjs.map +1 -1
- package/dist/components/SLoadingModal/SLoadingModal.js +68 -61
- package/dist/components/SLoadingModal/SLoadingModal.js.map +1 -1
- package/dist/components/SModalContainer/SModalContainer.cjs +9 -1
- package/dist/components/SModalContainer/SModalContainer.cjs.map +1 -1
- package/dist/components/SModalContainer/SModalContainer.js +9 -1
- package/dist/components/SModalContainer/SModalContainer.js.map +1 -1
- package/dist/components/SNumberInput/SNumberInput.cjs +334 -50
- package/dist/components/SNumberInput/SNumberInput.cjs.map +1 -1
- package/dist/components/SNumberInput/SNumberInput.d.ts +2 -0
- package/dist/components/SNumberInput/SNumberInput.js +334 -50
- package/dist/components/SNumberInput/SNumberInput.js.map +1 -1
- package/dist/components/SPagination/SPagination.cjs +1 -1
- package/dist/components/SPagination/SPagination.cjs.map +1 -1
- package/dist/components/SPagination/SPagination.js +1 -1
- package/dist/components/SPagination/SPagination.js.map +1 -1
- package/dist/components/SPopover/SPopover.cjs +20 -3
- package/dist/components/SPopover/SPopover.cjs.map +1 -1
- package/dist/components/SPopover/SPopover.js +20 -4
- package/dist/components/SPopover/SPopover.js.map +1 -1
- package/dist/components/SPopup/SPopup.cjs +2 -2
- package/dist/components/SPopup/SPopup.cjs.map +1 -1
- package/dist/components/SPopup/SPopup.js +2 -2
- package/dist/components/SPopup/SPopup.js.map +1 -1
- package/dist/components/SPortal/SPortal.cjs +8 -0
- package/dist/components/SPortal/SPortal.cjs.map +1 -1
- package/dist/components/SPortal/SPortal.js +8 -0
- package/dist/components/SPortal/SPortal.js.map +1 -1
- package/dist/components/SSelect/SSelect.cjs +76 -32
- package/dist/components/SSelect/SSelect.cjs.map +1 -1
- package/dist/components/SSelect/SSelect.js +76 -32
- package/dist/components/SSelect/SSelect.js.map +1 -1
- package/dist/components/STable/STable.cjs +133 -91
- package/dist/components/STable/STable.cjs.map +1 -1
- package/dist/components/STable/STable.js +133 -91
- package/dist/components/STable/STable.js.map +1 -1
- package/dist/components/STextLink/STextLink.cjs +137 -3
- package/dist/components/STextLink/STextLink.cjs.map +1 -1
- package/dist/components/STextLink/STextLink.d.ts +1 -1
- package/dist/components/STextLink/STextLink.js +118 -4
- package/dist/components/STextLink/STextLink.js.map +1 -1
- package/dist/components/STextarea/STextarea.cjs +226 -21
- package/dist/components/STextarea/STextarea.cjs.map +1 -1
- package/dist/components/STextarea/STextarea.js +226 -21
- package/dist/components/STextarea/STextarea.js.map +1 -1
- package/dist/components/SToast/SToast.cjs +8 -0
- package/dist/components/SToast/SToast.cjs.map +1 -1
- package/dist/components/SToast/SToast.js +8 -0
- package/dist/components/SToast/SToast.js.map +1 -1
- package/dist/components/SToast/SToastContainer.cjs +11 -3
- package/dist/components/SToast/SToastContainer.cjs.map +1 -1
- package/dist/components/SToast/SToastContainer.js +11 -3
- package/dist/components/SToast/SToastContainer.js.map +1 -1
- package/dist/components/STooltip/STooltip.cjs +217 -14
- package/dist/components/STooltip/STooltip.cjs.map +1 -1
- package/dist/components/STooltip/STooltip.js +217 -14
- package/dist/components/STooltip/STooltip.js.map +1 -1
- package/dist/index.cjs +532 -300
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +531 -300
- package/dist/index.js.map +1 -1
- package/dist/lib/floating-anim.cjs +8 -0
- package/dist/lib/floating-anim.cjs.map +1 -1
- package/dist/lib/floating-anim.d.ts +5 -1
- package/dist/lib/floating-anim.js +8 -0
- package/dist/lib/floating-anim.js.map +1 -1
- package/dist/styles.css +175 -66
- package/dist/theme.css +49 -22
- package/package.json +1 -1
|
@@ -5,7 +5,8 @@ var react = require('react');
|
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
-
var
|
|
8
|
+
var RPopover2 = require('@radix-ui/react-popover');
|
|
9
|
+
var RTooltip = require('@radix-ui/react-tooltip');
|
|
9
10
|
|
|
10
11
|
function _interopNamespace(e) {
|
|
11
12
|
if (e && e.__esModule) return e;
|
|
@@ -25,7 +26,8 @@ function _interopNamespace(e) {
|
|
|
25
26
|
return Object.freeze(n);
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
var
|
|
29
|
+
var RPopover2__namespace = /*#__PURE__*/_interopNamespace(RPopover2);
|
|
30
|
+
var RTooltip__namespace = /*#__PURE__*/_interopNamespace(RTooltip);
|
|
29
31
|
|
|
30
32
|
var twMerge = tailwindMerge.extendTailwindMerge({
|
|
31
33
|
extend: {
|
|
@@ -2876,12 +2878,20 @@ var SIcon = react.forwardRef(function SIcon2({ name, size = 24, color, rotate, l
|
|
|
2876
2878
|
// src/lib/floating-anim.ts
|
|
2877
2879
|
var FLOATING_SLIDE_ANIM = [
|
|
2878
2880
|
"data-[state=open]:data-[side=top]:animate-floating-in-top",
|
|
2881
|
+
"data-[state=delayed-open]:data-[side=top]:animate-floating-in-top",
|
|
2882
|
+
"data-[state=instant-open]:data-[side=top]:animate-floating-in-top",
|
|
2879
2883
|
"data-[state=closed]:data-[side=top]:animate-floating-out-top",
|
|
2880
2884
|
"data-[state=open]:data-[side=bottom]:animate-floating-in-bottom",
|
|
2885
|
+
"data-[state=delayed-open]:data-[side=bottom]:animate-floating-in-bottom",
|
|
2886
|
+
"data-[state=instant-open]:data-[side=bottom]:animate-floating-in-bottom",
|
|
2881
2887
|
"data-[state=closed]:data-[side=bottom]:animate-floating-out-bottom",
|
|
2882
2888
|
"data-[state=open]:data-[side=left]:animate-floating-in-left",
|
|
2889
|
+
"data-[state=delayed-open]:data-[side=left]:animate-floating-in-left",
|
|
2890
|
+
"data-[state=instant-open]:data-[side=left]:animate-floating-in-left",
|
|
2883
2891
|
"data-[state=closed]:data-[side=left]:animate-floating-out-left",
|
|
2884
2892
|
"data-[state=open]:data-[side=right]:animate-floating-in-right",
|
|
2893
|
+
"data-[state=delayed-open]:data-[side=right]:animate-floating-in-right",
|
|
2894
|
+
"data-[state=instant-open]:data-[side=right]:animate-floating-in-right",
|
|
2885
2895
|
"data-[state=closed]:data-[side=right]:animate-floating-out-right"
|
|
2886
2896
|
].join(" ");
|
|
2887
2897
|
var PortalContainerContext = react.createContext(null);
|
|
@@ -2889,11 +2899,200 @@ PortalContainerContext.Provider;
|
|
|
2889
2899
|
function usePortalContainer() {
|
|
2890
2900
|
return react.useContext(PortalContainerContext) ?? void 0;
|
|
2891
2901
|
}
|
|
2902
|
+
|
|
2903
|
+
// src/components/STag/tag.config.ts
|
|
2904
|
+
var TAG_SIZE_CONFIG = {
|
|
2905
|
+
xs: {
|
|
2906
|
+
height: 20,
|
|
2907
|
+
paddingX: 8,
|
|
2908
|
+
gap: 4,
|
|
2909
|
+
radius: 6,
|
|
2910
|
+
iconSize: 12,
|
|
2911
|
+
fontSize: 11,
|
|
2912
|
+
fontWeight: 500,
|
|
2913
|
+
lineHeight: 18
|
|
2914
|
+
},
|
|
2915
|
+
sm: {
|
|
2916
|
+
height: 24,
|
|
2917
|
+
paddingX: 8,
|
|
2918
|
+
gap: 4,
|
|
2919
|
+
radius: 6,
|
|
2920
|
+
iconSize: 16,
|
|
2921
|
+
fontSize: 12,
|
|
2922
|
+
fontWeight: 700,
|
|
2923
|
+
lineHeight: 20
|
|
2924
|
+
},
|
|
2925
|
+
md: {
|
|
2926
|
+
height: 28,
|
|
2927
|
+
paddingX: 12,
|
|
2928
|
+
gap: 6,
|
|
2929
|
+
radius: 8,
|
|
2930
|
+
iconSize: 16,
|
|
2931
|
+
fontSize: 14,
|
|
2932
|
+
fontWeight: 700,
|
|
2933
|
+
lineHeight: 24
|
|
2934
|
+
}
|
|
2935
|
+
};
|
|
2936
|
+
var STag = react.forwardRef(function STag2({
|
|
2937
|
+
shape = "square",
|
|
2938
|
+
size = "sm",
|
|
2939
|
+
color = "grey",
|
|
2940
|
+
label = "",
|
|
2941
|
+
icon,
|
|
2942
|
+
iconLeft = true,
|
|
2943
|
+
width,
|
|
2944
|
+
className,
|
|
2945
|
+
style,
|
|
2946
|
+
...rest
|
|
2947
|
+
}, ref) {
|
|
2948
|
+
const s = TAG_SIZE_CONFIG[size];
|
|
2949
|
+
const contentColor = `var(--cmp-tag-${color}-content)`;
|
|
2950
|
+
const iconNode = icon ? /* @__PURE__ */ jsxRuntime.jsx(SIcon, { name: icon, size: s.iconSize, color: contentColor }) : null;
|
|
2951
|
+
const resolvedWidth = typeof width === "number" ? `${width}px` : width;
|
|
2952
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2953
|
+
"span",
|
|
2954
|
+
{
|
|
2955
|
+
ref,
|
|
2956
|
+
"aria-label": label || "tag",
|
|
2957
|
+
className: cn(
|
|
2958
|
+
"box-border inline-flex w-fit select-none items-center justify-center whitespace-nowrap",
|
|
2959
|
+
className
|
|
2960
|
+
),
|
|
2961
|
+
style: {
|
|
2962
|
+
minHeight: s.height,
|
|
2963
|
+
padding: `0 ${s.paddingX}px`,
|
|
2964
|
+
gap: s.gap,
|
|
2965
|
+
borderRadius: shape === "pill" ? 999 : s.radius,
|
|
2966
|
+
fontSize: s.fontSize,
|
|
2967
|
+
fontWeight: s.fontWeight,
|
|
2968
|
+
lineHeight: `${s.lineHeight}px`,
|
|
2969
|
+
background: `var(--cmp-tag-${color}-bg)`,
|
|
2970
|
+
color: contentColor,
|
|
2971
|
+
...resolvedWidth != null ? { width: resolvedWidth } : {},
|
|
2972
|
+
...style
|
|
2973
|
+
},
|
|
2974
|
+
...rest,
|
|
2975
|
+
children: [
|
|
2976
|
+
icon && iconLeft && iconNode,
|
|
2977
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex min-w-0 items-center justify-center", children: label }),
|
|
2978
|
+
icon && !iconLeft && iconNode
|
|
2979
|
+
]
|
|
2980
|
+
}
|
|
2981
|
+
);
|
|
2982
|
+
});
|
|
2983
|
+
var SIZE = {
|
|
2984
|
+
xxs: { icon: 12, radius: "sm" },
|
|
2985
|
+
xs: { icon: 16, radius: "sm" },
|
|
2986
|
+
sm: { icon: 20, radius: "sm" },
|
|
2987
|
+
md: { icon: 24, radius: "md" },
|
|
2988
|
+
lg: { icon: 32, radius: "md" }
|
|
2989
|
+
};
|
|
2990
|
+
var TOOLTIP_HIDE_DELAY_MS = 100;
|
|
2991
|
+
function SGhostButton({
|
|
2992
|
+
icon,
|
|
2993
|
+
size = "sm",
|
|
2994
|
+
intent = "default",
|
|
2995
|
+
ariaLabel = "",
|
|
2996
|
+
tooltipText,
|
|
2997
|
+
disabled = false,
|
|
2998
|
+
onClick,
|
|
2999
|
+
className,
|
|
3000
|
+
style
|
|
3001
|
+
}) {
|
|
3002
|
+
const portalContainer = usePortalContainer();
|
|
3003
|
+
const [open, setOpen] = react.useState(false);
|
|
3004
|
+
const hideTimer = react.useRef(void 0);
|
|
3005
|
+
const cancelHide = () => {
|
|
3006
|
+
if (hideTimer.current) {
|
|
3007
|
+
clearTimeout(hideTimer.current);
|
|
3008
|
+
hideTimer.current = void 0;
|
|
3009
|
+
}
|
|
3010
|
+
};
|
|
3011
|
+
const openNow = () => {
|
|
3012
|
+
cancelHide();
|
|
3013
|
+
setOpen(true);
|
|
3014
|
+
};
|
|
3015
|
+
const startHide = () => {
|
|
3016
|
+
cancelHide();
|
|
3017
|
+
hideTimer.current = setTimeout(() => setOpen(false), TOOLTIP_HIDE_DELAY_MS);
|
|
3018
|
+
};
|
|
3019
|
+
const s = SIZE[size];
|
|
3020
|
+
const contentColor = disabled ? intent === "inverse" ? "var(--cmp-ghostButton-inverse-disabled)" : "var(--cmp-ghostButton-icon-disabled)" : `var(--cmp-ghostButton-${intent}-content)`;
|
|
3021
|
+
const btn = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3022
|
+
"button",
|
|
3023
|
+
{
|
|
3024
|
+
type: "button",
|
|
3025
|
+
disabled,
|
|
3026
|
+
"aria-disabled": disabled ? "true" : void 0,
|
|
3027
|
+
"aria-label": ariaLabel.trim() || void 0,
|
|
3028
|
+
tabIndex: disabled ? -1 : void 0,
|
|
3029
|
+
onClick: (e) => {
|
|
3030
|
+
if (disabled) {
|
|
3031
|
+
e.preventDefault();
|
|
3032
|
+
return;
|
|
3033
|
+
}
|
|
3034
|
+
onClick?.(e);
|
|
3035
|
+
},
|
|
3036
|
+
className: cn(
|
|
3037
|
+
"group relative box-border inline-flex items-center justify-center border-none bg-transparent p-0 transition-shadow",
|
|
3038
|
+
disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
3039
|
+
"focus-visible:outline-none focus-visible:shadow-[0_0_0_2px_var(--cmp-ghostButton-action-hover-bg)]",
|
|
3040
|
+
className
|
|
3041
|
+
),
|
|
3042
|
+
style: {
|
|
3043
|
+
width: `var(--cmp-ghostButton-${size}-size)`,
|
|
3044
|
+
height: `var(--cmp-ghostButton-${size}-size)`,
|
|
3045
|
+
borderRadius: `var(--cmp-ghostButton-radius-${s.radius})`,
|
|
3046
|
+
...style
|
|
3047
|
+
},
|
|
3048
|
+
children: [
|
|
3049
|
+
!disabled && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3050
|
+
"span",
|
|
3051
|
+
{
|
|
3052
|
+
"aria-hidden": true,
|
|
3053
|
+
className: "pointer-events-none absolute inset-0 rounded-[inherit] opacity-0 transition-opacity duration-200 group-hover:opacity-5",
|
|
3054
|
+
style: { background: `var(--cmp-ghostButton-${intent}-hover-bg)` }
|
|
3055
|
+
}
|
|
3056
|
+
),
|
|
3057
|
+
/* @__PURE__ */ jsxRuntime.jsx(SIcon, { name: icon, size: s.icon, color: contentColor })
|
|
3058
|
+
]
|
|
3059
|
+
}
|
|
3060
|
+
);
|
|
3061
|
+
const text = (tooltipText ?? "").trim();
|
|
3062
|
+
if (text === "") return btn;
|
|
3063
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RPopover2__namespace.Root, { open, onOpenChange: setOpen, children: [
|
|
3064
|
+
/* @__PURE__ */ jsxRuntime.jsx(RPopover2__namespace.Anchor, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3065
|
+
"span",
|
|
3066
|
+
{
|
|
3067
|
+
className: "inline-flex",
|
|
3068
|
+
onMouseEnter: openNow,
|
|
3069
|
+
onMouseLeave: startHide,
|
|
3070
|
+
onFocus: openNow,
|
|
3071
|
+
onBlur: startHide,
|
|
3072
|
+
children: btn
|
|
3073
|
+
}
|
|
3074
|
+
) }),
|
|
3075
|
+
/* @__PURE__ */ jsxRuntime.jsx(RPopover2__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3076
|
+
RPopover2__namespace.Content,
|
|
3077
|
+
{
|
|
3078
|
+
side: "top",
|
|
3079
|
+
sideOffset: 4,
|
|
3080
|
+
className: cn("z-50", FLOATING_SLIDE_ANIM),
|
|
3081
|
+
"aria-hidden": true,
|
|
3082
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
3083
|
+
onMouseEnter: cancelHide,
|
|
3084
|
+
onMouseLeave: startHide,
|
|
3085
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(STag, { shape: "square", size: "xs", color: "grey", label: text })
|
|
3086
|
+
}
|
|
3087
|
+
) })
|
|
3088
|
+
] });
|
|
3089
|
+
}
|
|
2892
3090
|
var HIDE_DELAY_MS = 100;
|
|
2893
3091
|
function useBody(content, message = []) {
|
|
2894
3092
|
if (content != null) return content;
|
|
2895
3093
|
if (message.length === 0) return null;
|
|
2896
|
-
|
|
3094
|
+
const singleLine = message.length === 1;
|
|
3095
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: message.map((line, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: singleLine ? "leading-[24px]" : void 0, children: line }, i)) });
|
|
2897
3096
|
}
|
|
2898
3097
|
var STooltip = react.forwardRef(function STooltip2({
|
|
2899
3098
|
content,
|
|
@@ -2951,7 +3150,7 @@ var STooltip = react.forwardRef(function STooltip2({
|
|
|
2951
3150
|
if (disabled || body == null) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: triggerNode });
|
|
2952
3151
|
const isHover = trigger === "hover";
|
|
2953
3152
|
const contentClass = cn(
|
|
2954
|
-
"z-50 max-w-xs rounded-[6px] px-[16px] py-[12px] text-[12px] leading-[20px]",
|
|
3153
|
+
"z-50 max-w-xs rounded-[6px] px-[16px] py-[12px] text-[12px] leading-[20px] shadow-[2px_2px_12px_2px_rgba(0,0,0,0.1)]",
|
|
2955
3154
|
FLOATING_SLIDE_ANIM,
|
|
2956
3155
|
className
|
|
2957
3156
|
);
|
|
@@ -2961,10 +3160,10 @@ var STooltip = react.forwardRef(function STooltip2({
|
|
|
2961
3160
|
fontWeight: tooltipType === "default" ? 500 : 700,
|
|
2962
3161
|
...style
|
|
2963
3162
|
};
|
|
2964
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3163
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RPopover2__namespace.Root, { open, onOpenChange: setOpen, children: [
|
|
2965
3164
|
isHover ? (
|
|
2966
3165
|
// hover: Anchor(위치 기준) + 직접 mouse 핸들러 — 클릭으로 토글되지 않도록 Trigger 미사용
|
|
2967
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3166
|
+
/* @__PURE__ */ jsxRuntime.jsx(RPopover2__namespace.Anchor, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2968
3167
|
"span",
|
|
2969
3168
|
{
|
|
2970
3169
|
className: "inline-flex",
|
|
@@ -2975,9 +3174,9 @@ var STooltip = react.forwardRef(function STooltip2({
|
|
|
2975
3174
|
children: triggerNode
|
|
2976
3175
|
}
|
|
2977
3176
|
) })
|
|
2978
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2979
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2980
|
-
|
|
3177
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(RPopover2__namespace.Trigger, { asChild: true, children: triggerNode }),
|
|
3178
|
+
/* @__PURE__ */ jsxRuntime.jsx(RPopover2__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3179
|
+
RPopover2__namespace.Content,
|
|
2981
3180
|
{
|
|
2982
3181
|
side: placement,
|
|
2983
3182
|
sideOffset: 8,
|
|
@@ -2996,15 +3195,21 @@ var STooltip = react.forwardRef(function STooltip2({
|
|
|
2996
3195
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-[12px]", children: [
|
|
2997
3196
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 flex-1", children: body }),
|
|
2998
3197
|
useClose && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2999
|
-
|
|
3198
|
+
SGhostButton,
|
|
3000
3199
|
{
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3200
|
+
icon: "close",
|
|
3201
|
+
size: "xs",
|
|
3202
|
+
intent: tooltipType === "default" ? "inverse" : "default",
|
|
3203
|
+
ariaLabel: "\uB2EB\uAE30",
|
|
3204
|
+
className: "shrink-0",
|
|
3205
|
+
onClick: () => {
|
|
3206
|
+
cancelHide();
|
|
3207
|
+
setOpen(false);
|
|
3208
|
+
}
|
|
3004
3209
|
}
|
|
3005
3210
|
)
|
|
3006
3211
|
] }),
|
|
3007
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3212
|
+
/* @__PURE__ */ jsxRuntime.jsx(RPopover2__namespace.Arrow, { width: 16, height: 12, style: { fill: bg } })
|
|
3008
3213
|
]
|
|
3009
3214
|
}
|
|
3010
3215
|
) })
|
|
@@ -3038,8 +3243,8 @@ function useFormField(field) {
|
|
|
3038
3243
|
}, [ctx, name]);
|
|
3039
3244
|
}
|
|
3040
3245
|
var FIELD_SIZE = {
|
|
3041
|
-
sm: { height: 28, radius: 4, fieldGap: 12, labelGap: 6, fontSize: 12, lineHeight: 20, icon:
|
|
3042
|
-
md: { height: 36, radius: 6, fieldGap: 16, labelGap: 8, fontSize: 14, lineHeight: 24, icon:
|
|
3246
|
+
sm: { height: 28, radius: 4, fieldGap: 12, labelGap: 6, fontSize: 12, lineHeight: 20, icon: 16 },
|
|
3247
|
+
md: { height: 36, radius: 6, fieldGap: 16, labelGap: 8, fontSize: 14, lineHeight: 24, icon: 16 }
|
|
3043
3248
|
};
|
|
3044
3249
|
var ALIGN = {
|
|
3045
3250
|
start: "flex-start",
|
|
@@ -3054,6 +3259,7 @@ var SField = react.forwardRef(function SField2({
|
|
|
3054
3259
|
labelTooltip = "",
|
|
3055
3260
|
labelTooltipProps,
|
|
3056
3261
|
labelWidth,
|
|
3262
|
+
labelHeight,
|
|
3057
3263
|
size = "sm",
|
|
3058
3264
|
addonLabel = "",
|
|
3059
3265
|
addonAlign = "start",
|
|
@@ -3068,6 +3274,7 @@ var SField = react.forwardRef(function SField2({
|
|
|
3068
3274
|
readOnly = false,
|
|
3069
3275
|
width,
|
|
3070
3276
|
multiline = false,
|
|
3277
|
+
borderless = false,
|
|
3071
3278
|
children,
|
|
3072
3279
|
className,
|
|
3073
3280
|
style,
|
|
@@ -3101,8 +3308,8 @@ var SField = react.forwardRef(function SField2({
|
|
|
3101
3308
|
const resolvedSuccess = status === "pass";
|
|
3102
3309
|
const showError = resolvedError && errorMessage !== "";
|
|
3103
3310
|
const interactive = !disabled && !readOnly;
|
|
3104
|
-
const borderColor = disabled ? "var(--color-grey-45)" : interactive && focused ? "var(--sys-color-field-border-focus)" : resolvedSuccess ? "var(--sys-color-field-border-success)" : resolvedError ? "var(--sys-color-field-border-danger)" : "var(--sys-color-field-border-default)";
|
|
3105
|
-
const bgColor = disabled ? "var(--color-grey-30)" : readOnly ? "var(--sys-color-field-bg-readOnly)" : "var(--sys-color-field-bg-default)";
|
|
3311
|
+
const borderColor = borderless ? "transparent" : disabled ? "var(--color-grey-45)" : interactive && focused ? "var(--sys-color-field-border-focus)" : resolvedSuccess ? "var(--sys-color-field-border-success)" : resolvedError ? "var(--sys-color-field-border-danger)" : "var(--sys-color-field-border-default)";
|
|
3312
|
+
const bgColor = borderless ? "transparent" : disabled ? "var(--color-grey-30)" : readOnly ? "var(--sys-color-field-bg-readOnly)" : "var(--sys-color-field-bg-default)";
|
|
3106
3313
|
const textColor = disabled ? "var(--color-grey-65)" : readOnly ? "var(--sys-color-field-text-readOnly)" : "var(--sys-color-field-text-default)";
|
|
3107
3314
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3108
3315
|
"div",
|
|
@@ -3119,7 +3326,7 @@ var SField = react.forwardRef(function SField2({
|
|
|
3119
3326
|
{
|
|
3120
3327
|
className: "flex shrink-0 items-center font-bold text-(--sys-color-field-text-default)",
|
|
3121
3328
|
style: {
|
|
3122
|
-
height: s.height,
|
|
3329
|
+
height: cssLen(labelHeight) ?? s.height,
|
|
3123
3330
|
marginRight: s.fieldGap,
|
|
3124
3331
|
width: cssLen(labelWidth),
|
|
3125
3332
|
fontSize: s.fontSize,
|
|
@@ -3145,14 +3352,14 @@ var SField = react.forwardRef(function SField2({
|
|
|
3145
3352
|
{
|
|
3146
3353
|
className: cn(
|
|
3147
3354
|
"relative box-border flex min-w-0 items-stretch overflow-hidden border border-solid border-(--field-bc)",
|
|
3148
|
-
interactive && "hover:border-(--sys-color-field-border-focus) hover:shadow-[0px_0px_4px_0px_#0071ff66] focus-within:border-(--sys-color-field-border-focus) focus-within:shadow-[0px_0px_4px_0px_#0071ff66]",
|
|
3355
|
+
interactive && !borderless && "hover:border-(--sys-color-field-border-focus) hover:shadow-[0px_0px_4px_0px_#0071ff66] focus-within:border-(--sys-color-field-border-focus) focus-within:shadow-[0px_0px_4px_0px_#0071ff66]",
|
|
3149
3356
|
disabled && "cursor-not-allowed"
|
|
3150
3357
|
),
|
|
3151
3358
|
style: {
|
|
3152
3359
|
// @ts-expect-error CSS 변수
|
|
3153
3360
|
"--field-bc": borderColor,
|
|
3154
3361
|
// focused/hovered prop이 명시된 경우 강조를 즉시 반영
|
|
3155
|
-
...interactive && focused ? { boxShadow: "0px 0px 4px 0px #0071ff66" } : {},
|
|
3362
|
+
...interactive && !borderless && focused ? { boxShadow: "0px 0px 4px 0px #0071ff66" } : {},
|
|
3156
3363
|
...multiline ? { minHeight: s.height } : { height: s.height },
|
|
3157
3364
|
"width": cssLen(width),
|
|
3158
3365
|
"borderRadius": s.radius,
|
|
@@ -3191,200 +3398,12 @@ var SField = react.forwardRef(function SField2({
|
|
|
3191
3398
|
}
|
|
3192
3399
|
);
|
|
3193
3400
|
});
|
|
3194
|
-
|
|
3195
|
-
// src/components/STag/tag.config.ts
|
|
3196
|
-
var TAG_SIZE_CONFIG = {
|
|
3197
|
-
xs: {
|
|
3198
|
-
height: 20,
|
|
3199
|
-
paddingX: 8,
|
|
3200
|
-
gap: 4,
|
|
3201
|
-
radius: 6,
|
|
3202
|
-
iconSize: 12,
|
|
3203
|
-
fontSize: 11,
|
|
3204
|
-
fontWeight: 500,
|
|
3205
|
-
lineHeight: 18
|
|
3206
|
-
},
|
|
3207
|
-
sm: {
|
|
3208
|
-
height: 24,
|
|
3209
|
-
paddingX: 8,
|
|
3210
|
-
gap: 4,
|
|
3211
|
-
radius: 6,
|
|
3212
|
-
iconSize: 16,
|
|
3213
|
-
fontSize: 12,
|
|
3214
|
-
fontWeight: 700,
|
|
3215
|
-
lineHeight: 20
|
|
3216
|
-
},
|
|
3217
|
-
md: {
|
|
3218
|
-
height: 28,
|
|
3219
|
-
paddingX: 12,
|
|
3220
|
-
gap: 6,
|
|
3221
|
-
radius: 8,
|
|
3222
|
-
iconSize: 16,
|
|
3223
|
-
fontSize: 14,
|
|
3224
|
-
fontWeight: 700,
|
|
3225
|
-
lineHeight: 24
|
|
3226
|
-
}
|
|
3227
|
-
};
|
|
3228
|
-
var STag = react.forwardRef(function STag2({
|
|
3229
|
-
shape = "square",
|
|
3230
|
-
size = "sm",
|
|
3231
|
-
color = "grey",
|
|
3232
|
-
label = "",
|
|
3233
|
-
icon,
|
|
3234
|
-
iconLeft = true,
|
|
3235
|
-
width,
|
|
3236
|
-
className,
|
|
3237
|
-
style,
|
|
3238
|
-
...rest
|
|
3239
|
-
}, ref) {
|
|
3240
|
-
const s = TAG_SIZE_CONFIG[size];
|
|
3241
|
-
const contentColor = `var(--cmp-tag-${color}-content)`;
|
|
3242
|
-
const iconNode = icon ? /* @__PURE__ */ jsxRuntime.jsx(SIcon, { name: icon, size: s.iconSize, color: contentColor }) : null;
|
|
3243
|
-
const resolvedWidth = typeof width === "number" ? `${width}px` : width;
|
|
3244
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3245
|
-
"span",
|
|
3246
|
-
{
|
|
3247
|
-
ref,
|
|
3248
|
-
"aria-label": label || "tag",
|
|
3249
|
-
className: cn(
|
|
3250
|
-
"box-border inline-flex w-fit select-none items-center justify-center whitespace-nowrap",
|
|
3251
|
-
className
|
|
3252
|
-
),
|
|
3253
|
-
style: {
|
|
3254
|
-
minHeight: s.height,
|
|
3255
|
-
padding: `0 ${s.paddingX}px`,
|
|
3256
|
-
gap: s.gap,
|
|
3257
|
-
borderRadius: shape === "pill" ? 999 : s.radius,
|
|
3258
|
-
fontSize: s.fontSize,
|
|
3259
|
-
fontWeight: s.fontWeight,
|
|
3260
|
-
lineHeight: `${s.lineHeight}px`,
|
|
3261
|
-
background: `var(--cmp-tag-${color}-bg)`,
|
|
3262
|
-
color: contentColor,
|
|
3263
|
-
...resolvedWidth != null ? { width: resolvedWidth } : {},
|
|
3264
|
-
...style
|
|
3265
|
-
},
|
|
3266
|
-
...rest,
|
|
3267
|
-
children: [
|
|
3268
|
-
icon && iconLeft && iconNode,
|
|
3269
|
-
label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex min-w-0 items-center justify-center", children: label }),
|
|
3270
|
-
icon && !iconLeft && iconNode
|
|
3271
|
-
]
|
|
3272
|
-
}
|
|
3273
|
-
);
|
|
3274
|
-
});
|
|
3275
|
-
var SIZE = {
|
|
3276
|
-
xxs: { icon: 12, radius: "sm" },
|
|
3277
|
-
xs: { icon: 16, radius: "sm" },
|
|
3278
|
-
sm: { icon: 20, radius: "sm" },
|
|
3279
|
-
md: { icon: 24, radius: "md" },
|
|
3280
|
-
lg: { icon: 32, radius: "md" }
|
|
3281
|
-
};
|
|
3282
|
-
var TOOLTIP_HIDE_DELAY_MS = 100;
|
|
3283
|
-
function SGhostButton({
|
|
3284
|
-
icon,
|
|
3285
|
-
size = "sm",
|
|
3286
|
-
intent = "default",
|
|
3287
|
-
ariaLabel = "",
|
|
3288
|
-
tooltipText,
|
|
3289
|
-
disabled = false,
|
|
3290
|
-
onClick,
|
|
3291
|
-
className,
|
|
3292
|
-
style
|
|
3293
|
-
}) {
|
|
3294
|
-
const portalContainer = usePortalContainer();
|
|
3295
|
-
const [open, setOpen] = react.useState(false);
|
|
3296
|
-
const hideTimer = react.useRef(void 0);
|
|
3297
|
-
const cancelHide = () => {
|
|
3298
|
-
if (hideTimer.current) {
|
|
3299
|
-
clearTimeout(hideTimer.current);
|
|
3300
|
-
hideTimer.current = void 0;
|
|
3301
|
-
}
|
|
3302
|
-
};
|
|
3303
|
-
const openNow = () => {
|
|
3304
|
-
cancelHide();
|
|
3305
|
-
setOpen(true);
|
|
3306
|
-
};
|
|
3307
|
-
const startHide = () => {
|
|
3308
|
-
cancelHide();
|
|
3309
|
-
hideTimer.current = setTimeout(() => setOpen(false), TOOLTIP_HIDE_DELAY_MS);
|
|
3310
|
-
};
|
|
3311
|
-
const s = SIZE[size];
|
|
3312
|
-
const contentColor = disabled ? intent === "inverse" ? "var(--cmp-ghostButton-inverse-disabled)" : "var(--cmp-ghostButton-icon-disabled)" : `var(--cmp-ghostButton-${intent}-content)`;
|
|
3313
|
-
const btn = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3314
|
-
"button",
|
|
3315
|
-
{
|
|
3316
|
-
type: "button",
|
|
3317
|
-
disabled,
|
|
3318
|
-
"aria-disabled": disabled ? "true" : void 0,
|
|
3319
|
-
"aria-label": ariaLabel.trim() || void 0,
|
|
3320
|
-
tabIndex: disabled ? -1 : void 0,
|
|
3321
|
-
onClick: (e) => {
|
|
3322
|
-
if (disabled) {
|
|
3323
|
-
e.preventDefault();
|
|
3324
|
-
return;
|
|
3325
|
-
}
|
|
3326
|
-
onClick?.(e);
|
|
3327
|
-
},
|
|
3328
|
-
className: cn(
|
|
3329
|
-
"group relative box-border inline-flex items-center justify-center border-none bg-transparent p-0 transition-shadow",
|
|
3330
|
-
disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
3331
|
-
"focus-visible:outline-none focus-visible:shadow-[0_0_0_2px_var(--cmp-ghostButton-action-hover-bg)]",
|
|
3332
|
-
className
|
|
3333
|
-
),
|
|
3334
|
-
style: {
|
|
3335
|
-
width: `var(--cmp-ghostButton-${size}-size)`,
|
|
3336
|
-
height: `var(--cmp-ghostButton-${size}-size)`,
|
|
3337
|
-
borderRadius: `var(--cmp-ghostButton-radius-${s.radius})`,
|
|
3338
|
-
...style
|
|
3339
|
-
},
|
|
3340
|
-
children: [
|
|
3341
|
-
!disabled && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3342
|
-
"span",
|
|
3343
|
-
{
|
|
3344
|
-
"aria-hidden": true,
|
|
3345
|
-
className: "pointer-events-none absolute inset-0 rounded-[inherit] opacity-0 transition-opacity duration-200 group-hover:opacity-5",
|
|
3346
|
-
style: { background: `var(--cmp-ghostButton-${intent}-hover-bg)` }
|
|
3347
|
-
}
|
|
3348
|
-
),
|
|
3349
|
-
/* @__PURE__ */ jsxRuntime.jsx(SIcon, { name: icon, size: s.icon, color: contentColor })
|
|
3350
|
-
]
|
|
3351
|
-
}
|
|
3352
|
-
);
|
|
3353
|
-
const text = (tooltipText ?? "").trim();
|
|
3354
|
-
if (text === "") return btn;
|
|
3355
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(RPopover__namespace.Root, { open, onOpenChange: setOpen, children: [
|
|
3356
|
-
/* @__PURE__ */ jsxRuntime.jsx(RPopover__namespace.Anchor, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3357
|
-
"span",
|
|
3358
|
-
{
|
|
3359
|
-
className: "inline-flex",
|
|
3360
|
-
onMouseEnter: openNow,
|
|
3361
|
-
onMouseLeave: startHide,
|
|
3362
|
-
onFocus: openNow,
|
|
3363
|
-
onBlur: startHide,
|
|
3364
|
-
children: btn
|
|
3365
|
-
}
|
|
3366
|
-
) }),
|
|
3367
|
-
/* @__PURE__ */ jsxRuntime.jsx(RPopover__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3368
|
-
RPopover__namespace.Content,
|
|
3369
|
-
{
|
|
3370
|
-
side: "top",
|
|
3371
|
-
sideOffset: 4,
|
|
3372
|
-
className: cn("z-50", FLOATING_SLIDE_ANIM),
|
|
3373
|
-
"aria-hidden": true,
|
|
3374
|
-
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
3375
|
-
onMouseEnter: cancelHide,
|
|
3376
|
-
onMouseLeave: startHide,
|
|
3377
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(STag, { shape: "square", size: "xs", color: "grey", label: text })
|
|
3378
|
-
}
|
|
3379
|
-
) })
|
|
3380
|
-
] });
|
|
3381
|
-
}
|
|
3382
3401
|
var SChip = react.forwardRef(function SChip2({
|
|
3383
3402
|
name,
|
|
3384
3403
|
value = "",
|
|
3385
3404
|
error: errorProp = false,
|
|
3386
3405
|
disabled = false,
|
|
3387
|
-
editable =
|
|
3406
|
+
editable = false,
|
|
3388
3407
|
showRemove = true,
|
|
3389
3408
|
placeholder = "",
|
|
3390
3409
|
rules,
|
|
@@ -3559,6 +3578,7 @@ var STextLink = react.forwardRef(function STextLink2({
|
|
|
3559
3578
|
className,
|
|
3560
3579
|
onClick,
|
|
3561
3580
|
children,
|
|
3581
|
+
style,
|
|
3562
3582
|
...rest
|
|
3563
3583
|
}, ref) {
|
|
3564
3584
|
const s = SIZE_CONFIG[size];
|
|
@@ -3567,13 +3587,13 @@ var STextLink = react.forwardRef(function STextLink2({
|
|
|
3567
3587
|
const handle = () => {
|
|
3568
3588
|
if (!disabled) onClick?.();
|
|
3569
3589
|
};
|
|
3570
|
-
|
|
3590
|
+
const portalContainer = usePortalContainer();
|
|
3591
|
+
const link = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3571
3592
|
"span",
|
|
3572
3593
|
{
|
|
3573
3594
|
ref,
|
|
3574
3595
|
role: "button",
|
|
3575
3596
|
tabIndex: disabled ? -1 : 0,
|
|
3576
|
-
title: tooltipText,
|
|
3577
3597
|
onClick: handle,
|
|
3578
3598
|
onKeyDown: (e) => {
|
|
3579
3599
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -3588,7 +3608,7 @@ var STextLink = react.forwardRef(function STextLink2({
|
|
|
3588
3608
|
disabled && "cursor-not-allowed",
|
|
3589
3609
|
className
|
|
3590
3610
|
),
|
|
3591
|
-
style: { gap: s.gap, color: contentColor },
|
|
3611
|
+
style: { gap: s.gap, color: contentColor, ...style },
|
|
3592
3612
|
...rest,
|
|
3593
3613
|
children: [
|
|
3594
3614
|
icon && /* @__PURE__ */ jsxRuntime.jsx(SIcon, { name: icon, size: s.iconSize, color: resolvedIconColor }),
|
|
@@ -3611,6 +3631,12 @@ var STextLink = react.forwardRef(function STextLink2({
|
|
|
3611
3631
|
]
|
|
3612
3632
|
}
|
|
3613
3633
|
);
|
|
3634
|
+
const text = (tooltipText ?? "").trim();
|
|
3635
|
+
if (text === "") return link;
|
|
3636
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RTooltip__namespace.Provider, { delayDuration: 200, children: /* @__PURE__ */ jsxRuntime.jsxs(RTooltip__namespace.Root, { children: [
|
|
3637
|
+
/* @__PURE__ */ jsxRuntime.jsx(RTooltip__namespace.Trigger, { asChild: true, children: link }),
|
|
3638
|
+
/* @__PURE__ */ jsxRuntime.jsx(RTooltip__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsx(RTooltip__namespace.Content, { side: "top", sideOffset: 4, className: cn("z-50", FLOATING_SLIDE_ANIM), children: /* @__PURE__ */ jsxRuntime.jsx(STag, { shape: "square", size: "xs", color: "grey", label: text }) }) })
|
|
3639
|
+
] }) });
|
|
3614
3640
|
});
|
|
3615
3641
|
function SPortal({
|
|
3616
3642
|
open,
|
|
@@ -3635,7 +3661,7 @@ function SPortal({
|
|
|
3635
3661
|
}) {
|
|
3636
3662
|
const portalContainer = usePortalContainer();
|
|
3637
3663
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3638
|
-
|
|
3664
|
+
RPopover2__namespace.Root,
|
|
3639
3665
|
{
|
|
3640
3666
|
open,
|
|
3641
3667
|
onOpenChange: (next) => {
|
|
@@ -3643,9 +3669,9 @@ function SPortal({
|
|
|
3643
3669
|
if (!next) onClose?.();
|
|
3644
3670
|
},
|
|
3645
3671
|
children: [
|
|
3646
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3647
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3648
|
-
|
|
3672
|
+
/* @__PURE__ */ jsxRuntime.jsx(RPopover2__namespace.Anchor, { virtualRef: anchorRef }),
|
|
3673
|
+
/* @__PURE__ */ jsxRuntime.jsx(RPopover2__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3674
|
+
RPopover2__namespace.Content,
|
|
3649
3675
|
{
|
|
3650
3676
|
side: placement,
|
|
3651
3677
|
align,
|
|
@@ -3693,7 +3719,7 @@ var SChipInput = react.forwardRef(function SChipInput2({
|
|
|
3693
3719
|
disabledChips = [],
|
|
3694
3720
|
size = "sm",
|
|
3695
3721
|
disabled = false,
|
|
3696
|
-
placeholder = "\uC785\uB825\
|
|
3722
|
+
placeholder = "\uD0DC\uADF8 \uC785\uB825 (Enter\uB85C \uB4F1\uB85D / \uCF64\uB9C8\uB85C \uAD6C\uBD84 / \uB744\uC5B4\uC4F0\uAE30 \uBD88\uAC00)",
|
|
3697
3723
|
name,
|
|
3698
3724
|
rules,
|
|
3699
3725
|
error,
|
|
@@ -3844,6 +3870,7 @@ var SChipInput = react.forwardRef(function SChipInput2({
|
|
|
3844
3870
|
{
|
|
3845
3871
|
label,
|
|
3846
3872
|
labelWidth,
|
|
3873
|
+
labelHeight: `calc(var(--cmp-chipInput-${size}-minHeight) + 2px)`,
|
|
3847
3874
|
icon,
|
|
3848
3875
|
labelTooltip,
|
|
3849
3876
|
labelTooltipProps,
|
|
@@ -3914,9 +3941,11 @@ var SChipInput = react.forwardRef(function SChipInput2({
|
|
|
3914
3941
|
paddingInline: isFieldFilled ? "var(--cmp-chip-paddingX)" : void 0,
|
|
3915
3942
|
borderWidth: isFieldFilled ? "var(--cmp-chip-border-width)" : void 0,
|
|
3916
3943
|
borderStyle: isFieldFilled ? "solid" : void 0,
|
|
3917
|
-
|
|
3944
|
+
// 작성중 필드는 SChip의 editable 수정중(editing) 스타일과 동일하게 —
|
|
3945
|
+
// bg/보더/글자색 모두 focus 토큰을 사용한다.
|
|
3946
|
+
borderColor: isFieldFilled ? "var(--cmp-chip-border-focus)" : void 0,
|
|
3918
3947
|
borderRadius: isFieldFilled ? "var(--cmp-chip-radius)" : 0,
|
|
3919
|
-
background: isFieldFilled ? "var(--cmp-chip-bg-
|
|
3948
|
+
background: isFieldFilled ? "var(--cmp-chip-bg-focus)" : "transparent",
|
|
3920
3949
|
overflow: "hidden"
|
|
3921
3950
|
},
|
|
3922
3951
|
children: [
|
|
@@ -3925,7 +3954,7 @@ var SChipInput = react.forwardRef(function SChipInput2({
|
|
|
3925
3954
|
{
|
|
3926
3955
|
"aria-hidden": true,
|
|
3927
3956
|
className: cn(
|
|
3928
|
-
"invisible col-start-1 row-start-1 whitespace-pre font-
|
|
3957
|
+
"invisible col-start-1 row-start-1 whitespace-pre font-normal",
|
|
3929
3958
|
size === "md" ? "text-14 leading-24" : "text-12 leading-20"
|
|
3930
3959
|
),
|
|
3931
3960
|
children: inputValue !== "" ? inputValue : values.length === 0 ? placeholder : ""
|
|
@@ -3938,12 +3967,14 @@ var SChipInput = react.forwardRef(function SChipInput2({
|
|
|
3938
3967
|
name: resolvedName,
|
|
3939
3968
|
size: 1,
|
|
3940
3969
|
className: cn(
|
|
3941
|
-
"s-chip-input__input col-start-1 row-start-1 w-full border-0 bg-transparent p-0 font-
|
|
3970
|
+
"s-chip-input__input col-start-1 row-start-1 w-full border-0 bg-transparent p-0 font-normal text-(--cmp-chip-content-focus) outline-none placeholder:text-(--cmp-chipInput-text-placeholder) disabled:cursor-not-allowed",
|
|
3942
3971
|
size === "md" ? "text-14 leading-24" : "text-12 leading-20"
|
|
3943
3972
|
),
|
|
3944
3973
|
style: {
|
|
3945
3974
|
minWidth: "1ch",
|
|
3946
|
-
height
|
|
3975
|
+
// height는 지정하지 않고 line-height(20/24px)에 맞춰 자동 크기로 둔다.
|
|
3976
|
+
// var(--cmp-chip-height)(24px)로 고정하면 네이티브 <input>이 남는 세로 여백에
|
|
3977
|
+
// 텍스트를 아래로 밀어 넣어, 확정된 chip 텍스트보다 2px 낮게 보인다.
|
|
3947
3978
|
margin: 0,
|
|
3948
3979
|
overflow: "hidden",
|
|
3949
3980
|
textOverflow: "ellipsis"
|
|
@@ -3988,7 +4019,7 @@ var SChipInput = react.forwardRef(function SChipInput2({
|
|
|
3988
4019
|
showMetaInfo && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3989
4020
|
"div",
|
|
3990
4021
|
{
|
|
3991
|
-
className: "s-chip-input__meta flex items-center gap-8",
|
|
4022
|
+
className: "s-chip-input__meta ml-auto flex items-center gap-8",
|
|
3992
4023
|
onMouseDown: (e) => e.preventDefault(),
|
|
3993
4024
|
children: [
|
|
3994
4025
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3998,17 +4029,11 @@ var SChipInput = react.forwardRef(function SChipInput2({
|
|
|
3998
4029
|
style: { width: 1, height: 12, backgroundColor: "#E1E1E1" }
|
|
3999
4030
|
}
|
|
4000
4031
|
),
|
|
4001
|
-
showMaxCount && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4002
|
-
"
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
"\uCD5C\uB300 ",
|
|
4007
|
-
maxCount,
|
|
4008
|
-
"\uAC1C"
|
|
4009
|
-
]
|
|
4010
|
-
}
|
|
4011
|
-
),
|
|
4032
|
+
showMaxCount && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "s-chip-input__max-count text-12 text-(--cmp-chipInput-text-placeholder)", children: [
|
|
4033
|
+
"\uCD5C\uB300 ",
|
|
4034
|
+
maxCount,
|
|
4035
|
+
"\uAC1C"
|
|
4036
|
+
] }),
|
|
4012
4037
|
showResetLink && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4013
4038
|
STextLink,
|
|
4014
4039
|
{
|