sellmate-design-system-react 9.0.0-beta.70 → 9.0.0-beta.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/AGENTS.md +1 -1
- package/dist/index.cjs +37 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +38 -5
- package/dist/index.js.map +1 -1
- package/dist/llms-full.txt +4 -1
- package/dist/llms.txt +4 -1
- package/dist/styles.css +18 -0
- package/dist/theme.css +18 -0
- package/eslint/rules/prefer-typo-preset.mjs +1 -1
- package/eslint/scale.gen.mjs +1 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -255,7 +255,7 @@ Tailwind 유틸리티는 **토큰 스케일에 있는 값만** 사용한다.
|
|
|
255
255
|
| --- | --- |
|
|
256
256
|
| 페이지/섹션 제목 | `typo-heading-lg`(18px) · `typo-heading-md`(16px) · `typo-heading-sm`(14px) · `typo-heading-xs`(12px) |
|
|
257
257
|
| 카드·아이템 안의 메인 수치 데이터 | `typo-heading-xl`(24px) — 제목에 쓰지 않는다 |
|
|
258
|
-
| 본문 | `typo-body-lg-*` (16px) · `typo-body-md-*`(14px) · `typo-body-sm-*`(12px) · `typo-body-xs
|
|
258
|
+
| 본문 | `typo-body-lg-*` (16px) · `typo-body-md-*`(14px) · `typo-body-sm-*`(12px) · `typo-body-xs-*`(11px) — `*` = `default`/`medium`/`semibold`/`bold` |
|
|
259
259
|
| 테이블 | `typo-table-header` · `typo-table-body` · `typo-table-accent` |
|
|
260
260
|
| 컨트롤·필드·피드백·내비 | `typo-control-*` `typo-field-*` `typo-feedback-*` `typo-navigation-*` (컴포넌트 내부용 — 직접 쓸 일은 드묾) |
|
|
261
261
|
|
package/dist/index.cjs
CHANGED
|
@@ -15062,6 +15062,14 @@ var DEFAULT_VIRTUAL_BUFFER = 10;
|
|
|
15062
15062
|
var DEFAULT_REACH_END_THRESHOLD = 10;
|
|
15063
15063
|
var DEFAULT_SEARCH_DEBOUNCE = 300;
|
|
15064
15064
|
var SEARCH_THRESHOLD = 11;
|
|
15065
|
+
function isListSized(el) {
|
|
15066
|
+
return el.clientHeight > 0 && getComputedStyle(el).maxHeight !== "none";
|
|
15067
|
+
}
|
|
15068
|
+
function fallbackListHeight(dropdownHeight) {
|
|
15069
|
+
const viewport = window.innerHeight;
|
|
15070
|
+
const px = typeof dropdownHeight === "number" ? dropdownHeight : Number(/^\s*(\d+(?:\.\d+)?)px\s*$/.exec(dropdownHeight ?? "")?.[1] ?? Number.NaN);
|
|
15071
|
+
return Number.isFinite(px) ? Math.min(px, viewport) : viewport;
|
|
15072
|
+
}
|
|
15065
15073
|
var SSelectImpl = /* @__PURE__ */ react.forwardRef(function SSelect({
|
|
15066
15074
|
value,
|
|
15067
15075
|
onValueChange,
|
|
@@ -15132,6 +15140,7 @@ var SSelectImpl = /* @__PURE__ */ react.forwardRef(function SSelect({
|
|
|
15132
15140
|
const searchBarRef = react.useRef(null);
|
|
15133
15141
|
const [listEl, setListEl] = react.useState(null);
|
|
15134
15142
|
const setListRef = react.useCallback((node) => setListEl(node), []);
|
|
15143
|
+
const [listSized, setListSized] = react.useState(false);
|
|
15135
15144
|
const dismissedByPointerRef = react.useRef(false);
|
|
15136
15145
|
const alignSelectedTopRef = react.useRef(false);
|
|
15137
15146
|
const selectedAnchorRef = react.useRef(-1);
|
|
@@ -15252,7 +15261,7 @@ var SSelectImpl = /* @__PURE__ */ react.forwardRef(function SSelect({
|
|
|
15252
15261
|
if (!multi) return;
|
|
15253
15262
|
const leafValues = groupLeafValues.get(i) ?? [];
|
|
15254
15263
|
if (leafValues.length === 0) return;
|
|
15255
|
-
items.push({ key: `__group_${i}__`, isGroup: true, leafValues });
|
|
15264
|
+
items.push({ key: `__group_${i}__`, isGroup: true, index: i, leafValues });
|
|
15256
15265
|
} else {
|
|
15257
15266
|
items.push({ key: o.value, value: o.value, index: i });
|
|
15258
15267
|
}
|
|
@@ -15282,8 +15291,9 @@ var SSelectImpl = /* @__PURE__ */ react.forwardRef(function SSelect({
|
|
|
15282
15291
|
const m = metricsRef.current;
|
|
15283
15292
|
if (m == null) return;
|
|
15284
15293
|
const buffer = Math.max(0, Math.floor(virtualBuffer));
|
|
15294
|
+
const listHeight = listSized ? Math.max(0, listEl.clientHeight) : fallbackListHeight(dropdownHeight);
|
|
15285
15295
|
const viewTop = Math.max(0, listEl.scrollTop - rowsOffset);
|
|
15286
|
-
const viewBottom = viewTop +
|
|
15296
|
+
const viewBottom = viewTop + listHeight;
|
|
15287
15297
|
const start = Math.max(0, indexAtOffset(m, viewTop) - buffer);
|
|
15288
15298
|
const end = Math.min(rowCount, indexAtOffset(m, viewBottom) + 1 + buffer);
|
|
15289
15299
|
const top = offsetOf(m, start);
|
|
@@ -15293,14 +15303,16 @@ var SSelectImpl = /* @__PURE__ */ react.forwardRef(function SSelect({
|
|
|
15293
15303
|
);
|
|
15294
15304
|
if (!pagingEnabled || !hasMore || loading2) return;
|
|
15295
15305
|
const contentHeight = rowsOffset + totalSize(m);
|
|
15296
|
-
const remaining = contentHeight - listEl.scrollTop -
|
|
15306
|
+
const remaining = contentHeight - listEl.scrollTop - listHeight;
|
|
15297
15307
|
if (remaining > Math.max(1, reachEndThreshold) * m.estimate) return;
|
|
15298
15308
|
if (lastReachEndCountRef.current === rowCount) return;
|
|
15299
15309
|
lastReachEndCountRef.current = rowCount;
|
|
15300
15310
|
cbRef.current.onReachEnd?.();
|
|
15301
15311
|
}, [
|
|
15312
|
+
dropdownHeight,
|
|
15302
15313
|
hasMore,
|
|
15303
15314
|
listEl,
|
|
15315
|
+
listSized,
|
|
15304
15316
|
loading2,
|
|
15305
15317
|
pagingEnabled,
|
|
15306
15318
|
reachEndThreshold,
|
|
@@ -15314,6 +15326,23 @@ var SSelectImpl = /* @__PURE__ */ react.forwardRef(function SSelect({
|
|
|
15314
15326
|
if (!open) return;
|
|
15315
15327
|
syncScrollState();
|
|
15316
15328
|
}, [open, syncScrollState]);
|
|
15329
|
+
react.useLayoutEffect(() => {
|
|
15330
|
+
if (!open || !listEl) {
|
|
15331
|
+
setListSized(false);
|
|
15332
|
+
return;
|
|
15333
|
+
}
|
|
15334
|
+
if (isListSized(listEl)) {
|
|
15335
|
+
setListSized(true);
|
|
15336
|
+
}
|
|
15337
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
15338
|
+
const observer = new ResizeObserver(() => {
|
|
15339
|
+
if (!isListSized(listEl)) return;
|
|
15340
|
+
reactDom.flushSync(() => setListSized(true));
|
|
15341
|
+
syncScrollStateRef.current();
|
|
15342
|
+
});
|
|
15343
|
+
observer.observe(listEl);
|
|
15344
|
+
return () => observer.disconnect();
|
|
15345
|
+
}, [listEl, open]);
|
|
15317
15346
|
react.useLayoutEffect(() => {
|
|
15318
15347
|
if (!open || !listEl) {
|
|
15319
15348
|
setSearchBarHeight(0);
|
|
@@ -15458,6 +15487,10 @@ var SSelectImpl = /* @__PURE__ */ react.forwardRef(function SSelect({
|
|
|
15458
15487
|
syncScrollStateRef.current();
|
|
15459
15488
|
return;
|
|
15460
15489
|
}
|
|
15490
|
+
if (!listSized) {
|
|
15491
|
+
syncScrollStateRef.current();
|
|
15492
|
+
return;
|
|
15493
|
+
}
|
|
15461
15494
|
const top = rowsOffset + offsetOf(m, rowIndex);
|
|
15462
15495
|
const height = sizeOf(m, rowIndex);
|
|
15463
15496
|
if (alignSelectedTopRef.current) {
|
|
@@ -15469,7 +15502,7 @@ var SSelectImpl = /* @__PURE__ */ react.forwardRef(function SSelect({
|
|
|
15469
15502
|
listEl.scrollTop = top + height - listEl.clientHeight;
|
|
15470
15503
|
}
|
|
15471
15504
|
syncScrollStateRef.current();
|
|
15472
|
-
}, [focusedIndex, listEl, open, rowsOffset]);
|
|
15505
|
+
}, [focusedIndex, listEl, listSized, open, rowsOffset]);
|
|
15473
15506
|
const moveFocusedIndex = (direction) => {
|
|
15474
15507
|
if (!open || navigableItems.length === 0) return;
|
|
15475
15508
|
setFocusedIndex((current) => {
|