@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
@@ -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/Input.js CHANGED
@@ -42,7 +42,10 @@ export const Input = (props) => {
42
42
  var _a, _b;
43
43
  (_a = restProps.onClick) === null || _a === void 0 ? void 0 : _a.call(restProps, e);
44
44
  (_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.focus({ preventScroll: true });
45
- }, children: [checkNodeExist(prefix) && _jsx("div", Object.assign({}, styled('input__prefix'), { children: prefix })), _jsx(BaseInput, Object.assign({}, inputProps, styled('input__input'), formControl === null || formControl === void 0 ? void 0 : formControl.inputAria, { ref: (instance) => {
45
+ }, children: [checkNodeExist(prefix) && _jsx("div", Object.assign({}, styled('input__prefix'), { children: prefix })), _jsx(BaseInput, Object.assign({}, inputProps, mergeCS(styled('input__input'), {
46
+ className: inputProps === null || inputProps === void 0 ? void 0 : inputProps.className,
47
+ style: inputProps === null || inputProps === void 0 ? void 0 : inputProps.style,
48
+ }), formControl === null || formControl === void 0 ? void 0 : formControl.inputAria, { ref: (instance) => {
46
49
  inputRef.current = instance;
47
50
  const ret = setRef(inputProps === null || inputProps === void 0 ? void 0 : inputProps.ref, instance);
48
51
  return () => {
@@ -85,7 +85,10 @@ export function InputNumber(props) {
85
85
  var _a, _b;
86
86
  (_a = restProps.onClick) === null || _a === void 0 ? void 0 : _a.call(restProps, e);
87
87
  (_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.focus({ preventScroll: true });
88
- }, children: [checkNodeExist(prefix) && _jsx("div", Object.assign({}, styled('input__prefix'), { children: prefix })), _jsx(BaseInput, Object.assign({}, inputProps, styled('input__input'), formControl === null || formControl === void 0 ? void 0 : formControl.inputAria, { ref: (instance) => {
88
+ }, children: [checkNodeExist(prefix) && _jsx("div", Object.assign({}, styled('input__prefix'), { children: prefix })), _jsx(BaseInput, Object.assign({}, inputProps, mergeCS(styled('input__input'), {
89
+ className: inputProps === null || inputProps === void 0 ? void 0 : inputProps.className,
90
+ style: inputProps === null || inputProps === void 0 ? void 0 : inputProps.style,
91
+ }), formControl === null || formControl === void 0 ? void 0 : formControl.inputAria, { ref: (instance) => {
89
92
  inputRef.current = instance;
90
93
  const ret = setRef(inputProps === null || inputProps === void 0 ? void 0 : inputProps.ref, instance);
91
94
  return () => {
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.4",
3
+ "version": "2.4.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": "5c907970283c561b245053dbf13e6560e3bd5c74"
40
+ "gitHead": "6aa6cb81ee51849b66dddeab0de811cadcb65c60"
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: {
package/radio/Radio.js CHANGED
@@ -36,7 +36,10 @@ export const Radio = (props) => {
36
36
  return () => {
37
37
  waveRef.current = null;
38
38
  };
39
- }, color: `var(--${namespace}-color-primary)` }), _jsx("div", Object.assign({}, styled('radio__input-wrapper'), { children: _jsx("input", Object.assign({}, inputProps, styled('radio__input'), formControl === null || formControl === void 0 ? void 0 : formControl.inputAria, { type: "radio", checked: checked, disabled: disabled, "aria-checked": checked, onChange: () => {
39
+ }, color: `var(--${namespace}-color-primary)` }), _jsx("div", Object.assign({}, styled('radio__input-wrapper'), { children: _jsx("input", Object.assign({}, inputProps, mergeCS(styled('radio__input'), {
40
+ className: inputProps === null || inputProps === void 0 ? void 0 : inputProps.className,
41
+ style: inputProps === null || inputProps === void 0 ? void 0 : inputProps.style,
42
+ }), formControl === null || formControl === void 0 ? void 0 : formControl.inputAria, { type: "radio", checked: checked, disabled: disabled, "aria-checked": checked, onChange: () => {
40
43
  changeChecked(true);
41
44
  } })) })), checkNodeExist(children) && _jsx("div", Object.assign({}, styled('radio__label'), { children: children }))] })));
42
45
  };
@@ -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) {
@@ -290,10 +288,8 @@ export function Select(props) {
290
288
  changeVisible((draft) => (searchable ? true : !draft));
291
289
  }, children: [_jsxs("div", Object.assign({}, styled('select__container'), { title: selectedLabel, children: [(() => {
292
290
  const nodeProps = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, inputProps), mergeCS(styled('select__search'), {
293
- style: {
294
- opacity: inputable ? undefined : 0,
295
- zIndex: inputable ? undefined : -1,
296
- },
291
+ className: inputProps === null || inputProps === void 0 ? void 0 : inputProps.className,
292
+ style: Object.assign(Object.assign({}, inputProps === null || inputProps === void 0 ? void 0 : inputProps.style), { opacity: inputable ? undefined : 0, zIndex: inputable ? undefined : -1 }),
297
293
  })), formControl === null || formControl === void 0 ? void 0 : formControl.inputAria), { ref: (instance) => {
298
294
  inputRef.current = instance;
299
295
  const ret = setRef(inputProps === null || inputProps === void 0 ? void 0 : inputProps.ref, instance);
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/Slider.js CHANGED
@@ -248,46 +248,52 @@ export function Slider(props) {
248
248
  };
249
249
  }, visible: isLeft ? visibleLeft : visibleRight, title: customTooltip ? customTooltip(value) : value, placement: vertical ? 'right' : 'top', onVisibleChange: (visible) => {
250
250
  setDotVisible(visible ? (isLeft ? 'left' : 'right') : null);
251
- }, children: (tooltipProps) => (_jsx("div", Object.assign({}, mergeCS(styled('slider__input-wrapper'), {
252
- style: {
253
- left: vertical ? undefined : `calc(${value} / ${max - min} * 100% - 7px)`,
254
- bottom: vertical ? `calc(${value} / ${max - min} * 100% - 7px)` : undefined,
255
- },
256
- }), { ref: (instance) => {
257
- const dotRef = isLeft ? dotLeftRef : dotRightRef;
258
- dotRef.current = instance;
259
- return () => {
260
- dotRef.current = null;
261
- };
262
- } }, tooltipProps, { children: _jsx("input", Object.assign({}, inputProps === null || inputProps === void 0 ? void 0 : inputProps[index], styled('slider__input'), formControl === null || formControl === void 0 ? void 0 : formControl.inputAria, { type: "range", value: value, max: max, min: min, step: step !== null && step !== void 0 ? step : undefined, disabled: disabled, "aria-orientation": vertical ? 'vertical' : 'horizontal', onChange: (e) => {
263
- const val = toNumber(e.currentTarget.value);
264
- if (range) {
265
- const index = isLeft ? 0 : 1;
266
- changeValue((draft) => {
267
- const offset = val - draft[index];
268
- const isAdd = offset > 0;
269
- draft[index] = val;
270
- if (isNumber(rangeMinDistance) && draft[1] - draft[0] < rangeMinDistance) {
271
- const _index = isLeft ? 1 : 0;
272
- draft[_index] = getValue(draft[_index] + offset, isAdd ? 'ceil' : 'floor');
273
- if (draft[1] - draft[0] < rangeMinDistance) {
274
- draft[index] = getValue(draft[_index] + (isAdd ? -rangeMinDistance : rangeMinDistance), isAdd ? 'floor' : 'ceil');
251
+ }, children: (tooltipProps) => {
252
+ var _a, _b;
253
+ return (_jsx("div", Object.assign({}, mergeCS(styled('slider__input-wrapper'), {
254
+ style: {
255
+ left: vertical ? undefined : `calc(${value} / ${max - min} * 100% - 7px)`,
256
+ bottom: vertical ? `calc(${value} / ${max - min} * 100% - 7px)` : undefined,
257
+ },
258
+ }), { ref: (instance) => {
259
+ const dotRef = isLeft ? dotLeftRef : dotRightRef;
260
+ dotRef.current = instance;
261
+ return () => {
262
+ dotRef.current = null;
263
+ };
264
+ } }, tooltipProps, { children: _jsx("input", Object.assign({}, inputProps === null || inputProps === void 0 ? void 0 : inputProps[index], mergeCS(styled('slider__input'), {
265
+ className: (_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps[index]) === null || _a === void 0 ? void 0 : _a.className,
266
+ style: (_b = inputProps === null || inputProps === void 0 ? void 0 : inputProps[index]) === null || _b === void 0 ? void 0 : _b.style,
267
+ }), formControl === null || formControl === void 0 ? void 0 : formControl.inputAria, { type: "range", value: value, max: max, min: min, step: step !== null && step !== void 0 ? step : undefined, disabled: disabled, "aria-orientation": vertical ? 'vertical' : 'horizontal', onChange: (e) => {
268
+ const val = toNumber(e.currentTarget.value);
269
+ if (range) {
270
+ const index = isLeft ? 0 : 1;
271
+ changeValue((draft) => {
272
+ const offset = val - draft[index];
273
+ const isAdd = offset > 0;
274
+ draft[index] = val;
275
+ if (isNumber(rangeMinDistance) && draft[1] - draft[0] < rangeMinDistance) {
276
+ const _index = isLeft ? 1 : 0;
277
+ draft[_index] = getValue(draft[_index] + offset, isAdd ? 'ceil' : 'floor');
278
+ if (draft[1] - draft[0] < rangeMinDistance) {
279
+ draft[index] = getValue(draft[_index] + (isAdd ? -rangeMinDistance : rangeMinDistance), isAdd ? 'floor' : 'ceil');
280
+ }
275
281
  }
276
- }
277
- });
278
- }
279
- else {
280
- changeValue(val);
281
- }
282
- }, onFocus: (e) => {
283
- var _a, _b;
284
- (_b = (_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps[index]) === null || _a === void 0 ? void 0 : _a.onFocus) === null || _b === void 0 ? void 0 : _b.call(_a, e);
285
- setDotFocused(isLeft ? 'left' : 'right');
286
- }, onBlur: (e) => {
287
- var _a, _b;
288
- (_b = (_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps[index]) === null || _a === void 0 ? void 0 : _a.onBlur) === null || _b === void 0 ? void 0 : _b.call(_a, e);
289
- setDotFocused(null);
290
- } })) }))) }));
282
+ });
283
+ }
284
+ else {
285
+ changeValue(val);
286
+ }
287
+ }, onFocus: (e) => {
288
+ var _a, _b;
289
+ (_b = (_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps[index]) === null || _a === void 0 ? void 0 : _a.onFocus) === null || _b === void 0 ? void 0 : _b.call(_a, e);
290
+ setDotFocused(isLeft ? 'left' : 'right');
291
+ }, onBlur: (e) => {
292
+ var _a, _b;
293
+ (_b = (_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps[index]) === null || _a === void 0 ? void 0 : _a.onBlur) === null || _b === void 0 ? void 0 : _b.call(_a, e);
294
+ setDotFocused(null);
295
+ } })) })));
296
+ } }));
291
297
  };
292
298
  const preventBlur = (e) => {
293
299
  if (e.button === 0) {
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 {};