sellmate-design-system-react 9.0.0-beta.102 → 9.0.0-beta.103
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 +20 -0
- package/dist/components/SIcon/icons.gen.d.ts +3 -0
- package/dist/components/SSelect/README.md +2 -2
- package/dist/components/SSelect/SSelect.d.ts +2 -2
- package/dist/components/SSystemActionButton/README.md +7 -0
- package/dist/components/SSystemActionButton/SSystemActionButton.d.ts +31 -1
- package/dist/index.cjs +255 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +253 -19
- package/dist/index.js.map +1 -1
- package/dist/lib/locale-context.d.ts +26 -0
- package/dist/lib/locale.d.ts +46 -0
- package/dist/llms-full.txt +29 -2
- package/dist/llms.txt +20 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { cn } from './lib/cn';
|
|
2
2
|
export { resolveColor, isColorKey, COLOR_KEYS, type SColor, type SColorKey } from './lib/color';
|
|
3
3
|
export { FIELD_WIDTH_GRADES, isFieldWidthGrade, fieldWidthValue, type SFieldWidth, type SFieldWidthGrade, } from './lib/field-width';
|
|
4
|
+
export { SLocaleProvider, useLocale, type SLocaleProviderProps } from './lib/locale-context';
|
|
5
|
+
export { SLOCALES, normalizeLocale, type SLocale, type SLocaleMessages, type SLocaleMessagesOverride, } from './lib/locale';
|
|
4
6
|
export type { Rule } from './lib/form';
|
|
5
7
|
export * from './components/SIcon';
|
|
6
8
|
export * from './components/SImage';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
import { extendTailwindMerge } from 'tailwind-merge';
|
|
4
|
-
import {
|
|
4
|
+
import { createContext, forwardRef, useState, useRef, useEffect, useCallback, useImperativeHandle, useLayoutEffect, useContext, useMemo, useId, Children, cloneElement, Fragment as Fragment$1, isValidElement, useSyncExternalStore, Component } from 'react';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
import * as RPopover13 from '@radix-ui/react-popover';
|
|
7
7
|
import { createPortal, flushSync } from 'react-dom';
|
|
@@ -243,6 +243,126 @@ var fieldWidthValue = (v) => {
|
|
|
243
243
|
if (isFieldWidthGrade(v)) return `var(--cmp-field-width-${v})`;
|
|
244
244
|
return typeof v === "number" ? `${v}px` : v;
|
|
245
245
|
};
|
|
246
|
+
|
|
247
|
+
// src/lib/locale.ts
|
|
248
|
+
var SLOCALES = ["ko", "en", "ja", "zh"];
|
|
249
|
+
var DEFAULT_LOCALE = "ko";
|
|
250
|
+
var BUNDLES = {
|
|
251
|
+
ko: {
|
|
252
|
+
pagination: {
|
|
253
|
+
firstPage: "\uCCAB \uD398\uC774\uC9C0",
|
|
254
|
+
prevPage: "\uC774\uC804 \uD398\uC774\uC9C0",
|
|
255
|
+
nextPage: "\uB2E4\uC74C \uD398\uC774\uC9C0",
|
|
256
|
+
lastPage: "\uB9C8\uC9C0\uB9C9 \uD398\uC774\uC9C0",
|
|
257
|
+
prevGroup: "\uC774\uC804 \uADF8\uB8F9",
|
|
258
|
+
nextGroup: "\uB2E4\uC74C \uADF8\uB8F9"
|
|
259
|
+
},
|
|
260
|
+
select: {
|
|
261
|
+
placeholder: "\uC120\uD0DD",
|
|
262
|
+
allSelected: "\uC804\uCCB4",
|
|
263
|
+
clear: "\uC120\uD0DD \uC9C0\uC6B0\uAE30",
|
|
264
|
+
deselect: (label) => `${label} \uC120\uD0DD \uD574\uC81C`,
|
|
265
|
+
searchPlaceholder: "\uAC80\uC0C9",
|
|
266
|
+
empty: "\uD45C\uC2DC\uD560 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
267
|
+
loading: "\uBD88\uB7EC\uC624\uB294 \uC911..."
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
en: {
|
|
271
|
+
pagination: {
|
|
272
|
+
firstPage: "First page",
|
|
273
|
+
prevPage: "Previous page",
|
|
274
|
+
nextPage: "Next page",
|
|
275
|
+
lastPage: "Last page",
|
|
276
|
+
prevGroup: "Previous pages",
|
|
277
|
+
nextGroup: "Next pages"
|
|
278
|
+
},
|
|
279
|
+
select: {
|
|
280
|
+
placeholder: "Select",
|
|
281
|
+
allSelected: "All",
|
|
282
|
+
clear: "Clear selection",
|
|
283
|
+
deselect: (label) => `Deselect ${label}`,
|
|
284
|
+
searchPlaceholder: "Search",
|
|
285
|
+
empty: "No items to display.",
|
|
286
|
+
loading: "Loading..."
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
ja: {
|
|
290
|
+
pagination: {
|
|
291
|
+
firstPage: "\u6700\u521D\u306E\u30DA\u30FC\u30B8",
|
|
292
|
+
prevPage: "\u524D\u306E\u30DA\u30FC\u30B8",
|
|
293
|
+
nextPage: "\u6B21\u306E\u30DA\u30FC\u30B8",
|
|
294
|
+
lastPage: "\u6700\u5F8C\u306E\u30DA\u30FC\u30B8",
|
|
295
|
+
prevGroup: "\u524D\u306E\u30B0\u30EB\u30FC\u30D7",
|
|
296
|
+
nextGroup: "\u6B21\u306E\u30B0\u30EB\u30FC\u30D7"
|
|
297
|
+
},
|
|
298
|
+
select: {
|
|
299
|
+
placeholder: "\u9078\u629E",
|
|
300
|
+
allSelected: "\u3059\u3079\u3066",
|
|
301
|
+
clear: "\u9078\u629E\u3092\u30AF\u30EA\u30A2",
|
|
302
|
+
deselect: (label) => `${label} \u306E\u9078\u629E\u3092\u89E3\u9664`,
|
|
303
|
+
searchPlaceholder: "\u691C\u7D22",
|
|
304
|
+
empty: "\u8868\u793A\u3059\u308B\u9805\u76EE\u304C\u3042\u308A\u307E\u305B\u3093\u3002",
|
|
305
|
+
loading: "\u8AAD\u307F\u8FBC\u307F\u4E2D..."
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
zh: {
|
|
309
|
+
pagination: {
|
|
310
|
+
firstPage: "\u7B2C\u4E00\u9875",
|
|
311
|
+
prevPage: "\u4E0A\u4E00\u9875",
|
|
312
|
+
nextPage: "\u4E0B\u4E00\u9875",
|
|
313
|
+
lastPage: "\u6700\u540E\u4E00\u9875",
|
|
314
|
+
prevGroup: "\u4E0A\u4E00\u7EC4",
|
|
315
|
+
nextGroup: "\u4E0B\u4E00\u7EC4"
|
|
316
|
+
},
|
|
317
|
+
select: {
|
|
318
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
319
|
+
allSelected: "\u5168\u90E8",
|
|
320
|
+
clear: "\u6E05\u9664\u9009\u62E9",
|
|
321
|
+
deselect: (label) => `\u53D6\u6D88\u9009\u62E9 ${label}`,
|
|
322
|
+
searchPlaceholder: "\u641C\u7D22",
|
|
323
|
+
empty: "\u6CA1\u6709\u53EF\u663E\u793A\u7684\u9879\u76EE\u3002",
|
|
324
|
+
loading: "\u52A0\u8F7D\u4E2D..."
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
function normalizeLocale(locale) {
|
|
329
|
+
if (!locale) return DEFAULT_LOCALE;
|
|
330
|
+
const lang = locale.toLowerCase().split(/[-_]/)[0];
|
|
331
|
+
return SLOCALES.includes(lang) ? lang : DEFAULT_LOCALE;
|
|
332
|
+
}
|
|
333
|
+
function mergeDefined(base, override) {
|
|
334
|
+
const next = { ...base };
|
|
335
|
+
if (!override) return next;
|
|
336
|
+
for (const key of Object.keys(override)) {
|
|
337
|
+
if (override[key] !== void 0) next[key] = override[key];
|
|
338
|
+
}
|
|
339
|
+
return next;
|
|
340
|
+
}
|
|
341
|
+
function resolveMessages(locale, override) {
|
|
342
|
+
const base = BUNDLES[normalizeLocale(locale)];
|
|
343
|
+
return {
|
|
344
|
+
pagination: mergeDefined(base.pagination, override?.pagination),
|
|
345
|
+
select: mergeDefined(base.select, override?.select)
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
function createValue(locale, override) {
|
|
349
|
+
const normalized = normalizeLocale(locale);
|
|
350
|
+
const numberFormat = new Intl.NumberFormat(normalized);
|
|
351
|
+
return {
|
|
352
|
+
locale: normalized,
|
|
353
|
+
messages: resolveMessages(normalized, override),
|
|
354
|
+
formatNumber: (value) => numberFormat.format(value)
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
var DEFAULT_VALUE = createValue(void 0);
|
|
358
|
+
var LocaleContext = /* @__PURE__ */ createContext(DEFAULT_VALUE);
|
|
359
|
+
function SLocaleProvider({ locale, messages, children }) {
|
|
360
|
+
const value = useMemo(() => createValue(locale, messages), [locale, messages]);
|
|
361
|
+
return /* @__PURE__ */ jsx(LocaleContext.Provider, { value, children });
|
|
362
|
+
}
|
|
363
|
+
function useLocale() {
|
|
364
|
+
return useContext(LocaleContext);
|
|
365
|
+
}
|
|
246
366
|
var Icon_account = (p) => {
|
|
247
367
|
const { size = 24, ...rest } = p;
|
|
248
368
|
return /* @__PURE__ */ jsxs(
|
|
@@ -1710,6 +1830,41 @@ var Icon_date = (p) => {
|
|
|
1710
1830
|
}
|
|
1711
1831
|
);
|
|
1712
1832
|
};
|
|
1833
|
+
var Icon_dollar = (p) => {
|
|
1834
|
+
const { size = 24, ...rest } = p;
|
|
1835
|
+
return /* @__PURE__ */ jsxs(
|
|
1836
|
+
"svg",
|
|
1837
|
+
{
|
|
1838
|
+
width: size,
|
|
1839
|
+
height: size,
|
|
1840
|
+
viewBox: "0 0 24 24",
|
|
1841
|
+
fill: "none",
|
|
1842
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1843
|
+
...rest,
|
|
1844
|
+
children: [
|
|
1845
|
+
/* @__PURE__ */ jsx(
|
|
1846
|
+
"path",
|
|
1847
|
+
{
|
|
1848
|
+
d: "M12 5V7.1M12 7.1V12M12 7.1H15.3333M12 7.1H10.3333C9.04467 7.1 8 8.1969 8 9.55C8 10.9031 9.04467 12 10.3333 12H12M12 12V16.9M12 12H13.6667C14.9553 12 16 13.0969 16 14.45C16 15.8031 14.9553 16.9 13.6667 16.9H12M12 16.9V19M12 16.9H8.66667",
|
|
1849
|
+
stroke: "currentColor",
|
|
1850
|
+
strokeWidth: "1.5",
|
|
1851
|
+
strokeLinecap: "round",
|
|
1852
|
+
strokeLinejoin: "round"
|
|
1853
|
+
}
|
|
1854
|
+
),
|
|
1855
|
+
/* @__PURE__ */ jsx(
|
|
1856
|
+
"path",
|
|
1857
|
+
{
|
|
1858
|
+
d: "M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z",
|
|
1859
|
+
stroke: "currentColor",
|
|
1860
|
+
strokeWidth: "1.5",
|
|
1861
|
+
strokeLinecap: "round"
|
|
1862
|
+
}
|
|
1863
|
+
)
|
|
1864
|
+
]
|
|
1865
|
+
}
|
|
1866
|
+
);
|
|
1867
|
+
};
|
|
1713
1868
|
var Icon_dot = (p) => {
|
|
1714
1869
|
const { size = 24, ...rest } = p;
|
|
1715
1870
|
return /* @__PURE__ */ jsx(
|
|
@@ -1926,6 +2081,54 @@ var Icon_focus = (p) => {
|
|
|
1926
2081
|
}
|
|
1927
2082
|
);
|
|
1928
2083
|
};
|
|
2084
|
+
var Icon_fullscreen = (p) => {
|
|
2085
|
+
const { size = 24, ...rest } = p;
|
|
2086
|
+
return /* @__PURE__ */ jsx(
|
|
2087
|
+
"svg",
|
|
2088
|
+
{
|
|
2089
|
+
width: size,
|
|
2090
|
+
height: size,
|
|
2091
|
+
viewBox: "0 0 24 24",
|
|
2092
|
+
fill: "none",
|
|
2093
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2094
|
+
...rest,
|
|
2095
|
+
children: /* @__PURE__ */ jsx(
|
|
2096
|
+
"path",
|
|
2097
|
+
{
|
|
2098
|
+
d: "M9 3H4C3.44772 3 3 3.44772 3 4V9M15 3H20C20.5523 3 21 3.44772 21 4V9M21 15V20C21 20.5523 20.5523 21 20 21H15M9 21H4C3.44772 21 3 20.5523 3 20V15",
|
|
2099
|
+
stroke: "currentColor",
|
|
2100
|
+
strokeWidth: "1.5",
|
|
2101
|
+
strokeLinecap: "round",
|
|
2102
|
+
strokeLinejoin: "round"
|
|
2103
|
+
}
|
|
2104
|
+
)
|
|
2105
|
+
}
|
|
2106
|
+
);
|
|
2107
|
+
};
|
|
2108
|
+
var Icon_fullscreenExit = (p) => {
|
|
2109
|
+
const { size = 24, ...rest } = p;
|
|
2110
|
+
return /* @__PURE__ */ jsx(
|
|
2111
|
+
"svg",
|
|
2112
|
+
{
|
|
2113
|
+
width: size,
|
|
2114
|
+
height: size,
|
|
2115
|
+
viewBox: "0 0 24 24",
|
|
2116
|
+
fill: "none",
|
|
2117
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2118
|
+
...rest,
|
|
2119
|
+
children: /* @__PURE__ */ jsx(
|
|
2120
|
+
"path",
|
|
2121
|
+
{
|
|
2122
|
+
d: "M3 9H8C8.55228 9 9 8.55228 9 8V3M15 3V8C15 8.55228 15.4477 9 16 9H21M21 15H16C15.4477 15 15 15.4477 15 16V21M9 21V16C9 15.4477 8.55228 15 8 15H3",
|
|
2123
|
+
stroke: "currentColor",
|
|
2124
|
+
strokeWidth: "1.5",
|
|
2125
|
+
strokeLinecap: "round",
|
|
2126
|
+
strokeLinejoin: "round"
|
|
2127
|
+
}
|
|
2128
|
+
)
|
|
2129
|
+
}
|
|
2130
|
+
);
|
|
2131
|
+
};
|
|
1929
2132
|
var Icon_global = (p) => {
|
|
1930
2133
|
const { size = 24, ...rest } = p;
|
|
1931
2134
|
return /* @__PURE__ */ jsx(
|
|
@@ -3628,6 +3831,7 @@ var ICONS = {
|
|
|
3628
3831
|
coupon: Icon_coupon,
|
|
3629
3832
|
dashboard: Icon_dashboard,
|
|
3630
3833
|
date: Icon_date,
|
|
3834
|
+
dollar: Icon_dollar,
|
|
3631
3835
|
dot: Icon_dot,
|
|
3632
3836
|
download: Icon_download,
|
|
3633
3837
|
drag: Icon_drag,
|
|
@@ -3635,6 +3839,8 @@ var ICONS = {
|
|
|
3635
3839
|
etc: Icon_etc,
|
|
3636
3840
|
event: Icon_event,
|
|
3637
3841
|
focus: Icon_focus,
|
|
3842
|
+
fullscreen: Icon_fullscreen,
|
|
3843
|
+
fullscreenExit: Icon_fullscreenExit,
|
|
3638
3844
|
global: Icon_global,
|
|
3639
3845
|
helpFill: Icon_helpFill,
|
|
3640
3846
|
helpOutline: Icon_helpOutline,
|
|
@@ -10420,7 +10626,17 @@ function TokenIcon2({ name, size }) {
|
|
|
10420
10626
|
return /* @__PURE__ */ jsx(SIcon, { name, size: "100%", style: { width: size, height: size } });
|
|
10421
10627
|
}
|
|
10422
10628
|
var SSystemActionButton = /* @__PURE__ */ forwardRef(
|
|
10423
|
-
function SSystemActionButton2({
|
|
10629
|
+
function SSystemActionButton2({
|
|
10630
|
+
color = "light",
|
|
10631
|
+
type,
|
|
10632
|
+
label,
|
|
10633
|
+
labelSlot,
|
|
10634
|
+
option,
|
|
10635
|
+
disabled = false,
|
|
10636
|
+
className,
|
|
10637
|
+
style,
|
|
10638
|
+
...rest
|
|
10639
|
+
}, ref) {
|
|
10424
10640
|
const c = SYSTEM_ACTION_BUTTON_COLOR_CONFIG[color];
|
|
10425
10641
|
const spec = SYSTEM_ACTION_BUTTON_TYPE_CONFIG[type];
|
|
10426
10642
|
const listBox = type === "account" ? option ?? {} : void 0;
|
|
@@ -10508,7 +10724,19 @@ var SSystemActionButton = /* @__PURE__ */ forwardRef(
|
|
|
10508
10724
|
icon: "dot",
|
|
10509
10725
|
label: selected?.label ?? status.value
|
|
10510
10726
|
}
|
|
10511
|
-
) : /* @__PURE__ */
|
|
10727
|
+
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10728
|
+
label != null && /* @__PURE__ */ jsx("span", { className: "truncate", children: label }),
|
|
10729
|
+
labelSlot != null && // 라벨↔슬롯 간격에 대응 토큰이 없어 아이콘↔라벨 간격을 같은 호흡으로 쓴다.
|
|
10730
|
+
// 라벨이 없으면 슬롯이 아이콘 바로 옆에서 시작하도록 간격은 라벨이 있을 때만 준다.
|
|
10731
|
+
/* @__PURE__ */ jsx(
|
|
10732
|
+
"span",
|
|
10733
|
+
{
|
|
10734
|
+
className: "inline-flex shrink-0 items-center",
|
|
10735
|
+
style: label != null ? { marginLeft: SYSTEM_ACTION_BUTTON_LAYOUT.iconLabelGap } : void 0,
|
|
10736
|
+
children: labelSlot
|
|
10737
|
+
}
|
|
10738
|
+
)
|
|
10739
|
+
] }) }),
|
|
10512
10740
|
(actionText != null || spec.actionIcon) && /* @__PURE__ */ jsxs("span", { className: "inline-flex shrink-0 items-center", style: { gap: SYSTEM_ACTION_BUTTON_LAYOUT.actionGap }, children: [
|
|
10513
10741
|
actionText != null && spec.actionText && /* @__PURE__ */ jsx(
|
|
10514
10742
|
"span",
|
|
@@ -14286,6 +14514,7 @@ function SPagination({
|
|
|
14286
14514
|
className,
|
|
14287
14515
|
style
|
|
14288
14516
|
}) {
|
|
14517
|
+
const t = useLocale().messages.pagination;
|
|
14289
14518
|
const start = Math.floor((currentPage - 1) / PER_PAGE) * PER_PAGE + 1;
|
|
14290
14519
|
const end = Math.min(start + PER_PAGE - 1, lastPage);
|
|
14291
14520
|
const pageNumbers = Array.from({ length: Math.max(end - start + 1, 0) }, (_, i) => start + i);
|
|
@@ -14312,18 +14541,18 @@ function SPagination({
|
|
|
14312
14541
|
}
|
|
14313
14542
|
);
|
|
14314
14543
|
const prevButtons = simple ? currentPage > 1 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14315
|
-
navBtn("chevronLeftEnd",
|
|
14316
|
-
navBtn("chevronLeft",
|
|
14544
|
+
navBtn("chevronLeftEnd", t.firstPage, () => go(1)),
|
|
14545
|
+
navBtn("chevronLeft", t.prevPage, () => go(currentPage - 1))
|
|
14317
14546
|
] }) : !isFirstGroup && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14318
|
-
navBtn("chevronLeftEnd",
|
|
14319
|
-
navBtn("chevronLeft",
|
|
14547
|
+
navBtn("chevronLeftEnd", t.firstPage, () => go(1)),
|
|
14548
|
+
navBtn("chevronLeft", t.prevGroup, () => groupMove("backward"))
|
|
14320
14549
|
] });
|
|
14321
14550
|
const nextButtons = simple ? currentPage < lastPage && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14322
|
-
navBtn("chevronRight",
|
|
14323
|
-
navBtn("chevronRightEnd",
|
|
14551
|
+
navBtn("chevronRight", t.nextPage, () => go(currentPage + 1)),
|
|
14552
|
+
navBtn("chevronRightEnd", t.lastPage, () => go(lastPage))
|
|
14324
14553
|
] }) : !isLastGroup && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14325
|
-
navBtn("chevronRight",
|
|
14326
|
-
navBtn("chevronRightEnd",
|
|
14554
|
+
navBtn("chevronRight", t.nextGroup, () => groupMove("forward")),
|
|
14555
|
+
navBtn("chevronRightEnd", t.lastPage, () => go(lastPage))
|
|
14327
14556
|
] });
|
|
14328
14557
|
return /* @__PURE__ */ jsxs(
|
|
14329
14558
|
"div",
|
|
@@ -16415,8 +16644,8 @@ var SSelectImpl = /* @__PURE__ */ forwardRef(function SSelect({
|
|
|
16415
16644
|
valueDisplay = "text",
|
|
16416
16645
|
showSearch = false,
|
|
16417
16646
|
showSelectAll = false,
|
|
16418
|
-
allSelectedLabel
|
|
16419
|
-
placeholder
|
|
16647
|
+
allSelectedLabel: allSelectedLabelProp,
|
|
16648
|
+
placeholder: placeholderProp,
|
|
16420
16649
|
disabled = false,
|
|
16421
16650
|
clearable = false,
|
|
16422
16651
|
error = false,
|
|
@@ -16457,6 +16686,9 @@ var SSelectImpl = /* @__PURE__ */ forwardRef(function SSelect({
|
|
|
16457
16686
|
const partialOptions = pagingEnabled || serverSearch;
|
|
16458
16687
|
const portalContainer = usePortalContainer();
|
|
16459
16688
|
const insideModal = useInsideModal();
|
|
16689
|
+
const t = useLocale().messages.select;
|
|
16690
|
+
const allSelectedLabel = allSelectedLabelProp ?? t.allSelected;
|
|
16691
|
+
const placeholder = placeholderProp ?? t.placeholder;
|
|
16460
16692
|
const [search, setSearch] = useState("");
|
|
16461
16693
|
const [ruleError, setRuleError] = useState("");
|
|
16462
16694
|
const [open, setOpen] = useState(false);
|
|
@@ -17198,7 +17430,9 @@ var SSelectImpl = /* @__PURE__ */ forwardRef(function SSelect({
|
|
|
17198
17430
|
chip.removable && /* @__PURE__ */ jsx(
|
|
17199
17431
|
TriggerRemoveButton,
|
|
17200
17432
|
{
|
|
17201
|
-
ariaLabel:
|
|
17433
|
+
ariaLabel: t.deselect(
|
|
17434
|
+
isHtmlLabel(chip.label) ? extractText(chip.label) : chip.label
|
|
17435
|
+
),
|
|
17202
17436
|
onRemove: () => handleRemoveChip(chip.values)
|
|
17203
17437
|
}
|
|
17204
17438
|
)
|
|
@@ -17210,7 +17444,7 @@ var SSelectImpl = /* @__PURE__ */ forwardRef(function SSelect({
|
|
|
17210
17444
|
)
|
|
17211
17445
|
) : /* @__PURE__ */ jsx(TriggerLabel, { label: triggerText }),
|
|
17212
17446
|
/* @__PURE__ */ jsxs("span", { className: "flex shrink-0 items-center gap-[8px]", children: [
|
|
17213
|
-
showClear && /* @__PURE__ */ jsx(TriggerRemoveButton, { ariaLabel:
|
|
17447
|
+
showClear && /* @__PURE__ */ jsx(TriggerRemoveButton, { ariaLabel: t.clear, onRemove: handleClear }),
|
|
17214
17448
|
showTriggerSpinner ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "inline-flex shrink-0", "data-select-trigger-spinner": true, children: /* @__PURE__ */ jsx(SCircleProgress, { indeterminate: true, type: "neutral", size: 12 }) }) : /* @__PURE__ */ jsx(
|
|
17215
17449
|
SIcon,
|
|
17216
17450
|
{
|
|
@@ -17290,7 +17524,7 @@ var SSelectImpl = /* @__PURE__ */ forwardRef(function SSelect({
|
|
|
17290
17524
|
value: search,
|
|
17291
17525
|
onValueChange: handleSearchChange,
|
|
17292
17526
|
onKeyDown: handleKeyDown,
|
|
17293
|
-
placeholder:
|
|
17527
|
+
placeholder: t.searchPlaceholder,
|
|
17294
17528
|
clearable: true,
|
|
17295
17529
|
"aria-controls": listboxId,
|
|
17296
17530
|
"aria-activedescendant": focusedIndex >= 0 ? activeOptionId : void 0
|
|
@@ -17334,7 +17568,7 @@ var SSelectImpl = /* @__PURE__ */ forwardRef(function SSelect({
|
|
|
17334
17568
|
}
|
|
17335
17569
|
) : loading2 ? null : (
|
|
17336
17570
|
// 첫 페이지를 받는 중에는 "없다"고 단정하지 않는다 — 아래 로딩 표시가 대신 나온다.
|
|
17337
|
-
/* @__PURE__ */ jsx("div", { className: "px-[12px] py-[12px] text-left text-[12px] leading-[20px] text-[color:var(--cmp-listBoxItem-content-disabled)]", children:
|
|
17571
|
+
/* @__PURE__ */ jsx("div", { className: "px-[12px] py-[12px] text-left text-[12px] leading-[20px] text-[color:var(--cmp-listBoxItem-content-disabled)]", children: t.empty })
|
|
17338
17572
|
),
|
|
17339
17573
|
loading2 && /* @__PURE__ */ jsxs(
|
|
17340
17574
|
"div",
|
|
@@ -17343,7 +17577,7 @@ var SSelectImpl = /* @__PURE__ */ forwardRef(function SSelect({
|
|
|
17343
17577
|
className: "flex items-center justify-center gap-[8px] px-[12px] py-[12px] text-[12px] leading-[20px] text-[color:var(--cmp-listBoxItem-content-disabled)]",
|
|
17344
17578
|
children: [
|
|
17345
17579
|
/* @__PURE__ */ jsx(SCircleProgress, { indeterminate: true, type: "neutral", size: 16 }),
|
|
17346
|
-
|
|
17580
|
+
t.loading
|
|
17347
17581
|
]
|
|
17348
17582
|
}
|
|
17349
17583
|
)
|
|
@@ -30455,6 +30689,6 @@ function STimeRangePicker({
|
|
|
30455
30689
|
);
|
|
30456
30690
|
}
|
|
30457
30691
|
|
|
30458
|
-
export { ACCOUNT_LIST_BOX_ICONS, ACCOUNT_LIST_BOX_ITEM_TONES, ACCOUNT_LIST_BOX_LABELS, ACCOUNT_LIST_BOX_LAYOUT, ACCOUNT_LIST_BOX_TONE_CONFIG, BADGE_COLORS, BAR_GAP, BAR_SIZE_MAX, BAR_SIZE_MIN, BUTTON_COLORS, BUTTON_SHAPES, BUTTON_SIZES, BUTTON_TONES, CALENDAR_BOARD_DAY_BG, CALENDAR_BOARD_DAY_COLORS, CALENDAR_BOARD_EVENT_COLORS, CALENDAR_BOARD_EVENT_PRESETS, CALENDAR_BOARD_MAX_VISIBLE_EVENTS, CHAT_ATTACHED_FILE_CONFIG, CHAT_FILE_CONFIG, CHAT_MESSAGE_DIRECTIONS, CHAT_MESSAGE_READ_STATUSES, CHAT_MESSAGE_VARIANTS, CHIP_COLORS, COLOR_KEYS, CONTEXT_ALERT_ICON_COLOR, CONTEXT_ALERT_INTENTS, CONTEXT_ALERT_SURFACE, FIELD_WIDTH_GRADES, GNB_COLORS, GNB_COMMON, GNB_FOLD_MS, GNB_FULL_LOGO_WIDTH, GNB_HEADER, GNB_MENU, GNB_MENU_WIDTH, GNB_RAIL, GNB_RAIL_WIDTH, GNB_SYSTEM_COLORS, GNB_SYSTEM_COLOR_CONFIG, GNB_SYSTEM_LAYOUT, GNB_SYSTEM_PLACEMENTS, GNB_SYSTEM_TOP_COLOR_CONFIG, ICONS, IMAGE_FITS, LAUNCHER_LIST_BOX_CONSOLE_HEIGHT, LAUNCHER_LIST_BOX_CONSOLE_ICON, LAUNCHER_LIST_BOX_CONSOLE_LABEL, LAUNCHER_LIST_BOX_LAYOUT, LAUNCHER_LIST_BOX_LOGO_HEIGHT, LAUNCHER_LIST_BOX_TRAILING_ICON, LAUNCHER_LIST_BOX_WIDTH, LAUNCHER_SERVICES, LAUNCHER_SERVICE_CATALOG, LOGO_DEFAULT_SIZE, LOGO_DIRECTIONS, LOGO_MODES, LOGO_NAMES, PAGE_BACKGROUNDS, PAGE_CONTENT_HEIGHTS, PAGE_CONTENT_WIDTHS, PAGE_HEADER_VARIANTS, PAGE_PADDINGS, RangeCalendar, SAccountListBox, SActionModal, SBadge, SBarChart, SBarcodeInput, SButton, SCROLL_AREA_AXES, SCalendar, SCalendarBoard, SCallout, SCard, SChatAttachedFile2 as SChatAttachedFile, SChatFile2 as SChatFile, SChatInput2 as SChatInput, SChatMessage2 as SChatMessage, SChatSystemMessage2 as SChatSystemMessage, SCheckbox, SChip2 as SChip, SChipFilter, SChipInput, SCircleProgress, SConfirmModal, SContextAlert, SDatePicker, SDatePickerMonthListbox, SDatePickerYearListbox, SDateRangePicker, SDivider, SDonutChart, SDraggableGroup, SDraggableItem2 as SDraggableItem, SDraggableList, SDraggableProvider, SDrawer, SDropdownButton2 as SDropdownButton, SEDITOR_DEFAULT_FONT_SIZE, SEDITOR_HEADING_LABELS, SEDITOR_HEADING_LEVELS, SEditor, SExpansionItem, SExpansionList2 as SExpansionList, SField, SFilePicker, SForm, SGhostButton, SGnb, SGnbSystem, SGnbSystemContext, SGuide, SIcon, SImage, SInput, SKELETON_ANIMATIONS, SKELETON_MODES, SKELETON_TYPES, SKELETON_TYPE_CONFIG, SKeyValueTable, SLAYOUT_MIN_WIDTH, SLauncherListBox, SLayout, SLayoutContext, SLineChart, SLinearProgress, SList2 as SList, SListItem2 as SListItem, SLoadingContainer, SLoadingModal, SLoginCard2 as SLoginCard, SLogo, SMeatballButton2 as SMeatballButton, SModal, SModalOutlet, SNumberInput, SPage, SPageHeader, SPagination, SPieChart, SPopover, SPopup, SPortal, SRadio, SRadioButton, SRadioCard, SRadioCardGroup, SRadioGroup, SSPLITTER_UNITS, SScrollArea, SSearchInput, SSectionHeaderCard2 as SSectionHeaderCard, SSectionNav, SSelect2 as SSelect, SSkeleton, SSlider, SSplitter2 as SSplitter, SStepper, SSwitch, SSystemActionButton, STEPPER_SIZES, STable2 as STable, STableBar, STabs, STag, STextLink, STextarea, STimePicker, STimeRangePicker, STimeline2 as STimeline, SToast, SToastContainer, SToggle, STooltip2 as STooltip, STree2 as STree, STreeItem2 as STreeItem, STreeTable, SYSTEM_ACTION_BUTTON_COLORS, SYSTEM_ACTION_BUTTON_COLOR_CONFIG, SYSTEM_ACTION_BUTTON_LAYOUT, SYSTEM_ACTION_BUTTON_TYPES, SYSTEM_ACTION_BUTTON_TYPE_CONFIG, TAG_COLORS, TAG_SHAPES, TAG_SIZES, TIMEPICKER_SIZES, TIMEPICKER_SIZE_CONFIG, buttonPreset, cn, fieldLabelId, fieldWidthValue, fileExtension, findGnbAncestors, findGnbRailValue, formatFileSize, isColorKey, isFieldWidthGrade, loading, normalizeExtension, resolveColor, useSLayout };
|
|
30692
|
+
export { ACCOUNT_LIST_BOX_ICONS, ACCOUNT_LIST_BOX_ITEM_TONES, ACCOUNT_LIST_BOX_LABELS, ACCOUNT_LIST_BOX_LAYOUT, ACCOUNT_LIST_BOX_TONE_CONFIG, BADGE_COLORS, BAR_GAP, BAR_SIZE_MAX, BAR_SIZE_MIN, BUTTON_COLORS, BUTTON_SHAPES, BUTTON_SIZES, BUTTON_TONES, CALENDAR_BOARD_DAY_BG, CALENDAR_BOARD_DAY_COLORS, CALENDAR_BOARD_EVENT_COLORS, CALENDAR_BOARD_EVENT_PRESETS, CALENDAR_BOARD_MAX_VISIBLE_EVENTS, CHAT_ATTACHED_FILE_CONFIG, CHAT_FILE_CONFIG, CHAT_MESSAGE_DIRECTIONS, CHAT_MESSAGE_READ_STATUSES, CHAT_MESSAGE_VARIANTS, CHIP_COLORS, COLOR_KEYS, CONTEXT_ALERT_ICON_COLOR, CONTEXT_ALERT_INTENTS, CONTEXT_ALERT_SURFACE, FIELD_WIDTH_GRADES, GNB_COLORS, GNB_COMMON, GNB_FOLD_MS, GNB_FULL_LOGO_WIDTH, GNB_HEADER, GNB_MENU, GNB_MENU_WIDTH, GNB_RAIL, GNB_RAIL_WIDTH, GNB_SYSTEM_COLORS, GNB_SYSTEM_COLOR_CONFIG, GNB_SYSTEM_LAYOUT, GNB_SYSTEM_PLACEMENTS, GNB_SYSTEM_TOP_COLOR_CONFIG, ICONS, IMAGE_FITS, LAUNCHER_LIST_BOX_CONSOLE_HEIGHT, LAUNCHER_LIST_BOX_CONSOLE_ICON, LAUNCHER_LIST_BOX_CONSOLE_LABEL, LAUNCHER_LIST_BOX_LAYOUT, LAUNCHER_LIST_BOX_LOGO_HEIGHT, LAUNCHER_LIST_BOX_TRAILING_ICON, LAUNCHER_LIST_BOX_WIDTH, LAUNCHER_SERVICES, LAUNCHER_SERVICE_CATALOG, LOGO_DEFAULT_SIZE, LOGO_DIRECTIONS, LOGO_MODES, LOGO_NAMES, PAGE_BACKGROUNDS, PAGE_CONTENT_HEIGHTS, PAGE_CONTENT_WIDTHS, PAGE_HEADER_VARIANTS, PAGE_PADDINGS, RangeCalendar, SAccountListBox, SActionModal, SBadge, SBarChart, SBarcodeInput, SButton, SCROLL_AREA_AXES, SCalendar, SCalendarBoard, SCallout, SCard, SChatAttachedFile2 as SChatAttachedFile, SChatFile2 as SChatFile, SChatInput2 as SChatInput, SChatMessage2 as SChatMessage, SChatSystemMessage2 as SChatSystemMessage, SCheckbox, SChip2 as SChip, SChipFilter, SChipInput, SCircleProgress, SConfirmModal, SContextAlert, SDatePicker, SDatePickerMonthListbox, SDatePickerYearListbox, SDateRangePicker, SDivider, SDonutChart, SDraggableGroup, SDraggableItem2 as SDraggableItem, SDraggableList, SDraggableProvider, SDrawer, SDropdownButton2 as SDropdownButton, SEDITOR_DEFAULT_FONT_SIZE, SEDITOR_HEADING_LABELS, SEDITOR_HEADING_LEVELS, SEditor, SExpansionItem, SExpansionList2 as SExpansionList, SField, SFilePicker, SForm, SGhostButton, SGnb, SGnbSystem, SGnbSystemContext, SGuide, SIcon, SImage, SInput, SKELETON_ANIMATIONS, SKELETON_MODES, SKELETON_TYPES, SKELETON_TYPE_CONFIG, SKeyValueTable, SLAYOUT_MIN_WIDTH, SLOCALES, SLauncherListBox, SLayout, SLayoutContext, SLineChart, SLinearProgress, SList2 as SList, SListItem2 as SListItem, SLoadingContainer, SLoadingModal, SLocaleProvider, SLoginCard2 as SLoginCard, SLogo, SMeatballButton2 as SMeatballButton, SModal, SModalOutlet, SNumberInput, SPage, SPageHeader, SPagination, SPieChart, SPopover, SPopup, SPortal, SRadio, SRadioButton, SRadioCard, SRadioCardGroup, SRadioGroup, SSPLITTER_UNITS, SScrollArea, SSearchInput, SSectionHeaderCard2 as SSectionHeaderCard, SSectionNav, SSelect2 as SSelect, SSkeleton, SSlider, SSplitter2 as SSplitter, SStepper, SSwitch, SSystemActionButton, STEPPER_SIZES, STable2 as STable, STableBar, STabs, STag, STextLink, STextarea, STimePicker, STimeRangePicker, STimeline2 as STimeline, SToast, SToastContainer, SToggle, STooltip2 as STooltip, STree2 as STree, STreeItem2 as STreeItem, STreeTable, SYSTEM_ACTION_BUTTON_COLORS, SYSTEM_ACTION_BUTTON_COLOR_CONFIG, SYSTEM_ACTION_BUTTON_LAYOUT, SYSTEM_ACTION_BUTTON_TYPES, SYSTEM_ACTION_BUTTON_TYPE_CONFIG, TAG_COLORS, TAG_SHAPES, TAG_SIZES, TIMEPICKER_SIZES, TIMEPICKER_SIZE_CONFIG, buttonPreset, cn, fieldLabelId, fieldWidthValue, fileExtension, findGnbAncestors, findGnbRailValue, formatFileSize, isColorKey, isFieldWidthGrade, loading, normalizeExtension, normalizeLocale, resolveColor, useLocale, useSLayout };
|
|
30459
30693
|
//# sourceMappingURL=index.js.map
|
|
30460
30694
|
//# sourceMappingURL=index.js.map
|