@wallarm-org/design-system 4.16.1-rc-fix-escape-outside-layer-stack.1 → 4.16.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.
@@ -4,7 +4,7 @@ import { useEffect, useRef } from "react";
4
4
  import { DndContext, KeyboardSensor, PointerSensor, closestCenter, useSensor, useSensors } from "@dnd-kit/core";
5
5
  import { SortableContext, arrayMove, horizontalListSortingStrategy, sortableKeyboardCoordinates } from "@dnd-kit/sortable";
6
6
  import { useTable } from "@tanstack/react-table";
7
- import { useControlled } from "../../../hooks/index.js";
7
+ import { useControlled, useIsKeyPressed } from "../../../hooks/index.js";
8
8
  import { useTableState } from "../hooks/index.js";
9
9
  import { TABLE_DRAG_HANDLE_COLUMN_ID, TABLE_EXPAND_COLUMN_ID, TABLE_MIN_COLUMN_WIDTH, TABLE_SELECT_COLUMN_ID, TABLE_SKELETON_ROWS, TABLE_VIRTUALIZATION_OVERSCAN, createDragHandleColumn, createExpandColumn, createSelectionColumn, dsTableFeatures } from "../lib/index.js";
10
10
  import { TableContext } from "./TableContext.js";
@@ -16,7 +16,7 @@ const toTanStackPinning = (p, pinnedLeft)=>({
16
16
  end: p?.right ?? []
17
17
  });
18
18
  const TableProvider = (props)=>{
19
- const $ = compiler_runtime_c(169);
19
+ const $ = compiler_runtime_c(170);
20
20
  const { data, columns, isLoading: t0, isLoadingPrevious: t1, skeletonCount: t2, children, getRowId, sorting: sortingProp, onSortingChange, manualSorting: t3, rowSelection: rowSelectionProp, onRowSelectionChange, enableSelectAllRows: t4, onSelectAllRows, columnSizing: columnSizingProp, onColumnSizingChange, columnPinning: columnPinningProp, onColumnPinningChange, columnOrder: columnOrderProp, onColumnOrderChange, grouping: groupingProp, onGroupingChange, expanded: expandedProp, onExpandedChange, renderGroupRow, groupRowSpan: t5, groupExpandColumn: t6, getSubRows, showEmptyGroups: t7, renderExpandedRow, columnVisibility: columnVisibilityProp, onColumnVisibilityChange, defaultColumnVisibility, defaultColumnOrder, columnGroups, virtualized, stretch: t8, estimateRowHeight, overscan: t9, onEndReached, onEndReachedThreshold, onStartReached, onStartReachedThreshold, initialScrollToRowId, onRowReorder, getRowCanDrag, renderFullWidthRow, onMasterCellClick, activeRowId: activeRowIdProp, onSettingsOpenChange, deferColumnVisibility: t10 } = props;
21
21
  const isLoading = void 0 === t0 ? false : t0;
22
22
  const isLoadingPrevious = void 0 === t1 ? false : t1;
@@ -427,6 +427,7 @@ const TableProvider = (props)=>{
427
427
  } else t45 = $[100];
428
428
  const allLeafColumns = t45;
429
429
  const lastSelectedRowIndexRef = useRef(null);
430
+ const shiftKeyRef = useIsKeyPressed("Shift");
430
431
  const containerRef = useRef(null);
431
432
  const headerScrollRef = useRef(null);
432
433
  const tbodyRef = useRef(null);
@@ -437,7 +438,7 @@ const TableProvider = (props)=>{
437
438
  const t49 = "full" === groupRowSpan ? renderGroupRow : void 0;
438
439
  const t50 = renderFullWidthRow;
439
440
  let t51;
440
- if ($[101] !== allLeafColumns || $[102] !== alwaysPinnedLeft || $[103] !== columnDndEnabled || $[104] !== columnGroups || $[105] !== defaultColumnOrder || $[106] !== defaultColumnVisibility || $[107] !== deferColumnVisibility || $[108] !== enableSelectAllRows || $[109] !== estimateRowHeight || $[110] !== expandingEnabled || $[111] !== groupingEnabled || $[112] !== initialScrollToRowId || $[113] !== isLoading || $[114] !== isLoadingPrevious || $[115] !== masterCellActiveRowId || $[116] !== masterColumnId || $[117] !== onEndReached || $[118] !== onEndReachedThreshold || $[119] !== onMasterCellClick || $[120] !== onRowReorder || $[121] !== onSelectAllRows || $[122] !== onSettingsOpenChange || $[123] !== onStartReached || $[124] !== onStartReachedThreshold || $[125] !== overscan || $[126] !== pinningEnabled || $[127] !== resizingEnabled || $[128] !== rowDndEnabled || $[129] !== selectionEnabled || $[130] !== setColumnOrder || $[131] !== showEmptyGroups || $[132] !== skeletonCount || $[133] !== sortingEnabled || $[134] !== stretch || $[135] !== t46 || $[136] !== t47 || $[137] !== t48 || $[138] !== t49 || $[139] !== t50 || $[140] !== table || $[141] !== virtualized || $[142] !== visibilityEnabled) {
441
+ if ($[101] !== allLeafColumns || $[102] !== alwaysPinnedLeft || $[103] !== columnDndEnabled || $[104] !== columnGroups || $[105] !== defaultColumnOrder || $[106] !== defaultColumnVisibility || $[107] !== deferColumnVisibility || $[108] !== enableSelectAllRows || $[109] !== estimateRowHeight || $[110] !== expandingEnabled || $[111] !== groupingEnabled || $[112] !== initialScrollToRowId || $[113] !== isLoading || $[114] !== isLoadingPrevious || $[115] !== masterCellActiveRowId || $[116] !== masterColumnId || $[117] !== onEndReached || $[118] !== onEndReachedThreshold || $[119] !== onMasterCellClick || $[120] !== onRowReorder || $[121] !== onSelectAllRows || $[122] !== onSettingsOpenChange || $[123] !== onStartReached || $[124] !== onStartReachedThreshold || $[125] !== overscan || $[126] !== pinningEnabled || $[127] !== resizingEnabled || $[128] !== rowDndEnabled || $[129] !== selectionEnabled || $[130] !== setColumnOrder || $[131] !== shiftKeyRef || $[132] !== showEmptyGroups || $[133] !== skeletonCount || $[134] !== sortingEnabled || $[135] !== stretch || $[136] !== t46 || $[137] !== t47 || $[138] !== t48 || $[139] !== t49 || $[140] !== t50 || $[141] !== table || $[142] !== virtualized || $[143] !== visibilityEnabled) {
441
442
  t51 = {
442
443
  table,
443
444
  isLoading,
@@ -467,6 +468,7 @@ const TableProvider = (props)=>{
467
468
  alwaysPinnedLeft,
468
469
  masterColumnId,
469
470
  lastSelectedRowIndexRef,
471
+ shiftKeyRef,
470
472
  selectAllRowsEnabled: enableSelectAllRows,
471
473
  onSelectAllRows,
472
474
  containerRef,
@@ -517,24 +519,25 @@ const TableProvider = (props)=>{
517
519
  $[128] = rowDndEnabled;
518
520
  $[129] = selectionEnabled;
519
521
  $[130] = setColumnOrder;
520
- $[131] = showEmptyGroups;
521
- $[132] = skeletonCount;
522
- $[133] = sortingEnabled;
523
- $[134] = stretch;
524
- $[135] = t46;
525
- $[136] = t47;
526
- $[137] = t48;
527
- $[138] = t49;
528
- $[139] = t50;
529
- $[140] = table;
530
- $[141] = virtualized;
531
- $[142] = visibilityEnabled;
532
- $[143] = t51;
533
- } else t51 = $[143];
522
+ $[131] = shiftKeyRef;
523
+ $[132] = showEmptyGroups;
524
+ $[133] = skeletonCount;
525
+ $[134] = sortingEnabled;
526
+ $[135] = stretch;
527
+ $[136] = t46;
528
+ $[137] = t47;
529
+ $[138] = t48;
530
+ $[139] = t49;
531
+ $[140] = t50;
532
+ $[141] = table;
533
+ $[142] = virtualized;
534
+ $[143] = visibilityEnabled;
535
+ $[144] = t51;
536
+ } else t51 = $[144];
534
537
  const contextValue = t51;
535
538
  let t52;
536
539
  let t53;
537
- if ($[144] !== selectionEnabled || $[145] !== table) {
540
+ if ($[145] !== selectionEnabled || $[146] !== table) {
538
541
  t52 = ()=>{
539
542
  if (!selectionEnabled) return;
540
543
  const container = containerRef.current;
@@ -549,34 +552,34 @@ const TableProvider = (props)=>{
549
552
  selectionEnabled,
550
553
  table
551
554
  ];
552
- $[144] = selectionEnabled;
553
- $[145] = table;
554
- $[146] = t52;
555
- $[147] = t53;
555
+ $[145] = selectionEnabled;
556
+ $[146] = table;
557
+ $[147] = t52;
558
+ $[148] = t53;
556
559
  } else {
557
- t52 = $[146];
558
- t53 = $[147];
560
+ t52 = $[147];
561
+ t53 = $[148];
559
562
  }
560
563
  useEffect(t52, t53);
561
564
  let t54;
562
- if ($[148] === Symbol.for("react.memo_cache_sentinel")) {
565
+ if ($[149] === Symbol.for("react.memo_cache_sentinel")) {
563
566
  t54 = {
564
567
  activationConstraint: {
565
568
  distance: 5
566
569
  }
567
570
  };
568
- $[148] = t54;
569
- } else t54 = $[148];
571
+ $[149] = t54;
572
+ } else t54 = $[149];
570
573
  let t55;
571
- if ($[149] === Symbol.for("react.memo_cache_sentinel")) {
574
+ if ($[150] === Symbol.for("react.memo_cache_sentinel")) {
572
575
  t55 = {
573
576
  coordinateGetter: sortableKeyboardCoordinates
574
577
  };
575
- $[149] = t55;
576
- } else t55 = $[149];
578
+ $[150] = t55;
579
+ } else t55 = $[150];
577
580
  const sensors = useSensors(useSensor(PointerSensor, t54), useSensor(KeyboardSensor, t55));
578
581
  let t56;
579
- if ($[150] !== allLeafColumns || $[151] !== setColumnOrder || $[152] !== table.atoms) {
582
+ if ($[151] !== allLeafColumns || $[152] !== setColumnOrder || $[153] !== table.atoms) {
580
583
  t56 = (event)=>{
581
584
  const { active, over } = event;
582
585
  if (!over || active.id === over.id) return;
@@ -587,59 +590,59 @@ const TableProvider = (props)=>{
587
590
  const newOrder_0 = arrayMove(currentOrder, oldIndex, newIndex);
588
591
  setColumnOrder(newOrder_0);
589
592
  };
590
- $[150] = allLeafColumns;
591
- $[151] = setColumnOrder;
592
- $[152] = table.atoms;
593
- $[153] = t56;
594
- } else t56 = $[153];
593
+ $[151] = allLeafColumns;
594
+ $[152] = setColumnOrder;
595
+ $[153] = table.atoms;
596
+ $[154] = t56;
597
+ } else t56 = $[154];
595
598
  const handleDragEnd = t56;
596
599
  let t57;
597
- if ($[154] !== allLeafColumns || $[155] !== alwaysPinnedLeft || $[156] !== columnDndEnabled) {
600
+ if ($[155] !== allLeafColumns || $[156] !== alwaysPinnedLeft || $[157] !== columnDndEnabled) {
598
601
  t57 = columnDndEnabled ? allLeafColumns.filter((c_0)=>!alwaysPinnedLeft.includes(c_0.id)).map(_temp3) : [];
599
- $[154] = allLeafColumns;
600
- $[155] = alwaysPinnedLeft;
601
- $[156] = columnDndEnabled;
602
- $[157] = t57;
603
- } else t57 = $[157];
602
+ $[155] = allLeafColumns;
603
+ $[156] = alwaysPinnedLeft;
604
+ $[157] = columnDndEnabled;
605
+ $[158] = t57;
606
+ } else t57 = $[158];
604
607
  const columnIds = t57;
605
608
  const t58 = columnDndEnabled ? sensors : void 0;
606
609
  const t59 = columnDndEnabled ? closestCenter : void 0;
607
610
  const t60 = columnDndEnabled ? handleDragEnd : void 0;
608
611
  let t61;
609
- if ($[158] !== children || $[159] !== columnIds) {
612
+ if ($[159] !== children || $[160] !== columnIds) {
610
613
  t61 = /*#__PURE__*/ jsx(SortableContext, {
611
614
  items: columnIds,
612
615
  strategy: horizontalListSortingStrategy,
613
616
  children: children
614
617
  });
615
- $[158] = children;
616
- $[159] = columnIds;
617
- $[160] = t61;
618
- } else t61 = $[160];
618
+ $[159] = children;
619
+ $[160] = columnIds;
620
+ $[161] = t61;
621
+ } else t61 = $[161];
619
622
  let t62;
620
- if ($[161] !== t58 || $[162] !== t59 || $[163] !== t60 || $[164] !== t61) {
623
+ if ($[162] !== t58 || $[163] !== t59 || $[164] !== t60 || $[165] !== t61) {
621
624
  t62 = /*#__PURE__*/ jsx(DndContext, {
622
625
  sensors: t58,
623
626
  collisionDetection: t59,
624
627
  onDragEnd: t60,
625
628
  children: t61
626
629
  });
627
- $[161] = t58;
628
- $[162] = t59;
629
- $[163] = t60;
630
- $[164] = t61;
631
- $[165] = t62;
632
- } else t62 = $[165];
630
+ $[162] = t58;
631
+ $[163] = t59;
632
+ $[164] = t60;
633
+ $[165] = t61;
634
+ $[166] = t62;
635
+ } else t62 = $[166];
633
636
  let t63;
634
- if ($[166] !== contextValue || $[167] !== t62) {
637
+ if ($[167] !== contextValue || $[168] !== t62) {
635
638
  t63 = /*#__PURE__*/ jsx(TableContext.Provider, {
636
639
  value: contextValue,
637
640
  children: t62
638
641
  });
639
- $[166] = contextValue;
640
- $[167] = t62;
641
- $[168] = t63;
642
- } else t63 = $[168];
642
+ $[167] = contextValue;
643
+ $[168] = t62;
644
+ $[169] = t63;
645
+ } else t63 = $[169];
643
646
  return t63;
644
647
  };
645
648
  function _temp() {
@@ -36,6 +36,7 @@ export interface TableContextValue<T extends RowData> {
36
36
  columnGroups?: TableColumnGroup[];
37
37
  setColumnOrder: (order: string[]) => void;
38
38
  lastSelectedRowIndexRef: RefObject<number | null>;
39
+ shiftKeyRef: RefObject<boolean>;
39
40
  selectAllRowsEnabled: boolean;
40
41
  onSelectAllRows?: (selected: boolean) => void;
41
42
  alwaysPinnedLeft: string[];
@@ -1,6 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
- import { useIsKeyPressed } from "../../../hooks/index.js";
4
3
  import { Checkbox, CheckboxIndicator } from "../../Checkbox/index.js";
5
4
  import { useTableContext } from "../TableContext/index.js";
6
5
  import { TABLE_SELECT_COLUMN_ID, TABLE_SELECT_COLUMN_WIDTH } from "./constants.js";
@@ -22,8 +21,7 @@ const applyRangeSelection = (rows, fromIndex, toIndex, table, clickedRow)=>{
22
21
  const SelectionCell = (t0)=>{
23
22
  const $ = c(17);
24
23
  const { row, table } = t0;
25
- const { lastSelectedRowIndexRef } = useTableContext();
26
- const shiftRef = useIsKeyPressed("Shift");
24
+ const { lastSelectedRowIndexRef, shiftKeyRef } = useTableContext();
27
25
  let t1;
28
26
  if ($[0] !== row.subRows.length) {
29
27
  t1 = ()=>row.subRows.length > 0;
@@ -32,7 +30,7 @@ const SelectionCell = (t0)=>{
32
30
  } else t1 = $[1];
33
31
  const hasSubRows = useTableValue(t1);
34
32
  let t2;
35
- if ($[2] !== hasSubRows || $[3] !== lastSelectedRowIndexRef || $[4] !== row || $[5] !== shiftRef || $[6] !== table) {
33
+ if ($[2] !== hasSubRows || $[3] !== lastSelectedRowIndexRef || $[4] !== row || $[5] !== shiftKeyRef || $[6] !== table) {
36
34
  t2 = ()=>{
37
35
  if (hasSubRows) {
38
36
  const allSelected = row.getIsAllSubRowsSelected();
@@ -41,14 +39,14 @@ const SelectionCell = (t0)=>{
41
39
  }
42
40
  const rows = table.getRowModel().rows;
43
41
  const currentIndex = rows.findIndex((r)=>r.id === row.id);
44
- if (shiftRef.current && null !== lastSelectedRowIndexRef.current) applyRangeSelection(rows, lastSelectedRowIndexRef.current, currentIndex, table, row);
42
+ if (shiftKeyRef.current && null !== lastSelectedRowIndexRef.current) applyRangeSelection(rows, lastSelectedRowIndexRef.current, currentIndex, table, row);
45
43
  else row.toggleSelected(!row.getIsSelected());
46
44
  lastSelectedRowIndexRef.current = currentIndex;
47
45
  };
48
46
  $[2] = hasSubRows;
49
47
  $[3] = lastSelectedRowIndexRef;
50
48
  $[4] = row;
51
- $[5] = shiftRef;
49
+ $[5] = shiftKeyRef;
52
50
  $[6] = table;
53
51
  $[7] = t2;
54
52
  } else t2 = $[7];
@@ -1,7 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { useFieldContext } from "@ark-ui/react/field";
4
- import { mergeProps } from "@ark-ui/react/utils";
5
4
  import { composeRefs } from "@radix-ui/react-compose-refs";
6
5
  import { SvgIcon } from "../../icons/SvgIcon.js";
7
6
  import { cn } from "../../utils/cn.js";
@@ -10,57 +9,55 @@ import { textareaHeightVariants, textareaPaddingVariants } from "./classes.js";
10
9
  import { useAutoResize } from "./useAutoResize.js";
11
10
  const Textarea = (t0)=>{
12
11
  const $ = c(35);
12
+ let disabled;
13
+ let error;
13
14
  let maxRows;
14
15
  let minRows;
15
16
  let props;
16
17
  let ref;
17
18
  let t1;
18
- let t2;
19
- let t3;
20
19
  if ($[0] !== t0) {
21
- ({ error: t1, disabled: t2, size: t3, minRows, maxRows, ref, ...props } = t0);
20
+ ({ error, disabled, size: t1, minRows, maxRows, ref, ...props } = t0);
22
21
  $[0] = t0;
23
- $[1] = maxRows;
24
- $[2] = minRows;
25
- $[3] = props;
26
- $[4] = ref;
27
- $[5] = t1;
28
- $[6] = t2;
29
- $[7] = t3;
22
+ $[1] = disabled;
23
+ $[2] = error;
24
+ $[3] = maxRows;
25
+ $[4] = minRows;
26
+ $[5] = props;
27
+ $[6] = ref;
28
+ $[7] = t1;
30
29
  } else {
31
- maxRows = $[1];
32
- minRows = $[2];
33
- props = $[3];
34
- ref = $[4];
35
- t1 = $[5];
36
- t2 = $[6];
37
- t3 = $[7];
30
+ disabled = $[1];
31
+ error = $[2];
32
+ maxRows = $[3];
33
+ minRows = $[4];
34
+ props = $[5];
35
+ ref = $[6];
36
+ t1 = $[7];
38
37
  }
39
- const error = void 0 === t1 ? false : t1;
40
- const disabled = void 0 === t2 ? false : t2;
41
- const size = void 0 === t3 ? "default" : t3;
38
+ const size = void 0 === t1 ? "default" : t1;
42
39
  const field = useFieldContext();
43
- let t4;
44
- if ($[8] !== field) {
45
- t4 = mergeProps(field?.getTextareaProps());
46
- $[8] = field;
47
- $[9] = t4;
48
- } else t4 = $[9];
49
- const mergedProps = t4;
40
+ const invalid = error ?? field?.invalid ?? false;
41
+ const isDisabled = disabled ?? field?.disabled ?? false;
50
42
  const autoResize = null != maxRows;
51
43
  const effectiveMinRows = minRows ?? (autoResize ? 1 : void 0);
52
44
  const { ref: autoResizeRef, adjustHeight } = useAutoResize(autoResize, effectiveMinRows ?? 1, maxRows ?? 1, props.value);
53
- let t5;
45
+ let t2;
46
+ if ($[8] !== field) {
47
+ t2 = field?.getTextareaProps();
48
+ $[8] = field;
49
+ $[9] = t2;
50
+ } else t2 = $[9];
51
+ let t3;
54
52
  if ($[10] !== autoResizeRef || $[11] !== ref) {
55
- t5 = composeRefs(autoResizeRef, ref);
53
+ t3 = composeRefs(autoResizeRef, ref);
56
54
  $[10] = autoResizeRef;
57
55
  $[11] = ref;
58
- $[12] = t5;
59
- } else t5 = $[12];
60
- const t6 = Boolean(error);
61
- let t7;
56
+ $[12] = t3;
57
+ } else t3 = $[12];
58
+ let t4;
62
59
  if ($[13] !== adjustHeight || $[14] !== autoResize || $[15] !== props) {
63
- t7 = autoResize && {
60
+ t4 = autoResize && {
64
61
  onInput: (e)=>{
65
62
  adjustHeight();
66
63
  props.onInput?.(e);
@@ -69,48 +66,48 @@ const Textarea = (t0)=>{
69
66
  $[13] = adjustHeight;
70
67
  $[14] = autoResize;
71
68
  $[15] = props;
72
- $[16] = t7;
73
- } else t7 = $[16];
74
- let t8;
75
- if ($[17] !== autoResize || $[18] !== error || $[19] !== size) {
76
- t8 = cn(inputVariants({
77
- error
69
+ $[16] = t4;
70
+ } else t4 = $[16];
71
+ let t5;
72
+ if ($[17] !== autoResize || $[18] !== invalid || $[19] !== size) {
73
+ t5 = cn(inputVariants({
74
+ error: invalid
78
75
  }), textareaPaddingVariants({
79
76
  size
80
77
  }), "[scrollbar-width:thin]", !autoResize && textareaHeightVariants({
81
78
  size
82
79
  }), autoResize && "resize-none");
83
80
  $[17] = autoResize;
84
- $[18] = error;
81
+ $[18] = invalid;
85
82
  $[19] = size;
86
- $[20] = t8;
87
- } else t8 = $[20];
88
- let t9;
89
- if ($[21] !== disabled || $[22] !== effectiveMinRows || $[23] !== mergedProps || $[24] !== props || $[25] !== t5 || $[26] !== t6 || $[27] !== t7 || $[28] !== t8) {
90
- t9 = /*#__PURE__*/ jsx("textarea", {
91
- ...mergedProps,
83
+ $[20] = t5;
84
+ } else t5 = $[20];
85
+ let t6;
86
+ if ($[21] !== effectiveMinRows || $[22] !== invalid || $[23] !== isDisabled || $[24] !== props || $[25] !== t2 || $[26] !== t3 || $[27] !== t4 || $[28] !== t5) {
87
+ t6 = /*#__PURE__*/ jsx("textarea", {
88
+ ...t2,
92
89
  ...props,
93
- ref: t5,
94
- disabled: disabled,
95
- "aria-invalid": t6,
96
- "aria-disabled": disabled,
90
+ ref: t3,
91
+ disabled: isDisabled,
92
+ "aria-invalid": invalid,
93
+ "aria-disabled": isDisabled,
97
94
  rows: effectiveMinRows,
98
- ...t7,
99
- className: t8
95
+ ...t4,
96
+ className: t5
100
97
  });
101
- $[21] = disabled;
102
- $[22] = effectiveMinRows;
103
- $[23] = mergedProps;
98
+ $[21] = effectiveMinRows;
99
+ $[22] = invalid;
100
+ $[23] = isDisabled;
104
101
  $[24] = props;
105
- $[25] = t5;
106
- $[26] = t6;
107
- $[27] = t7;
108
- $[28] = t8;
109
- $[29] = t9;
110
- } else t9 = $[29];
111
- let t10;
102
+ $[25] = t2;
103
+ $[26] = t3;
104
+ $[27] = t4;
105
+ $[28] = t5;
106
+ $[29] = t6;
107
+ } else t6 = $[29];
108
+ let t7;
112
109
  if ($[30] !== autoResize) {
113
- t10 = !autoResize && /*#__PURE__*/ jsx(SvgIcon, {
110
+ t7 = !autoResize && /*#__PURE__*/ jsx(SvgIcon, {
114
111
  className: "w-12 h-12 absolute bottom-0 right-0 text-icon-secondary pointer-events-none",
115
112
  viewBox: "0 0 12 12",
116
113
  children: /*#__PURE__*/ jsx("path", {
@@ -120,23 +117,23 @@ const Textarea = (t0)=>{
120
117
  })
121
118
  });
122
119
  $[30] = autoResize;
123
- $[31] = t10;
124
- } else t10 = $[31];
125
- let t11;
126
- if ($[32] !== t10 || $[33] !== t9) {
127
- t11 = /*#__PURE__*/ jsxs("div", {
120
+ $[31] = t7;
121
+ } else t7 = $[31];
122
+ let t8;
123
+ if ($[32] !== t6 || $[33] !== t7) {
124
+ t8 = /*#__PURE__*/ jsxs("div", {
128
125
  className: "relative",
129
126
  "data-slot": "textarea",
130
127
  children: [
131
- t9,
132
- t10
128
+ t6,
129
+ t7
133
130
  ]
134
131
  });
135
- $[32] = t10;
136
- $[33] = t9;
137
- $[34] = t11;
138
- } else t11 = $[34];
139
- return t11;
132
+ $[32] = t6;
133
+ $[33] = t7;
134
+ $[34] = t8;
135
+ } else t8 = $[34];
136
+ return t8;
140
137
  };
141
138
  Textarea.displayName = "Textarea";
142
139
  export { Textarea };
@@ -60,7 +60,7 @@ There is no `FilterBar`, `PageFilters` or `Combobox` (use `Select` + `useSelectS
60
60
 
61
61
  **Searchable select**
62
62
 
63
- - Put `SelectSearchInput` in `SelectHeader`, wired to `useSelectSearch`. Pass the original collection to `Select`; render `filteredCollection`.
63
+ - Put `SelectSearchInput` in `SelectHeader`, wired to `useSelectSearch`. Pass `filteredCollection` to `Select` and render it, so arrow keys skip hidden options.
64
64
  - If the menu must match the trigger, pass `positioning={{ sameWidth: true }}` and `SelectPositioner className='min-w-full max-w-full'`; otherwise it is 240–320px.
65
65
  - Option icons: set `icon` on each item.
66
66
  - For several values use `SelectInput multiple`. `SelectButtonTag` is a trigger, not a chip list.
@@ -410,7 +410,7 @@ export const SearchableSelect = () => {
410
410
  <Field>
411
411
  <FieldLabel>Time zone</FieldLabel>
412
412
  <Select
413
- collection={timeZones}
413
+ collection={filteredCollection}
414
414
  value={[timeZone]}
415
415
  positioning={{ sameWidth: true }}
416
416
  onValueChange={handleTimeZoneChange}
@@ -1,15 +1,30 @@
1
- import { useCallback, useRef, useState } from "react";
1
+ import { c } from "react/compiler-runtime";
2
+ import { useState } from "react";
2
3
  const useControlled = (props)=>{
4
+ const $ = c(5);
3
5
  const { controlled, default: defaultProp } = props;
4
- const { current: isControlled } = useRef(void 0 !== controlled);
6
+ const [isControlled] = useState(void 0 !== controlled);
5
7
  const [valueState, setValue] = useState(defaultProp);
6
8
  const value = isControlled ? controlled : valueState;
7
- const setValueIfUncontrolled = useCallback((newValue)=>{
8
- if (!isControlled) setValue(newValue);
9
- }, []);
10
- return [
11
- value,
12
- setValueIfUncontrolled
13
- ];
9
+ let t0;
10
+ if ($[0] !== isControlled) {
11
+ t0 = (newValue)=>{
12
+ if (!isControlled) setValue(newValue);
13
+ };
14
+ $[0] = isControlled;
15
+ $[1] = t0;
16
+ } else t0 = $[1];
17
+ const setValueIfUncontrolled = t0;
18
+ let t1;
19
+ if ($[2] !== setValueIfUncontrolled || $[3] !== value) {
20
+ t1 = [
21
+ value,
22
+ setValueIfUncontrolled
23
+ ];
24
+ $[2] = setValueIfUncontrolled;
25
+ $[3] = value;
26
+ $[4] = t1;
27
+ } else t1 = $[4];
28
+ return t1;
14
29
  };
15
30
  export { useControlled };