sellmate-design-system-react 0.1.10 → 0.2.0
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 +10 -4
- package/dist/components/SActionModal/SActionModal.cjs.map +1 -1
- package/dist/components/SActionModal/SActionModal.js +10 -4
- package/dist/components/SActionModal/SActionModal.js.map +1 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.cjs +22 -5
- package/dist/components/SBarcodeInput/SBarcodeInput.cjs.map +1 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.d.ts +3 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.js +22 -5
- package/dist/components/SBarcodeInput/SBarcodeInput.js.map +1 -1
- package/dist/components/SCalendar/SCalendar.cjs +9 -3
- package/dist/components/SCalendar/SCalendar.cjs.map +1 -1
- package/dist/components/SCalendar/SCalendar.js +9 -3
- package/dist/components/SCalendar/SCalendar.js.map +1 -1
- package/dist/components/SChip/SChip.cjs +9 -3
- package/dist/components/SChip/SChip.cjs.map +1 -1
- package/dist/components/SChip/SChip.js +9 -3
- package/dist/components/SChip/SChip.js.map +1 -1
- package/dist/components/SChipInput/SChipInput.cjs +44 -13
- package/dist/components/SChipInput/SChipInput.cjs.map +1 -1
- package/dist/components/SChipInput/SChipInput.d.ts +5 -0
- package/dist/components/SChipInput/SChipInput.js +44 -13
- package/dist/components/SChipInput/SChipInput.js.map +1 -1
- package/dist/components/SChipInput/index.d.ts +1 -1
- package/dist/components/SCircleProgress/SCircleProgress.cjs +6 -2
- package/dist/components/SCircleProgress/SCircleProgress.cjs.map +1 -1
- package/dist/components/SCircleProgress/SCircleProgress.js +6 -2
- package/dist/components/SCircleProgress/SCircleProgress.js.map +1 -1
- package/dist/components/SConfirmModal/SConfirmModal.cjs +20 -13
- package/dist/components/SConfirmModal/SConfirmModal.cjs.map +1 -1
- package/dist/components/SConfirmModal/SConfirmModal.d.ts +7 -4
- package/dist/components/SConfirmModal/SConfirmModal.js +20 -13
- package/dist/components/SConfirmModal/SConfirmModal.js.map +1 -1
- package/dist/components/SDatePicker/SDatePicker.cjs +22 -5
- package/dist/components/SDatePicker/SDatePicker.cjs.map +1 -1
- package/dist/components/SDatePicker/SDatePicker.d.ts +3 -1
- package/dist/components/SDatePicker/SDatePicker.js +22 -5
- package/dist/components/SDatePicker/SDatePicker.js.map +1 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.cjs +22 -5
- package/dist/components/SDateRangePicker/SDateRangePicker.cjs.map +1 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.d.ts +3 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.js +22 -5
- package/dist/components/SDateRangePicker/SDateRangePicker.js.map +1 -1
- package/dist/components/SDropdownButton/SDropdownButton.cjs +3 -1
- package/dist/components/SDropdownButton/SDropdownButton.cjs.map +1 -1
- package/dist/components/SDropdownButton/SDropdownButton.js +3 -1
- package/dist/components/SDropdownButton/SDropdownButton.js.map +1 -1
- package/dist/components/SField/SField.cjs +20 -5
- package/dist/components/SField/SField.cjs.map +1 -1
- package/dist/components/SField/SField.d.ts +4 -1
- package/dist/components/SField/SField.js +20 -5
- package/dist/components/SField/SField.js.map +1 -1
- package/dist/components/SFilePicker/SFilePicker.cjs +23 -6
- package/dist/components/SFilePicker/SFilePicker.cjs.map +1 -1
- package/dist/components/SFilePicker/SFilePicker.d.ts +3 -1
- package/dist/components/SFilePicker/SFilePicker.js +23 -6
- package/dist/components/SFilePicker/SFilePicker.js.map +1 -1
- package/dist/components/SGhostButton/SGhostButton.cjs +9 -3
- package/dist/components/SGhostButton/SGhostButton.cjs.map +1 -1
- package/dist/components/SGhostButton/SGhostButton.d.ts +5 -1
- package/dist/components/SGhostButton/SGhostButton.js +9 -3
- package/dist/components/SGhostButton/SGhostButton.js.map +1 -1
- package/dist/components/SGnb/SGnb.cjs +3297 -0
- package/dist/components/SGnb/SGnb.cjs.map +1 -0
- package/dist/components/SGnb/SGnb.d.ts +35 -0
- package/dist/components/SGnb/SGnb.js +3295 -0
- package/dist/components/SGnb/SGnb.js.map +1 -0
- package/dist/components/SGnb/gnb.config.d.ts +63 -0
- package/dist/components/SGnb/index.d.ts +2 -0
- package/dist/components/SGuide/SGuide.cjs +9 -3
- package/dist/components/SGuide/SGuide.cjs.map +1 -1
- package/dist/components/SGuide/SGuide.js +9 -3
- package/dist/components/SGuide/SGuide.js.map +1 -1
- package/dist/components/SInput/SInput.cjs +22 -5
- package/dist/components/SInput/SInput.cjs.map +1 -1
- package/dist/components/SInput/SInput.d.ts +4 -1
- package/dist/components/SInput/SInput.js +22 -5
- package/dist/components/SInput/SInput.js.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs +511 -209
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.d.ts +27 -6
- package/dist/components/SKeyValueTable/SKeyValueTable.js +510 -208
- package/dist/components/SKeyValueTable/SKeyValueTable.js.map +1 -1
- package/dist/components/SLayout/SLayout.cjs +79 -0
- package/dist/components/SLayout/SLayout.cjs.map +1 -0
- package/dist/components/SLayout/SLayout.d.ts +41 -0
- package/dist/components/SLayout/SLayout.js +75 -0
- package/dist/components/SLayout/SLayout.js.map +1 -0
- package/dist/components/SLayout/index.d.ts +1 -0
- package/dist/components/SLoadingContainer/SLoadingContainer.cjs +6 -2
- package/dist/components/SLoadingContainer/SLoadingContainer.cjs.map +1 -1
- package/dist/components/SLoadingContainer/SLoadingContainer.js +6 -2
- package/dist/components/SLoadingContainer/SLoadingContainer.js.map +1 -1
- package/dist/components/SLoadingContainer/loading.cjs +6 -2
- package/dist/components/SLoadingContainer/loading.cjs.map +1 -1
- package/dist/components/SLoadingContainer/loading.js +6 -2
- package/dist/components/SLoadingContainer/loading.js.map +1 -1
- package/dist/components/SLoadingModal/SLoadingModal.cjs +16 -6
- package/dist/components/SLoadingModal/SLoadingModal.cjs.map +1 -1
- package/dist/components/SLoadingModal/SLoadingModal.js +16 -6
- package/dist/components/SLoadingModal/SLoadingModal.js.map +1 -1
- package/dist/components/SModalContainer/SModalContainer.cjs +10 -4
- package/dist/components/SModalContainer/SModalContainer.cjs.map +1 -1
- package/dist/components/SModalContainer/SModalContainer.d.ts +10 -0
- package/dist/components/SModalContainer/SModalContainer.js +10 -4
- package/dist/components/SModalContainer/SModalContainer.js.map +1 -1
- package/dist/components/SNumberInput/SNumberInput.cjs +22 -5
- package/dist/components/SNumberInput/SNumberInput.cjs.map +1 -1
- package/dist/components/SNumberInput/SNumberInput.d.ts +2 -0
- package/dist/components/SNumberInput/SNumberInput.js +22 -5
- package/dist/components/SNumberInput/SNumberInput.js.map +1 -1
- package/dist/components/SPage/SPage.cjs +86 -0
- package/dist/components/SPage/SPage.cjs.map +1 -0
- package/dist/components/SPage/SPage.d.ts +13 -0
- package/dist/components/SPage/SPage.js +84 -0
- package/dist/components/SPage/SPage.js.map +1 -0
- package/dist/components/SPage/index.d.ts +1 -0
- package/dist/components/SPopover/SPopover.cjs +9 -3
- package/dist/components/SPopover/SPopover.cjs.map +1 -1
- package/dist/components/SPopover/SPopover.js +9 -3
- package/dist/components/SPopover/SPopover.js.map +1 -1
- package/dist/components/SPortal/SPortal.cjs +3 -1
- package/dist/components/SPortal/SPortal.cjs.map +1 -1
- package/dist/components/SPortal/SPortal.js +3 -1
- package/dist/components/SPortal/SPortal.js.map +1 -1
- package/dist/components/SSelect/SSelect.cjs +545 -265
- package/dist/components/SSelect/SSelect.cjs.map +1 -1
- package/dist/components/SSelect/SSelect.d.ts +4 -2
- package/dist/components/SSelect/SSelect.js +546 -265
- package/dist/components/SSelect/SSelect.js.map +1 -1
- package/dist/components/STable/STable.cjs +552 -268
- package/dist/components/STable/STable.cjs.map +1 -1
- package/dist/components/STable/STable.js +553 -268
- package/dist/components/STable/STable.js.map +1 -1
- package/dist/components/STextLink/STextLink.cjs +2 -0
- package/dist/components/STextLink/STextLink.cjs.map +1 -1
- package/dist/components/STextLink/STextLink.js +2 -0
- package/dist/components/STextLink/STextLink.js.map +1 -1
- package/dist/components/STextarea/STextarea.cjs +22 -5
- package/dist/components/STextarea/STextarea.cjs.map +1 -1
- package/dist/components/STextarea/STextarea.d.ts +2 -0
- package/dist/components/STextarea/STextarea.js +22 -5
- package/dist/components/STextarea/STextarea.js.map +1 -1
- package/dist/components/SToast/SToast.cjs +9 -3
- package/dist/components/SToast/SToast.cjs.map +1 -1
- package/dist/components/SToast/SToast.js +9 -3
- package/dist/components/SToast/SToast.js.map +1 -1
- package/dist/components/SToast/SToastContainer.cjs +9 -3
- package/dist/components/SToast/SToastContainer.cjs.map +1 -1
- package/dist/components/SToast/SToastContainer.js +9 -3
- package/dist/components/SToast/SToastContainer.js.map +1 -1
- package/dist/components/STooltip/STooltip.cjs +9 -3
- package/dist/components/STooltip/STooltip.cjs.map +1 -1
- package/dist/components/STooltip/STooltip.js +9 -3
- package/dist/components/STooltip/STooltip.js.map +1 -1
- package/dist/index.cjs +840 -199
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +832 -200
- package/dist/index.js.map +1 -1
- package/dist/lib/portal-container.d.ts +7 -0
- package/dist/styles.css +253 -63
- package/dist/theme.css +66 -13
- package/package.json +1 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type CSSProperties } from 'react';
|
|
2
2
|
import { type SFieldSize, type SFieldStatus } from '../SField';
|
|
3
3
|
import { type SIconName } from '../SIcon';
|
|
4
|
+
import { type SColor } from '../../lib/color';
|
|
4
5
|
import { type Rule } from '../../lib/form';
|
|
5
6
|
import { type STooltipProps } from '../STooltip';
|
|
6
7
|
export type SChipInputSize = SFieldSize;
|
|
8
|
+
export type SChipInputMetaPlacement = 'end' | 'inline';
|
|
7
9
|
/** ref로 노출되는 UX 메서드 (sd-chip-input @Method sdFocus 대응) */
|
|
8
10
|
export interface SChipInputHandle {
|
|
9
11
|
/** 입력 필드에 포커스를 이동합니다. */
|
|
@@ -32,6 +34,8 @@ export interface SChipInputProps {
|
|
|
32
34
|
useReset?: boolean;
|
|
33
35
|
/** 최대 칩 개수 */
|
|
34
36
|
maxCount?: number;
|
|
37
|
+
/** 최대 개수·초기화 meta 위치 */
|
|
38
|
+
metaPlacement?: SChipInputMetaPlacement;
|
|
35
39
|
/** 중복 에러 메시지 항목명 */
|
|
36
40
|
duplicateLabel?: string;
|
|
37
41
|
/** 자동완성 후보 */
|
|
@@ -49,6 +53,7 @@ export interface SChipInputProps {
|
|
|
49
53
|
width?: number | string;
|
|
50
54
|
status?: SFieldStatus;
|
|
51
55
|
icon?: SIconName;
|
|
56
|
+
iconColor?: SColor;
|
|
52
57
|
labelTooltip?: string;
|
|
53
58
|
labelTooltipProps?: Partial<STooltipProps>;
|
|
54
59
|
className?: string;
|
|
@@ -2872,7 +2872,9 @@ var FLOATING_SLIDE_ANIM = [
|
|
|
2872
2872
|
"data-[state=closed]:data-[side=right]:animate-floating-out-right"
|
|
2873
2873
|
].join(" ");
|
|
2874
2874
|
var PortalContainerContext = createContext(null);
|
|
2875
|
+
var InsideModalContext = createContext(false);
|
|
2875
2876
|
PortalContainerContext.Provider;
|
|
2877
|
+
InsideModalContext.Provider;
|
|
2876
2878
|
function usePortalContainer() {
|
|
2877
2879
|
return useContext(PortalContainerContext) ?? void 0;
|
|
2878
2880
|
}
|
|
@@ -2973,6 +2975,8 @@ function SGhostButton({
|
|
|
2973
2975
|
tooltipText,
|
|
2974
2976
|
disabled = false,
|
|
2975
2977
|
onClick,
|
|
2978
|
+
anchorClassName,
|
|
2979
|
+
anchorStyle,
|
|
2976
2980
|
className,
|
|
2977
2981
|
style
|
|
2978
2982
|
}) {
|
|
@@ -2995,6 +2999,8 @@ function SGhostButton({
|
|
|
2995
2999
|
};
|
|
2996
3000
|
const s = SIZE[size];
|
|
2997
3001
|
const contentColor = disabled ? intent === "inverse" ? "var(--cmp-ghostButton-inverse-disabled)" : "var(--cmp-ghostButton-icon-disabled)" : `var(--cmp-ghostButton-${intent}-content)`;
|
|
3002
|
+
const text = (tooltipText ?? "").trim();
|
|
3003
|
+
const hasTooltip = text !== "";
|
|
2998
3004
|
const btn = /* @__PURE__ */ jsxs(
|
|
2999
3005
|
"button",
|
|
3000
3006
|
{
|
|
@@ -3035,13 +3041,13 @@ function SGhostButton({
|
|
|
3035
3041
|
]
|
|
3036
3042
|
}
|
|
3037
3043
|
);
|
|
3038
|
-
|
|
3039
|
-
if (text === "") return btn;
|
|
3044
|
+
if (!hasTooltip) return btn;
|
|
3040
3045
|
return /* @__PURE__ */ jsxs(RPopover2.Root, { open, onOpenChange: setOpen, children: [
|
|
3041
3046
|
/* @__PURE__ */ jsx(RPopover2.Anchor, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
3042
3047
|
"span",
|
|
3043
3048
|
{
|
|
3044
|
-
className: "inline-flex",
|
|
3049
|
+
className: cn("inline-flex", anchorClassName),
|
|
3050
|
+
style: anchorStyle,
|
|
3045
3051
|
onMouseEnter: openNow,
|
|
3046
3052
|
onMouseLeave: startHide,
|
|
3047
3053
|
onFocus: openNow,
|
|
@@ -3233,6 +3239,7 @@ var SField = forwardRef(function SField2({
|
|
|
3233
3239
|
name,
|
|
3234
3240
|
label = "",
|
|
3235
3241
|
icon,
|
|
3242
|
+
iconColor,
|
|
3236
3243
|
labelTooltip = "",
|
|
3237
3244
|
labelTooltipProps,
|
|
3238
3245
|
labelWidth,
|
|
@@ -3310,7 +3317,15 @@ var SField = forwardRef(function SField2({
|
|
|
3310
3317
|
lineHeight: `${s.lineHeight}px`
|
|
3311
3318
|
},
|
|
3312
3319
|
children: [
|
|
3313
|
-
icon && /* @__PURE__ */ jsx(
|
|
3320
|
+
icon && /* @__PURE__ */ jsx(
|
|
3321
|
+
SIcon,
|
|
3322
|
+
{
|
|
3323
|
+
name: icon,
|
|
3324
|
+
size: s.icon,
|
|
3325
|
+
color: iconColor,
|
|
3326
|
+
style: { marginRight: s.labelGap }
|
|
3327
|
+
}
|
|
3328
|
+
),
|
|
3314
3329
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap", children: label }),
|
|
3315
3330
|
(labelTooltip !== "" || labelTooltipProps) && /* @__PURE__ */ jsx("span", { className: "shrink-0", style: { marginLeft: s.labelGap }, children: /* @__PURE__ */ jsx(
|
|
3316
3331
|
STooltip,
|
|
@@ -3360,7 +3375,7 @@ var SField = forwardRef(function SField2({
|
|
|
3360
3375
|
borderBottomLeftRadius: s.radius - 1
|
|
3361
3376
|
},
|
|
3362
3377
|
children: [
|
|
3363
|
-
icon && !label && /* @__PURE__ */ jsx(SIcon, { name: icon, size: s.icon }),
|
|
3378
|
+
icon && !label && /* @__PURE__ */ jsx(SIcon, { name: icon, size: s.icon, color: iconColor }),
|
|
3364
3379
|
effectiveAddonLabel
|
|
3365
3380
|
]
|
|
3366
3381
|
}
|
|
@@ -3671,7 +3686,7 @@ function SPortal({
|
|
|
3671
3686
|
onCloseAutoFocus,
|
|
3672
3687
|
onClick: autoClose ? () => onClose?.() : void 0,
|
|
3673
3688
|
className: cn(
|
|
3674
|
-
"z-50 overflow-hidden rounded-(--cmp-listBox-radius) bg-(--cmp-listBox-bg)
|
|
3689
|
+
"z-50 overflow-hidden rounded-(--cmp-listBox-radius) bg-(--cmp-listBox-bg) shadow-normal-sm",
|
|
3675
3690
|
maxHeight != null && "overflow-y-auto",
|
|
3676
3691
|
fit && "min-w-(--radix-popover-trigger-width)",
|
|
3677
3692
|
FLOATING_SLIDE_ANIM,
|
|
@@ -3702,6 +3717,7 @@ var SChipInput = forwardRef(function SChipInput2({
|
|
|
3702
3717
|
error,
|
|
3703
3718
|
useReset = false,
|
|
3704
3719
|
maxCount,
|
|
3720
|
+
metaPlacement = "end",
|
|
3705
3721
|
duplicateLabel,
|
|
3706
3722
|
suggestions = [],
|
|
3707
3723
|
loadingSuggestions = false,
|
|
@@ -3715,6 +3731,7 @@ var SChipInput = forwardRef(function SChipInput2({
|
|
|
3715
3731
|
width,
|
|
3716
3732
|
status,
|
|
3717
3733
|
icon,
|
|
3734
|
+
iconColor,
|
|
3718
3735
|
labelTooltip,
|
|
3719
3736
|
labelTooltipProps,
|
|
3720
3737
|
className,
|
|
@@ -3849,6 +3866,7 @@ var SChipInput = forwardRef(function SChipInput2({
|
|
|
3849
3866
|
labelWidth,
|
|
3850
3867
|
labelHeight: `calc(var(--cmp-chipInput-${size}-minHeight) + 2px)`,
|
|
3851
3868
|
icon,
|
|
3869
|
+
iconColor,
|
|
3852
3870
|
labelTooltip,
|
|
3853
3871
|
labelTooltipProps,
|
|
3854
3872
|
size,
|
|
@@ -3996,7 +4014,11 @@ var SChipInput = forwardRef(function SChipInput2({
|
|
|
3996
4014
|
showMetaInfo && /* @__PURE__ */ jsxs(
|
|
3997
4015
|
"div",
|
|
3998
4016
|
{
|
|
3999
|
-
className:
|
|
4017
|
+
className: cn(
|
|
4018
|
+
"s-chip-input__meta flex items-center gap-8",
|
|
4019
|
+
metaPlacement === "end" && "ml-auto"
|
|
4020
|
+
),
|
|
4021
|
+
"data-placement": metaPlacement,
|
|
4000
4022
|
onMouseDown: (e) => e.preventDefault(),
|
|
4001
4023
|
children: [
|
|
4002
4024
|
/* @__PURE__ */ jsx(
|
|
@@ -4006,11 +4028,20 @@ var SChipInput = forwardRef(function SChipInput2({
|
|
|
4006
4028
|
style: { width: 1, height: 12, backgroundColor: "#E1E1E1" }
|
|
4007
4029
|
}
|
|
4008
4030
|
),
|
|
4009
|
-
showMaxCount && /* @__PURE__ */ jsxs(
|
|
4010
|
-
"
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4031
|
+
showMaxCount && /* @__PURE__ */ jsxs(
|
|
4032
|
+
"span",
|
|
4033
|
+
{
|
|
4034
|
+
className: cn(
|
|
4035
|
+
"s-chip-input__max-count text-12",
|
|
4036
|
+
isMax ? "text-(--sys-color-fg-warning)" : "text-(--cmp-chipInput-text-placeholder)"
|
|
4037
|
+
),
|
|
4038
|
+
children: [
|
|
4039
|
+
"\uCD5C\uB300 ",
|
|
4040
|
+
maxCount,
|
|
4041
|
+
"\uAC1C"
|
|
4042
|
+
]
|
|
4043
|
+
}
|
|
4044
|
+
),
|
|
4014
4045
|
showResetLink && /* @__PURE__ */ jsx(
|
|
4015
4046
|
STextLink,
|
|
4016
4047
|
{
|
|
@@ -4047,7 +4078,7 @@ var SChipInput = forwardRef(function SChipInput2({
|
|
|
4047
4078
|
onMouseDown: (e) => e.preventDefault(),
|
|
4048
4079
|
children: [
|
|
4049
4080
|
loading && /* @__PURE__ */ jsx("div", { className: "s-chip-input__suggestions-empty p-12 text-center text-12 leading-20 text-(--color-grey-65)", children: "\uBD88\uB7EC\uC624\uB294 \uC911..." }),
|
|
4050
|
-
!effectiveAutocomplete ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-8
|
|
4081
|
+
!effectiveAutocomplete ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-8 px-12 py-6", children: items.map((item, i) => {
|
|
4051
4082
|
const selected = values.includes(item);
|
|
4052
4083
|
const active = i === activeIndex && !selected;
|
|
4053
4084
|
return /* @__PURE__ */ jsx(
|