sellmate-design-system-react 9.0.0-beta.55 → 9.0.0-beta.56

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/index.cjs CHANGED
@@ -371,6 +371,43 @@ var Icon_alert = (p) => {
371
371
  }
372
372
  );
373
373
  };
374
+ var Icon_alignCenter = (p) => {
375
+ const { size = 24, ...rest } = p;
376
+ return /* @__PURE__ */ jsxRuntime.jsxs(
377
+ "svg",
378
+ {
379
+ width: size,
380
+ height: size,
381
+ viewBox: "0 0 24 24",
382
+ fill: "none",
383
+ xmlns: "http://www.w3.org/2000/svg",
384
+ ...rest,
385
+ children: [
386
+ /* @__PURE__ */ jsxRuntime.jsx(
387
+ "path",
388
+ {
389
+ d: "M20 16.25C20.4142 16.25 20.75 16.5858 20.75 17C20.75 17.4142 20.4142 17.75 20 17.75H4C3.58579 17.75 3.25 17.4142 3.25 17C3.25 16.5858 3.58579 16.25 4 16.25H20Z",
390
+ fill: "currentColor"
391
+ }
392
+ ),
393
+ /* @__PURE__ */ jsxRuntime.jsx(
394
+ "path",
395
+ {
396
+ d: "M16 11.25C16.4142 11.25 16.75 11.5858 16.75 12C16.75 12.4142 16.4142 12.75 16 12.75H7C6.58579 12.75 6.25 12.4142 6.25 12C6.25 11.5858 6.58579 11.25 7 11.25H16Z",
397
+ fill: "currentColor"
398
+ }
399
+ ),
400
+ /* @__PURE__ */ jsxRuntime.jsx(
401
+ "path",
402
+ {
403
+ d: "M21.4004 6.25C21.8144 6.25021 22.1504 6.58592 22.1504 7C22.1504 7.41408 21.8144 7.74979 21.4004 7.75H3C2.58579 7.75 2.25 7.41421 2.25 7C2.25 6.58579 2.58579 6.25 3 6.25H21.4004Z",
404
+ fill: "currentColor"
405
+ }
406
+ )
407
+ ]
408
+ }
409
+ );
410
+ };
374
411
  var Icon_alignKorean = (p) => {
375
412
  const { size = 24, ...rest } = p;
376
413
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -410,6 +447,147 @@ var Icon_alignKorean = (p) => {
410
447
  }
411
448
  );
412
449
  };
450
+ var Icon_alignLeft = (p) => {
451
+ const { size = 24, ...rest } = p;
452
+ return /* @__PURE__ */ jsxRuntime.jsxs(
453
+ "svg",
454
+ {
455
+ width: size,
456
+ height: size,
457
+ viewBox: "0 0 24 24",
458
+ fill: "none",
459
+ xmlns: "http://www.w3.org/2000/svg",
460
+ ...rest,
461
+ children: [
462
+ /* @__PURE__ */ jsxRuntime.jsx(
463
+ "path",
464
+ {
465
+ d: "M19 16.25C19.4142 16.25 19.75 16.5858 19.75 17C19.75 17.4142 19.4142 17.75 19 17.75H3C2.58579 17.75 2.25 17.4142 2.25 17C2.25 16.5858 2.58579 16.25 3 16.25H19Z",
466
+ fill: "currentColor"
467
+ }
468
+ ),
469
+ /* @__PURE__ */ jsxRuntime.jsx(
470
+ "path",
471
+ {
472
+ d: "M12 11.25C12.4142 11.25 12.75 11.5858 12.75 12C12.75 12.4142 12.4142 12.75 12 12.75H3C2.58579 12.75 2.25 12.4142 2.25 12C2.25 11.5858 2.58579 11.25 3 11.25H12Z",
473
+ fill: "currentColor"
474
+ }
475
+ ),
476
+ /* @__PURE__ */ jsxRuntime.jsx(
477
+ "path",
478
+ {
479
+ d: "M21.4004 6.25C21.8144 6.25021 22.1504 6.58592 22.1504 7C22.1504 7.41408 21.8144 7.74979 21.4004 7.75H3C2.58579 7.75 2.25 7.41421 2.25 7C2.25 6.58579 2.58579 6.25 3 6.25H21.4004Z",
480
+ fill: "currentColor"
481
+ }
482
+ )
483
+ ]
484
+ }
485
+ );
486
+ };
487
+ var Icon_alignMiddle = (p) => {
488
+ const { size = 24, ...rest } = p;
489
+ return /* @__PURE__ */ jsxRuntime.jsxs(
490
+ "svg",
491
+ {
492
+ width: size,
493
+ height: size,
494
+ viewBox: "0 0 24 24",
495
+ fill: "none",
496
+ xmlns: "http://www.w3.org/2000/svg",
497
+ ...rest,
498
+ children: [
499
+ /* @__PURE__ */ jsxRuntime.jsx(
500
+ "path",
501
+ {
502
+ d: "M11.4844 13.9551C11.7735 13.6819 12.2265 13.6819 12.5156 13.9551L15.5156 16.79C15.8165 17.0746 15.8294 17.5496 15.5449 17.8506C15.2604 18.1515 14.7854 18.1653 14.4844 17.8809L12.75 16.2422V20.5C12.75 20.9142 12.4142 21.25 12 21.25C11.5858 21.25 11.25 20.9142 11.25 20.5V16.2422L9.51562 17.8809C9.21463 18.1653 8.73961 18.1515 8.45508 17.8506C8.17061 17.5496 8.18347 17.0746 8.48438 16.79L11.4844 13.9551Z",
503
+ fill: "currentColor"
504
+ }
505
+ ),
506
+ /* @__PURE__ */ jsxRuntime.jsx(
507
+ "path",
508
+ {
509
+ d: "M21.2002 11.25C21.6142 11.2502 21.9502 11.5859 21.9502 12C21.9502 12.4141 21.6142 12.7498 21.2002 12.75H2.7998C2.38568 12.7499 2.0498 12.4142 2.0498 12C2.0498 11.5858 2.38568 11.2501 2.7998 11.25H21.2002Z",
510
+ fill: "currentColor"
511
+ }
512
+ ),
513
+ /* @__PURE__ */ jsxRuntime.jsx(
514
+ "path",
515
+ {
516
+ d: "M12 2.75C12.4142 2.75 12.75 3.08579 12.75 3.5V7.75781L14.4844 6.11914C14.7854 5.83467 15.2604 5.8485 15.5449 6.14941C15.8294 6.45041 15.8165 6.92543 15.5156 7.20996L12.5156 10.0449C12.2265 10.3182 11.7735 10.3182 11.4844 10.0449L8.48438 7.20996C8.18347 6.92543 8.17061 6.45041 8.45508 6.14941C8.73961 5.8485 9.21463 5.83467 9.51562 6.11914L11.25 7.75781V3.5C11.25 3.08579 11.5858 2.75 12 2.75Z",
517
+ fill: "currentColor"
518
+ }
519
+ )
520
+ ]
521
+ }
522
+ );
523
+ };
524
+ var Icon_alignRight = (p) => {
525
+ const { size = 24, ...rest } = p;
526
+ return /* @__PURE__ */ jsxRuntime.jsxs(
527
+ "svg",
528
+ {
529
+ width: size,
530
+ height: size,
531
+ viewBox: "0 0 24 24",
532
+ fill: "none",
533
+ xmlns: "http://www.w3.org/2000/svg",
534
+ ...rest,
535
+ children: [
536
+ /* @__PURE__ */ jsxRuntime.jsx(
537
+ "path",
538
+ {
539
+ d: "M21 16.25C21.4142 16.25 21.75 16.5858 21.75 17C21.75 17.4142 21.4142 17.75 21 17.75H5C4.58579 17.75 4.25 17.4142 4.25 17C4.25 16.5858 4.58579 16.25 5 16.25H21Z",
540
+ fill: "currentColor"
541
+ }
542
+ ),
543
+ /* @__PURE__ */ jsxRuntime.jsx(
544
+ "path",
545
+ {
546
+ d: "M21 11.25C21.4142 11.25 21.75 11.5858 21.75 12C21.75 12.4142 21.4142 12.75 21 12.75H12C11.5858 12.75 11.25 12.4142 11.25 12C11.25 11.5858 11.5858 11.25 12 11.25H21Z",
547
+ fill: "currentColor"
548
+ }
549
+ ),
550
+ /* @__PURE__ */ jsxRuntime.jsx(
551
+ "path",
552
+ {
553
+ d: "M21.4004 6.25C21.8144 6.25021 22.1504 6.58592 22.1504 7C22.1504 7.41408 21.8144 7.74979 21.4004 7.75H3C2.58579 7.75 2.25 7.41421 2.25 7C2.25 6.58579 2.58579 6.25 3 6.25H21.4004Z",
554
+ fill: "currentColor"
555
+ }
556
+ )
557
+ ]
558
+ }
559
+ );
560
+ };
561
+ var Icon_alignTop = (p) => {
562
+ const { size = 24, ...rest } = p;
563
+ return /* @__PURE__ */ jsxRuntime.jsxs(
564
+ "svg",
565
+ {
566
+ width: size,
567
+ height: size,
568
+ viewBox: "0 0 24 24",
569
+ fill: "none",
570
+ xmlns: "http://www.w3.org/2000/svg",
571
+ ...rest,
572
+ children: [
573
+ /* @__PURE__ */ jsxRuntime.jsx(
574
+ "path",
575
+ {
576
+ d: "M12 6.1499C12.2017 6.1499 12.3951 6.23132 12.5361 6.37549L18.5361 12.519C18.8254 12.8153 18.8204 13.2901 18.5244 13.5796C18.2281 13.869 17.7533 13.8631 17.4639 13.5669L12.75 8.7417V19.8999C12.75 20.3141 12.4142 20.6499 12 20.6499C11.5858 20.6499 11.25 20.3141 11.25 19.8999V8.7417L6.53613 13.5669C6.24671 13.8631 5.77189 13.869 5.47559 13.5796C5.1796 13.2901 5.17456 12.8153 5.46387 12.519L11.4639 6.37549C11.6049 6.23132 11.7983 6.1499 12 6.1499Z",
577
+ fill: "currentColor"
578
+ }
579
+ ),
580
+ /* @__PURE__ */ jsxRuntime.jsx(
581
+ "path",
582
+ {
583
+ d: "M21.2002 3.24951C21.6142 3.24972 21.9502 3.58641 21.9502 4.00049C21.9499 4.41435 21.6141 4.75028 21.2002 4.75049H2.7998C2.38584 4.75039 2.05007 4.41442 2.0498 4.00049C2.0498 3.58634 2.38568 3.24961 2.7998 3.24951H21.2002Z",
584
+ fill: "currentColor"
585
+ }
586
+ )
587
+ ]
588
+ }
589
+ );
590
+ };
413
591
  var Icon_archive = (p) => {
414
592
  const { size = 24, ...rest } = p;
415
593
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -3428,7 +3606,12 @@ var ICONS = {
3428
3606
  account: Icon_account,
3429
3607
  add: Icon_add,
3430
3608
  alert: Icon_alert,
3609
+ alignCenter: Icon_alignCenter,
3431
3610
  alignKorean: Icon_alignKorean,
3611
+ alignLeft: Icon_alignLeft,
3612
+ alignMiddle: Icon_alignMiddle,
3613
+ alignRight: Icon_alignRight,
3614
+ alignTop: Icon_alignTop,
3432
3615
  archive: Icon_archive,
3433
3616
  arrowDown: Icon_arrowDown,
3434
3617
  arrowLeft: Icon_arrowLeft,
@@ -6193,6 +6376,13 @@ function SDraggableListInner({
6193
6376
  );
6194
6377
  }
6195
6378
  var SDraggableList = /* @__PURE__ */ react.forwardRef(SDraggableListInner);
6379
+ function useInertRef(inert) {
6380
+ const ref = react.useRef(null);
6381
+ react.useEffect(() => {
6382
+ ref.current?.toggleAttribute("inert", inert);
6383
+ }, [inert]);
6384
+ return ref;
6385
+ }
6196
6386
  var SExpansionItemDescendantContext = /* @__PURE__ */ react.createContext(
6197
6387
  null
6198
6388
  );
@@ -6224,6 +6414,7 @@ var SExpansionItem = /* @__PURE__ */ react.forwardRef(
6224
6414
  const [hovered, setHovered] = react.useState(false);
6225
6415
  const parentDescendantContext = react.useContext(SExpansionItemDescendantContext);
6226
6416
  const isExpanded = expanded ?? internalExpanded;
6417
+ const bodyRef = useInertRef(!isExpanded);
6227
6418
  const isSelected = isExpanded && (selected || expandedDescendantCount === 0);
6228
6419
  const hasChevronInteraction = interaction === "chevron";
6229
6420
  const showInteractionChevron = hasChevronInteraction && !disabled && (isSelected || hovered);
@@ -6347,6 +6538,7 @@ var SExpansionItem = /* @__PURE__ */ react.forwardRef(
6347
6538
  "div",
6348
6539
  {
6349
6540
  id,
6541
+ ref: bodyRef,
6350
6542
  "aria-hidden": !isExpanded,
6351
6543
  className: cn(
6352
6544
  "grid overflow-hidden bg-(--cmp-listExpansionItem-body-bg) transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none",
@@ -6792,11 +6984,29 @@ function TreeConnector({
6792
6984
  ] })
6793
6985
  ] });
6794
6986
  }
6987
+ function TreeBranch({ expanded, children }) {
6988
+ const branchRef = useInertRef(!expanded);
6989
+ return /* @__PURE__ */ jsxRuntime.jsx(
6990
+ "div",
6991
+ {
6992
+ ref: branchRef,
6993
+ "aria-hidden": !expanded,
6994
+ className: cn(
6995
+ "grid w-full overflow-hidden transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none",
6996
+ expanded ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
6997
+ ),
6998
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 overflow-hidden", children })
6999
+ }
7000
+ );
7001
+ }
6795
7002
  function STreeAllItem({
6796
7003
  selected,
6797
7004
  indeterminate,
6798
7005
  border,
6799
7006
  size,
7007
+ rowId,
7008
+ tabIndex,
7009
+ onKeyDown,
6800
7010
  onSelect
6801
7011
  }) {
6802
7012
  const checkboxValue = indeterminate ? null : selected;
@@ -6808,6 +7018,9 @@ function STreeAllItem({
6808
7018
  role: "treeitem",
6809
7019
  "aria-level": 1,
6810
7020
  "aria-selected": selected,
7021
+ "data-tree-row": rowId,
7022
+ tabIndex,
7023
+ onKeyDown,
6811
7024
  onClick: onSelect,
6812
7025
  className: cn(
6813
7026
  "group/tree-item box-border flex w-full cursor-pointer items-center overflow-hidden bg-(--cmp-tree-item-bg-default) px-(--cmp-tree-item-paddingX) text-left hover:bg-(--cmp-tree-item-bg-hover)",
@@ -6993,6 +7206,34 @@ var STreeImpl = /* @__PURE__ */ react.forwardRef(function STree({
6993
7206
  const someSelected = selectableIds.some((id) => selectedSet.has(id));
6994
7207
  const allIndeterminate = someSelected && !allSelected;
6995
7208
  const showAllItem = selectable && showSelectAll;
7209
+ const visibleRows = react.useMemo(() => {
7210
+ const rows = [];
7211
+ if (showAllItem) {
7212
+ rows.push({ id: TREE_ALL_NODE.id, node: TREE_ALL_NODE, parentId: null, expanded: false });
7213
+ }
7214
+ const walk = (nodes, parentId) => {
7215
+ nodes.forEach((node) => {
7216
+ const expanded = !!node.children?.length && expandedSet.has(node.id);
7217
+ rows.push({ id: node.id, node, parentId, expanded });
7218
+ if (expanded) walk(node.children, node.id);
7219
+ });
7220
+ };
7221
+ walk(items, null);
7222
+ return rows;
7223
+ }, [items, expandedSet, showAllItem]);
7224
+ const [focusedId, setFocusedId] = react.useState(null);
7225
+ const activeRowId = focusedId != null && visibleRows.some((row) => row.id === focusedId) ? focusedId : visibleRows[0]?.id ?? null;
7226
+ const treeRef = react.useRef(null);
7227
+ const focusRow = (id) => {
7228
+ setFocusedId(id);
7229
+ const rows = treeRef.current?.querySelectorAll("[data-tree-row]") ?? [];
7230
+ for (const row of rows) {
7231
+ if (row.dataset.treeRow === id) {
7232
+ row.focus();
7233
+ return;
7234
+ }
7235
+ }
7236
+ };
6996
7237
  const updateExpanded = (node) => {
6997
7238
  const next = new Set(currentExpandedIds);
6998
7239
  if (next.has(node.id)) next.delete(node.id);
@@ -7026,6 +7267,59 @@ var STreeImpl = /* @__PURE__ */ react.forwardRef(function STree({
7026
7267
  if (value === void 0) setInternalValue(orderedIds);
7027
7268
  onValueChange?.(orderedIds, TREE_ALL_NODE);
7028
7269
  };
7270
+ const handleTreeKeyDown = (event) => {
7271
+ const target = event.target;
7272
+ const rowId = target.dataset?.treeRow;
7273
+ if (rowId == null) return;
7274
+ const index = visibleRows.findIndex((row2) => row2.id === rowId);
7275
+ if (index < 0) return;
7276
+ const row = visibleRows[index];
7277
+ const hasChildren = !!row.node.children?.length;
7278
+ switch (event.key) {
7279
+ case "ArrowDown": {
7280
+ const next = visibleRows[index + 1];
7281
+ if (next) focusRow(next.id);
7282
+ break;
7283
+ }
7284
+ case "ArrowUp": {
7285
+ const prev = visibleRows[index - 1];
7286
+ if (prev) focusRow(prev.id);
7287
+ break;
7288
+ }
7289
+ case "ArrowRight": {
7290
+ if (!hasChildren || row.node.disabled) return;
7291
+ if (!row.expanded) updateExpanded(row.node);
7292
+ else if (visibleRows[index + 1]) focusRow(visibleRows[index + 1].id);
7293
+ break;
7294
+ }
7295
+ case "ArrowLeft": {
7296
+ if (hasChildren && row.expanded && !row.node.disabled) updateExpanded(row.node);
7297
+ else if (row.parentId != null) focusRow(row.parentId);
7298
+ else return;
7299
+ break;
7300
+ }
7301
+ case "Home": {
7302
+ if (visibleRows[0]) focusRow(visibleRows[0].id);
7303
+ break;
7304
+ }
7305
+ case "End": {
7306
+ const last = visibleRows[visibleRows.length - 1];
7307
+ if (last) focusRow(last.id);
7308
+ break;
7309
+ }
7310
+ case "Enter":
7311
+ case " ": {
7312
+ if (row.id === TREE_ALL_NODE.id) updateAllSelected();
7313
+ else if (selectable) updateSelected(row.node);
7314
+ else if (hasChildren && !row.node.disabled) updateExpanded(row.node);
7315
+ else return;
7316
+ break;
7317
+ }
7318
+ default:
7319
+ return;
7320
+ }
7321
+ event.preventDefault();
7322
+ };
7029
7323
  const renderNodes = (nodes, depth = 1, ancestorLast = []) => nodes.map((node, index) => {
7030
7324
  const isLast = index === nodes.length - 1;
7031
7325
  const isExpanded = expandedSet.has(node.id);
@@ -7034,6 +7328,9 @@ var STreeImpl = /* @__PURE__ */ react.forwardRef(function STree({
7034
7328
  /* @__PURE__ */ jsxRuntime.jsx(
7035
7329
  STreeItem2,
7036
7330
  {
7331
+ "data-tree-row": node.id,
7332
+ tabIndex: activeRowId === node.id ? 0 : -1,
7333
+ onKeyDown: handleTreeKeyDown,
7037
7334
  node,
7038
7335
  depth,
7039
7336
  last: isLast,
@@ -7051,30 +7348,31 @@ var STreeImpl = /* @__PURE__ */ react.forwardRef(function STree({
7051
7348
  onTreeSelect: updateSelected
7052
7349
  }
7053
7350
  ),
7054
- node.children?.length ? /* @__PURE__ */ jsxRuntime.jsx(
7055
- "div",
7056
- {
7057
- "aria-hidden": !isExpanded,
7058
- className: cn(
7059
- "grid w-full overflow-hidden transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none",
7060
- isExpanded ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
7061
- ),
7062
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 overflow-hidden", children: renderNodes(node.children, depth + 1, [...ancestorLast, isLast]) })
7063
- }
7064
- ) : null
7351
+ node.children?.length ? /* @__PURE__ */ jsxRuntime.jsx(TreeBranch, { expanded: isExpanded, children: renderNodes(node.children, depth + 1, [...ancestorLast, isLast]) }) : null
7065
7352
  ] }, node.id);
7066
7353
  });
7067
7354
  return /* @__PURE__ */ jsxRuntime.jsxs(
7068
7355
  "div",
7069
7356
  {
7070
- ref,
7357
+ ref: (node) => {
7358
+ treeRef.current = node;
7359
+ if (typeof ref === "function") ref(node);
7360
+ else if (ref) ref.current = node;
7361
+ },
7071
7362
  role: "tree",
7072
7363
  className: cn("flex w-full flex-col items-start bg-(--cmp-tree-item-bg-default)", className),
7364
+ onFocus: (event) => {
7365
+ const rowId = event.target.closest?.("[data-tree-row]")?.getAttribute("data-tree-row");
7366
+ if (rowId != null) setFocusedId(rowId);
7367
+ },
7073
7368
  ...rest,
7074
7369
  children: [
7075
7370
  showAllItem && /* @__PURE__ */ jsxRuntime.jsx(
7076
7371
  STreeAllItem,
7077
7372
  {
7373
+ rowId: TREE_ALL_NODE.id,
7374
+ tabIndex: activeRowId === TREE_ALL_NODE.id ? 0 : -1,
7375
+ onKeyDown: handleTreeKeyDown,
7078
7376
  selected: allSelected,
7079
7377
  indeterminate: allIndeterminate,
7080
7378
  border,
@@ -7844,10 +8142,11 @@ var SLinearProgress = /* @__PURE__ */ react.forwardRef(
7844
8142
  // src/lib/global-overlay.ts
7845
8143
  var GLOBAL_OVERLAY_ATTR = "data-s-global-overlay";
7846
8144
  var globalOverlayProps = { [GLOBAL_OVERLAY_ATTR]: "" };
8145
+ var ELEMENT_NODE = 1;
7847
8146
  function isFromGlobalOverlay(event) {
7848
8147
  const detail = event.detail;
7849
8148
  const target = detail?.originalEvent?.target ?? event.target;
7850
- const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;
8149
+ const element = target == null ? null : target.nodeType === ELEMENT_NODE ? target : target.parentElement ?? null;
7851
8150
  return !!element?.closest(`[${GLOBAL_OVERLAY_ATTR}]`);
7852
8151
  }
7853
8152
  var SLoadingContainer = /* @__PURE__ */ react.forwardRef(
@@ -14274,6 +14573,9 @@ var SSelectImpl = /* @__PURE__ */ react.forwardRef(function SSelect({
14274
14573
  const [open, setOpen] = react.useState(false);
14275
14574
  const [pendingOpen, setPendingOpen] = react.useState(false);
14276
14575
  const [focusedIndex, setFocusedIndex] = react.useState(-1);
14576
+ const baseId = react.useId();
14577
+ const listboxId = `${baseId}-listbox`;
14578
+ const activeOptionId = `${baseId}-active-option`;
14277
14579
  const [win, setWin] = react.useState({ start: 0, end: 0, top: 0, bottom: 0 });
14278
14580
  const winRef = react.useRef(win);
14279
14581
  winRef.current = win;
@@ -14359,13 +14661,15 @@ var SSelectImpl = /* @__PURE__ */ react.forwardRef(function SSelect({
14359
14661
  setPendingOpen(false);
14360
14662
  commitOpen(true);
14361
14663
  }, [insideModal, pendingOpen, portalContainer]);
14664
+ const requestOpenRef = react.useRef(requestOpen);
14665
+ requestOpenRef.current = requestOpen;
14362
14666
  react.useImperativeHandle(
14363
14667
  ref,
14364
14668
  () => ({
14365
14669
  focus: () => triggerRef.current?.focus(),
14366
- open: () => requestOpen(true)
14670
+ open: () => requestOpenRef.current(true)
14367
14671
  }),
14368
- [insideModal, portalContainer]
14672
+ []
14369
14673
  );
14370
14674
  useFormField({
14371
14675
  name,
@@ -14703,6 +15007,8 @@ var SSelectImpl = /* @__PURE__ */ react.forwardRef(function SSelect({
14703
15007
  disabled: effectiveDisabled,
14704
15008
  "aria-haspopup": "listbox",
14705
15009
  "aria-expanded": open,
15010
+ "aria-controls": open ? listboxId : void 0,
15011
+ "aria-activedescendant": open && focusedIndex >= 0 ? activeOptionId : void 0,
14706
15012
  onClick: () => requestOpen(!open),
14707
15013
  onKeyDown: handleKeyDown,
14708
15014
  className: "flex h-full w-full cursor-pointer items-center justify-between gap-[8px] bg-transparent px-[12px] text-left text-[12px] leading-[20px] outline-none disabled:cursor-not-allowed",
@@ -14829,7 +15135,9 @@ var SSelectImpl = /* @__PURE__ */ react.forwardRef(function SSelect({
14829
15135
  onValueChange: setSearch,
14830
15136
  onKeyDown: handleKeyDown,
14831
15137
  placeholder: "\uAC80\uC0C9",
14832
- clearable: true
15138
+ clearable: true,
15139
+ "aria-controls": listboxId,
15140
+ "aria-activedescendant": focusedIndex >= 0 ? activeOptionId : void 0
14833
15141
  }
14834
15142
  )
14835
15143
  }
@@ -14837,6 +15145,8 @@ var SSelectImpl = /* @__PURE__ */ react.forwardRef(function SSelect({
14837
15145
  hasItems ? /* @__PURE__ */ jsxRuntime.jsx(
14838
15146
  ItemList,
14839
15147
  {
15148
+ listboxId,
15149
+ activeOptionId,
14840
15150
  items: visibleItems,
14841
15151
  indexOffset: windowStart,
14842
15152
  topSpacer: win.top,
@@ -14885,6 +15195,8 @@ var SSelectImpl = /* @__PURE__ */ react.forwardRef(function SSelect({
14885
15195
  });
14886
15196
  var SSelect2 = /* @__PURE__ */ withDisplayName(SSelectImpl, "SSelect");
14887
15197
  function ItemList({
15198
+ listboxId,
15199
+ activeOptionId,
14888
15200
  items,
14889
15201
  indexOffset,
14890
15202
  topSpacer,
@@ -14910,12 +15222,13 @@ function ItemList({
14910
15222
  "disabled:cursor-not-allowed disabled:text-[color:var(--cmp-listBoxItem-content-disabled)]"
14911
15223
  );
14912
15224
  const activeClass = "hover:bg-[var(--cmp-listBoxItem-bg-hover)] hover:text-[color:var(--cmp-listBoxItem-content-hover)] focus-visible:bg-[var(--cmp-listBoxItem-bg-hover)] focus-visible:text-[color:var(--cmp-listBoxItem-content-hover)]";
14913
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { role: "listbox", "aria-multiselectable": multi || void 0, children: [
15225
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { id: listboxId, role: "listbox", "aria-multiselectable": multi || void 0, children: [
14914
15226
  showSelectAll && /* @__PURE__ */ jsxRuntime.jsxs(
14915
15227
  "button",
14916
15228
  {
14917
15229
  type: "button",
14918
15230
  "data-select-all-row": true,
15231
+ id: focusedValue === "__select_all__" ? activeOptionId : void 0,
14919
15232
  "data-select-focused": focusedValue === "__select_all__" ? "true" : void 0,
14920
15233
  "data-select-active": focusedValue === "__select_all__" ? "true" : void 0,
14921
15234
  className: cn(
@@ -14957,6 +15270,7 @@ function ItemList({
14957
15270
  type: "button",
14958
15271
  "data-select-row": true,
14959
15272
  "data-index": idx,
15273
+ id: groupFocused ? activeOptionId : void 0,
14960
15274
  role: "option",
14961
15275
  "aria-selected": groupState === true,
14962
15276
  disabled: groupDisabled,
@@ -15030,6 +15344,7 @@ function ItemList({
15030
15344
  type: "button",
15031
15345
  "data-select-row": true,
15032
15346
  "data-index": idx,
15347
+ id: focusedValue === o.value ? activeOptionId : void 0,
15033
15348
  disabled: o.disabled,
15034
15349
  role: "option",
15035
15350
  "aria-selected": isSelected,
@@ -24055,6 +24370,8 @@ var SChipInput = /* @__PURE__ */ react.forwardRef(function SChipInput2({
24055
24370
  }, ref) {
24056
24371
  const autoId = react.useId();
24057
24372
  const resolvedName = name ?? autoId;
24373
+ const listboxId = `${autoId}-listbox`;
24374
+ const activeOptionId = `${autoId}-active-option`;
24058
24375
  const [inputValue, setInputValue] = react.useState("");
24059
24376
  const [focused, setFocused] = react.useState(false);
24060
24377
  const [hovered, setHovered] = react.useState(false);
@@ -24277,6 +24594,11 @@ var SChipInput = /* @__PURE__ */ react.forwardRef(function SChipInput2({
24277
24594
  ref: inputRef,
24278
24595
  name: resolvedName,
24279
24596
  size: 1,
24597
+ role: "combobox",
24598
+ "aria-expanded": showDropdown,
24599
+ "aria-controls": showDropdown ? listboxId : void 0,
24600
+ "aria-activedescendant": showDropdown && activeIndex >= 0 ? activeOptionId : void 0,
24601
+ "aria-autocomplete": "list",
24280
24602
  className: cn(
24281
24603
  "s-chip-input__input col-start-1 row-start-1 w-full border-0 bg-transparent p-0 font-normal text-(--cmp-chip-content-focus) outline-none placeholder:text-(--cmp-chipInput-text-placeholder) disabled:cursor-not-allowed",
24282
24604
  AUTOFILL_RESET_CLASS,
@@ -24390,6 +24712,7 @@ var SChipInput = /* @__PURE__ */ react.forwardRef(function SChipInput2({
24390
24712
  children: /* @__PURE__ */ jsxRuntime.jsxs(
24391
24713
  "div",
24392
24714
  {
24715
+ id: listboxId,
24393
24716
  role: "listbox",
24394
24717
  className: "s-chip-input__suggestions flex w-full flex-col outline-none",
24395
24718
  onMouseDown: (e) => e.preventDefault(),
@@ -24401,6 +24724,7 @@ var SChipInput = /* @__PURE__ */ react.forwardRef(function SChipInput2({
24401
24724
  return /* @__PURE__ */ jsxRuntime.jsx(
24402
24725
  "div",
24403
24726
  {
24727
+ id: active ? activeOptionId : void 0,
24404
24728
  role: "option",
24405
24729
  "aria-selected": selected || active,
24406
24730
  className: "rounded-full",
@@ -24419,6 +24743,7 @@ var SChipInput = /* @__PURE__ */ react.forwardRef(function SChipInput2({
24419
24743
  return /* @__PURE__ */ jsxRuntime.jsxs(
24420
24744
  "div",
24421
24745
  {
24746
+ id: active ? activeOptionId : void 0,
24422
24747
  role: "option",
24423
24748
  "aria-selected": selected || active,
24424
24749
  className: cn(