sellmate-design-system-react 2.1.0 → 2.1.1
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 +8 -2
- package/dist/components/SActionModal/SActionModal.cjs.map +1 -1
- package/dist/components/SActionModal/SActionModal.d.ts +11 -2
- package/dist/components/SActionModal/SActionModal.js +8 -2
- package/dist/components/SActionModal/SActionModal.js.map +1 -1
- package/dist/components/SChipInput/SChipInput.cjs +9 -2
- package/dist/components/SChipInput/SChipInput.cjs.map +1 -1
- package/dist/components/SChipInput/SChipInput.js +9 -2
- package/dist/components/SChipInput/SChipInput.js.map +1 -1
- package/dist/components/SConfirmModal/SConfirmModal.cjs +93 -4
- package/dist/components/SConfirmModal/SConfirmModal.cjs.map +1 -1
- package/dist/components/SConfirmModal/SConfirmModal.d.ts +2 -1
- package/dist/components/SConfirmModal/SConfirmModal.js +93 -4
- package/dist/components/SConfirmModal/SConfirmModal.js.map +1 -1
- package/dist/components/SExpansionItem/SExpansionItem.cjs +11 -11
- package/dist/components/SExpansionItem/SExpansionItem.cjs.map +1 -1
- package/dist/components/SExpansionItem/SExpansionItem.js +11 -11
- package/dist/components/SExpansionItem/SExpansionItem.js.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs +20 -19
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.d.ts +57 -4
- package/dist/components/SKeyValueTable/SKeyValueTable.js +20 -19
- package/dist/components/SKeyValueTable/SKeyValueTable.js.map +1 -1
- package/dist/components/SLoadingModal/SLoadingModal.cjs +8 -2
- package/dist/components/SLoadingModal/SLoadingModal.cjs.map +1 -1
- package/dist/components/SLoadingModal/SLoadingModal.js +8 -2
- package/dist/components/SLoadingModal/SLoadingModal.js.map +1 -1
- package/dist/components/SModal/SModal.cjs +93 -4
- package/dist/components/SModal/SModal.cjs.map +1 -1
- package/dist/components/SModal/SModal.js +93 -4
- package/dist/components/SModal/SModal.js.map +1 -1
- package/dist/components/SModalContainer/SModalContainer.cjs +8 -2
- package/dist/components/SModalContainer/SModalContainer.cjs.map +1 -1
- package/dist/components/SModalContainer/SModalContainer.js +8 -2
- package/dist/components/SModalContainer/SModalContainer.js.map +1 -1
- package/dist/components/SSelect/SSelect.cjs +20 -19
- package/dist/components/SSelect/SSelect.cjs.map +1 -1
- package/dist/components/SSelect/SSelect.js +20 -19
- package/dist/components/SSelect/SSelect.js.map +1 -1
- package/dist/components/SStepper/SStepper.cjs +1 -1
- package/dist/components/SStepper/SStepper.cjs.map +1 -1
- package/dist/components/SStepper/SStepper.js +1 -1
- package/dist/components/SStepper/SStepper.js.map +1 -1
- package/dist/components/STable/STable.cjs +20 -19
- package/dist/components/STable/STable.cjs.map +1 -1
- package/dist/components/STable/STable.js +20 -19
- package/dist/components/STable/STable.js.map +1 -1
- package/dist/components/STimePicker/STimePicker.cjs +1 -1
- package/dist/components/STimePicker/STimePicker.cjs.map +1 -1
- package/dist/components/STimePicker/STimePicker.js +1 -1
- package/dist/components/STimePicker/STimePicker.js.map +1 -1
- package/dist/components/STimeRangePicker/STimeRangePicker.cjs +1 -1
- package/dist/components/STimeRangePicker/STimeRangePicker.cjs.map +1 -1
- package/dist/components/STimeRangePicker/STimeRangePicker.js +1 -1
- package/dist/components/STimeRangePicker/STimeRangePicker.js.map +1 -1
- package/dist/index.cjs +67 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +67 -39
- package/dist/index.js.map +1 -1
- package/dist/styles.css +303 -195
- package/dist/theme.css +229 -121
- package/package.json +1 -1
|
@@ -3143,11 +3143,17 @@ function SModalContainer({
|
|
|
3143
3143
|
/* @__PURE__ */ jsx(InsideModalProvider, { value: true, children: /* @__PURE__ */ jsx(PortalContainerProvider, { value: portalContainer, children }) })
|
|
3144
3144
|
]
|
|
3145
3145
|
}
|
|
3146
|
+
),
|
|
3147
|
+
/* @__PURE__ */ jsx(
|
|
3148
|
+
"div",
|
|
3149
|
+
{
|
|
3150
|
+
ref: setPortalContainer,
|
|
3151
|
+
className: "pointer-events-auto fixed left-0 top-0 z-[1001]"
|
|
3152
|
+
}
|
|
3146
3153
|
)
|
|
3147
3154
|
]
|
|
3148
3155
|
}
|
|
3149
|
-
) })
|
|
3150
|
-
/* @__PURE__ */ jsx("div", { ref: setPortalContainer, className: "pointer-events-auto fixed left-0 top-0 z-[1001]" })
|
|
3156
|
+
) })
|
|
3151
3157
|
] }) });
|
|
3152
3158
|
}
|
|
3153
3159
|
|
|
@@ -3316,6 +3322,75 @@ var SButton = forwardRef(function SButton2({
|
|
|
3316
3322
|
}
|
|
3317
3323
|
);
|
|
3318
3324
|
});
|
|
3325
|
+
|
|
3326
|
+
// src/lib/sanitize-inline-html.ts
|
|
3327
|
+
var ALLOWED_INLINE_TAGS = /* @__PURE__ */ new Set(["A", "B", "STRONG", "I", "EM", "BR", "SPAN"]);
|
|
3328
|
+
var ALLOWED_ATTRS_BY_TAG = {
|
|
3329
|
+
A: /* @__PURE__ */ new Set(["href", "target", "rel", "class"])
|
|
3330
|
+
};
|
|
3331
|
+
var COMMON_ALLOWED_ATTRS = /* @__PURE__ */ new Set(["class"]);
|
|
3332
|
+
var SAFE_HREF_RE = /^(https?:|mailto:|tel:|\/|#|\.)/i;
|
|
3333
|
+
var DROP_CONTENT_TAGS = /* @__PURE__ */ new Set([
|
|
3334
|
+
"SCRIPT",
|
|
3335
|
+
"STYLE",
|
|
3336
|
+
"IFRAME",
|
|
3337
|
+
"OBJECT",
|
|
3338
|
+
"EMBED",
|
|
3339
|
+
"META",
|
|
3340
|
+
"LINK",
|
|
3341
|
+
"BASE",
|
|
3342
|
+
"NOSCRIPT",
|
|
3343
|
+
// SVG/MATH 는 foreign-content 파싱 모드로 전환되어 재직렬화 시 다른 트리로
|
|
3344
|
+
// 재파싱될 수 있다(mXSS 벡터). 인라인 라벨에 필요 없으므로 통째로 제거한다.
|
|
3345
|
+
"SVG",
|
|
3346
|
+
"MATH",
|
|
3347
|
+
"TEMPLATE"
|
|
3348
|
+
]);
|
|
3349
|
+
var escapeHtml = (value) => value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
3350
|
+
var sanitizeNode = (node) => {
|
|
3351
|
+
if (node.nodeType === Node.COMMENT_NODE) {
|
|
3352
|
+
node.remove();
|
|
3353
|
+
return;
|
|
3354
|
+
}
|
|
3355
|
+
if (node.nodeType !== Node.ELEMENT_NODE) return;
|
|
3356
|
+
const element = node;
|
|
3357
|
+
const tagName = element.tagName;
|
|
3358
|
+
if (DROP_CONTENT_TAGS.has(tagName)) {
|
|
3359
|
+
element.remove();
|
|
3360
|
+
return;
|
|
3361
|
+
}
|
|
3362
|
+
Array.from(element.childNodes).forEach((child) => sanitizeNode(child));
|
|
3363
|
+
if (ALLOWED_INLINE_TAGS.has(tagName)) {
|
|
3364
|
+
if (element.hasAttribute("className")) {
|
|
3365
|
+
const val = element.getAttribute("className");
|
|
3366
|
+
element.removeAttribute("className");
|
|
3367
|
+
if (!element.hasAttribute("class")) element.setAttribute("class", val);
|
|
3368
|
+
}
|
|
3369
|
+
const allowedAttrs = ALLOWED_ATTRS_BY_TAG[tagName] ?? COMMON_ALLOWED_ATTRS;
|
|
3370
|
+
Array.from(element.attributes).forEach((attr) => {
|
|
3371
|
+
if (!allowedAttrs.has(attr.name)) element.removeAttribute(attr.name);
|
|
3372
|
+
});
|
|
3373
|
+
if (tagName === "A") {
|
|
3374
|
+
const href = element.getAttribute("href");
|
|
3375
|
+
if (href !== null && href !== "" && !SAFE_HREF_RE.test(href)) element.removeAttribute("href");
|
|
3376
|
+
if (element.hasAttribute("target")) {
|
|
3377
|
+
element.setAttribute("rel", "noopener noreferrer");
|
|
3378
|
+
}
|
|
3379
|
+
}
|
|
3380
|
+
return;
|
|
3381
|
+
}
|
|
3382
|
+
const parent = element.parentNode;
|
|
3383
|
+
if (parent == null) return;
|
|
3384
|
+
while (element.firstChild) parent.insertBefore(element.firstChild, element);
|
|
3385
|
+
parent.removeChild(element);
|
|
3386
|
+
};
|
|
3387
|
+
var sanitizeInlineHtml = (value) => {
|
|
3388
|
+
if (typeof document === "undefined") return escapeHtml(value);
|
|
3389
|
+
const template = document.createElement("template");
|
|
3390
|
+
template.innerHTML = value;
|
|
3391
|
+
Array.from(template.content.childNodes).forEach((child) => sanitizeNode(child));
|
|
3392
|
+
return template.innerHTML;
|
|
3393
|
+
};
|
|
3319
3394
|
var TYPE_ICON = {
|
|
3320
3395
|
positive: "notificationOutline",
|
|
3321
3396
|
negative: "warningOutline",
|
|
@@ -3392,10 +3467,24 @@ function SConfirmModal({
|
|
|
3392
3467
|
)
|
|
3393
3468
|
] }),
|
|
3394
3469
|
hasBody && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[20px] text-center text-[12px] font-normal leading-[20px] text-[color:var(--cmp-modal-confirm-message-color)] w-full", children: [
|
|
3395
|
-
topMessage.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-[2px]", children: topMessage.map((m, i) => /* @__PURE__ */ jsx(
|
|
3470
|
+
topMessage.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-[2px]", children: topMessage.map((m, i) => /* @__PURE__ */ jsx(
|
|
3471
|
+
"p",
|
|
3472
|
+
{
|
|
3473
|
+
className: "m-0",
|
|
3474
|
+
dangerouslySetInnerHTML: { __html: sanitizeInlineHtml(m) }
|
|
3475
|
+
},
|
|
3476
|
+
i
|
|
3477
|
+
)) }),
|
|
3396
3478
|
tagNode != null && // tag 위치 content-box: 흰 박스 + 1px 테두리 + 패딩 + 14/700 (원본 sd-confirm-modal__content-box)
|
|
3397
3479
|
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center gap-[8px] rounded-[8px] border border-solid border-[color:var(--color-grey-30)] bg-white px-[16px] py-[12px] text-[14px] font-bold leading-[22px] w-full", children: tagNode }),
|
|
3398
|
-
bottomMessage.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-[2px]", children: bottomMessage.map((m, i) => /* @__PURE__ */ jsx(
|
|
3480
|
+
bottomMessage.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-[2px]", children: bottomMessage.map((m, i) => /* @__PURE__ */ jsx(
|
|
3481
|
+
"p",
|
|
3482
|
+
{
|
|
3483
|
+
className: "m-0",
|
|
3484
|
+
dangerouslySetInnerHTML: { __html: sanitizeInlineHtml(m) }
|
|
3485
|
+
},
|
|
3486
|
+
i
|
|
3487
|
+
)) }),
|
|
3399
3488
|
optionNode != null && optionNode
|
|
3400
3489
|
] })
|
|
3401
3490
|
] }),
|