@laser-ui/components 2.3.5 → 2.5.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 (210) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/accordion/Accordion.d.ts +0 -1
  3. package/accordion/types.d.ts +0 -1
  4. package/affix/Affix.d.ts +0 -1
  5. package/affix/types.d.ts +0 -1
  6. package/alert/Alert.d.ts +0 -1
  7. package/alert/types.d.ts +0 -1
  8. package/anchor/Anchor.d.ts +0 -1
  9. package/anchor/types.d.ts +0 -1
  10. package/avatar/Avatar.d.ts +0 -1
  11. package/avatar/types.d.ts +0 -1
  12. package/badge/Badge.d.ts +0 -1
  13. package/badge/internal/BadgeNumber.d.ts +0 -1
  14. package/badge/types.d.ts +0 -1
  15. package/base-input/types.d.ts +0 -1
  16. package/breadcrumb/Breadcrumb.d.ts +0 -1
  17. package/breadcrumb/types.d.ts +0 -1
  18. package/button/types.d.ts +0 -1
  19. package/card/Card.d.ts +0 -1
  20. package/card/CardAction.d.ts +0 -1
  21. package/card/CardActions.d.ts +0 -1
  22. package/card/CardContent.d.ts +0 -1
  23. package/card/CardHeader.d.ts +0 -1
  24. package/card/types.d.ts +0 -1
  25. package/cascader/Cascader.d.ts +0 -1
  26. package/cascader/Cascader.js +9 -7
  27. package/cascader/internal/CascaderPanel.d.ts +1 -1
  28. package/cascader/internal/CascaderPanel.js +7 -3
  29. package/cascader/internal/CascaderSearchPanel.d.ts +1 -1
  30. package/cascader/internal/CascaderSearchPanel.js +2 -2
  31. package/cascader/internal/types.d.ts +0 -1
  32. package/cascader/types.d.ts +1 -1
  33. package/checkbox/Checkbox.d.ts +0 -1
  34. package/checkbox/CheckboxGroup.d.ts +0 -1
  35. package/checkbox/types.d.ts +0 -1
  36. package/circular-progress/CircularProgress.d.ts +0 -1
  37. package/compose/Compose.d.ts +0 -1
  38. package/compose/ComposeItem.d.ts +0 -1
  39. package/compose/types.d.ts +0 -1
  40. package/config-provider/ConfigProvider.d.ts +0 -1
  41. package/config-provider/types.d.ts +0 -1
  42. package/context/index.d.ts +0 -1
  43. package/date-picker/DatePicker.d.ts +0 -1
  44. package/date-picker/DatePicker.js +8 -4
  45. package/date-picker/internal/DatePickerPanel.d.ts +0 -1
  46. package/date-picker/types.d.ts +0 -1
  47. package/dialog-service.d.ts +0 -1
  48. package/drawer/Drawer.d.ts +0 -1
  49. package/drawer/DrawerFooter.d.ts +0 -1
  50. package/drawer/DrawerHeader.d.ts +0 -1
  51. package/drawer/types.d.ts +0 -1
  52. package/drawer/vars.d.ts +0 -1
  53. package/dropdown/Dropdown.d.ts +0 -1
  54. package/dropdown/internal/DropdownList.d.ts +0 -1
  55. package/dropdown/internal/DropdownList.js +6 -6
  56. package/dropdown/internal/DropdownSub.d.ts +0 -1
  57. package/dropdown/types.d.ts +0 -1
  58. package/dropdown/utils.d.ts +0 -1
  59. package/empty/Empty.d.ts +0 -1
  60. package/empty/types.d.ts +0 -1
  61. package/fab/Fab.d.ts +0 -1
  62. package/fab/FabBacktop.d.ts +0 -1
  63. package/fab/FabButton.d.ts +0 -1
  64. package/fab/types.d.ts +0 -1
  65. package/fab/vars.d.ts +0 -1
  66. package/form/Form.d.ts +0 -1
  67. package/form/FormItem.d.ts +0 -1
  68. package/form/internal/FormError.d.ts +0 -1
  69. package/form/types.d.ts +0 -1
  70. package/form/vars.d.ts +0 -1
  71. package/hooks/useContainerScrolling.d.ts +0 -1
  72. package/hooks/useFocusVisible.d.ts +0 -1
  73. package/hooks/useLayout.d.ts +0 -1
  74. package/hooks/useNestedPopup.d.ts +0 -1
  75. package/hooks/useStyled.d.ts +0 -1
  76. package/hooks/useStyled.js +0 -2
  77. package/hooks/useZIndex.js +5 -2
  78. package/icon/Icon.d.ts +0 -1
  79. package/icon/types.d.ts +0 -1
  80. package/image/Image.d.ts +0 -1
  81. package/image/ImageAction.d.ts +0 -1
  82. package/image/ImageLoader.d.ts +0 -1
  83. package/image/ImagePreview.d.ts +0 -1
  84. package/image/types.d.ts +0 -1
  85. package/input/Input.d.ts +0 -1
  86. package/input/types.d.ts +0 -1
  87. package/internal/lazy-loading/LazyLoading.d.ts +0 -1
  88. package/internal/lazy-loading/types.d.ts +0 -1
  89. package/internal/popup/Popup.d.ts +0 -1
  90. package/internal/popup/types.d.ts +0 -1
  91. package/internal/portal/Portal.d.ts +0 -1
  92. package/internal/portal/types.d.ts +0 -1
  93. package/mask/Mask.d.ts +0 -1
  94. package/mask/types.d.ts +0 -1
  95. package/menu/Menu.d.ts +0 -1
  96. package/menu/Menu.js +6 -6
  97. package/menu/internal/MenuGroup.d.ts +0 -1
  98. package/menu/internal/MenuItem.d.ts +0 -1
  99. package/menu/internal/MenuSub.d.ts +0 -1
  100. package/menu/types.d.ts +0 -1
  101. package/menu/utils.d.ts +0 -1
  102. package/modal/Modal.d.ts +0 -1
  103. package/modal/ModalAlert.d.ts +0 -1
  104. package/modal/ModalFooter.d.ts +0 -1
  105. package/modal/ModalHeader.d.ts +0 -1
  106. package/modal/types.d.ts +0 -1
  107. package/modal/vars.d.ts +0 -1
  108. package/notification/Notification.d.ts +0 -1
  109. package/notification/types.d.ts +0 -1
  110. package/package.json +2 -2
  111. package/pagination/Pagination.d.ts +0 -1
  112. package/pagination/types.d.ts +0 -1
  113. package/pagination/utils.d.ts +1 -2
  114. package/popover/Popover.d.ts +0 -1
  115. package/popover/PopoverFooter.d.ts +0 -1
  116. package/popover/PopoverHeader.d.ts +0 -1
  117. package/popover/types.d.ts +0 -1
  118. package/popover/vars.d.ts +0 -1
  119. package/progress/Progress.d.ts +0 -1
  120. package/progress/types.d.ts +0 -1
  121. package/radio/Radio.d.ts +0 -1
  122. package/radio/RadioGroup.d.ts +0 -1
  123. package/radio/types.d.ts +0 -1
  124. package/radio/vars.d.ts +1 -2
  125. package/rating/Rating.d.ts +0 -1
  126. package/rating/internal/RatingStar.d.ts +0 -1
  127. package/rating/types.d.ts +0 -1
  128. package/root/Dialogs.d.ts +0 -1
  129. package/root/Root.d.ts +0 -1
  130. package/root/types.d.ts +0 -1
  131. package/root/vars.d.ts +0 -1
  132. package/select/Select.d.ts +0 -1
  133. package/select/Select.js +2 -4
  134. package/select/types.d.ts +0 -1
  135. package/separator/Separator.d.ts +0 -1
  136. package/separator/types.d.ts +0 -1
  137. package/skeleton/Skeleton.d.ts +0 -1
  138. package/skeleton/types.d.ts +0 -1
  139. package/slider/Slider.d.ts +0 -1
  140. package/slider/types.d.ts +0 -1
  141. package/slides/Slides.d.ts +0 -1
  142. package/slides/Slides.js +5 -5
  143. package/slides/types.d.ts +0 -1
  144. package/spinner/Spinner.d.ts +0 -1
  145. package/spinner/types.d.ts +0 -1
  146. package/stepper/Stepper.d.ts +0 -1
  147. package/stepper/types.d.ts +0 -1
  148. package/switch/types.d.ts +0 -1
  149. package/table/Table.d.ts +0 -1
  150. package/table/TableEmpty.d.ts +0 -1
  151. package/table/TableExpand.d.ts +0 -1
  152. package/table/TableFilter.d.ts +0 -1
  153. package/table/TableTd.d.ts +0 -1
  154. package/table/TableTh.d.ts +0 -1
  155. package/table/TableThAction.d.ts +0 -1
  156. package/table/internal/TableCell.d.ts +0 -1
  157. package/table/types.d.ts +0 -1
  158. package/table/vars.d.ts +0 -1
  159. package/tabs/Tabs.d.ts +0 -1
  160. package/tabs/types.d.ts +0 -1
  161. package/tag/Tag.d.ts +0 -1
  162. package/tag/types.d.ts +0 -1
  163. package/textarea/Textarea.d.ts +0 -1
  164. package/textarea/types.d.ts +0 -1
  165. package/time-picker/TimePicker.d.ts +0 -1
  166. package/time-picker/internal/TimePickerPanel.d.ts +0 -1
  167. package/time-picker/types.d.ts +0 -1
  168. package/timeline/Timeline.d.ts +0 -1
  169. package/timeline/types.d.ts +0 -1
  170. package/toast/Toast.d.ts +0 -1
  171. package/toast/types.d.ts +0 -1
  172. package/tooltip/Tooltip.d.ts +0 -1
  173. package/tooltip/types.d.ts +0 -1
  174. package/transfer/Transfer.d.ts +0 -1
  175. package/transfer/Transfer.js +4 -5
  176. package/transfer/internal/TransferPanel.d.ts +0 -1
  177. package/transfer/types.d.ts +0 -1
  178. package/transition/CollapseTransition.d.ts +0 -1
  179. package/transition/Transition.d.ts +0 -1
  180. package/transition/types.d.ts +0 -1
  181. package/tree/Tree.d.ts +0 -1
  182. package/tree/internal/TreePanel.d.ts +0 -1
  183. package/tree/node/abstract-node.d.ts +0 -1
  184. package/tree/node/multiple-node.d.ts +0 -1
  185. package/tree/node/single-node.d.ts +0 -1
  186. package/tree/types.d.ts +0 -1
  187. package/tree/utils.d.ts +0 -1
  188. package/tree-select/TreeSelect.d.ts +0 -1
  189. package/tree-select/TreeSelect.js +2 -4
  190. package/tree-select/internal/TreeSelectSearchPanel.d.ts +0 -1
  191. package/tree-select/internal/types.d.ts +0 -1
  192. package/tree-select/types.d.ts +0 -1
  193. package/types.d.ts +0 -1
  194. package/upload/Upload.d.ts +0 -1
  195. package/upload/Upload.js +4 -3
  196. package/upload/UploadAction.d.ts +0 -1
  197. package/upload/UploadButton.d.ts +0 -1
  198. package/upload/UploadList.d.ts +0 -1
  199. package/upload/UploadPicture.d.ts +0 -1
  200. package/upload/UploadPictureList.d.ts +0 -1
  201. package/upload/UploadPreviewAction.d.ts +0 -1
  202. package/upload/hooks.d.ts +0 -1
  203. package/upload/types.d.ts +0 -1
  204. package/upload/vars.d.ts +5 -6
  205. package/utils/handleModalKeyDown.d.ts +0 -1
  206. package/utils/mergeCS.d.ts +0 -1
  207. package/virtual-scroll/VirtualScroll.d.ts +0 -1
  208. package/virtual-scroll/types.d.ts +0 -1
  209. package/wave/Wave.d.ts +0 -1
  210. package/wave/types.d.ts +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
4
4
 
5
+ # [2.5.0](https://github.com/laser-ui/laser-ui/compare/v2.4.0...v2.5.0) (2026-04-03)
6
+
7
+ ### Features
8
+
9
+ - **components:** cascader support `onScrollBottom` event ([19508bb](https://github.com/laser-ui/laser-ui/commit/19508bbd77fabdd3b884b40e77005d8f596985ac))
10
+
11
+ # [2.4.0](https://github.com/laser-ui/laser-ui/compare/v2.3.5...v2.4.0) (2026-03-27)
12
+
13
+ ### Bug Fixes
14
+
15
+ - fix `no-non-null-assertion` ([0080403](https://github.com/laser-ui/laser-ui/commit/0080403dcf3c8d82f473d5ce62c2222efdfc0e06))
16
+
5
17
  ## [2.3.5](https://github.com/laser-ui/laser-ui/compare/v2.3.4...v2.3.5) (2026-03-16)
6
18
 
7
19
  ### Bug Fixes
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { AccordionItem, AccordionProps } from './types';
3
2
  export declare function Accordion<ID extends React.Key, T extends AccordionItem<ID>>(props: AccordionProps<ID, T>): React.ReactElement | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CLASSES } from './vars';
3
2
  import type { BaseProps } from '../types';
4
3
  export {};
package/affix/Affix.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { AffixProps } from './types';
3
2
  export declare function Affix(props: AffixProps): React.ReactElement | null;
package/affix/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { RefExtra } from '@laser-ui/hooks/useRefExtra';
3
2
  export {};
4
3
  export interface AffixRef {
package/alert/Alert.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { AlertProps } from './types';
3
2
  export declare function Alert(props: AlertProps): React.ReactElement | null;
package/alert/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CLASSES } from './vars';
3
2
  import type { BaseProps } from '../types';
4
3
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { AnchorItem, AnchorProps } from './types';
3
2
  import { DOT_INDICATOR, LINE_INDICATOR } from './vars';
4
3
  export declare const Anchor: {
package/anchor/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CLASSES, DOT_INDICATOR, LINE_INDICATOR } from './vars';
3
2
  import type { BaseProps } from '../types';
4
3
  import type { RefExtra } from '@laser-ui/hooks/useRefExtra';
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { AvatarProps } from './types';
3
2
  export declare function Avatar(props: AvatarProps): React.ReactElement | null;
package/avatar/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CLASSES } from './vars';
3
2
  import type { BaseProps } from '../types';
4
3
  export {};
package/badge/Badge.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { BadgeProps } from './types';
3
2
  import { BadgeText } from './BadgeText';
4
3
  export declare const Badge: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Styled } from '../../hooks/useStyled';
3
2
  import type { CLASSES } from '../vars';
4
3
  interface BadgeNumberProps {
package/badge/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CLASSES } from './vars';
3
2
  import type { BaseProps } from '../types';
4
3
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export {};
3
2
  export interface BaseInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
4
3
  ref?: React.Ref<HTMLInputElement>;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { BreadcrumbItem, BreadcrumbProps } from './types';
3
2
  export declare function Breadcrumb<ID extends React.Key, T extends BreadcrumbItem<ID>>(props: BreadcrumbProps<ID, T>): React.ReactElement | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CLASSES } from './vars';
3
2
  import type { BaseProps } from '../types';
4
3
  export {};
package/button/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CLASSES } from './vars';
3
2
  import type { BaseProps, Size } from '../types';
4
3
  export {};
package/card/Card.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CardProps } from './types';
3
2
  import { CardAction } from './CardAction';
4
3
  import { CardActions } from './CardActions';
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { CardActionProps } from './types';
3
2
  export declare function CardAction(props: CardActionProps): React.ReactElement | null;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { CardActionsProps } from './types';
3
2
  export declare function CardActions(props: CardActionsProps): React.ReactElement | null;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { CardContentProps } from './types';
3
2
  export declare function CardContent(props: CardContentProps): React.ReactElement | null;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { CardHeaderProps } from './types';
3
2
  export declare function CardHeader(props: CardHeaderProps): React.ReactElement | null;
package/card/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CLASSES } from './vars';
3
2
  import type { BaseProps } from '../types';
4
3
  export {};
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { CascaderItem, CascaderProps } from './types';
3
2
  export declare function Cascader<V extends React.Key, T extends CascaderItem<V>>(props: CascaderProps<V, T>): React.ReactElement | null;
@@ -6,7 +6,7 @@ import CancelFilled from '@material-design-icons/svg/filled/cancel.svg?react';
6
6
  import CloseOutlined from '@material-design-icons/svg/outlined/close.svg?react';
7
7
  import KeyboardArrowDownOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_down.svg?react';
8
8
  import SearchOutlined from '@material-design-icons/svg/outlined/search.svg?react';
9
- import { isNull, isUndefined } from 'lodash';
9
+ import { isNull } from 'lodash';
10
10
  import { useId, useImperativeHandle, useMemo, useRef, useState } from 'react';
11
11
  import { CascaderPanel } from './internal/CascaderPanel';
12
12
  import { CascaderSearchPanel } from './internal/CascaderSearchPanel';
@@ -27,7 +27,7 @@ import { TREE_NODE_KEY } from '../tree/vars';
27
27
  import { getVerticalSidePosition, isPrintableCharacter, mergeCS } from '../utils';
28
28
  import { TTANSITION_DURING_POPUP, WINDOW_SPACE } from '../vars';
29
29
  export function Cascader(props) {
30
- const _a = useComponentProps('Cascader', props), { ref, styleOverrides, styleProvider, formControl, list, model, defaultModel, visible: visibleProp, defaultVisible, placeholder, multiple = false, searchable = false, searchValue: searchValueProp, defaultSearchValue, onlyLeafSelectable = true, clearable: clearableProp = false, loading = false, size: sizeProp, disabled: disabledProp = false, virtual = false, escClosable = true, customItem, customSelected, customSearch, inputProps, popupRender, onModelChange, onVisibleChange, onSearch, onClear, onFirstFocus, afterVisibleChange } = _a, restProps = __rest(_a, ["ref", "styleOverrides", "styleProvider", "formControl", "list", "model", "defaultModel", "visible", "defaultVisible", "placeholder", "multiple", "searchable", "searchValue", "defaultSearchValue", "onlyLeafSelectable", "clearable", "loading", "size", "disabled", "virtual", "escClosable", "customItem", "customSelected", "customSearch", "inputProps", "popupRender", "onModelChange", "onVisibleChange", "onSearch", "onClear", "onFirstFocus", "afterVisibleChange"]);
30
+ const _a = useComponentProps('Cascader', props), { ref, styleOverrides, styleProvider, formControl, list, model, defaultModel, visible: visibleProp, defaultVisible, placeholder, multiple = false, searchable = false, searchValue: searchValueProp, defaultSearchValue, onlyLeafSelectable = true, clearable: clearableProp = false, loading = false, size: sizeProp, disabled: disabledProp = false, virtual = false, escClosable = true, customItem, customSelected, customSearch, inputProps, popupRender, onModelChange, onVisibleChange, onSearch, onClear, onFirstFocus, afterVisibleChange, onScrollBottom } = _a, restProps = __rest(_a, ["ref", "styleOverrides", "styleProvider", "formControl", "list", "model", "defaultModel", "visible", "defaultVisible", "placeholder", "multiple", "searchable", "searchValue", "defaultSearchValue", "onlyLeafSelectable", "clearable", "loading", "size", "disabled", "virtual", "escClosable", "customItem", "customSelected", "customSearch", "inputProps", "popupRender", "onModelChange", "onVisibleChange", "onSearch", "onClear", "onFirstFocus", "afterVisibleChange", "onScrollBottom"]);
31
31
  const namespace = useNamespace();
32
32
  const styled = useStyled(CLASSES, { cascader: styleProvider === null || styleProvider === void 0 ? void 0 : styleProvider.cascader, 'cascader-popup': styleProvider === null || styleProvider === void 0 ? void 0 : styleProvider['cascader-popup'] }, styleOverrides);
33
33
  const { t } = useTranslation();
@@ -113,10 +113,8 @@ export function Cascader(props) {
113
113
  if (!hasSearch) {
114
114
  return [];
115
115
  }
116
- const filterFn = isUndefined(customSearch === null || customSearch === void 0 ? void 0 : customSearch.filter)
117
- ? (item) => item.label.includes(searchValue)
118
- : // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
119
- (item) => customSearch.filter(searchValue, item);
116
+ const customFilterFn = customSearch && customSearch.filter ? customSearch.filter : undefined;
117
+ const filterFn = customFilterFn ? (item) => customFilterFn(searchValue, item) : (item) => item.label.includes(searchValue);
120
118
  const sortFn = customSearch === null || customSearch === void 0 ? void 0 : customSearch.sort;
121
119
  const searchList = [];
122
120
  const reduceNodes = (nodes) => {
@@ -484,12 +482,16 @@ export function Cascader(props) {
484
482
  }, namespace: namespace, styled: styled, id: listId, list: searchList, customItem: customItem, itemId: getItemId, itemFocused: itemFocusedWithSearch, multiple: multiple, onlyLeafSelectable: onlyLeafSelectable, virtual: virtual, focusVisible: focusVisible, onClick: (item) => {
485
483
  changeItemFocusedWithSearch(item);
486
484
  changeSelectedByClickWithSearch(item);
485
+ }, onScrollBottom: () => {
486
+ onScrollBottom === null || onScrollBottom === void 0 ? void 0 : onScrollBottom([]);
487
487
  } })) : (_jsx(CascaderPanel, { ref: (instance) => {
488
488
  focusRef.current = instance;
489
489
  return () => {
490
490
  focusRef.current = null;
491
491
  };
492
- }, namespace: namespace, styled: styled, id: listId, list: nodes, customItem: customItem, itemId: getItemId, itemSelected: !multiple && hasSelected ? nodesMap.get(selected) : undefined, itemFocused: itemFocusedWithoutSearch, multiple: multiple, virtual: virtual, focusVisible: focusVisible, onFocus: changeItemFocusedWithoutSearch, onClick: changeSelectedByClickWithoutSearch }))] })));
492
+ }, namespace: namespace, styled: styled, id: listId, list: nodes, customItem: customItem, itemId: getItemId, itemSelected: !multiple && hasSelected ? nodesMap.get(selected) : undefined, itemFocused: itemFocusedWithoutSearch, multiple: multiple, virtual: virtual, focusVisible: focusVisible, onFocus: changeItemFocusedWithoutSearch, onClick: changeSelectedByClickWithoutSearch, onScrollBottom: (ancestors) => {
493
+ onScrollBottom === null || onScrollBottom === void 0 ? void 0 : onScrollBottom(ancestors);
494
+ } }))] })));
493
495
  return popupRender ? popupRender(el) : el;
494
496
  })() }))) }) })] }));
495
497
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Styled } from '../../hooks/useStyled';
3
2
  import type { AbstractTreeNode } from '../../tree/node/abstract-node';
4
3
  import type { CascaderItem } from '../types';
@@ -18,6 +17,7 @@ interface CascaderPanelProps<V extends React.Key, T extends CascaderItem<V>> {
18
17
  focusVisible: boolean;
19
18
  onFocus: (item: AbstractTreeNode<V, T>) => void;
20
19
  onClick: (item: AbstractTreeNode<V, T>) => void;
20
+ onScrollBottom: (ancestors: V[]) => void;
21
21
  }
22
22
  export declare function CascaderPanel<V extends React.Key, T extends CascaderItem<V>>(props: CascaderPanelProps<V, T>): React.ReactElement | null;
23
23
  export {};
@@ -11,7 +11,7 @@ import { Empty } from '../../empty';
11
11
  import { Icon } from '../../icon';
12
12
  import { VirtualScroll } from '../../virtual-scroll';
13
13
  export function CascaderPanel(props) {
14
- const { ref, namespace, styled, id, list, customItem, itemId, itemSelected, itemFocused, multiple, virtual, focusVisible, onFocus, onClick, _root = true, } = props;
14
+ const { ref, namespace, styled, id, list, customItem, itemId, itemSelected, itemFocused, multiple, virtual, focusVisible, onFocus, onClick, onScrollBottom, _root = true, } = props;
15
15
  const listRef = useRef(null);
16
16
  const vsRef = useRef(null);
17
17
  const focusRef = useRef(null);
@@ -135,7 +135,9 @@ export function CascaderPanel(props) {
135
135
  } }) }))),
136
136
  _jsx("div", Object.assign({}, styled('cascader__option-content'), { children: customItem ? customItem(item.origin) : item.origin.label })),
137
137
  !item.isLeaf && (_jsx("div", Object.assign({}, styled('cascader__option-icon'), { children: _jsx(Icon, { children: item.origin.loading ? _jsx(CircularProgress, {}) : _jsx(KeyboardArrowRightOutlined, {}) }) })))));
138
- }, itemFocused: nodeFocused === null || nodeFocused === void 0 ? void 0 : nodeFocused.id, placeholder: "li", children: (vsList, onScroll) => (_jsx("ul", Object.assign({}, styled('cascader__list', 'cascader__list--inline'), { ref: (instance) => {
138
+ }, itemFocused: nodeFocused === null || nodeFocused === void 0 ? void 0 : nodeFocused.id, placeholder: "li", onScrollEnd: () => {
139
+ onScrollBottom([]);
140
+ }, children: (vsList, onScroll) => (_jsx("ul", Object.assign({}, styled('cascader__list', 'cascader__list--inline'), { ref: (instance) => {
139
141
  listRef.current = instance;
140
142
  return () => {
141
143
  listRef.current = null;
@@ -145,5 +147,7 @@ export function CascaderPanel(props) {
145
147
  return () => {
146
148
  focusRef.current = null;
147
149
  };
148
- }, id: undefined, list: nodeFocused.children })))] }));
150
+ }, id: undefined, list: nodeFocused.children, onScrollBottom: (ancestors) => {
151
+ onScrollBottom([nodeFocused.id].concat(ancestors));
152
+ } })))] }));
149
153
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CascaderSearchPanelItem } from './types';
3
2
  import type { Styled } from '../../hooks/useStyled';
4
3
  import type { CascaderItem } from '../types';
@@ -17,6 +16,7 @@ interface CascaderSearchPanelProps<V extends React.Key, T extends CascaderItem<V
17
16
  virtual: boolean | number;
18
17
  focusVisible: boolean;
19
18
  onClick: (item: CascaderSearchPanelItem<V, T>) => void;
19
+ onScrollBottom: () => void;
20
20
  }
21
21
  export declare function CascaderSearchPanel<V extends React.Key, T extends CascaderItem<V>>(props: CascaderSearchPanelProps<V, T>): React.ReactElement | null;
22
22
  export {};
@@ -10,7 +10,7 @@ import { getTreeNodeLabel } from '../../tree/utils';
10
10
  import { TREE_NODE_KEY } from '../../tree/vars';
11
11
  import { VirtualScroll } from '../../virtual-scroll';
12
12
  export function CascaderSearchPanel(props) {
13
- const { ref, namespace, styled, id, list, customItem, itemId, itemFocused, multiple, onlyLeafSelectable, virtual, focusVisible, onClick, } = props;
13
+ const { ref, namespace, styled, id, list, customItem, itemId, itemFocused, multiple, onlyLeafSelectable, virtual, focusVisible, onClick, onScrollBottom, } = props;
14
14
  const listRef = useRef(null);
15
15
  const vsRef = useRef(null);
16
16
  const handleKeyDown = useEventCallback((code) => {
@@ -73,7 +73,7 @@ export function CascaderSearchPanel(props) {
73
73
  focusVisible && (itemFocused === null || itemFocused === void 0 ? void 0 : itemFocused.value) === item.value && _jsx("div", { className: `${namespace}-focus-outline` }),
74
74
  multiple && (_jsx("div", Object.assign({}, styled('cascader__option-prefix'), { children: _jsx(Checkbox, { model: node.checked, disabled: node.disabled }) }))),
75
75
  _jsx("div", Object.assign({}, styled('cascader__option-content'), { children: customItem ? customItem(node.origin) : getTreeNodeLabel(node) }))));
76
- }, itemFocused: itemFocused === null || itemFocused === void 0 ? void 0 : itemFocused.value, placeholder: "li", children: (vsList, onScroll) => (_jsx("ul", Object.assign({}, styled('cascader__list'), { ref: (instance) => {
76
+ }, itemFocused: itemFocused === null || itemFocused === void 0 ? void 0 : itemFocused.value, placeholder: "li", onScrollEnd: onScrollBottom, children: (vsList, onScroll) => (_jsx("ul", Object.assign({}, styled('cascader__list'), { ref: (instance) => {
77
77
  listRef.current = instance;
78
78
  return () => {
79
79
  listRef.current = null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { SelectItem } from '../../select/types';
3
2
  import type { AbstractTreeNode } from '../../tree/node/abstract-node';
4
3
  import type { TreeNode } from '../../tree/node/types';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CLASSES } from './vars';
3
2
  import type { FormControlProvider } from '../form/types';
4
3
  import type { BaseProps, Size } from '../types';
@@ -46,5 +45,6 @@ export interface CascaderProps<V extends React.Key, T extends CascaderItem<V>> e
46
45
  onSearch?: (value: string) => void;
47
46
  onClear?: () => void;
48
47
  onFirstFocus?: (value: V, origin: T) => void;
48
+ onScrollBottom?: (ancestors: V[]) => void;
49
49
  afterVisibleChange?: (visible: boolean) => void;
50
50
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CheckboxProps } from './types';
3
2
  import { CheckboxGroup } from './CheckboxGroup';
4
3
  export declare const Checkbox: {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { CheckboxGroupItem, CheckboxGroupProps } from './types';
3
2
  export declare function CheckboxGroup<V extends React.Key, T extends CheckboxGroupItem<V>>(props: CheckboxGroupProps<V, T>): React.ReactElement | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CLASSES } from './vars';
3
2
  import type { FormControlProvider } from '../form/types';
4
3
  import type { BaseProps } from '../types';
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare function CircularProgress(props: React.SVGProps<SVGSVGElement>): React.ReactElement | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ComposeProps } from './types';
3
2
  import { ComposeItem } from './ComposeItem';
4
3
  export declare const Compose: {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { ComposeItemProps } from './types';
3
2
  export declare function ComposeItem(props: ComposeItemProps): React.ReactElement | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CLASSES } from './vars';
3
2
  import type { BaseProps, Size } from '../types';
4
3
  export {};
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { ConfigProviderProps } from './types';
3
2
  export declare function ConfigProvider(props: ConfigProviderProps): React.ReactElement | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { LContextIn } from '../context';
3
2
  export {};
4
3
  export interface ConfigProviderProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ComponentProps } from './props';
3
2
  import type { Size } from '../types';
4
3
  import type { RefExtra } from '@laser-ui/hooks/useRefExtra';
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { DatePickerProps } from './types';
3
2
  export declare function DatePicker(props: DatePickerProps): React.ReactElement | null;
@@ -386,10 +386,14 @@ export function DatePicker(props) {
386
386
  return () => {
387
387
  timePickerPanelRef.current = null;
388
388
  };
389
- }, styled: styled, time: dataRef.current.latestFocused === 'start' ? valueLeft : valueRight, format: format, config: showTime && !isBoolean(showTime) && showTime.config
390
- ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
391
- (...args) => showTime.config(...args, dataRef.current.latestFocused, [valueLeft, valueRight])
392
- : undefined, inDatePicker: true, onTimeChange: (time) => {
389
+ }, styled: styled, time: dataRef.current.latestFocused === 'start' ? valueLeft : valueRight, format: format, config: (() => {
390
+ if (showTime && !isBoolean(showTime)) {
391
+ const fn = showTime.config;
392
+ if (fn) {
393
+ return (...args) => fn(...args, dataRef.current.latestFocused, [valueLeft, valueRight]);
394
+ }
395
+ }
396
+ })(), inDatePicker: true, onTimeChange: (time) => {
393
397
  changeValue(time);
394
398
  } })), _jsx("div", Object.assign({}, styled('date-picker__footer'), { children: _jsx(Button, { pattern: "link", onClick: () => {
395
399
  const now = new Date();
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Styled } from '../../hooks/useStyled';
3
2
  import type { CLASSES } from '../vars';
4
3
  interface DatePickerPanelProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CLASSES } from './vars';
3
2
  import type { FormControlProvider } from '../form/types';
4
3
  import type { TimePickerProps } from '../time-picker';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare class DialogInstance<P extends object> {
3
2
  key: string | number;
4
3
  private type;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { DrawerProps } from './types';
3
2
  import { DrawerFooter } from './DrawerFooter';
4
3
  import { DrawerHeader } from './DrawerHeader';
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { DrawerFooterProps } from './types';
3
2
  export declare function DrawerFooter(props: DrawerFooterProps): React.ReactElement | null;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { DrawerHeaderProps } from './types';
3
2
  export declare function DrawerHeader(props: DrawerHeaderProps): React.ReactElement | null;
package/drawer/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CLASSES } from './vars';
3
2
  import type { ButtonProps } from '../button';
4
3
  import type { BaseProps } from '../types';
package/drawer/vars.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Offsets } from './types';
3
2
  export declare const CLASSES: {
4
3
  drawer: string;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { DropdownItem, DropdownProps } from './types';
3
2
  export declare function Dropdown<ID extends React.Key, T extends DropdownItem<ID>>(props: DropdownProps<ID, T>): React.ReactElement | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Styled } from '../../hooks/useStyled';
3
2
  import type { DropdownItem } from '../types';
4
3
  import type { CLASSES } from '../vars';
@@ -147,12 +147,12 @@ export function DropdownList(props) {
147
147
  })(),
148
148
  },
149
149
  }), { role: "group", "aria-labelledby": id, children: childrenNode }))] })) : (_jsx(DropdownSub, { ref: (instance) => {
150
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
151
- const fn = instance;
152
- updateSubPosition.current.set(itemId, fn);
153
- return () => {
154
- updateSubPosition.current.delete(itemId);
155
- };
150
+ if (instance) {
151
+ updateSubPosition.current.set(itemId, instance);
152
+ return () => {
153
+ updateSubPosition.current.delete(itemId);
154
+ };
155
+ }
156
156
  }, namespace: namespace, styled: styled, id: id, icon: itemIcon, theme: itemTheme, list: _jsx(DropdownList, { namespace: namespace, styled: styled, ulProps: { 'aria-labelledby': id }, list: (children !== null && children !== void 0 ? children : []), ancestryOfSub: currentAncestryOfSub, virtual: virtual, focusVisible: focusVisible, focusId: focusId, popupIds: popupIds, updateSubPosition: updateSubPosition, trigger: trigger, zIndex: zIndex, handleKeyDown: handleKeyDown, getItemId: getItemId, onClick: onClick, onFocusIdsChange: onFocusIdsChange, onPopupIdsChange: onPopupIdsChange, addPopupId: addPopupId, removePopupId: removePopupId, onVisibleChange: onVisibleChange }), popupState: popupState === null || popupState === void 0 ? void 0 : popupState.visible, trigger: trigger, focus: focusVisible && isFocus, disabled: itemDisabled, zIndex: isUndefined(zIndex)
157
157
  ? zIndex
158
158
  : isNumber(zIndex)
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Styled } from '../../hooks/useStyled';
3
2
  import type { CLASSES } from '../vars';
4
3
  interface DropdownSubProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CLASSES } from './vars';
3
2
  import type { BaseProps, VerticalSidePlacement } from '../types';
4
3
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { DropdownItem } from './types';
3
2
  export declare function checkEnableItem<ID extends React.Key, T extends DropdownItem<ID>>(item: T): boolean;
4
3
  export declare function getSameLevelEnableItems<ID extends React.Key, T extends DropdownItem<ID>>(arr: T[]): T[];
package/empty/Empty.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { EmptyProps } from './types';
3
2
  import { SIMPLE_IMG } from './vars';
4
3
  export declare const Empty: {
package/empty/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CLASSES, SIMPLE_IMG } from './vars';
3
2
  import type { BaseProps } from '../types';
4
3
  export {};
package/fab/Fab.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { FabProps } from './types';
3
2
  import { FabBacktop } from './FabBacktop';
4
3
  import { FabButton } from './FabButton';
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { FabBacktopProps } from './types';
3
2
  export declare function FabBacktop(props: FabBacktopProps): React.ReactElement | null;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { FabButtonProps } from './types';
3
2
  export declare function FabButton(props: FabButtonProps): React.ReactElement | null;
package/fab/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { BUTTON_CLASSES, CLASSES } from './vars';
3
2
  import type { BaseProps } from '../types';
4
3
  import type { RefExtra } from '@laser-ui/hooks/useRefExtra';
package/fab/vars.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const CLASSES: {
3
2
  fab: string;
4
3
  fab__actions: string;
package/form/Form.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { FormProps } from './types';
3
2
  import { FormItem } from './FormItem';
4
3
  export declare const Form: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { FormErrors, FormItemProps } from './types';
3
2
  export declare function FormItem<T extends {
4
3
  [index: string]: FormErrors;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Styled } from '../../hooks/useStyled';
3
2
  import type { CLASSES } from '../vars';
4
3
  interface FormErrorProps {
package/form/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { AbstractControl } from './model/abstract-control';
3
2
  import type { CLASSES } from './vars';
4
3
  import type { BaseProps, Size } from '../types';
package/form/vars.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { FormGroup } from './model/form-group';
3
2
  import type { FormContextData } from './types';
4
3
  export declare const CLASSES: {
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare function useContainerScrolling(target: React.RefObject<HTMLElement | null>, callback?: () => void, disabled?: boolean): void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare function useFocusVisible(isValidCode: (code: string) => boolean): [
3
2
  boolean,
4
3
  {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare function useLayout(): {
3
2
  pageScrollRef: import("react").RefObject<HTMLElement | null>;
4
3
  contentResizeRef: import("react").RefObject<HTMLElement | null>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { DraftFunction } from '@laser-ui/hooks/useImmer';
3
2
  interface PopupId<ID> {
4
3
  id: ID;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type Styled<C extends {
3
2
  [index: string]: string;
4
3
  }> = (...args: (keyof C | {