sellmate-design-system-react 0.7.0 → 0.8.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/SBarcodeInput/SBarcodeInput.cjs +61 -49
- package/dist/components/SBarcodeInput/SBarcodeInput.cjs.map +1 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.js +61 -49
- package/dist/components/SBarcodeInput/SBarcodeInput.js.map +1 -1
- package/dist/components/SChipInput/SChipInput.cjs +61 -49
- package/dist/components/SChipInput/SChipInput.cjs.map +1 -1
- package/dist/components/SChipInput/SChipInput.js +61 -49
- package/dist/components/SChipInput/SChipInput.js.map +1 -1
- package/dist/components/SDatePicker/SDatePicker.cjs +61 -49
- package/dist/components/SDatePicker/SDatePicker.cjs.map +1 -1
- package/dist/components/SDatePicker/SDatePicker.js +61 -49
- package/dist/components/SDatePicker/SDatePicker.js.map +1 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.cjs +61 -49
- package/dist/components/SDateRangePicker/SDateRangePicker.cjs.map +1 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.js +61 -49
- package/dist/components/SDateRangePicker/SDateRangePicker.js.map +1 -1
- package/dist/components/SField/SField.cjs +61 -49
- package/dist/components/SField/SField.cjs.map +1 -1
- package/dist/components/SField/SField.d.ts +5 -2
- package/dist/components/SField/SField.js +61 -49
- package/dist/components/SField/SField.js.map +1 -1
- package/dist/components/SFilePicker/SFilePicker.cjs +61 -49
- package/dist/components/SFilePicker/SFilePicker.cjs.map +1 -1
- package/dist/components/SFilePicker/SFilePicker.js +61 -49
- package/dist/components/SFilePicker/SFilePicker.js.map +1 -1
- package/dist/components/SInput/SInput.cjs +61 -49
- package/dist/components/SInput/SInput.cjs.map +1 -1
- package/dist/components/SInput/SInput.js +61 -49
- package/dist/components/SInput/SInput.js.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs +61 -49
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.js +61 -49
- package/dist/components/SKeyValueTable/SKeyValueTable.js.map +1 -1
- package/dist/components/SNumberInput/SNumberInput.cjs +61 -49
- package/dist/components/SNumberInput/SNumberInput.cjs.map +1 -1
- package/dist/components/SNumberInput/SNumberInput.js +61 -49
- package/dist/components/SNumberInput/SNumberInput.js.map +1 -1
- package/dist/components/SPage/SPage.cjs +19 -2
- package/dist/components/SPage/SPage.cjs.map +1 -1
- package/dist/components/SPage/SPage.d.ts +7 -1
- package/dist/components/SPage/SPage.js +19 -2
- package/dist/components/SPage/SPage.js.map +1 -1
- package/dist/components/SPage/index.d.ts +1 -0
- package/dist/components/SPage/page.config.d.ts +8 -0
- package/dist/components/SPopup/SPopup.cjs.map +1 -1
- package/dist/components/SPopup/SPopup.js.map +1 -1
- package/dist/components/SScrollArea/SScrollArea.cjs.map +1 -1
- package/dist/components/SScrollArea/SScrollArea.js.map +1 -1
- package/dist/components/SSelect/SSelect.cjs +61 -49
- package/dist/components/SSelect/SSelect.cjs.map +1 -1
- package/dist/components/SSelect/SSelect.js +61 -49
- package/dist/components/SSelect/SSelect.js.map +1 -1
- package/dist/components/STable/STable.cjs +67 -55
- package/dist/components/STable/STable.cjs.map +1 -1
- package/dist/components/STable/STable.d.ts +2 -0
- package/dist/components/STable/STable.js +67 -55
- package/dist/components/STable/STable.js.map +1 -1
- package/dist/components/STextarea/STextarea.cjs +61 -49
- package/dist/components/STextarea/STextarea.cjs.map +1 -1
- package/dist/components/STextarea/STextarea.js +61 -49
- package/dist/components/STextarea/STextarea.js.map +1 -1
- package/dist/components/STimePicker/STimePicker.cjs +61 -49
- package/dist/components/STimePicker/STimePicker.cjs.map +1 -1
- package/dist/components/STimePicker/STimePicker.js +61 -49
- package/dist/components/STimePicker/STimePicker.js.map +1 -1
- package/dist/components/STimeRangePicker/STimeRangePicker.cjs +61 -49
- package/dist/components/STimeRangePicker/STimeRangePicker.cjs.map +1 -1
- package/dist/components/STimeRangePicker/STimeRangePicker.js +61 -49
- package/dist/components/STimeRangePicker/STimeRangePicker.js.map +1 -1
- package/dist/index.cjs +84 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +84 -58
- package/dist/index.js.map +1 -1
- package/dist/lib/scrollbar.cjs +2 -0
- package/dist/lib/scrollbar.cjs.map +1 -1
- package/dist/lib/scrollbar.d.ts +13 -1
- package/dist/lib/scrollbar.js +2 -1
- package/dist/lib/scrollbar.js.map +1 -1
- package/dist/styles.css +53 -3
- package/package.json +1 -1
|
@@ -56,9 +56,12 @@ export interface SFieldProps {
|
|
|
56
56
|
disabled?: boolean;
|
|
57
57
|
/** 읽기 전용 (회색 배경) */
|
|
58
58
|
readOnly?: boolean;
|
|
59
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* 컨트롤 너비 (숫자=px). 지정하면 필드가 부모 폭을 다 먹지 않고 (레이블 + width) 만큼만 차지한다.
|
|
61
|
+
* 다른 요소와 나란히 놓으려면 부모를 flex 로 두면 된다.
|
|
62
|
+
*/
|
|
60
63
|
width?: number | string;
|
|
61
|
-
/** 컨트롤 최소 너비 (숫자=px) */
|
|
64
|
+
/** 컨트롤 최소 너비 (숫자=px). 하한선만 지정하며 필드는 계속 부모 폭을 채운다 */
|
|
62
65
|
minWidth?: number | string;
|
|
63
66
|
/** 멀티라인(textarea) — 컨트롤 높이를 고정하지 않고 min-height만 적용 */
|
|
64
67
|
multiline?: boolean;
|
|
@@ -3268,6 +3268,7 @@ var SField = forwardRef(function SField2({
|
|
|
3268
3268
|
const resolvedSuccess = status === "pass";
|
|
3269
3269
|
const showError = resolvedError && errorMessage !== "";
|
|
3270
3270
|
const interactive = !disabled && !readOnly;
|
|
3271
|
+
const hug = cssLen(width) !== void 0;
|
|
3271
3272
|
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)";
|
|
3272
3273
|
const bgColor = borderless ? "transparent" : disabled ? "var(--color-grey-30)" : readOnly ? "var(--sys-color-field-bg-readOnly)" : "var(--sys-color-field-bg-default)";
|
|
3273
3274
|
const textColor = disabled ? "var(--color-grey-65)" : readOnly ? "var(--sys-color-field-text-readOnly)" : "var(--sys-color-field-text-default)";
|
|
@@ -3276,7 +3277,13 @@ var SField = forwardRef(function SField2({
|
|
|
3276
3277
|
{
|
|
3277
3278
|
ref: rootRef,
|
|
3278
3279
|
"data-name": name || void 0,
|
|
3279
|
-
className: cn(
|
|
3280
|
+
className: cn(
|
|
3281
|
+
"h-fit flex-col",
|
|
3282
|
+
// hug 시 inline-flex 를 유지하면 기존에 세로로 쌓여 있던 필드들이 한 줄에 붙어버리므로
|
|
3283
|
+
// 블록 레벨(flex)로 두어 쌓임은 그대로 유지한다. 나란히 놓으려면 부모를 flex 로.
|
|
3284
|
+
hug ? "flex w-fit max-w-full" : "inline-flex w-full",
|
|
3285
|
+
className
|
|
3286
|
+
),
|
|
3280
3287
|
style,
|
|
3281
3288
|
onMouseEnter,
|
|
3282
3289
|
onMouseLeave,
|
|
@@ -3314,55 +3321,60 @@ var SField = forwardRef(function SField2({
|
|
|
3314
3321
|
]
|
|
3315
3322
|
}
|
|
3316
3323
|
),
|
|
3317
|
-
/* @__PURE__ */ jsxs(
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3324
|
+
/* @__PURE__ */ jsxs(
|
|
3325
|
+
"div",
|
|
3326
|
+
{
|
|
3327
|
+
className: cn("flex min-w-0 flex-col", !hug && "flex-1"),
|
|
3328
|
+
style: { width: cssLen(width), minWidth: cssLen(minWidth) },
|
|
3329
|
+
children: [
|
|
3330
|
+
/* @__PURE__ */ jsxs(
|
|
3331
|
+
"div",
|
|
3332
|
+
{
|
|
3333
|
+
className: cn(
|
|
3334
|
+
"relative box-border flex min-w-0 items-stretch overflow-hidden border border-solid border-(--field-bc)",
|
|
3335
|
+
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]",
|
|
3336
|
+
disabled && "cursor-not-allowed"
|
|
3337
|
+
),
|
|
3338
|
+
style: {
|
|
3339
|
+
// @ts-expect-error CSS 변수
|
|
3340
|
+
"--field-bc": borderColor,
|
|
3341
|
+
// focused/hovered prop이 명시된 경우 강조를 즉시 반영
|
|
3342
|
+
...interactive && !borderless && focused ? { boxShadow: "0px 0px 4px 0px #0071ff66" } : {},
|
|
3343
|
+
...multiline ? { minHeight: s.height } : { height: s.height },
|
|
3344
|
+
"borderRadius": s.radius,
|
|
3345
|
+
"background": bgColor,
|
|
3346
|
+
"color": textColor
|
|
3347
|
+
},
|
|
3348
|
+
"data-focused": focused || void 0,
|
|
3349
|
+
"data-hovered": hovered || void 0,
|
|
3350
|
+
children: [
|
|
3351
|
+
effectiveAddonLabel !== "" && /* @__PURE__ */ jsxs(
|
|
3352
|
+
"div",
|
|
3353
|
+
{
|
|
3354
|
+
className: "flex shrink-0 items-center gap-(--cmp-field-addonLabel-gap) whitespace-nowrap border-r border-solid px-(--cmp-field-addonLabel-paddingX) text-12 font-medium leading-20",
|
|
3355
|
+
style: {
|
|
3356
|
+
// 원본 sd-field: labelWidth가 addon 폭(--sd-field-addon-width)에도 적용됨
|
|
3357
|
+
width: cssLen(labelWidth),
|
|
3358
|
+
justifyContent: ALIGN[addonAlign],
|
|
3359
|
+
background: "var(--cmp-field-addonLabel-bg)",
|
|
3360
|
+
borderRightColor: disabled ? "var(--cmp-field-addonLabel-border-disabled)" : "var(--cmp-field-addonLabel-border-default)",
|
|
3361
|
+
borderTopLeftRadius: s.radius - 1,
|
|
3362
|
+
borderBottomLeftRadius: s.radius - 1
|
|
3363
|
+
},
|
|
3364
|
+
children: [
|
|
3365
|
+
icon && !label && /* @__PURE__ */ jsx(SIcon, { name: icon, size: s.icon, color: iconColor }),
|
|
3366
|
+
effectiveAddonLabel
|
|
3367
|
+
]
|
|
3368
|
+
}
|
|
3369
|
+
),
|
|
3370
|
+
/* @__PURE__ */ jsx("div", { className: "flex min-w-0 flex-1", children })
|
|
3371
|
+
]
|
|
3372
|
+
}
|
|
3325
3373
|
),
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
...interactive && !borderless && focused ? { boxShadow: "0px 0px 4px 0px #0071ff66" } : {},
|
|
3331
|
-
...multiline ? { minHeight: s.height } : { height: s.height },
|
|
3332
|
-
"minWidth": cssLen(minWidth),
|
|
3333
|
-
"width": cssLen(width),
|
|
3334
|
-
"borderRadius": s.radius,
|
|
3335
|
-
"background": bgColor,
|
|
3336
|
-
"color": textColor
|
|
3337
|
-
},
|
|
3338
|
-
"data-focused": focused || void 0,
|
|
3339
|
-
"data-hovered": hovered || void 0,
|
|
3340
|
-
children: [
|
|
3341
|
-
effectiveAddonLabel !== "" && /* @__PURE__ */ jsxs(
|
|
3342
|
-
"div",
|
|
3343
|
-
{
|
|
3344
|
-
className: "flex shrink-0 items-center gap-(--cmp-field-addonLabel-gap) whitespace-nowrap border-r border-solid px-(--cmp-field-addonLabel-paddingX) text-12 font-medium leading-20",
|
|
3345
|
-
style: {
|
|
3346
|
-
// 원본 sd-field: labelWidth가 addon 폭(--sd-field-addon-width)에도 적용됨
|
|
3347
|
-
width: cssLen(labelWidth),
|
|
3348
|
-
justifyContent: ALIGN[addonAlign],
|
|
3349
|
-
background: "var(--cmp-field-addonLabel-bg)",
|
|
3350
|
-
borderRightColor: disabled ? "var(--cmp-field-addonLabel-border-disabled)" : "var(--cmp-field-addonLabel-border-default)",
|
|
3351
|
-
borderTopLeftRadius: s.radius - 1,
|
|
3352
|
-
borderBottomLeftRadius: s.radius - 1
|
|
3353
|
-
},
|
|
3354
|
-
children: [
|
|
3355
|
-
icon && !label && /* @__PURE__ */ jsx(SIcon, { name: icon, size: s.icon, color: iconColor }),
|
|
3356
|
-
effectiveAddonLabel
|
|
3357
|
-
]
|
|
3358
|
-
}
|
|
3359
|
-
),
|
|
3360
|
-
/* @__PURE__ */ jsx("div", { className: "flex min-w-0 flex-1", children })
|
|
3361
|
-
]
|
|
3362
|
-
}
|
|
3363
|
-
),
|
|
3364
|
-
showError ? /* @__PURE__ */ jsx("div", { className: "mt-(--cmp-field-contents-gap) text-12 font-normal leading-20 text-(--cmp-field-errorMessage-color)", children: errorMessage }) : hint !== "" ? /* @__PURE__ */ jsx("div", { className: "mt-(--cmp-field-contents-gap) text-12 font-normal leading-20 text-(--cmp-field-hint-color)", children: hint }) : null
|
|
3365
|
-
] })
|
|
3374
|
+
showError ? /* @__PURE__ */ jsx("div", { className: "mt-(--cmp-field-contents-gap) text-12 font-normal leading-20 text-(--cmp-field-errorMessage-color)", children: errorMessage }) : hint !== "" ? /* @__PURE__ */ jsx("div", { className: "mt-(--cmp-field-contents-gap) text-12 font-normal leading-20 text-(--cmp-field-hint-color)", children: hint }) : null
|
|
3375
|
+
]
|
|
3376
|
+
}
|
|
3377
|
+
)
|
|
3366
3378
|
] })
|
|
3367
3379
|
}
|
|
3368
3380
|
);
|