@fibrae/semi-foundation 0.1.1 → 0.3.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 (282) hide show
  1. package/dist/anchor/foundation.d.ts +1 -4
  2. package/dist/anchor/foundation.js +21 -22
  3. package/dist/audio-player/foundation.d.ts +10 -13
  4. package/dist/audio-player/foundation.js +19 -20
  5. package/dist/auto-complete/foundation.d.ts +12 -14
  6. package/dist/auto-complete/foundation.js +51 -52
  7. package/dist/avatar/foundation.d.ts +5 -6
  8. package/dist/avatar/foundation.js +16 -16
  9. package/dist/avatar/variables.scss +0 -1
  10. package/dist/backtop/foundation.d.ts +2 -5
  11. package/dist/backtop/foundation.js +7 -8
  12. package/dist/banner/foundation.d.ts +1 -1
  13. package/dist/banner/foundation.js +4 -4
  14. package/dist/base/auto-close-foundation.d.ts +8 -9
  15. package/dist/base/auto-close-foundation.js +15 -15
  16. package/dist/base/foundation.d.ts +4 -4
  17. package/dist/base/foundation.js +12 -11
  18. package/dist/base/list-store.d.ts +0 -1
  19. package/dist/breadcrumb/foundation.d.ts +5 -5
  20. package/dist/breadcrumb/foundation.js +9 -10
  21. package/dist/breadcrumb/item-foundation.d.ts +3 -3
  22. package/dist/breadcrumb/item-foundation.js +6 -6
  23. package/dist/calendar/event-util.d.ts +0 -10
  24. package/dist/calendar/event-util.js +1 -11
  25. package/dist/calendar/foundation.d.ts +1 -6
  26. package/dist/calendar/foundation.js +5 -9
  27. package/dist/calendar/month-foundation.d.ts +2 -3
  28. package/dist/calendar/month-foundation.js +6 -7
  29. package/dist/carousel/foundation.d.ts +17 -19
  30. package/dist/carousel/foundation.js +51 -51
  31. package/dist/cascader/foundation.d.ts +36 -32
  32. package/dist/cascader/foundation.js +145 -132
  33. package/dist/cascader/util.d.ts +1 -8
  34. package/dist/cascader/util.js +1 -8
  35. package/dist/checkbox/checkbox-foundation.d.ts +3 -7
  36. package/dist/checkbox/checkbox-foundation.js +15 -17
  37. package/dist/checkbox/checkbox-group-foundation.d.ts +2 -3
  38. package/dist/checkbox/checkbox-group-foundation.js +8 -8
  39. package/dist/code-highlight/index.d.ts +1 -2
  40. package/dist/code-highlight/index.js +3 -3
  41. package/dist/collapse/foundation.d.ts +2 -2
  42. package/dist/collapse/foundation.js +7 -7
  43. package/dist/collapsible/foundation.d.ts +3 -3
  44. package/dist/collapsible/foundation.js +8 -8
  45. package/dist/color-picker/alpha-slider-foundation.d.ts +2 -4
  46. package/dist/color-picker/alpha-slider-foundation.js +10 -10
  47. package/dist/color-picker/color-choose-area-foundation.d.ts +2 -5
  48. package/dist/color-picker/color-choose-area-foundation.js +14 -14
  49. package/dist/color-picker/color-picker.scss +0 -2
  50. package/dist/color-picker/color-slider-foundation.d.ts +2 -4
  51. package/dist/color-picker/color-slider-foundation.js +10 -10
  52. package/dist/color-picker/data-part-foundation.d.ts +5 -5
  53. package/dist/color-picker/data-part-foundation.js +11 -11
  54. package/dist/color-picker/foundation.d.ts +4 -4
  55. package/dist/color-picker/foundation.js +10 -10
  56. package/dist/color-picker/interface.d.ts +0 -1
  57. package/dist/config-provider/breakpoint-observer.d.ts +3 -3
  58. package/dist/config-provider/breakpoint-observer.js +6 -6
  59. package/dist/config-provider/responsive-types.d.ts +0 -16
  60. package/dist/cropper/foundation.d.ts +15 -16
  61. package/dist/cropper/foundation.js +26 -24
  62. package/dist/date-picker/_utils/get-default-picker-date.d.ts +0 -3
  63. package/dist/date-picker/_utils/get-default-picker-date.js +0 -3
  64. package/dist/date-picker/_utils/get-inset-input-format-token.d.ts +0 -2
  65. package/dist/date-picker/_utils/get-inset-input-format-token.js +0 -2
  66. package/dist/date-picker/_utils/get-inset-input-value-from-inset-input-str.d.ts +0 -2
  67. package/dist/date-picker/_utils/get-inset-input-value-from-inset-input-str.js +0 -2
  68. package/dist/date-picker/_utils/parser.d.ts +0 -3
  69. package/dist/date-picker/_utils/parser.js +0 -7
  70. package/dist/date-picker/_utils/picker-type.d.ts +1 -3
  71. package/dist/date-picker/_utils/picker-type.js +0 -2
  72. package/dist/date-picker/_utils/to-callback-args.d.ts +0 -1
  73. package/dist/date-picker/_utils/to-callback-args.js +0 -1
  74. package/dist/date-picker/date-picker.scss +0 -3
  75. package/dist/date-picker/foundation.d.ts +39 -58
  76. package/dist/date-picker/foundation.js +126 -153
  77. package/dist/date-picker/input-foundation.d.ts +10 -16
  78. package/dist/date-picker/input-foundation.js +28 -30
  79. package/dist/date-picker/month-foundation.d.ts +0 -3
  80. package/dist/date-picker/month-foundation.js +0 -2
  81. package/dist/date-picker/months-grid-foundation.d.ts +17 -26
  82. package/dist/date-picker/months-grid-foundation.js +65 -75
  83. package/dist/date-picker/year-and-month-foundation.d.ts +3 -3
  84. package/dist/date-picker/year-and-month-foundation.js +11 -11
  85. package/dist/drag-move/foundation.d.ts +2 -3
  86. package/dist/drag-move/foundation.js +15 -13
  87. package/dist/dropdown/foundation.d.ts +8 -7
  88. package/dist/dropdown/foundation.js +32 -28
  89. package/dist/dropdown/menu-foundation.d.ts +1 -2
  90. package/dist/dropdown/menu-foundation.js +11 -11
  91. package/dist/feedback/foundation.d.ts +9 -10
  92. package/dist/feedback/foundation.js +33 -33
  93. package/dist/feedback/variables.scss +1 -5
  94. package/dist/float-button/float-button.css +0 -1
  95. package/dist/float-button/float-button.scss +0 -2
  96. package/dist/form/form-api-proxy.d.ts +8 -7
  97. package/dist/form/form-api-proxy.js +25 -25
  98. package/dist/form/form.scss +0 -12
  99. package/dist/form/foundation.d.ts +5 -5
  100. package/dist/form/foundation.js +60 -76
  101. package/dist/form/interface.d.ts +2 -15
  102. package/dist/form/utils.d.ts +0 -8
  103. package/dist/form/utils.js +0 -7
  104. package/dist/form/variables.scss +1 -4
  105. package/dist/grid/variables.scss +0 -10
  106. package/dist/highlight/foundation.d.ts +0 -2
  107. package/dist/highlight/foundation.js +1 -3
  108. package/dist/hot-keys/foundation.d.ts +2 -3
  109. package/dist/hot-keys/foundation.js +5 -5
  110. package/dist/image/image-foundation.d.ts +4 -6
  111. package/dist/image/image-foundation.js +10 -10
  112. package/dist/image/preview-footer-foundation.d.ts +3 -4
  113. package/dist/image/preview-footer-foundation.js +10 -10
  114. package/dist/image/preview-foundation.d.ts +0 -3
  115. package/dist/image/preview-foundation.js +7 -6
  116. package/dist/image/preview-image-foundation.d.ts +6 -9
  117. package/dist/image/preview-image-foundation.js +14 -14
  118. package/dist/image/preview-inner-foundation.d.ts +9 -10
  119. package/dist/image/preview-inner-foundation.js +38 -38
  120. package/dist/input/foundation.d.ts +10 -11
  121. package/dist/input/foundation.js +47 -49
  122. package/dist/input/text-entry-foundation.d.ts +3 -5
  123. package/dist/input/text-entry-foundation.js +14 -15
  124. package/dist/input/textarea-foundation.d.ts +7 -8
  125. package/dist/input/textarea-foundation.js +36 -36
  126. package/dist/input-number/caret.d.ts +0 -1
  127. package/dist/input-number/caret.js +0 -1
  128. package/dist/input-number/foundation.d.ts +16 -19
  129. package/dist/input-number/foundation.js +54 -58
  130. package/dist/json-viewer/foundation.d.ts +8 -10
  131. package/dist/json-viewer/foundation.js +23 -24
  132. package/dist/locale/interface.d.ts +0 -3
  133. package/dist/lottie/foundation.d.ts +1 -1
  134. package/dist/lottie/foundation.js +4 -4
  135. package/dist/markdown-render/foundation.d.ts +2 -7
  136. package/dist/markdown-render/foundation.js +5 -9
  137. package/dist/modal/modal-content-foundation.d.ts +7 -7
  138. package/dist/modal/modal-content-foundation.js +20 -20
  139. package/dist/modal/modal-foundation.d.ts +6 -6
  140. package/dist/modal/modal-foundation.js +24 -24
  141. package/dist/navigation/foundation.d.ts +1 -8
  142. package/dist/navigation/foundation.js +14 -20
  143. package/dist/navigation/item-foundation.d.ts +1 -1
  144. package/dist/navigation/item-foundation.js +8 -8
  145. package/dist/navigation/sub-nav-foundation.d.ts +3 -4
  146. package/dist/navigation/sub-nav-foundation.js +17 -17
  147. package/dist/notification/notification-list-foundation.d.ts +7 -8
  148. package/dist/notification/notification-list-foundation.js +12 -13
  149. package/dist/notification/variables.scss +0 -1
  150. package/dist/overflow-list/foundation.d.ts +4 -6
  151. package/dist/overflow-list/foundation.js +18 -19
  152. package/dist/pagination/foundation.d.ts +8 -10
  153. package/dist/pagination/foundation.js +28 -28
  154. package/dist/pincode/foundation.d.ts +6 -9
  155. package/dist/pincode/foundation.js +23 -26
  156. package/dist/popconfirm/popconfirm-foundation.d.ts +7 -9
  157. package/dist/popconfirm/popconfirm-foundation.js +26 -26
  158. package/dist/progress/generates.d.ts +1 -4
  159. package/dist/progress/generates.js +1 -4
  160. package/dist/progress/utils.d.ts +1 -1
  161. package/dist/progress/utils.js +1 -1
  162. package/dist/radio/radio-foundation.d.ts +5 -9
  163. package/dist/radio/radio-foundation.js +15 -16
  164. package/dist/radio/radio-group-foundation.d.ts +2 -3
  165. package/dist/radio/radio-group-foundation.js +9 -9
  166. package/dist/rating/foundation.d.ts +10 -15
  167. package/dist/rating/foundation.js +35 -38
  168. package/dist/resizable/group/index.d.ts +6 -10
  169. package/dist/resizable/group/index.js +40 -44
  170. package/dist/resizable/resizable.scss +0 -1
  171. package/dist/resizable/single/index.d.ts +3 -7
  172. package/dist/resizable/single/index.js +10 -13
  173. package/dist/scroll-list/item-foundation.d.ts +7 -9
  174. package/dist/scroll-list/item-foundation.js +35 -36
  175. package/dist/scroll-list/variables.scss +1 -6
  176. package/dist/select/foundation.d.ts +42 -57
  177. package/dist/select/foundation.js +214 -279
  178. package/dist/select/option-foundation.d.ts +23 -28
  179. package/dist/select/option-foundation.js +10 -19
  180. package/dist/select/variables.scss +1 -8
  181. package/dist/side-sheet/side-sheet-foundation.d.ts +7 -12
  182. package/dist/side-sheet/side-sheet-foundation.js +23 -27
  183. package/dist/side-sheet/variables.scss +1 -3
  184. package/dist/slider/foundation.d.ts +17 -28
  185. package/dist/slider/foundation.js +47 -59
  186. package/dist/slider/variables.scss +1 -5
  187. package/dist/sortable/accessibility.d.ts +1 -1
  188. package/dist/sortable/accessibility.js +2 -2
  189. package/dist/spin/foundation.d.ts +2 -4
  190. package/dist/spin/foundation.js +6 -7
  191. package/dist/spin/variables.scss +1 -3
  192. package/dist/steps/utils.d.ts +1 -1
  193. package/dist/switch/foundation.d.ts +2 -3
  194. package/dist/switch/foundation.js +7 -7
  195. package/dist/switch/switch.scss +1 -1
  196. package/dist/switch/variables.scss +1 -5
  197. package/dist/table/foundation.d.ts +24 -33
  198. package/dist/table/foundation.js +144 -108
  199. package/dist/table/table.scss +0 -1
  200. package/dist/table/utils.d.ts +2 -10
  201. package/dist/table/utils.js +0 -13
  202. package/dist/table/variables.scss +1 -5
  203. package/dist/tabs/foundation.d.ts +5 -14
  204. package/dist/tabs/foundation.js +17 -21
  205. package/dist/tabs/tabs.scss +1 -1
  206. package/dist/tag/focus.js +0 -1
  207. package/dist/tag-input/foundation.d.ts +11 -13
  208. package/dist/tag-input/foundation.js +52 -53
  209. package/dist/tag-input/tag-input.scss +0 -1
  210. package/dist/tag-input/utils/tag-focus.d.ts +0 -1
  211. package/dist/tag-input/utils/tag-focus.js +0 -1
  212. package/dist/time-picker/combox-foundation.d.ts +3 -11
  213. package/dist/time-picker/combox-foundation.js +3 -10
  214. package/dist/time-picker/foundation.d.ts +13 -23
  215. package/dist/time-picker/foundation.js +39 -48
  216. package/dist/time-picker/input-foundation.d.ts +4 -4
  217. package/dist/time-picker/input-foundation.js +13 -13
  218. package/dist/time-picker/utils/index.d.ts +0 -11
  219. package/dist/time-picker/utils/index.js +0 -11
  220. package/dist/toast/toast-list-foundation.d.ts +7 -7
  221. package/dist/toast/toast-list-foundation.js +14 -14
  222. package/dist/tooltip/adjust-position.d.ts +1 -2
  223. package/dist/tooltip/constants.d.ts +0 -3
  224. package/dist/tooltip/constants.js +0 -3
  225. package/dist/tooltip/foundation.d.ts +9 -12
  226. package/dist/tooltip/foundation.js +67 -63
  227. package/dist/tooltip/position.scss +0 -1
  228. package/dist/transfer/foundation.d.ts +22 -13
  229. package/dist/transfer/foundation.js +38 -24
  230. package/dist/tree/foundation.d.ts +14 -16
  231. package/dist/tree/foundation.js +61 -62
  232. package/dist/tree/shared.d.ts +2 -4
  233. package/dist/tree/shared.js +0 -2
  234. package/dist/tree/tree-util.d.ts +0 -5
  235. package/dist/tree/tree-util.js +0 -5
  236. package/dist/tree-select/foundation.d.ts +26 -22
  237. package/dist/tree-select/foundation.js +91 -86
  238. package/dist/typography/ellipsis.d.ts +5 -7
  239. package/dist/typography/ellipsis.js +8 -10
  240. package/dist/typography/format-numeral.d.ts +1 -1
  241. package/dist/typography/format-numeral.js +2 -2
  242. package/dist/typography/typography.scss +0 -1
  243. package/dist/upload/constants.d.ts +1 -1
  244. package/dist/upload/foundation.d.ts +17 -23
  245. package/dist/upload/foundation.js +93 -103
  246. package/dist/upload/utils.d.ts +3 -8
  247. package/dist/upload/utils.js +6 -11
  248. package/dist/user-guide/foundation.d.ts +3 -5
  249. package/dist/user-guide/foundation.js +19 -19
  250. package/dist/utils/a11y.d.ts +2 -6
  251. package/dist/utils/a11y.js +1 -4
  252. package/dist/utils/announcer.d.ts +2 -2
  253. package/dist/utils/announcer.js +4 -4
  254. package/dist/utils/array.d.ts +0 -6
  255. package/dist/utils/array.js +0 -6
  256. package/dist/utils/date-fns-extra.js +1 -5
  257. package/dist/utils/dom.d.ts +0 -1
  258. package/dist/utils/dom.js +0 -1
  259. package/dist/utils/escape-html.js +0 -3
  260. package/dist/utils/field-sizing.d.ts +0 -2
  261. package/dist/utils/field-sizing.js +0 -2
  262. package/dist/utils/focus-handle.d.ts +1 -2
  263. package/dist/utils/focus-handle.js +1 -3
  264. package/dist/utils/focus-scope.d.ts +5 -6
  265. package/dist/utils/focus-scope.js +10 -11
  266. package/dist/utils/is-promise.d.ts +1 -1
  267. package/dist/utils/release-holder.d.ts +2 -2
  268. package/dist/utils/release-holder.js +4 -4
  269. package/dist/utils/scroll-lock.d.ts +3 -4
  270. package/dist/utils/scroll-lock.js +3 -4
  271. package/dist/utils/tween.d.ts +0 -1
  272. package/dist/utils/tween.js +0 -1
  273. package/dist/utils/uuid.d.ts +0 -1
  274. package/dist/utils/uuid.js +0 -1
  275. package/dist/utils/warning.d.ts +0 -1
  276. package/dist/utils/warning.js +0 -1
  277. package/dist/video-player/foundation.d.ts +15 -15
  278. package/dist/video-player/foundation.js +89 -89
  279. package/dist/video-player/progress-foundation.d.ts +2 -3
  280. package/dist/video-player/progress-foundation.js +12 -13
  281. package/dist/video-player/variables.scss +1 -1
  282. package/package.json +2 -2
@@ -13,7 +13,7 @@ var JsonViewerFoundation = class extends BaseFoundation {
13
13
  #lastSearch = null;
14
14
  jsonViewer = null;
15
15
  #observeResize() {
16
- const el = this._adapter.getEditorRef();
16
+ const el = this.adapter.getEditorRef();
17
17
  if (!el) return;
18
18
  const rect = el.getBoundingClientRect();
19
19
  this.#lastObservedSize = {
@@ -48,18 +48,18 @@ var JsonViewerFoundation = class extends BaseFoundation {
48
48
  }
49
49
  init() {
50
50
  const props = this.getProps();
51
- const editorRef = this._adapter.getEditorRef();
51
+ const editorRef = this.adapter.getEditorRef();
52
52
  this.jsonViewer = new JsonViewer(editorRef, props.value, {
53
53
  prefixCls: cssClasses.PREFIX,
54
54
  ...props.options
55
55
  });
56
56
  this.jsonViewer.emitter.on("customRender", (e) => {
57
- this._adapter.setCustomRenderMap(e.customRenderMap);
57
+ this.adapter.setCustomRenderMap(e.customRenderMap);
58
58
  });
59
59
  this.jsonViewer.layout();
60
60
  this.#searchAgain();
61
61
  this.jsonViewer.emitter.on("contentChanged", () => {
62
- this._adapter.notifyChange(this.jsonViewer?.getModel().getValue());
62
+ this.adapter.notifyChange(this.jsonViewer?.getModel().getValue());
63
63
  this.#searchAgain();
64
64
  });
65
65
  this.#observeResize();
@@ -74,9 +74,9 @@ var JsonViewerFoundation = class extends BaseFoundation {
74
74
  this.#resetMeasuredHeights = false;
75
75
  this.jsonViewer?.dispose();
76
76
  this.jsonViewer = null;
77
- this._adapter.setCustomRenderMap(/* @__PURE__ */ new Map());
77
+ this.adapter.setCustomRenderMap(/* @__PURE__ */ new Map());
78
78
  }
79
- search(searchText, caseSensitive, wholeWord, regex) {
79
+ search = (searchText, caseSensitive, wholeWord, regex) => {
80
80
  let options;
81
81
  if (caseSensitive !== void 0 || wholeWord !== void 0 || regex !== void 0) options = {
82
82
  caseSensitive: caseSensitive ?? false,
@@ -89,36 +89,35 @@ var JsonViewerFoundation = class extends BaseFoundation {
89
89
  ...options
90
90
  };
91
91
  this.jsonViewer?.getSearchWidget().search(searchText, options.caseSensitive, options.wholeWord, options.regex);
92
- }
93
- prevSearch(step) {
92
+ };
93
+ prevSearch = (step) => {
94
94
  if (step === void 0) this.jsonViewer?.getSearchWidget().navigateResults(-1);
95
95
  else this.jsonViewer?.getSearchWidget().navigateResults(-step);
96
- }
97
- nextSearch(step) {
96
+ };
97
+ nextSearch = (step) => {
98
98
  if (step === void 0) this.jsonViewer?.getSearchWidget().navigateResults(1);
99
99
  else this.jsonViewer?.getSearchWidget().navigateResults(step);
100
- }
101
- replace(replaceText) {
100
+ };
101
+ replace = (replaceText) => {
102
102
  if (this.getProps().options?.readOnly) return;
103
103
  this.jsonViewer?.getSearchWidget().replace(replaceText);
104
- }
105
- replaceAll(replaceText) {
104
+ };
105
+ replaceAll = (replaceText) => {
106
106
  if (this.getProps().options?.readOnly) return;
107
107
  this.jsonViewer?.getSearchWidget().replaceAll(replaceText);
108
- }
109
- /** Toggles one search option, then searches again with the input text and the new options */
110
- toggleSearchOption(key) {
111
- this._adapter.toggleSearchOption(key);
108
+ };
109
+ toggleSearchOption = (key) => {
110
+ this.adapter.toggleSearchOption(key);
112
111
  this.search(this.#lastSearch?.text ?? "");
113
- }
114
- toggleSearchBar() {
112
+ };
113
+ toggleSearchBar = () => {
115
114
  this.#lastSearch = null;
116
115
  this.jsonViewer?.getSearchWidget().clear();
117
- this._adapter.toggleSearchBar();
118
- }
116
+ this.adapter.toggleSearchBar();
117
+ };
119
118
  /** `null` when nothing was searched (or the bar was closed), `undefined` while there is no editor */
120
- getSearchResults() {
119
+ getSearchResults = () => {
121
120
  return this.jsonViewer?.getSearchWidget().searchResults;
122
- }
121
+ };
123
122
  };
124
123
  export { JsonViewerFoundation as default };
@@ -1,11 +1,8 @@
1
1
  import { Locale as Locale$1 } from "date-fns";
2
- /** Keys of `Locale` that hold a component's strings */
3
2
  export type LocaleComponentName = Exclude<keyof Locale, 'code' | 'dateFnsLocale' | 'currency'>;
4
3
  export interface LocaleResult<T> {
5
- /** `locale[componentName]`: the component's own strings */
6
4
  locale: T;
7
5
  localeCode: string;
8
- /** For formatting dates in the locale's language, e.g. `format(date, 'EEEE', { locale: dateFnsLocale })` */
9
6
  dateFnsLocale: Locale$1;
10
7
  currency: string;
11
8
  }
@@ -18,7 +18,7 @@ export default class LottieFoundation<P extends LottieBaseProps = LottieBaseProp
18
18
  #private;
19
19
  static getLottie: () => Promise<import("lottie-web").LottiePlayer>;
20
20
  init(): void;
21
- handleParamsUpdate(): void;
21
+ handleParamsUpdate: () => void;
22
22
  destroy(): void;
23
23
  }
24
24
  export {};
@@ -9,7 +9,7 @@ var LottieFoundation = class LottieFoundation extends BaseFoundation {
9
9
  #getLoadParams() {
10
10
  const params = this.getProp("params");
11
11
  return {
12
- container: params.container ?? this._adapter.getContainer(),
12
+ container: params.container ?? this.adapter.getContainer(),
13
13
  renderer: "svg",
14
14
  loop: true,
15
15
  autoplay: !this.#reducedMotion?.matches,
@@ -33,7 +33,7 @@ var LottieFoundation = class LottieFoundation extends BaseFoundation {
33
33
  this.getProp("getLottie")?.(lottie);
34
34
  }
35
35
  } catch (error) {
36
- this._adapter.notifyLoadError(error);
36
+ this.adapter.notifyLoadError(error);
37
37
  }
38
38
  }
39
39
  static getLottie = () => LottieFoundation.#pending ??= import("lottie-web").then((module) => module.default).catch((error) => {
@@ -47,11 +47,11 @@ var LottieFoundation = class LottieFoundation extends BaseFoundation {
47
47
  this.#reducedMotion.addEventListener("change", this.#handleMotionChange, { signal: this.signal });
48
48
  this.#load();
49
49
  }
50
- handleParamsUpdate() {
50
+ handleParamsUpdate = () => {
51
51
  this.#animation?.destroy();
52
52
  this.#animation = null;
53
53
  this.#load();
54
- }
54
+ };
55
55
  destroy() {
56
56
  super.destroy();
57
57
  this.#generation++;
@@ -10,7 +10,6 @@ export interface MarkdownRenderAdapter<P extends MarkdownRenderBaseProps = Markd
10
10
  * which breaks type checking of published declarations. The values are framework components this package cannot name.
11
11
  */
12
12
  export type MarkdownComponents = Record<string, any>;
13
- /** Renders the compiled source with the given element renderers */
14
13
  export type MarkdownContent = (props: {
15
14
  components?: MarkdownComponents;
16
15
  }) => any;
@@ -28,7 +27,6 @@ export interface MarkdownRenderBaseState {
28
27
  }
29
28
  export default class MarkdownRenderFoundation<P extends MarkdownRenderBaseProps = MarkdownRenderBaseProps, S extends MarkdownRenderBaseState = MarkdownRenderBaseState> extends BaseFoundation<MarkdownRenderAdapter<P, S>, P, S> {
30
29
  #private;
31
- /** Returns a function that renders the source with its `components` prop */
32
30
  protected evaluate(raw: string): Promise<MarkdownContent>;
33
31
  /**
34
32
  * Compiles `md` synchronously for the first render, so server output and hydration start with the content.
@@ -42,9 +40,6 @@ export default class MarkdownRenderFoundation<P extends MarkdownRenderBaseProps
42
40
  /** Plugin lists match when each entry, or each item of a `[plugin, options]` entry, is the same reference */
43
41
  static isSamePluginList(a?: PluggableList, b?: PluggableList): boolean;
44
42
  destroy(): void;
45
- /**
46
- * Compiles the current source and stores the result as `renderContent`. A failed compile keeps the last
47
- * content and goes to `notifyCompileError`.
48
- */
49
- updateContent(): Promise<void>;
43
+ /** A failed compile keeps the last content and goes to `notifyCompileError` */
44
+ updateContent: () => Promise<void>;
50
45
  }
@@ -25,7 +25,6 @@ var MarkdownRenderFoundation = class MarkdownRenderFoundation extends BaseFounda
25
25
  ignoreInvalidStyle: true
26
26
  });
27
27
  }
28
- /** Returns a function that renders the source with its `components` prop */
29
28
  async evaluate(raw) {
30
29
  const props = {
31
30
  format: this.getProp("format"),
@@ -33,7 +32,7 @@ var MarkdownRenderFoundation = class MarkdownRenderFoundation extends BaseFounda
33
32
  rehypePlugins: this.getProp("rehypePlugins"),
34
33
  remarkGfm: this.getProp("remarkGfm")
35
34
  };
36
- const runtime = this._adapter.getRuntime();
35
+ const runtime = this.adapter.getRuntime();
37
36
  if (props.format === "md") {
38
37
  const processor = MarkdownRenderFoundation.#createMdProcessor(props);
39
38
  const tree = await processor.run(processor.parse(raw), raw);
@@ -84,18 +83,15 @@ var MarkdownRenderFoundation = class MarkdownRenderFoundation extends BaseFounda
84
83
  destroy() {
85
84
  this.#requestId++;
86
85
  }
87
- /**
88
- * Compiles the current source and stores the result as `renderContent`. A failed compile keeps the last
89
- * content and goes to `notifyCompileError`.
90
- */
91
- async updateContent() {
86
+ /** A failed compile keeps the last content and goes to `notifyCompileError` */
87
+ updateContent = async () => {
92
88
  const requestId = ++this.#requestId;
93
89
  try {
94
90
  const renderContent = await this.evaluate(this.getProp("raw"));
95
91
  if (requestId === this.#requestId) this.setState({ renderContent });
96
92
  } catch (error) {
97
- if (requestId === this.#requestId) this._adapter.notifyCompileError(error);
93
+ if (requestId === this.#requestId) this.adapter.notifyCompileError(error);
98
94
  }
99
- }
95
+ };
100
96
  };
101
97
  export { MarkdownRenderFoundation as default };
@@ -26,15 +26,15 @@ export interface ModalContentAdapter<P extends ModalContentProps = ModalContentP
26
26
  export default class ModalContentFoundation<P extends ModalContentProps = ModalContentProps, E extends Pick<Event, 'target' | 'currentTarget'> = Pick<Event, 'target' | 'currentTarget'>> extends BaseFoundation<ModalContentAdapter<P, E>, P> {
27
27
  #private;
28
28
  /** Called when the dialog is shown: joins the overlay stack and moves focus into the dialog */
29
- show(): void;
29
+ show: () => void;
30
30
  /**
31
31
  * The reverse of `show`. The layer goes first: it releases the page's inert, and an inert element cannot take
32
32
  * the focus back.
33
33
  */
34
- hide(): void;
35
- handleDialogMouseDown(): void;
36
- handleMaskMouseUp(): void;
37
- handleMaskClick(e: E): void;
38
- close(e: E | KeyboardEvent): void;
39
- restoreFocus(): void;
34
+ hide: () => void;
35
+ handleDialogMouseDown: () => void;
36
+ handleMaskMouseUp: () => void;
37
+ handleMaskClick: (e: E) => void;
38
+ close: (e: E | KeyboardEvent) => void;
39
+ restoreFocus: () => void;
40
40
  }
@@ -12,37 +12,37 @@ var ModalContentFoundation = class extends BaseFoundation {
12
12
  return true;
13
13
  };
14
14
  /** Called when the dialog is shown: joins the overlay stack and moves focus into the dialog */
15
- show() {
16
- this._adapter.openLayer(this.#handleEscape);
17
- this._adapter.trapFocus();
18
- }
15
+ show = () => {
16
+ this.adapter.openLayer(this.#handleEscape);
17
+ this.adapter.trapFocus();
18
+ };
19
19
  /**
20
20
  * The reverse of `show`. The layer goes first: it releases the page's inert, and an inert element cannot take
21
21
  * the focus back.
22
22
  */
23
- hide() {
24
- this._adapter.closeLayer();
25
- this._adapter.releaseFocus();
23
+ hide = () => {
24
+ this.adapter.closeLayer();
25
+ this.adapter.releaseFocus();
26
26
  clearTimeout(this.#mouseUpTimer);
27
27
  this.#dialogMouseDown = false;
28
28
  this.restoreFocus();
29
- }
30
- handleDialogMouseDown() {
29
+ };
30
+ handleDialogMouseDown = () => {
31
31
  this.#dialogMouseDown = true;
32
- }
33
- handleMaskMouseUp() {
32
+ };
33
+ handleMaskMouseUp = () => {
34
34
  if (this.#dialogMouseDown) this.#mouseUpTimer = setTimeout(() => {
35
35
  this.#dialogMouseDown = false;
36
36
  }, 0);
37
- }
38
- handleMaskClick(e) {
37
+ };
38
+ handleMaskClick = (e) => {
39
39
  if (e.target === e.currentTarget && !this.#dialogMouseDown) this.close(e);
40
- }
41
- close(e) {
42
- this._adapter.notifyClose(e);
43
- }
44
- restoreFocus() {
45
- this._adapter.restoreFocus();
46
- }
40
+ };
41
+ close = (e) => {
42
+ this.adapter.notifyClose(e);
43
+ };
44
+ restoreFocus = () => {
45
+ this.adapter.restoreFocus();
46
+ };
47
47
  };
48
48
  export { ModalContentFoundation as default, isModal };
@@ -76,10 +76,10 @@ export default class ModalFoundation<P extends ModalProps = ModalProps, S extend
76
76
  };
77
77
  }): 'ok' | 'cancel' | undefined;
78
78
  destroy(): void;
79
- handleCancel(e: CE): void;
80
- handleOk(e: OE): void;
81
- beforeShow(): void;
82
- afterHide(): void;
83
- afterClose(): void;
84
- toggleDisplayNone(displayNone: boolean): void;
79
+ handleCancel: (e: CE) => void;
80
+ handleOk: (e: OE) => void;
81
+ beforeShow: () => void;
82
+ afterHide: () => void;
83
+ afterClose: () => void;
84
+ toggleDisplayNone: (displayNone: boolean) => void;
85
85
  }
@@ -12,25 +12,25 @@ var ModalFoundation = class extends BaseFoundation {
12
12
  this.#invokeCancel(e);
13
13
  }, 100, { edges: ["leading"] });
14
14
  #invokeCancel(e) {
15
- const result = this._adapter.notifyCancel(e);
15
+ const result = this.adapter.notifyCancel(e);
16
16
  if (isPromise(result)) {
17
- this._adapter.setState({ onCancelReturnPromiseStatus: "pending" });
17
+ this.adapter.setState({ onCancelReturnPromiseStatus: "pending" });
18
18
  result?.then(() => {
19
- this._adapter.setState({ onCancelReturnPromiseStatus: "fulfilled" });
19
+ this.adapter.setState({ onCancelReturnPromiseStatus: "fulfilled" });
20
20
  })?.catch((e) => {
21
- this._adapter.setState({ onCancelReturnPromiseStatus: "rejected" });
21
+ this.adapter.setState({ onCancelReturnPromiseStatus: "rejected" });
22
22
  throw e;
23
23
  });
24
24
  }
25
25
  }
26
26
  #invokeOk(e) {
27
- const result = this._adapter.notifyOk(e);
27
+ const result = this.adapter.notifyOk(e);
28
28
  if (isPromise(result)) {
29
- this._adapter.setState({ onOKReturnPromiseStatus: "pending" });
29
+ this.adapter.setState({ onOKReturnPromiseStatus: "pending" });
30
30
  result?.then(() => {
31
- this._adapter.setState({ onOKReturnPromiseStatus: "fulfilled" });
31
+ this.adapter.setState({ onOKReturnPromiseStatus: "fulfilled" });
32
32
  })?.catch((e) => {
33
- this._adapter.setState({ onOKReturnPromiseStatus: "rejected" });
33
+ this.adapter.setState({ onOKReturnPromiseStatus: "rejected" });
34
34
  throw e;
35
35
  });
36
36
  }
@@ -45,30 +45,30 @@ var ModalFoundation = class extends BaseFoundation {
45
45
  this.#debouncedOk.cancel();
46
46
  this.#debouncedCancel.cancel();
47
47
  }
48
- handleCancel(e) {
48
+ handleCancel = (e) => {
49
49
  if (!this.getProp("visible")) return;
50
50
  const target = e?.currentTarget ?? e?.target ?? null;
51
51
  if (target !== this.#lastCancelTarget) this.#debouncedCancel.cancel();
52
52
  this.#lastCancelTarget = target;
53
53
  this.#debouncedCancel(e);
54
- }
55
- handleOk(e) {
54
+ };
55
+ handleOk = (e) => {
56
56
  const target = e?.currentTarget ?? e?.target ?? null;
57
57
  if (target !== this.#lastOkTarget) this.#debouncedOk.cancel();
58
58
  this.#lastOkTarget = target;
59
59
  this.#debouncedOk(e);
60
- }
61
- beforeShow() {
62
- this._adapter.disabledBodyScroll();
63
- }
64
- afterHide() {
65
- this._adapter.enabledBodyScroll();
66
- }
67
- afterClose() {
68
- this._adapter.notifyClose();
69
- }
70
- toggleDisplayNone(displayNone) {
71
- this._adapter.toggleDisplayNone(displayNone);
72
- }
60
+ };
61
+ beforeShow = () => {
62
+ this.adapter.disabledBodyScroll();
63
+ };
64
+ afterHide = () => {
65
+ this.adapter.enabledBodyScroll();
66
+ };
67
+ afterClose = () => {
68
+ this.adapter.notifyClose();
69
+ };
70
+ toggleDisplayNone = (displayNone) => {
71
+ this.adapter.toggleDisplayNone(displayNone);
72
+ };
73
73
  };
74
74
  export { ModalFoundation as default };
@@ -25,7 +25,6 @@ export interface NavigationAdapter<P extends NavigationBaseProps = NavigationBas
25
25
  updateSelectedKeys(keys: ItemKey[]): void;
26
26
  updateOpenKeys(keys: ItemKey[]): void;
27
27
  }
28
- /** The props the foundation reads */
29
28
  export interface NavigationBaseProps {
30
29
  items?: (string | NavItemInput)[];
31
30
  children?: unknown;
@@ -42,9 +41,6 @@ export default class NavigationFoundation<P extends NavigationBaseProps = Naviga
42
41
  static getZeroParentKeys(itemKeysMap?: ItemKey2ParentKeysMap, ...itemKeys: ItemKey[]): any[];
43
42
  static buildItemKeysMap(items?: NavItemType[], keysMap?: {}, parentKeys?: (string | number)[], keyPropName?: string): {};
44
43
  static formatItems(items?: (string | NavItemInput)[]): NavItemType[];
45
- /**
46
- * Formatted items and the itemKey -> parent keys map
47
- */
48
44
  static getFormattedItems({ items }: NavigationBaseProps, children?: NavItemType[]): {
49
45
  itemKeysMap: ItemKey2ParentKeysMap;
50
46
  formattedItems: NavItemType[];
@@ -64,10 +60,7 @@ export default class NavigationFoundation<P extends NavigationBaseProps = Naviga
64
60
  * New items or children rebuild the menu from the props, otherwise a changed (deep compared) selectedKeys or
65
61
  * openKeys is copied into state
66
62
  */
67
- handlePropsUpdate(prevProps: NavigationBaseProps): void;
68
- /**
69
- * Selects keys together with their top level parents
70
- */
63
+ handlePropsUpdate: (prevProps: NavigationBaseProps) => void;
71
64
  updateSelectedKeys: (keys: ItemKey[]) => void;
72
65
  addOpenKey: (itemKey: ItemKey) => void;
73
66
  removeOpenKey: (itemKey: ItemKey) => void;
@@ -4,7 +4,7 @@ import { isEqual } from "es-toolkit";
4
4
  // src/navigation/foundation.ts
5
5
  var NavigationFoundation = class NavigationFoundation extends BaseFoundation {
6
6
  #getItemKeysMap() {
7
- return NavigationFoundation.getFormattedItems(this.getProps(), this._adapter.getItemsFromChildren()).itemKeysMap;
7
+ return NavigationFoundation.getFormattedItems(this.getProps(), this.adapter.getItemsFromChildren()).itemKeysMap;
8
8
  }
9
9
  #rebuild() {
10
10
  const props = this.getProps();
@@ -12,8 +12,8 @@ var NavigationFoundation = class NavigationFoundation extends BaseFoundation {
12
12
  const willOpenKeys = NavigationFoundation.getWillOpenKeys(props, this.getState("openKeys"), itemKeysMap);
13
13
  const willSelectedKeys = props.selectedKeys || props.defaultSelectedKeys || [];
14
14
  const selectedKeys = willSelectedKeys.concat(NavigationFoundation.getZeroParentKeys(itemKeysMap, ...willSelectedKeys));
15
- if (!isEqual(selectedKeys, this.getState("selectedKeys"))) this._adapter.updateSelectedKeys(selectedKeys);
16
- if (!isEqual(willOpenKeys, this.getState("openKeys"))) this._adapter.updateOpenKeys(willOpenKeys);
15
+ if (!isEqual(selectedKeys, this.getState("selectedKeys"))) this.adapter.updateSelectedKeys(selectedKeys);
16
+ if (!isEqual(willOpenKeys, this.getState("openKeys"))) this.adapter.updateOpenKeys(willOpenKeys);
17
17
  }
18
18
  static getZeroParentKeys(itemKeysMap = {}, ...itemKeys) {
19
19
  const willAddKeys = [];
@@ -50,9 +50,6 @@ var NavigationFoundation = class NavigationFoundation extends BaseFoundation {
50
50
  } : rest;
51
51
  });
52
52
  }
53
- /**
54
- * Formatted items and the itemKey -> parent keys map
55
- */
56
53
  static getFormattedItems({ items }, children = []) {
57
54
  const formattedItems = NavigationFoundation.formatItems(items);
58
55
  const willHandleItems = Array.isArray(items) && items.length ? formattedItems : children;
@@ -119,7 +116,7 @@ var NavigationFoundation = class NavigationFoundation extends BaseFoundation {
119
116
  * New items or children rebuild the menu from the props, otherwise a changed (deep compared) selectedKeys or
120
117
  * openKeys is copied into state
121
118
  */
122
- handlePropsUpdate(prevProps) {
119
+ handlePropsUpdate = (prevProps) => {
123
120
  const props = this.getProps();
124
121
  if (prevProps.items !== props.items || prevProps.children !== props.children) {
125
122
  this.#rebuild();
@@ -127,32 +124,29 @@ var NavigationFoundation = class NavigationFoundation extends BaseFoundation {
127
124
  }
128
125
  if (props.selectedKeys && !isEqual(prevProps.selectedKeys, props.selectedKeys)) {
129
126
  this.updateSelectedKeys(props.selectedKeys);
130
- this._adapter.updateOpenKeys(NavigationFoundation.getWillOpenKeys(props, this.getState("openKeys"), this.#getItemKeysMap()));
131
- } else if (prevProps.selectedKeys !== void 0 && props.selectedKeys === void 0) this._adapter.updateSelectedKeys([]);
132
- if (props.openKeys && !isEqual(prevProps.openKeys, props.openKeys)) this._adapter.updateOpenKeys(props.openKeys);
133
- else if (prevProps.openKeys !== void 0 && props.openKeys === void 0) this._adapter.updateOpenKeys(NavigationFoundation.getWillOpenKeys(props, [], this.#getItemKeysMap()));
134
- }
135
- /**
136
- * Selects keys together with their top level parents
137
- */
127
+ this.adapter.updateOpenKeys(NavigationFoundation.getWillOpenKeys(props, this.getState("openKeys"), this.#getItemKeysMap()));
128
+ } else if (prevProps.selectedKeys !== void 0 && props.selectedKeys === void 0) this.adapter.updateSelectedKeys([]);
129
+ if (props.openKeys && !isEqual(prevProps.openKeys, props.openKeys)) this.adapter.updateOpenKeys(props.openKeys);
130
+ else if (prevProps.openKeys !== void 0 && props.openKeys === void 0) this.adapter.updateOpenKeys(NavigationFoundation.getWillOpenKeys(props, [], this.#getItemKeysMap()));
131
+ };
138
132
  updateSelectedKeys = (keys) => {
139
133
  const parentKeys = NavigationFoundation.getZeroParentKeys(this.#getItemKeysMap(), ...keys);
140
- this._adapter.updateSelectedKeys(Array.from(new Set(keys.concat(parentKeys))));
134
+ this.adapter.updateSelectedKeys(Array.from(new Set(keys.concat(parentKeys))));
141
135
  };
142
136
  addOpenKey = (itemKey) => {
143
137
  const openKeys = new Set(this.getState("openKeys"));
144
138
  if (itemKey != null) openKeys.add(itemKey);
145
- this._adapter.updateOpenKeys(Array.from(openKeys));
139
+ this.adapter.updateOpenKeys(Array.from(openKeys));
146
140
  };
147
141
  removeOpenKey = (itemKey) => {
148
142
  const openKeys = new Set(this.getState("openKeys"));
149
143
  if (itemKey != null) openKeys.delete(itemKey);
150
- this._adapter.updateOpenKeys(Array.from(openKeys));
144
+ this.adapter.updateOpenKeys(Array.from(openKeys));
151
145
  };
152
146
  handleCollapseChange = () => {
153
147
  const isCollapsed = !NavigationFoundation.getIsCollapsed(this.getProps(), this.getStates());
154
- if (!this._isControlledComponent("isCollapsed")) this._adapter.setIsCollapsed(isCollapsed);
155
- this._adapter.notifyCollapseChange(isCollapsed);
148
+ if (!this.isControlledComponent("isCollapsed")) this.adapter.setIsCollapsed(isCollapsed);
149
+ this.adapter.notifyCollapseChange(isCollapsed);
156
150
  };
157
151
  };
158
152
  export { NavigationFoundation as default };
@@ -40,5 +40,5 @@ export declare function countPlaceholderIcons({ mode, limitIndent, isCollapsed,
40
40
  }): number;
41
41
  export default class ItemFoundation<P extends ItemProps = ItemProps, S extends object = object> extends BaseFoundation<ItemAdapter<P, S>, P, S> {
42
42
  protected isValidKey(itemKey: string): boolean;
43
- handleClick(e: MouseEvent | KeyboardEvent): void;
43
+ handleClick: (e: MouseEvent | KeyboardEvent) => void;
44
44
  }
@@ -10,33 +10,33 @@ var ItemFoundation = class extends BaseFoundation {
10
10
  isValidKey(itemKey) {
11
11
  return itemKey != null && (typeof itemKey === "string" || typeof itemKey === "number");
12
12
  }
13
- handleClick(e) {
13
+ handleClick = (e) => {
14
14
  const { isSubNav, itemKey, text, disabled } = this.getProps();
15
15
  if (disabled) return;
16
- const wasSelected = this._adapter.getSelected();
17
- if (!isSubNav && this.isValidKey(itemKey) && !this._adapter.getSelectedKeysIsControlled() && !wasSelected) this._adapter.selectSelf();
16
+ const wasSelected = this.adapter.getSelected();
17
+ if (!isSubNav && this.isValidKey(itemKey) && !this.adapter.getSelectedKeysIsControlled() && !wasSelected) this.adapter.selectSelf();
18
18
  const selectedKeys = [itemKey];
19
19
  if (!isSubNav) {
20
20
  if (!wasSelected) {
21
- const selectedItems = [this._adapter.cloneDeep(this.getProps())];
22
- this._adapter.notifyGlobalOnSelect({
21
+ const selectedItems = [this.adapter.cloneDeep(this.getProps())];
22
+ this.adapter.notifyGlobalOnSelect({
23
23
  itemKey,
24
24
  selectedKeys,
25
25
  selectedItems,
26
26
  domEvent: e
27
27
  });
28
28
  }
29
- this._adapter.notifyGlobalOnClick({
29
+ this.adapter.notifyGlobalOnClick({
30
30
  itemKey,
31
31
  text,
32
32
  domEvent: e
33
33
  });
34
34
  }
35
- this._adapter.notifyClick({
35
+ this.adapter.notifyClick({
36
36
  itemKey,
37
37
  text,
38
38
  domEvent: e
39
39
  });
40
- }
40
+ };
41
41
  };
42
42
  export { countPlaceholderIcons, ItemFoundation as default };
@@ -15,17 +15,16 @@ export interface SubNavAdapter<P extends SubNavBaseProps = SubNavBaseProps, S ex
15
15
  notifyGlobalOnClick(data: OnClickData): void;
16
16
  getIsOpen(): boolean;
17
17
  }
18
- /** The props the foundation reads */
19
18
  export interface SubNavBaseProps {
20
19
  itemKey?: string | number;
21
20
  disabled?: boolean;
22
21
  }
23
22
  export default class SubNavFoundation<P extends SubNavBaseProps = SubNavBaseProps, S extends object = object> extends BaseFoundation<SubNavAdapter<P, S>, P, S> {
24
- handleDropdownVisibleChange(visible: boolean): void;
25
- handleClick(e: MouseEvent | KeyboardEvent): void;
23
+ handleDropdownVisibleChange: (visible: boolean) => void;
24
+ handleClick: (e: MouseEvent | KeyboardEvent) => void;
26
25
  /**
27
26
  * Only reports the click: the Dropdown owns the open state and reports it through handleDropdownVisibleChange,
28
27
  * so toggling here would emit a second, possibly contradictory openChange.
29
28
  */
30
- handlePopupClick(e: MouseEvent | KeyboardEvent): void;
29
+ handlePopupClick: (e: MouseEvent | KeyboardEvent) => void;
31
30
  }
@@ -11,44 +11,44 @@ function removeKeys(originKeys = [], ...willRemoveKeys) {
11
11
  return Array.from(keySet);
12
12
  }
13
13
  var SubNavFoundation = class extends BaseFoundation {
14
- handleDropdownVisibleChange(visible) {
14
+ handleDropdownVisibleChange = (visible) => {
15
15
  const itemKey = this.getProp("itemKey");
16
- const rawOpenKeys = this._adapter.getOpenKeys();
16
+ const rawOpenKeys = this.adapter.getOpenKeys();
17
17
  const openKeys = visible ? addKeys(rawOpenKeys, itemKey) : removeKeys(rawOpenKeys, itemKey);
18
- this._adapter.updateOpen(visible);
19
- this._adapter.notifyGlobalOpenChange({
18
+ this.adapter.updateOpen(visible);
19
+ this.adapter.notifyGlobalOpenChange({
20
20
  itemKey,
21
21
  openKeys,
22
22
  isOpen: visible
23
23
  });
24
- }
25
- handleClick(e) {
24
+ };
25
+ handleClick = (e) => {
26
26
  const { itemKey, disabled } = this.getProps();
27
27
  if (disabled) return;
28
- const isOpen = !this._adapter.getIsOpen();
28
+ const isOpen = !this.adapter.getIsOpen();
29
29
  const cbVal = {
30
30
  itemKey,
31
- openKeys: isOpen ? addKeys(this._adapter.getOpenKeys(), itemKey) : removeKeys(this._adapter.getOpenKeys(), itemKey),
31
+ openKeys: isOpen ? addKeys(this.adapter.getOpenKeys(), itemKey) : removeKeys(this.adapter.getOpenKeys(), itemKey),
32
32
  isOpen,
33
33
  domEvent: e
34
34
  };
35
- if (!this._adapter.getOpenKeysIsControlled()) this._adapter.updateOpen(isOpen);
36
- this._adapter.notifyGlobalOpenChange(cbVal);
37
- this._adapter.notifyGlobalOnClick(cbVal);
38
- }
35
+ if (!this.adapter.getOpenKeysIsControlled()) this.adapter.updateOpen(isOpen);
36
+ this.adapter.notifyGlobalOpenChange(cbVal);
37
+ this.adapter.notifyGlobalOnClick(cbVal);
38
+ };
39
39
  /**
40
40
  * Only reports the click: the Dropdown owns the open state and reports it through handleDropdownVisibleChange,
41
41
  * so toggling here would emit a second, possibly contradictory openChange.
42
42
  */
43
- handlePopupClick(e) {
43
+ handlePopupClick = (e) => {
44
44
  const { itemKey, disabled } = this.getProps();
45
45
  if (disabled) return;
46
- this._adapter.notifyGlobalOnClick({
46
+ this.adapter.notifyGlobalOnClick({
47
47
  itemKey,
48
- openKeys: this._adapter.getOpenKeys(),
49
- isOpen: this._adapter.getIsOpen(),
48
+ openKeys: this.adapter.getOpenKeys(),
49
+ isOpen: this.adapter.getIsOpen(),
50
50
  domEvent: e
51
51
  });
52
- }
52
+ };
53
53
  };
54
54
  export { SubNavFoundation as default };