@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
@@ -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;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { ImagePreviewProps } from './types';
3
2
  export declare function ImagePreview(props: ImagePreviewProps): React.ReactElement | null;
package/image/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CLASSES, PREVIEW_CLASSES } from './vars';
3
2
  import type { BaseProps } from '../types';
4
3
  export {};
package/input/Input.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { InputProps } from './types';
3
2
  import { InputNumber } from './InputNumber';
4
3
  export declare const Input: {
package/input/types.d.ts CHANGED
@@ -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,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { LazyLoadingProps } from './types';
3
2
  export declare function LazyLoading(props: LazyLoadingProps): React.ReactNode;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export {};
3
2
  export interface LazyLoadingProps {
4
3
  children?: React.ReactNode;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { PopupProps } from './types';
3
2
  export declare function Popup(props: PopupProps): React.ReactElement | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export {};
3
2
  export interface PopupProps {
4
3
  children: (props: {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { PortalProps } from './types';
3
2
  export declare function Portal<T extends Element = HTMLElement>(props: PortalProps<T>): React.ReactElement | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export {};
3
2
  export interface PortalProps<T extends Element = HTMLElement> {
4
3
  ref?: React.Ref<T | null>;
package/mask/Mask.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { MaskProps } from './types';
3
2
  export declare function Mask(props: MaskProps): React.ReactElement | null;
package/mask/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export {};
3
2
  export interface MaskProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
4
3
  visible: boolean;
package/menu/Menu.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { MenuItem, MenuProps } from './types';
3
2
  export declare function Menu<ID extends React.Key, T extends MenuItem<ID>>(props: MenuProps<ID, T>): React.ReactElement | null;
package/menu/Menu.js CHANGED
@@ -290,12 +290,12 @@ export function Menu(props) {
290
290
  return (_jsx(Fragment, { children: itemType === 'item' ? (_jsx(MenuItemFC, { namespace: namespace, styled: styled, id: id, level: level, space: space, step: step, icon: itemIcon,
291
291
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
292
292
  posinset: posinset.get(itemId), mode: mode, inNav: inNav, active: active === itemId, focus: focusVisible && isFocus, disabled: itemDisabled, onClick: handleItemClick, children: itemTitle })) : itemType === 'group' ? (_jsx(MenuGroup, { styled: styled, id: id, level: level, space: space, step: step, list: children && getNodes(children, level + 1, nextSubParents), empty: isEmpty, children: itemTitle })) : (_jsx(MenuSub, { ref: (instance) => {
293
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
294
- const fn = instance;
295
- updateSubPosition.current.set(itemId, fn);
296
- return () => {
297
- updateSubPosition.current.delete(itemId);
298
- };
293
+ if (instance) {
294
+ updateSubPosition.current.set(itemId, instance);
295
+ return () => {
296
+ updateSubPosition.current.delete(itemId);
297
+ };
298
+ }
299
299
  }, namespace: namespace, styled: styled, id: id, level: level, space: space, step: step, icon: itemIcon, list: children && getNodes(children, mode === 'vertical' ? level + 1 : 0, nextSubParents), popupState: popupState === null || popupState === void 0 ? void 0 : popupState.visible, trigger: expandTrigger !== null && expandTrigger !== void 0 ? expandTrigger : (mode === 'vertical' ? 'click' : 'hover'),
300
300
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
301
301
  posinset: posinset.get(itemId), mode: mode, inNav: inNav, active: (mode === 'vertical' ? !isExpand : isUndefined(popupState)) && actives.includes(itemId), includeActive: actives.includes(itemId), expand: isExpand, empty: isEmpty, focus: focusVisible && isFocus, disabled: itemDisabled, onVisibleChange: (visible) => {
@@ -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 MenuGroupProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Styled } from '../../hooks/useStyled';
3
2
  import type { MenuMode } from '../types';
4
3
  import type { CLASSES } from '../vars';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Styled } from '../../hooks/useStyled';
3
2
  import type { MenuMode } from '../types';
4
3
  import type { CLASSES } from '../vars';
package/menu/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/menu/utils.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { MenuItem } from './types';
3
2
  export declare function checkEnableItem<ID extends React.Key, T extends MenuItem<ID>>(item: T): boolean;
4
3
  export declare function getSameLevelEnableItems<ID extends React.Key, T extends MenuItem<ID>>(arr: T[]): T[];
package/modal/Modal.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ModalProps } from './types';
3
2
  import { ModalAlert } from './ModalAlert';
4
3
  import { ModalFooter } from './ModalFooter';
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { ModalAlertProps } from './types';
3
2
  export declare function ModalAlert(props: ModalAlertProps): React.ReactElement | null;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { ModalFooterProps } from './types';
3
2
  export declare function ModalFooter(props: ModalFooterProps): React.ReactElement | null;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { ModalHeaderProps } from './types';
3
2
  export declare function ModalHeader(props: ModalHeaderProps): React.ReactElement | null;
package/modal/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/modal/vars.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const CLASSES: {
3
2
  modal: string;
4
3
  'modal--center': string;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { NotificationProps } from './types';
3
2
  export declare function Notification(props: NotificationProps): 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laser-ui/components",
3
- "version": "2.3.5",
3
+ "version": "2.5.0",
4
4
  "description": "React components.",
5
5
  "keywords": [
6
6
  "ui",
@@ -37,5 +37,5 @@
37
37
  "access": "public",
38
38
  "directory": "../../dist/libs/components"
39
39
  },
40
- "gitHead": "e51fff3eacbe15668fbce67291124b3bb36d19c3"
40
+ "gitHead": "27f4c8861d51f0fbc8e83ef36df60fdac59afeb3"
41
41
  }
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { PaginationProps } from './types';
3
2
  export declare function Pagination(props: PaginationProps): 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 {};
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
- export declare function buttonProps(handleClick: () => void, disabled?: boolean): import("react").HTMLAttributes<HTMLElement>;
1
+ export declare function buttonProps(handleClick: () => void, disabled?: boolean): React.HTMLAttributes<HTMLElement>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { PopoverProps } from './types';
3
2
  import { PopoverFooter } from './PopoverFooter';
4
3
  import { PopoverHeader } from './PopoverHeader';
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { PopoverFooterProps } from './types';
3
2
  export declare function PopoverFooter(props: PopoverFooterProps): React.ReactElement | null;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { PopoverHeaderProps } from './types';
3
2
  export declare function PopoverHeader(props: PopoverHeaderProps): React.ReactElement | null;
@@ -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, PopupPlacement } from '../types';
package/popover/vars.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const CLASSES: {
3
2
  popover: string;
4
3
  'popover--top': string;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { ProgressProps } from './types';
3
2
  export declare function Progress(props: ProgressProps): 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/radio/Radio.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { RadioProps } from './types';
3
2
  import { RadioGroup } from './RadioGroup';
4
3
  export declare const Radio: {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { RadioGroupItem, RadioGroupProps } from './types';
3
2
  export declare function RadioGroup<V extends React.Key, T extends RadioGroupItem<V>>(props: RadioGroupProps<V, T>): React.ReactElement | null;
package/radio/types.d.ts CHANGED
@@ -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';
package/radio/vars.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Size } from '../types';
3
2
  export declare const CLASSES: {
4
3
  radio: string;
@@ -15,6 +14,6 @@ export declare const CLASSES: {
15
14
  radio__label: string;
16
15
  };
17
16
  export declare const RadioGroupContext: import("react").Context<{
18
- pattern?: "fill" | "outline" | undefined;
17
+ pattern?: "outline" | "fill";
19
18
  size: Size;
20
19
  } | undefined>;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { RatingProps } from './types';
3
2
  export declare function Rating(props: RatingProps): React.ReactElement | null;
@@ -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 RatingStarProps {
package/rating/types.d.ts CHANGED
@@ -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';
package/root/Dialogs.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { DialogInstance } from '../dialog-service';
3
2
  export declare const Dialogs: import("react").NamedExoticComponent<{
4
3
  dialogs: DialogInstance<any>[];
package/root/Root.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { RootProps } from './types';
3
2
  export declare function Root(props: RootProps): React.ReactElement | null;
package/root/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type resources from '../resources.json';
3
2
  import type { Lang } from '../types';
4
3
  export {};
package/root/vars.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Lang } from '../types';
3
2
  import resources from '../resources.json';
4
3
  export declare const ROOT_DATA: {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { SelectItem, SelectProps } from './types';
3
2
  export declare function Select<V extends React.Key, T extends SelectItem<V>>(props: SelectProps<V, T>): React.ReactElement | null;
package/select/Select.js CHANGED
@@ -90,10 +90,8 @@ export function Select(props) {
90
90
  if (!hasSearch) {
91
91
  return [];
92
92
  }
93
- const filterFn = isUndefined(customSearch === null || customSearch === void 0 ? void 0 : customSearch.filter)
94
- ? (item) => item.label.includes(searchValue)
95
- : // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
96
- (item) => customSearch.filter(searchValue, item);
93
+ const customFilterFn = customSearch && customSearch.filter ? customSearch.filter : undefined;
94
+ const filterFn = customFilterFn ? (item) => customFilterFn(searchValue, item) : (item) => item.label.includes(searchValue);
97
95
  const sortFn = customSearch === null || customSearch === void 0 ? void 0 : customSearch.sort;
98
96
  let itemCreated = createItem === null || createItem === void 0 ? void 0 : createItem(searchValue);
99
97
  if (itemCreated) {
package/select/types.d.ts CHANGED
@@ -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,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { SeparatorProps } from './types';
3
2
  export declare function Separator(props: SeparatorProps): 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 {};
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { SkeletonProps } from './types';
3
2
  export declare function Skeleton(props: SkeletonProps): 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 {};
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { SliderProps } from './types';
3
2
  export declare function Slider(props: SliderProps): React.ReactElement | null;
package/slider/types.d.ts CHANGED
@@ -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,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { SlidesItem, SlidesProps } from './types';
3
2
  export declare function Slides<ID extends React.Key, T extends SlidesItem<ID>>(props: SlidesProps<ID, T>): React.ReactElement | null;
package/slides/Slides.js CHANGED
@@ -152,20 +152,20 @@ export function Slides(props) {
152
152
  setDragOpacity(undefined);
153
153
  };
154
154
  useIsomorphicLayoutEffect(() => {
155
- if (slidesRef.current) {
155
+ const slidesEl = slidesRef.current;
156
+ if (slidesEl) {
156
157
  let size = 0;
157
- const slideEls = slidesRef.current.querySelectorAll(`.${namespace}-slides__slide`);
158
+ const slideEls = slidesEl.querySelectorAll(`.${namespace}-slides__slide`);
158
159
  slideEls.forEach((el) => {
159
160
  const index = Number(el.dataset['index']);
160
161
  if (index < activeIndex) {
161
162
  size += el[vertical ? 'offsetHeight' : 'offsetWidth'];
162
163
  }
163
164
  else if (index === activeIndex) {
164
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
165
- slidesRef.current.style.height = el.offsetHeight + 'px';
165
+ slidesEl.style.height = el.offsetHeight + 'px';
166
166
  }
167
167
  });
168
- const containerEl = slidesRef.current.querySelector(`.${namespace}-slides__container`);
168
+ const containerEl = slidesEl.querySelector(`.${namespace}-slides__container`);
169
169
  containerEl.style.transform = effect === 'slide' ? `translate${vertical ? 'Y' : 'X'}(calc(-${size}px + ${dragDistance}px))` : '';
170
170
  }
171
171
  });
package/slides/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 { SpinnerProps } from './types';
3
2
  export declare function Spinner(props: SpinnerProps): 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 {};
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { StepperItem, StepperProps } from './types';
3
2
  export declare function Stepper<T extends StepperItem>(props: StepperProps<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/switch/types.d.ts CHANGED
@@ -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';
package/table/Table.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { TableProps } from './types';
3
2
  import { TableEmpty } from './TableEmpty';
4
3
  import { TableExpand } from './TableExpand';
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { TableEmptyProps } from './types';
3
2
  export declare function TableEmpty(props: TableEmptyProps): React.ReactElement | null;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { TableExpandProps } from './types';
3
2
  export declare function TableExpand(props: TableExpandProps): React.ReactElement | null;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { TableFilterProps } from './types';
3
2
  export declare function TableFilter(props: TableFilterProps): React.ReactElement | null;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { TableTdProps } from './types';
3
2
  export declare function TableTd(props: TableTdProps): React.ReactElement | null;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { TableThProps } from './types';
3
2
  export declare function TableTh(props: TableThProps): React.ReactElement | null;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { TableThActionProps } from './types';
3
2
  export declare function TableThAction(props: TableThActionProps): React.ReactElement | null;
@@ -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 TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
package/table/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CLASSES } from './vars';
3
2
  import type { BaseProps, PopupPlacement } from '../types';
4
3
  export {};
package/table/vars.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { TableContextData } from './types';
3
2
  export declare const CLASSES: {
4
3
  table: string;
package/tabs/Tabs.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { TabsItem, TabsProps } from './types';
3
2
  export declare function Tabs<ID extends React.Key, T extends TabsItem<ID>>(props: TabsProps<ID, T>): React.ReactElement | null;
package/tabs/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/tag/Tag.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { TagProps } from './types';
3
2
  export declare function Tag(props: TagProps): React.ReactElement | null;
package/tag/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 {};
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { TextareaProps } from './types';
3
2
  export declare function Textarea(props: TextareaProps): 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, Size } from '../types';