@fibrae/semi-foundation 0.1.1 → 0.2.0

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.
Files changed (194) hide show
  1. package/dist/anchor/foundation.d.ts +1 -1
  2. package/dist/anchor/foundation.js +21 -21
  3. package/dist/audio-player/foundation.d.ts +10 -10
  4. package/dist/audio-player/foundation.js +19 -19
  5. package/dist/auto-complete/foundation.d.ts +12 -12
  6. package/dist/auto-complete/foundation.js +51 -51
  7. package/dist/avatar/foundation.d.ts +5 -5
  8. package/dist/avatar/foundation.js +16 -16
  9. package/dist/backtop/foundation.d.ts +2 -2
  10. package/dist/backtop/foundation.js +7 -7
  11. package/dist/banner/foundation.d.ts +1 -1
  12. package/dist/banner/foundation.js +4 -4
  13. package/dist/base/auto-close-foundation.d.ts +8 -8
  14. package/dist/base/auto-close-foundation.js +15 -15
  15. package/dist/base/foundation.d.ts +4 -3
  16. package/dist/base/foundation.js +12 -11
  17. package/dist/breadcrumb/foundation.d.ts +5 -5
  18. package/dist/breadcrumb/foundation.js +9 -10
  19. package/dist/breadcrumb/item-foundation.d.ts +3 -3
  20. package/dist/breadcrumb/item-foundation.js +6 -6
  21. package/dist/calendar/event-util.js +1 -1
  22. package/dist/calendar/foundation.js +4 -4
  23. package/dist/calendar/month-foundation.d.ts +2 -2
  24. package/dist/calendar/month-foundation.js +6 -6
  25. package/dist/carousel/foundation.d.ts +17 -17
  26. package/dist/carousel/foundation.js +51 -51
  27. package/dist/cascader/foundation.d.ts +34 -26
  28. package/dist/cascader/foundation.js +143 -121
  29. package/dist/checkbox/checkbox-foundation.d.ts +2 -2
  30. package/dist/checkbox/checkbox-foundation.js +15 -15
  31. package/dist/checkbox/checkbox-group-foundation.d.ts +2 -2
  32. package/dist/checkbox/checkbox-group-foundation.js +8 -8
  33. package/dist/code-highlight/index.d.ts +1 -1
  34. package/dist/code-highlight/index.js +3 -3
  35. package/dist/collapse/foundation.d.ts +2 -2
  36. package/dist/collapse/foundation.js +7 -7
  37. package/dist/collapsible/foundation.d.ts +3 -3
  38. package/dist/collapsible/foundation.js +8 -8
  39. package/dist/color-picker/alpha-slider-foundation.d.ts +2 -4
  40. package/dist/color-picker/alpha-slider-foundation.js +10 -10
  41. package/dist/color-picker/color-choose-area-foundation.d.ts +2 -5
  42. package/dist/color-picker/color-choose-area-foundation.js +14 -14
  43. package/dist/color-picker/color-slider-foundation.d.ts +2 -4
  44. package/dist/color-picker/color-slider-foundation.js +10 -10
  45. package/dist/color-picker/data-part-foundation.d.ts +5 -5
  46. package/dist/color-picker/data-part-foundation.js +11 -11
  47. package/dist/color-picker/foundation.d.ts +4 -4
  48. package/dist/color-picker/foundation.js +10 -10
  49. package/dist/config-provider/breakpoint-observer.d.ts +3 -3
  50. package/dist/config-provider/breakpoint-observer.js +6 -6
  51. package/dist/cropper/foundation.d.ts +15 -15
  52. package/dist/cropper/foundation.js +26 -23
  53. package/dist/date-picker/_utils/picker-type.d.ts +1 -1
  54. package/dist/date-picker/foundation.d.ts +36 -36
  55. package/dist/date-picker/foundation.js +125 -129
  56. package/dist/date-picker/input-foundation.d.ts +9 -9
  57. package/dist/date-picker/input-foundation.js +28 -28
  58. package/dist/date-picker/months-grid-foundation.d.ts +16 -16
  59. package/dist/date-picker/months-grid-foundation.js +64 -65
  60. package/dist/date-picker/year-and-month-foundation.d.ts +3 -3
  61. package/dist/date-picker/year-and-month-foundation.js +11 -11
  62. package/dist/drag-move/foundation.d.ts +2 -2
  63. package/dist/drag-move/foundation.js +15 -13
  64. package/dist/dropdown/foundation.d.ts +8 -5
  65. package/dist/dropdown/foundation.js +32 -28
  66. package/dist/dropdown/menu-foundation.d.ts +1 -1
  67. package/dist/dropdown/menu-foundation.js +11 -11
  68. package/dist/feedback/foundation.d.ts +9 -9
  69. package/dist/feedback/foundation.js +33 -33
  70. package/dist/form/form-api-proxy.d.ts +8 -7
  71. package/dist/form/form-api-proxy.js +25 -25
  72. package/dist/form/foundation.d.ts +5 -5
  73. package/dist/form/foundation.js +60 -61
  74. package/dist/highlight/foundation.js +1 -1
  75. package/dist/hot-keys/foundation.d.ts +2 -2
  76. package/dist/hot-keys/foundation.js +5 -5
  77. package/dist/image/image-foundation.d.ts +4 -4
  78. package/dist/image/image-foundation.js +10 -10
  79. package/dist/image/preview-footer-foundation.d.ts +3 -3
  80. package/dist/image/preview-footer-foundation.js +10 -10
  81. package/dist/image/preview-foundation.js +7 -6
  82. package/dist/image/preview-image-foundation.d.ts +6 -8
  83. package/dist/image/preview-image-foundation.js +14 -14
  84. package/dist/image/preview-inner-foundation.d.ts +9 -9
  85. package/dist/image/preview-inner-foundation.js +38 -38
  86. package/dist/input/foundation.d.ts +10 -10
  87. package/dist/input/foundation.js +47 -49
  88. package/dist/input/text-entry-foundation.d.ts +3 -3
  89. package/dist/input/text-entry-foundation.js +14 -14
  90. package/dist/input/textarea-foundation.d.ts +7 -7
  91. package/dist/input/textarea-foundation.js +36 -36
  92. package/dist/input-number/foundation.d.ts +16 -14
  93. package/dist/input-number/foundation.js +54 -53
  94. package/dist/json-viewer/foundation.d.ts +8 -8
  95. package/dist/json-viewer/foundation.js +23 -23
  96. package/dist/lottie/foundation.d.ts +1 -1
  97. package/dist/lottie/foundation.js +4 -4
  98. package/dist/markdown-render/foundation.d.ts +1 -1
  99. package/dist/markdown-render/foundation.js +4 -4
  100. package/dist/modal/modal-content-foundation.d.ts +7 -7
  101. package/dist/modal/modal-content-foundation.js +20 -20
  102. package/dist/modal/modal-foundation.d.ts +6 -6
  103. package/dist/modal/modal-foundation.js +24 -24
  104. package/dist/navigation/foundation.d.ts +1 -1
  105. package/dist/navigation/foundation.js +14 -14
  106. package/dist/navigation/item-foundation.d.ts +1 -1
  107. package/dist/navigation/item-foundation.js +8 -8
  108. package/dist/navigation/sub-nav-foundation.d.ts +3 -3
  109. package/dist/navigation/sub-nav-foundation.js +17 -17
  110. package/dist/notification/notification-list-foundation.d.ts +7 -7
  111. package/dist/notification/notification-list-foundation.js +12 -12
  112. package/dist/overflow-list/foundation.d.ts +4 -4
  113. package/dist/overflow-list/foundation.js +18 -18
  114. package/dist/pagination/foundation.d.ts +8 -8
  115. package/dist/pagination/foundation.js +28 -28
  116. package/dist/pincode/foundation.d.ts +5 -5
  117. package/dist/pincode/foundation.js +22 -22
  118. package/dist/popconfirm/popconfirm-foundation.d.ts +7 -7
  119. package/dist/popconfirm/popconfirm-foundation.js +26 -26
  120. package/dist/radio/radio-foundation.d.ts +5 -5
  121. package/dist/radio/radio-foundation.js +15 -15
  122. package/dist/radio/radio-group-foundation.d.ts +2 -2
  123. package/dist/radio/radio-group-foundation.js +9 -9
  124. package/dist/rating/foundation.d.ts +10 -10
  125. package/dist/rating/foundation.js +35 -35
  126. package/dist/resizable/group/index.d.ts +6 -6
  127. package/dist/resizable/group/index.js +40 -40
  128. package/dist/resizable/single/index.d.ts +2 -2
  129. package/dist/resizable/single/index.js +9 -9
  130. package/dist/scroll-list/item-foundation.d.ts +7 -7
  131. package/dist/scroll-list/item-foundation.js +35 -35
  132. package/dist/select/foundation.d.ts +42 -56
  133. package/dist/select/foundation.js +214 -279
  134. package/dist/select/option-foundation.d.ts +23 -27
  135. package/dist/select/option-foundation.js +10 -18
  136. package/dist/side-sheet/side-sheet-foundation.d.ts +6 -6
  137. package/dist/side-sheet/side-sheet-foundation.js +22 -22
  138. package/dist/slider/foundation.d.ts +16 -16
  139. package/dist/slider/foundation.js +46 -46
  140. package/dist/sortable/accessibility.d.ts +1 -1
  141. package/dist/sortable/accessibility.js +2 -2
  142. package/dist/spin/foundation.d.ts +2 -2
  143. package/dist/spin/foundation.js +6 -6
  144. package/dist/steps/utils.d.ts +1 -1
  145. package/dist/switch/foundation.d.ts +2 -2
  146. package/dist/switch/foundation.js +7 -7
  147. package/dist/table/foundation.d.ts +14 -14
  148. package/dist/table/foundation.js +93 -93
  149. package/dist/table/utils.d.ts +2 -2
  150. package/dist/tabs/foundation.d.ts +5 -5
  151. package/dist/tabs/foundation.js +17 -17
  152. package/dist/tag-input/foundation.d.ts +11 -11
  153. package/dist/tag-input/foundation.js +52 -52
  154. package/dist/time-picker/foundation.d.ts +13 -13
  155. package/dist/time-picker/foundation.js +39 -39
  156. package/dist/time-picker/input-foundation.d.ts +4 -4
  157. package/dist/time-picker/input-foundation.js +13 -13
  158. package/dist/toast/toast-list-foundation.d.ts +7 -7
  159. package/dist/toast/toast-list-foundation.js +14 -14
  160. package/dist/tooltip/foundation.d.ts +9 -9
  161. package/dist/tooltip/foundation.js +67 -61
  162. package/dist/transfer/foundation.d.ts +22 -9
  163. package/dist/transfer/foundation.js +38 -23
  164. package/dist/tree/foundation.d.ts +14 -14
  165. package/dist/tree/foundation.js +61 -61
  166. package/dist/tree/shared.d.ts +1 -1
  167. package/dist/tree-select/foundation.d.ts +26 -20
  168. package/dist/tree-select/foundation.js +91 -83
  169. package/dist/typography/ellipsis.d.ts +4 -4
  170. package/dist/typography/ellipsis.js +8 -8
  171. package/dist/typography/format-numeral.d.ts +1 -1
  172. package/dist/typography/format-numeral.js +2 -2
  173. package/dist/upload/constants.d.ts +1 -1
  174. package/dist/upload/foundation.d.ts +17 -17
  175. package/dist/upload/foundation.js +92 -92
  176. package/dist/upload/utils.d.ts +3 -3
  177. package/dist/upload/utils.js +6 -6
  178. package/dist/user-guide/foundation.d.ts +3 -3
  179. package/dist/user-guide/foundation.js +19 -19
  180. package/dist/utils/a11y.d.ts +1 -1
  181. package/dist/utils/announcer.d.ts +2 -2
  182. package/dist/utils/announcer.js +4 -4
  183. package/dist/utils/focus-handle.d.ts +1 -1
  184. package/dist/utils/focus-handle.js +1 -2
  185. package/dist/utils/focus-scope.d.ts +5 -5
  186. package/dist/utils/focus-scope.js +10 -10
  187. package/dist/utils/is-promise.d.ts +1 -1
  188. package/dist/utils/release-holder.d.ts +2 -2
  189. package/dist/utils/release-holder.js +4 -4
  190. package/dist/video-player/foundation.d.ts +15 -15
  191. package/dist/video-player/foundation.js +89 -89
  192. package/dist/video-player/progress-foundation.d.ts +2 -2
  193. package/dist/video-player/progress-foundation.js +12 -12
  194. package/package.json +2 -2
@@ -56,7 +56,7 @@ var TreeFoundation = class TreeFoundation extends BaseFoundation {
56
56
  constructor(adapter) {
57
57
  super({ ...adapter });
58
58
  this.#throttledDragOverUpdate = throttle((dropPosition) => {
59
- this._adapter.updateState({ dropPosition });
59
+ this.adapter.updateState({ dropPosition });
60
60
  }, 16);
61
61
  }
62
62
  #isMultiple() {
@@ -83,7 +83,7 @@ var TreeFoundation = class TreeFoundation extends BaseFoundation {
83
83
  const data = this.getProp("treeDataSimpleJson");
84
84
  const selectedPath = normalizedArr(key).map((i) => i.split(strings.JSON_KEY_SPLIT));
85
85
  const value = pick$1(data, selectedPath);
86
- this._adapter.notifyChange(value);
86
+ this.adapter.notifyChange(value);
87
87
  }
88
88
  #notifyMultipleChange(key) {
89
89
  const { keyEntities } = this.getStates();
@@ -96,7 +96,7 @@ var TreeFoundation = class TreeFoundation extends BaseFoundation {
96
96
  const nodes = keyList.map((key) => keyEntities[key] ? keyEntities[key].data : getDataForKeyNotInKeyEntities(key, props));
97
97
  if (this.getProp("onChangeWithObject")) value = nodes;
98
98
  else value = getValueOrKey(nodes, keyMaps);
99
- this._adapter.notifyChange(value);
99
+ this.adapter.notifyChange(value);
100
100
  }
101
101
  #notifyChange(key) {
102
102
  const isMultiple = this.#isMultiple();
@@ -111,26 +111,26 @@ var TreeFoundation = class TreeFoundation extends BaseFoundation {
111
111
  const { data } = get(keyEntities, key);
112
112
  value = getValueOrKey(data, keyMaps);
113
113
  }
114
- this._adapter.notifyChange(value);
114
+ this.adapter.notifyChange(value);
115
115
  }
116
116
  }
117
117
  #handleSingleSelect(_e, { selected, eventKey, data }) {
118
118
  let selectedKeys = [...this.getState("selectedKeys")];
119
119
  const targetSelected = !selected;
120
- this._adapter.notifySelect(eventKey, true, data);
120
+ this.adapter.notifySelect(eventKey, true, data);
121
121
  if (!targetSelected) return;
122
122
  if (!selectedKeys.includes(eventKey)) {
123
123
  selectedKeys = [eventKey];
124
124
  this.#notifyChange(eventKey);
125
- if (!this._isControlledComponent()) this._adapter.updateState({ selectedKeys });
125
+ if (!this.isControlledComponent()) this.adapter.updateState({ selectedKeys });
126
126
  }
127
127
  }
128
128
  #handleMultipleSelect(_e, treeNode) {
129
129
  const result = getMultipleSelectResult(treeNode, this.getProps(), this.getStates());
130
130
  if (!result) return;
131
- this._adapter.notifySelect(treeNode.eventKey, result.targetStatus, treeNode.data);
131
+ this.adapter.notifySelect(treeNode.eventKey, result.targetStatus, treeNode.data);
132
132
  this.#notifyChange(result.keys);
133
- if (!this._isControlledComponent()) this._adapter.updateState(result.state);
133
+ if (!this.isControlledComponent()) this.adapter.updateState(result.state);
134
134
  }
135
135
  #setExpandedStatus({ eventKey, expanded, data }) {
136
136
  const { inputValue, treeData, filteredShownKeys, keyEntities } = this.getStates();
@@ -145,7 +145,7 @@ var TreeFoundation = class TreeFoundation extends BaseFoundation {
145
145
  expandedKeys.delete(eventKey);
146
146
  motionType = "hide";
147
147
  }
148
- this._adapter.setCachedFlattenNodes(motionType === "hide" && this.#isAnimated() ? this.getState("flattenNodes") : void 0);
148
+ this.adapter.setCachedFlattenNodes(motionType === "hide" && this.#isAnimated() ? this.getState("flattenNodes") : void 0);
149
149
  if (!this.#isExpandControlled()) {
150
150
  const flattenNodes = flattenTreeData(treeData, expandedKeys, keyMaps, isSearching && showFilteredOnly && filteredShownKeys);
151
151
  let motionKeys = this.#isAnimated() ? getMotionKeys(eventKey, expandedKeys, keyEntities) : [];
@@ -156,7 +156,7 @@ var TreeFoundation = class TreeFoundation extends BaseFoundation {
156
156
  motionKeys: new Set(motionKeys),
157
157
  motionType
158
158
  };
159
- this._adapter.updateState(newState);
159
+ this.adapter.updateState(newState);
160
160
  }
161
161
  return {
162
162
  expandedKeys,
@@ -178,7 +178,7 @@ var TreeFoundation = class TreeFoundation extends BaseFoundation {
178
178
  }
179
179
  #clearDragState() {
180
180
  this.#clearDragEnterTimers();
181
- this._adapter.updateState({
181
+ this.adapter.updateState({
182
182
  dragOverNodeKey: "",
183
183
  dragging: false
184
184
  });
@@ -350,14 +350,14 @@ var TreeFoundation = class TreeFoundation extends BaseFoundation {
350
350
  this.#clearDragEnterTimers();
351
351
  }
352
352
  /** Writes the state derived from new props back, so handlers read what was rendered */
353
- syncDerivedState(derived) {
354
- this._adapter.updateState(derived);
355
- }
356
- scrollTo({ key, align = "center" }) {
357
- if (key && this.getState("flattenNodes")?.some((node) => node.key === key)) this._adapter.scrollToNode(key, align);
358
- }
359
- handleInputChange(sugInput) {
360
- this._adapter.updateInputValue(sugInput);
353
+ syncDerivedState = (derived) => {
354
+ this.adapter.updateState(derived);
355
+ };
356
+ scrollTo = ({ key, align = "center" }) => {
357
+ if (key && this.getState("flattenNodes")?.some((node) => node.key === key)) this.adapter.scrollToNode(key, align);
358
+ };
359
+ handleInputChange = (sugInput) => {
360
+ this.adapter.updateInputValue(sugInput);
361
361
  const { selectedKeys, keyEntities, treeData } = this.getStates();
362
362
  const expandedKeys = new Set(this.getState("expandedKeys"));
363
363
  const { showFilteredOnly, filterTreeNode, treeNodeFilterProp, keyMaps } = this.getProps();
@@ -380,8 +380,8 @@ var TreeFoundation = class TreeFoundation extends BaseFoundation {
380
380
  flattenNodes = flattenTreeData(treeData, new Set(expandedOptsKeys), keyMaps, showFilteredOnly && filteredShownKeys);
381
381
  }
382
382
  const newFilteredExpandedKeys = new Set(expandedOptsKeys);
383
- this._adapter.notifySearch(sugInput, Array.from(newFilteredExpandedKeys));
384
- this._adapter.updateState({
383
+ this.adapter.notifySearch(sugInput, Array.from(newFilteredExpandedKeys));
384
+ this.adapter.updateState({
385
385
  expandedKeys,
386
386
  flattenNodes,
387
387
  motionKeys: /* @__PURE__ */ new Set([]),
@@ -389,29 +389,29 @@ var TreeFoundation = class TreeFoundation extends BaseFoundation {
389
389
  filteredExpandedKeys: newFilteredExpandedKeys,
390
390
  filteredShownKeys
391
391
  });
392
- }
393
- handleNodeSelect(e, treeNode) {
392
+ };
393
+ handleNodeSelect = (e, treeNode) => {
394
394
  if (this.#isDisabled(treeNode)) return;
395
395
  if (!this.#isMultiple()) this.#handleSingleSelect(e, treeNode);
396
396
  else this.#handleMultipleSelect(e, treeNode);
397
- }
398
- handleNodeRightClick(e, treeNode) {
399
- this._adapter.notifyRightClick(e, treeNode.data);
400
- }
401
- handleNodeDoubleClick(e, treeNode) {
402
- this._adapter.notifyDoubleClick(e, treeNode.data);
403
- }
404
- handleNodeExpand(_e, treeNode) {
397
+ };
398
+ handleNodeRightClick = (e, treeNode) => {
399
+ this.adapter.notifyRightClick(e, treeNode.data);
400
+ };
401
+ handleNodeDoubleClick = (e, treeNode) => {
402
+ this.adapter.notifyDoubleClick(e, treeNode.data);
403
+ };
404
+ handleNodeExpand = (_e, treeNode) => {
405
405
  const { loadData } = this.getProps();
406
406
  if (!loadData && (!treeNode.children || !treeNode.children.length)) return;
407
407
  if (isTreeNodeLeaf(treeNode, loadData)) return;
408
408
  const { expandedKeys, data, expanded } = this.#setExpandedStatus(treeNode);
409
- this._adapter.notifyExpand(expandedKeys, {
409
+ this.adapter.notifyExpand(expandedKeys, {
410
410
  expanded,
411
411
  node: data
412
412
  });
413
413
  if (expanded && loadData) this.handleNodeLoad(treeNode.eventKey, data);
414
- }
414
+ };
415
415
  /** Loads a node's children once; `key` is the node's entity key, which keyMaps may take from another field */
416
416
  handleNodeLoad(key, data) {
417
417
  const { loadData } = this.getProps();
@@ -423,20 +423,20 @@ var TreeFoundation = class TreeFoundation extends BaseFoundation {
423
423
  const newLoadedKeys = prevLoadedKeys.add(key);
424
424
  const newLoadingKeys = new Set(prevLoadingKeys);
425
425
  newLoadingKeys.delete(key);
426
- this._adapter.notifyLoad(newLoadedKeys, data);
427
- if (!this.#isLoadControlled()) this._adapter.updateState({ loadedKeys: newLoadedKeys });
428
- this._adapter.updateState({ loadingKeys: newLoadingKeys });
426
+ this.adapter.notifyLoad(newLoadedKeys, data);
427
+ if (!this.#isLoadControlled()) this.adapter.updateState({ loadedKeys: newLoadedKeys });
428
+ this.adapter.updateState({ loadingKeys: newLoadingKeys });
429
429
  }).finally(() => {
430
430
  const currentLoadingKeys = this.getState("loadingKeys");
431
431
  if (currentLoadingKeys.has(key)) {
432
432
  const newLoadingKeys = new Set(currentLoadingKeys);
433
433
  newLoadingKeys.delete(key);
434
- this._adapter.updateState({ loadingKeys: newLoadingKeys });
434
+ this.adapter.updateState({ loadingKeys: newLoadingKeys });
435
435
  }
436
436
  });
437
- this._adapter.updateState({ loadingKeys: new Set(loadingKeys).add(key) });
437
+ this.adapter.updateState({ loadingKeys: new Set(loadingKeys).add(key) });
438
438
  }
439
- handleNodeDragStart(e, treeNode) {
439
+ handleNodeDragStart = (e, treeNode) => {
440
440
  const { keyEntities } = this.getStates();
441
441
  const { hideDraggingNode, renderDraggingNode } = this.getProps();
442
442
  const { eventKey, nodeInstance, data } = treeNode;
@@ -452,13 +452,13 @@ var TreeFoundation = class TreeFoundation extends BaseFoundation {
452
452
  setTimeout(() => dragImg.remove());
453
453
  }
454
454
  this.#dragNode = treeNode;
455
- this._adapter.updateState({
455
+ this.adapter.updateState({
456
456
  dragging: true,
457
457
  dragNodesKeys: new Set(getDragNodesKeys(eventKey, keyEntities))
458
458
  });
459
- this._adapter.notifyDragStart(this.#dragProps(e, treeNode));
460
- }
461
- handleNodeDragEnter(e, treeNode) {
459
+ this.adapter.notifyDragStart(this.#dragProps(e, treeNode));
460
+ };
461
+ handleNodeDragEnter = (e, treeNode) => {
462
462
  const { dragNodesKeys } = this.getStates();
463
463
  const { autoExpandWhenDragEnter } = this.getProps();
464
464
  const { eventKey, expanded } = treeNode;
@@ -466,7 +466,7 @@ var TreeFoundation = class TreeFoundation extends BaseFoundation {
466
466
  if (!dragNode || dragNodesKeys.has(eventKey)) return;
467
467
  const dropPosition = calcDropRelativePosition(e, treeNode);
468
468
  if (dragNode.eventKey === eventKey && dropPosition === 0) {
469
- this._adapter.updateState({
469
+ this.adapter.updateState({
470
470
  dragOverNodeKey: "",
471
471
  dropPosition: null
472
472
  });
@@ -474,26 +474,26 @@ var TreeFoundation = class TreeFoundation extends BaseFoundation {
474
474
  }
475
475
  const timer = setTimeout(() => {
476
476
  this.#dragEnterTimers.delete(timer);
477
- this._adapter.updateState({
477
+ this.adapter.updateState({
478
478
  dragOverNodeKey: eventKey,
479
479
  dropPosition
480
480
  });
481
481
  if (!autoExpandWhenDragEnter || expanded) {
482
- this._adapter.notifyDragEnter(this.#dragProps(e, treeNode));
482
+ this.adapter.notifyDragEnter(this.#dragProps(e, treeNode));
483
483
  return;
484
484
  }
485
485
  clearTimeout(this.#autoExpandTimer);
486
486
  this.#autoExpandTimer = setTimeout(() => {
487
487
  const { expandedKeys: newExpandedKeys } = this.#setExpandedStatus(treeNode);
488
- this._adapter.notifyDragEnter({
488
+ this.adapter.notifyDragEnter({
489
489
  ...this.#dragProps(e, treeNode),
490
490
  expandedKeys: [...newExpandedKeys]
491
491
  });
492
492
  }, 400);
493
493
  }, 0);
494
494
  this.#dragEnterTimers.add(timer);
495
- }
496
- handleNodeDragOver(e, treeNode) {
495
+ };
496
+ handleNodeDragOver = (e, treeNode) => {
497
497
  const { dropPosition, dragNodesKeys, dragOverNodeKey } = this.getStates();
498
498
  const { eventKey } = treeNode;
499
499
  if (dragNodesKeys.has(eventKey)) return;
@@ -502,21 +502,21 @@ var TreeFoundation = class TreeFoundation extends BaseFoundation {
502
502
  if (dropPosition === newPos) return;
503
503
  this.#throttledDragOverUpdate(newPos);
504
504
  }
505
- this._adapter.notifyDragOver(this.#dragProps(e, treeNode));
506
- }
507
- handleNodeDragLeave(e, treeNode) {
505
+ this.adapter.notifyDragOver(this.#dragProps(e, treeNode));
506
+ };
507
+ handleNodeDragLeave = (e, treeNode) => {
508
508
  this.#throttledDragOverUpdate.cancel();
509
509
  clearTimeout(this.#autoExpandTimer);
510
- this._adapter.updateState({ dragOverNodeKey: "" });
511
- this._adapter.notifyDragLeave(this.#dragProps(e, treeNode));
512
- }
513
- handleNodeDragEnd(e, treeNode) {
510
+ this.adapter.updateState({ dragOverNodeKey: "" });
511
+ this.adapter.notifyDragLeave(this.#dragProps(e, treeNode));
512
+ };
513
+ handleNodeDragEnd = (e, treeNode) => {
514
514
  this.#throttledDragOverUpdate.flush();
515
515
  this.#clearDragState();
516
- this._adapter.notifyDragEnd(this.#dragProps(e, treeNode));
516
+ this.adapter.notifyDragEnd(this.#dragProps(e, treeNode));
517
517
  this.#dragNode = null;
518
- }
519
- handleNodeDrop(e, treeNode) {
518
+ };
519
+ handleNodeDrop = (e, treeNode) => {
520
520
  this.#throttledDragOverUpdate.flush();
521
521
  const { dropPosition, dragNodesKeys } = this.getStates();
522
522
  const { eventKey, pos } = treeNode;
@@ -529,11 +529,11 @@ var TreeFoundation = class TreeFoundation extends BaseFoundation {
529
529
  dropPosition: calcDropActualPosition(pos, dropPosition),
530
530
  dropToGap: dropPosition !== 0
531
531
  };
532
- this._adapter.notifyDrop({
532
+ this.adapter.notifyDrop({
533
533
  ...this.#dragProps(e, treeNode),
534
534
  ...dropRes
535
535
  });
536
536
  this.#dragNode = null;
537
- }
537
+ };
538
538
  };
539
539
  export { TreeFoundation as default, treeDerivedPropKeys };
@@ -54,7 +54,7 @@ export declare function sameKeys(a: {
54
54
  */
55
55
  export declare function getTransitionNodes<T extends {
56
56
  key?: string;
57
- }>(nodes: T[], motionKeys: Set<string>, motionType: TreeMotionType | null | undefined, flattenList?: T[]): (T | T[])[];
57
+ }>(nodes: T[], motionKeys: Set<string>, motionType?: TreeMotionType | null, flattenList?: T[]): (T | T[])[];
58
58
  export type TreeKeyAction = {
59
59
  type: 'move';
60
60
  index: number;
@@ -127,7 +127,7 @@ export default class TreeSelectFoundation<P extends BasicTreeSelectProps = Basic
127
127
  /** The state of a new TreeSelect: the empty state with what the props imply */
128
128
  static getInitialState(props: BasicTreeSelectProps): BasicTreeSelectInnerData;
129
129
  /** The keys the trigger shows: the selection, or in multiple mode the checked keys merged as onChange reports them */
130
- static getTriggerKeys(props: Pick<BasicTreeSelectProps, 'multiple' | 'checkRelation' | 'autoMergeValue' | 'leafOnly'>, state: Pick<BasicTreeSelectInnerData, 'selectedKeys' | 'checkedKeys' | 'realCheckedKeys' | 'keyEntities'>): string[];
130
+ static getTriggerKeys(props: Pick<BasicTreeSelectProps, 'multiple' | 'checkRelation' | 'autoMergeValue' | 'leafOnly'>, { checkedKeys, realCheckedKeys, keyEntities, selectedKeys }: Pick<BasicTreeSelectInnerData, 'selectedKeys' | 'checkedKeys' | 'realCheckedKeys' | 'keyEntities'>): string[];
131
131
  static hasValue(props: Pick<BasicTreeSelectProps, 'multiple' | 'checkRelation'>, { selectedKeys, checkedKeys, realCheckedKeys }: Pick<BasicTreeSelectInnerData, 'selectedKeys' | 'checkedKeys' | 'realCheckedKeys'>): boolean;
132
132
  /** What the trigger shows for the single selection; pure, so render can call it */
133
133
  static getRenderTextInSingle(props: Record<string, any>, { selectedKeys, keyEntities }: Pick<BasicTreeSelectInnerData, 'selectedKeys' | 'keyEntities'>): any;
@@ -138,39 +138,45 @@ export default class TreeSelectFoundation<P extends BasicTreeSelectProps = Basic
138
138
  static getNodeData(key: string, keyEntities: BasicTreeSelectInnerData['keyEntities'], props: Parameters<typeof getDataForKeyNotInKeyEntities>[1]): BasicTreeNodeData | undefined;
139
139
  init(): void;
140
140
  /** Writes the state derived from new props back, so handlers read what was rendered */
141
- syncDerivedState(derived: Partial<BasicTreeSelectInnerData>): void;
141
+ syncDerivedState: (derived: Partial<BasicTreeSelectInnerData>) => void;
142
142
  /** Searches as if `value` were typed, opening the dropdown first */
143
- search(value: string): void;
143
+ search: (value: string) => void;
144
144
  /** Focus entering the trigger (its search input, tags, clear button) or the dropdown from outside */
145
- handleTriggerFocus(e: FocusEvent): void;
145
+ handleTriggerFocus: (e: FocusEvent) => void;
146
146
  /**
147
147
  * Reports the blur once per focus: on a mousedown outside, a single pick that closes, or the focus leaving the
148
148
  * trigger and the dropdown (the component checks where it went)
149
149
  */
150
150
  handleTriggerBlur(e: E | MouseEvent | FocusEvent): void;
151
+ /**
152
+ * The focus left the trigger and the dropdown (the component checks where it went): reports the blur, and closes
153
+ * an open dropdown when the focus went to another element (APG combobox). A window blur has no target and keeps
154
+ * the dropdown, as the native select does.
155
+ */
156
+ handleFocusLeave: (e: FocusEvent) => void;
151
157
  /** A mousedown outside the trigger and the dropdown, listened to while the TreeSelect is focused or open */
152
- handleClickOutside(e: MouseEvent): void;
153
- handleKeyDown(e: Pick<KeyboardEvent, 'key' | 'preventDefault'>): void;
154
- onClickSingleTriggerSearchItem(): void;
155
- close(): void;
156
- handleClick(e: E & Pick<UIEvent, 'detail' | 'target' | 'currentTarget'>): void;
158
+ handleClickOutside: (e: MouseEvent) => void;
159
+ handleKeyDown: (e: Pick<KeyboardEvent, "key" | "preventDefault">) => void;
160
+ onClickSingleTriggerSearchItem: () => void;
161
+ close: () => void;
162
+ handleClick: (e: E & Pick<UIEvent, "detail" | "target" | "currentTarget">) => void;
157
163
  /**
158
164
  * Enter toggles the popup like a click; Down and Up open a closed one (APG combobox). Outside a text field (the
159
165
  * select-only combobox) Space toggles it like Enter, and Home and End open a closed one: the view moves to the
160
166
  * first or the last row, which lives in the view.
161
167
  */
162
- handleSelectionKeyDown(e: E & Pick<KeyboardEvent, 'key' | 'preventDefault' | 'detail' | 'target' | 'currentTarget'>): void;
163
- handleClear(e: any): void;
164
- removeTag(eventKey: BasicTreeNodeData['key']): void;
165
- handleNodeSelect(e: any, treeNode: BasicTreeNodeProps): void;
166
- handleNodeExpand(e: any, treeNode: BasicTreeNodeProps): void;
167
- handleInputTriggerBlur(e?: {
168
+ handleSelectionKeyDown: (e: E & Pick<KeyboardEvent, "key" | "preventDefault" | "detail" | "target" | "currentTarget">) => void;
169
+ handleClear: (e?: E) => void;
170
+ removeTag: (eventKey: BasicTreeNodeData["key"]) => void;
171
+ handleNodeSelect: (e: E, treeNode: BasicTreeNodeProps) => void;
172
+ handleNodeExpand: (e: E, treeNode: BasicTreeNodeProps) => void;
173
+ handleInputTriggerBlur: (e?: {
168
174
  relatedTarget: EventTarget | null;
169
- }): void;
170
- handleInputTriggerFocus(e?: {
175
+ }) => void;
176
+ handleInputTriggerFocus: (e?: {
171
177
  relatedTarget: EventTarget | null;
172
- }): void;
173
- handlePopoverOpen(): void;
174
- handleAfterClose(): void;
178
+ }) => void;
179
+ handlePopoverOpen: () => void;
180
+ handleAfterClose: () => void;
175
181
  }
176
182
  export type { Size };