@laser-ui/components 2.3.4 → 2.4.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 (215) 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 +5 -9
  27. package/cascader/internal/CascaderPanel.d.ts +0 -1
  28. package/cascader/internal/CascaderSearchPanel.d.ts +0 -1
  29. package/cascader/internal/types.d.ts +0 -1
  30. package/cascader/types.d.ts +0 -1
  31. package/checkbox/Checkbox.d.ts +0 -1
  32. package/checkbox/Checkbox.js +4 -1
  33. package/checkbox/CheckboxGroup.d.ts +0 -1
  34. package/checkbox/types.d.ts +0 -1
  35. package/circular-progress/CircularProgress.d.ts +0 -1
  36. package/compose/Compose.d.ts +0 -1
  37. package/compose/ComposeItem.d.ts +0 -1
  38. package/compose/types.d.ts +0 -1
  39. package/config-provider/ConfigProvider.d.ts +0 -1
  40. package/config-provider/types.d.ts +0 -1
  41. package/context/index.d.ts +0 -1
  42. package/date-picker/DatePicker.d.ts +0 -1
  43. package/date-picker/DatePicker.js +13 -5
  44. package/date-picker/internal/DatePickerPanel.d.ts +0 -1
  45. package/date-picker/types.d.ts +0 -1
  46. package/dialog-service.d.ts +0 -1
  47. package/drawer/Drawer.d.ts +0 -1
  48. package/drawer/DrawerFooter.d.ts +0 -1
  49. package/drawer/DrawerHeader.d.ts +0 -1
  50. package/drawer/types.d.ts +0 -1
  51. package/drawer/vars.d.ts +0 -1
  52. package/dropdown/Dropdown.d.ts +0 -1
  53. package/dropdown/internal/DropdownList.d.ts +0 -1
  54. package/dropdown/internal/DropdownList.js +6 -6
  55. package/dropdown/internal/DropdownSub.d.ts +0 -1
  56. package/dropdown/types.d.ts +0 -1
  57. package/dropdown/utils.d.ts +0 -1
  58. package/empty/Empty.d.ts +0 -1
  59. package/empty/types.d.ts +0 -1
  60. package/fab/Fab.d.ts +0 -1
  61. package/fab/FabBacktop.d.ts +0 -1
  62. package/fab/FabButton.d.ts +0 -1
  63. package/fab/types.d.ts +0 -1
  64. package/fab/vars.d.ts +0 -1
  65. package/form/Form.d.ts +0 -1
  66. package/form/FormItem.d.ts +0 -1
  67. package/form/internal/FormError.d.ts +0 -1
  68. package/form/types.d.ts +0 -1
  69. package/form/vars.d.ts +0 -1
  70. package/hooks/useContainerScrolling.d.ts +0 -1
  71. package/hooks/useFocusVisible.d.ts +0 -1
  72. package/hooks/useLayout.d.ts +0 -1
  73. package/hooks/useNestedPopup.d.ts +0 -1
  74. package/hooks/useStyled.d.ts +0 -1
  75. package/hooks/useStyled.js +0 -2
  76. package/hooks/useZIndex.js +5 -2
  77. package/icon/Icon.d.ts +0 -1
  78. package/icon/types.d.ts +0 -1
  79. package/image/Image.d.ts +0 -1
  80. package/image/ImageAction.d.ts +0 -1
  81. package/image/ImageLoader.d.ts +0 -1
  82. package/image/ImagePreview.d.ts +0 -1
  83. package/image/types.d.ts +0 -1
  84. package/input/Input.d.ts +0 -1
  85. package/input/Input.js +4 -1
  86. package/input/InputNumber.js +4 -1
  87. package/input/types.d.ts +0 -1
  88. package/internal/lazy-loading/LazyLoading.d.ts +0 -1
  89. package/internal/lazy-loading/types.d.ts +0 -1
  90. package/internal/popup/Popup.d.ts +0 -1
  91. package/internal/popup/types.d.ts +0 -1
  92. package/internal/portal/Portal.d.ts +0 -1
  93. package/internal/portal/types.d.ts +0 -1
  94. package/mask/Mask.d.ts +0 -1
  95. package/mask/types.d.ts +0 -1
  96. package/menu/Menu.d.ts +0 -1
  97. package/menu/Menu.js +6 -6
  98. package/menu/internal/MenuGroup.d.ts +0 -1
  99. package/menu/internal/MenuItem.d.ts +0 -1
  100. package/menu/internal/MenuSub.d.ts +0 -1
  101. package/menu/types.d.ts +0 -1
  102. package/menu/utils.d.ts +0 -1
  103. package/modal/Modal.d.ts +0 -1
  104. package/modal/ModalAlert.d.ts +0 -1
  105. package/modal/ModalFooter.d.ts +0 -1
  106. package/modal/ModalHeader.d.ts +0 -1
  107. package/modal/types.d.ts +0 -1
  108. package/modal/vars.d.ts +0 -1
  109. package/notification/Notification.d.ts +0 -1
  110. package/notification/types.d.ts +0 -1
  111. package/package.json +2 -2
  112. package/pagination/Pagination.d.ts +0 -1
  113. package/pagination/types.d.ts +0 -1
  114. package/pagination/utils.d.ts +1 -2
  115. package/popover/Popover.d.ts +0 -1
  116. package/popover/PopoverFooter.d.ts +0 -1
  117. package/popover/PopoverHeader.d.ts +0 -1
  118. package/popover/types.d.ts +0 -1
  119. package/popover/vars.d.ts +0 -1
  120. package/progress/Progress.d.ts +0 -1
  121. package/progress/types.d.ts +0 -1
  122. package/radio/Radio.d.ts +0 -1
  123. package/radio/Radio.js +4 -1
  124. package/radio/RadioGroup.d.ts +0 -1
  125. package/radio/types.d.ts +0 -1
  126. package/radio/vars.d.ts +1 -2
  127. package/rating/Rating.d.ts +0 -1
  128. package/rating/internal/RatingStar.d.ts +0 -1
  129. package/rating/types.d.ts +0 -1
  130. package/root/Dialogs.d.ts +0 -1
  131. package/root/Root.d.ts +0 -1
  132. package/root/types.d.ts +0 -1
  133. package/root/vars.d.ts +0 -1
  134. package/select/Select.d.ts +0 -1
  135. package/select/Select.js +4 -8
  136. package/select/types.d.ts +0 -1
  137. package/separator/Separator.d.ts +0 -1
  138. package/separator/types.d.ts +0 -1
  139. package/skeleton/Skeleton.d.ts +0 -1
  140. package/skeleton/types.d.ts +0 -1
  141. package/slider/Slider.d.ts +0 -1
  142. package/slider/Slider.js +45 -39
  143. package/slider/types.d.ts +0 -1
  144. package/slides/Slides.d.ts +0 -1
  145. package/slides/Slides.js +5 -5
  146. package/slides/types.d.ts +0 -1
  147. package/spinner/Spinner.d.ts +0 -1
  148. package/spinner/types.d.ts +0 -1
  149. package/stepper/Stepper.d.ts +0 -1
  150. package/stepper/types.d.ts +0 -1
  151. package/switch/Switch.js +4 -1
  152. package/switch/types.d.ts +0 -1
  153. package/table/Table.d.ts +0 -1
  154. package/table/TableEmpty.d.ts +0 -1
  155. package/table/TableExpand.d.ts +0 -1
  156. package/table/TableFilter.d.ts +0 -1
  157. package/table/TableTd.d.ts +0 -1
  158. package/table/TableTh.d.ts +0 -1
  159. package/table/TableThAction.d.ts +0 -1
  160. package/table/internal/TableCell.d.ts +0 -1
  161. package/table/types.d.ts +0 -1
  162. package/table/vars.d.ts +0 -1
  163. package/tabs/Tabs.d.ts +0 -1
  164. package/tabs/types.d.ts +0 -1
  165. package/tag/Tag.d.ts +0 -1
  166. package/tag/types.d.ts +0 -1
  167. package/textarea/Textarea.d.ts +0 -1
  168. package/textarea/types.d.ts +0 -1
  169. package/time-picker/TimePicker.d.ts +0 -1
  170. package/time-picker/TimePicker.js +5 -1
  171. package/time-picker/internal/TimePickerPanel.d.ts +0 -1
  172. package/time-picker/types.d.ts +0 -1
  173. package/timeline/Timeline.d.ts +0 -1
  174. package/timeline/types.d.ts +0 -1
  175. package/toast/Toast.d.ts +0 -1
  176. package/toast/types.d.ts +0 -1
  177. package/tooltip/Tooltip.d.ts +0 -1
  178. package/tooltip/types.d.ts +0 -1
  179. package/transfer/Transfer.d.ts +0 -1
  180. package/transfer/Transfer.js +4 -5
  181. package/transfer/internal/TransferPanel.d.ts +0 -1
  182. package/transfer/types.d.ts +0 -1
  183. package/transition/CollapseTransition.d.ts +0 -1
  184. package/transition/Transition.d.ts +0 -1
  185. package/transition/types.d.ts +0 -1
  186. package/tree/Tree.d.ts +0 -1
  187. package/tree/internal/TreePanel.d.ts +0 -1
  188. package/tree/node/abstract-node.d.ts +0 -1
  189. package/tree/node/multiple-node.d.ts +0 -1
  190. package/tree/node/single-node.d.ts +0 -1
  191. package/tree/types.d.ts +0 -1
  192. package/tree/utils.d.ts +0 -1
  193. package/tree-select/TreeSelect.d.ts +0 -1
  194. package/tree-select/TreeSelect.js +4 -8
  195. package/tree-select/internal/TreeSelectSearchPanel.d.ts +0 -1
  196. package/tree-select/internal/types.d.ts +0 -1
  197. package/tree-select/types.d.ts +0 -1
  198. package/types.d.ts +0 -1
  199. package/upload/Upload.d.ts +0 -1
  200. package/upload/Upload.js +4 -3
  201. package/upload/UploadAction.d.ts +0 -1
  202. package/upload/UploadButton.d.ts +0 -1
  203. package/upload/UploadList.d.ts +0 -1
  204. package/upload/UploadPicture.d.ts +0 -1
  205. package/upload/UploadPictureList.d.ts +0 -1
  206. package/upload/UploadPreviewAction.d.ts +0 -1
  207. package/upload/hooks.d.ts +0 -1
  208. package/upload/types.d.ts +0 -1
  209. package/upload/vars.d.ts +5 -6
  210. package/utils/handleModalKeyDown.d.ts +0 -1
  211. package/utils/mergeCS.d.ts +0 -1
  212. package/virtual-scroll/VirtualScroll.d.ts +0 -1
  213. package/virtual-scroll/types.d.ts +0 -1
  214. package/wave/Wave.d.ts +0 -1
  215. 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.4.0](https://github.com/laser-ui/laser-ui/compare/v2.3.5...v2.4.0) (2026-03-27)
6
+
7
+ ### Bug Fixes
8
+
9
+ - fix `no-non-null-assertion` ([0080403](https://github.com/laser-ui/laser-ui/commit/0080403dcf3c8d82f473d5ce62c2222efdfc0e06))
10
+
11
+ ## [2.3.5](https://github.com/laser-ui/laser-ui/compare/v2.3.4...v2.3.5) (2026-03-16)
12
+
13
+ ### Bug Fixes
14
+
15
+ - **components:** fix pass class or style to `inputProps` ([1f7a6ba](https://github.com/laser-ui/laser-ui/commit/1f7a6ba7524742cb7095b2f335a87f91434203a0))
16
+
5
17
  ## [2.3.4](https://github.com/laser-ui/laser-ui/compare/v2.3.3...v2.3.4) (2026-03-06)
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';
@@ -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) => {
@@ -281,10 +279,8 @@ export function Cascader(props) {
281
279
  changeVisible((draft) => (searchable ? true : !draft));
282
280
  }, children: [_jsxs("div", Object.assign({}, styled('cascader__container'), { title: selectedLabel, children: [(() => {
283
281
  const nodeProps = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, inputProps), mergeCS(styled('cascader__search'), {
284
- style: {
285
- opacity: inputable ? undefined : 0,
286
- zIndex: inputable ? undefined : -1,
287
- },
282
+ className: inputProps === null || inputProps === void 0 ? void 0 : inputProps.className,
283
+ style: Object.assign(Object.assign({}, inputProps === null || inputProps === void 0 ? void 0 : inputProps.style), { opacity: inputable ? undefined : 0, zIndex: inputable ? undefined : -1 }),
288
284
  })), formControl === null || formControl === void 0 ? void 0 : formControl.inputAria), { ref: (instance) => {
289
285
  inputRef.current = instance;
290
286
  const ret = setRef(inputProps === null || inputProps === void 0 ? void 0 : inputProps.ref, instance);
@@ -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';
@@ -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';
@@ -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';
@@ -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: {
@@ -17,7 +17,10 @@ export const Checkbox = (props) => {
17
17
  }), {
18
18
  className: restProps.className,
19
19
  style: restProps.style,
20
- }), { children: [_jsxs("div", Object.assign({}, styled('checkbox__state-container'), { children: [_jsx("input", Object.assign({}, inputProps, styled('checkbox__input'), formControl === null || formControl === void 0 ? void 0 : formControl.inputAria, { type: "checkbox", disabled: disabled, "aria-checked": indeterminate ? 'mixed' : checked, onChange: () => {
20
+ }), { children: [_jsxs("div", Object.assign({}, styled('checkbox__state-container'), { children: [_jsx("input", Object.assign({}, inputProps, mergeCS(styled('checkbox__input'), {
21
+ className: inputProps === null || inputProps === void 0 ? void 0 : inputProps.className,
22
+ style: inputProps === null || inputProps === void 0 ? void 0 : inputProps.style,
23
+ }), formControl === null || formControl === void 0 ? void 0 : formControl.inputAria, { type: "checkbox", disabled: disabled, "aria-checked": indeterminate ? 'mixed' : checked, onChange: () => {
21
24
  changeChecked((draft) => !draft);
22
25
  } })), indeterminate ? _jsx("div", Object.assign({}, styled('checkbox__indeterminate'))) : checked && _jsx("div", Object.assign({}, styled('checkbox__tick')))] })), checkNodeExist(children) && _jsx("div", Object.assign({}, styled('checkbox__label'), { children: children }))] })));
23
26
  };
@@ -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;
@@ -191,10 +191,14 @@ export function DatePicker(props) {
191
191
  };
192
192
  const clearable = clearableProp && !isNull(_value) && !visible && !disabled;
193
193
  const inputNode = (isLeft) => {
194
+ var _a, _b;
194
195
  const index = isLeft ? 0 : 1;
195
196
  const value = isLeft ? valueLeft : valueRight;
196
197
  const inputRef = isLeft ? inputLeftRef : inputRightRef;
197
- return (_jsx(BaseInput, Object.assign({}, inputProps === null || inputProps === void 0 ? void 0 : inputProps[index], styled('date-picker__input'), formControl === null || formControl === void 0 ? void 0 : formControl.inputAria, { ref: (instance) => {
198
+ return (_jsx(BaseInput, Object.assign({}, inputProps === null || inputProps === void 0 ? void 0 : inputProps[index], mergeCS(styled('date-picker__input'), {
199
+ className: (_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps[index]) === null || _a === void 0 ? void 0 : _a.className,
200
+ style: (_b = inputProps === null || inputProps === void 0 ? void 0 : inputProps[index]) === null || _b === void 0 ? void 0 : _b.style,
201
+ }), formControl === null || formControl === void 0 ? void 0 : formControl.inputAria, { ref: (instance) => {
198
202
  var _a;
199
203
  inputRef.current = instance;
200
204
  const ret = setRef((_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps[index]) === null || _a === void 0 ? void 0 : _a.ref, instance);
@@ -382,10 +386,14 @@ export function DatePicker(props) {
382
386
  return () => {
383
387
  timePickerPanelRef.current = null;
384
388
  };
385
- }, styled: styled, time: dataRef.current.latestFocused === 'start' ? valueLeft : valueRight, format: format, config: showTime && !isBoolean(showTime) && showTime.config
386
- ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
387
- (...args) => showTime.config(...args, dataRef.current.latestFocused, [valueLeft, valueRight])
388
- : 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) => {
389
397
  changeValue(time);
390
398
  } })), _jsx("div", Object.assign({}, styled('date-picker__footer'), { children: _jsx(Button, { pattern: "link", onClick: () => {
391
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 | {
@@ -5,7 +5,6 @@ export function useStyled(classes, styleProvider, styleOverrides) {
5
5
  const context = use(LContext);
6
6
  const classRoot = {};
7
7
  Object.keys(styleProvider).forEach((key) => {
8
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
9
8
  classRoot[key] = isUndefined(styleProvider[key]) ? `${context.namespace}-${key}` : styleProvider[key];
10
9
  });
11
10
  const prevClassRoot = useRef(classRoot);
@@ -49,7 +48,6 @@ export function useStyled(classes, styleProvider, styleOverrides) {
49
48
  const handleKey = (classKey) => {
50
49
  let remove = false;
51
50
  if (styleOverrides && styleOverrides[classKey]) {
52
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
53
51
  const styleOverride = styleOverrides[classKey];
54
52
  if (styleOverride.remove) {
55
53
  remove = true;
@@ -6,8 +6,11 @@ export function useZIndex(visible) {
6
6
  const [zIndex, setZIndex] = useState(0);
7
7
  useIsomorphicLayoutEffect(() => {
8
8
  if (visible) {
9
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
10
- const zIndex = Array.from(ZINDEX).at(-1)[1] + 1;
9
+ let zIndex = 1;
10
+ const end = Array.from(ZINDEX).at(-1);
11
+ if (end) {
12
+ zIndex = end[1] + 1;
13
+ }
11
14
  ZINDEX.set(id, zIndex);
12
15
  setZIndex(zIndex);
13
16
  return () => {
package/icon/Icon.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { IconProps } from './types';
3
2
  export declare function Icon(props: IconProps): React.ReactElement | null;
package/icon/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/image/Image.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ImageProps } from './types';
3
2
  import { ImageAction } from './ImageAction';
4
3
  import { ImageLoader } from './ImageLoader';
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { ImageActionProps } from './types';
3
2
  export declare function ImageAction(props: ImageActionProps): React.ReactElement | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ImageLoaderProps } from './types';
3
2
  export declare const ImageLoader: {
4
3
  (props: ImageLoaderProps): React.ReactElement | null;