@laser-ui/components 0.3.0 → 0.4.1

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 (42) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +2 -2
  3. package/accordion/Accordion.js +1 -1
  4. package/alert/Alert.js +5 -5
  5. package/cascader/Cascader.js +4 -4
  6. package/cascader/internal/CascaderPanel.js +1 -1
  7. package/date-picker/DatePicker.js +3 -3
  8. package/date-picker/internal/DatePickerPanel.js +4 -4
  9. package/drawer/DrawerHeader.js +1 -1
  10. package/dropdown/internal/DropdownSub.js +1 -1
  11. package/fab/FabBacktop.js +1 -1
  12. package/fab/FabButton.js +1 -1
  13. package/form/FormItem.js +4 -4
  14. package/image/ImagePreview.js +6 -6
  15. package/input/Input.js +3 -3
  16. package/input/InputNumber.js +3 -3
  17. package/modal/ModalAlert.js +4 -4
  18. package/modal/ModalHeader.js +1 -1
  19. package/notification/Notification.js +5 -5
  20. package/package.json +4 -4
  21. package/pagination/Pagination.js +5 -5
  22. package/popover/PopoverHeader.js +1 -1
  23. package/progress/Progress.js +6 -6
  24. package/rating/Rating.js +1 -1
  25. package/root/Root.js +25 -22
  26. package/select/Select.js +5 -5
  27. package/slides/Slides.js +2 -2
  28. package/stepper/Stepper.js +2 -2
  29. package/table/TableFilter.js +1 -1
  30. package/tabs/Tabs.js +3 -3
  31. package/time-picker/TimePicker.js +3 -3
  32. package/toast/Toast.js +5 -5
  33. package/transfer/Transfer.js +2 -2
  34. package/transfer/internal/TransferPanel.js +1 -1
  35. package/tree/internal/TreePanel.js +3 -3
  36. package/tree-select/TreeSelect.js +4 -4
  37. package/upload/UploadAction.js +2 -2
  38. package/upload/UploadButton.js +2 -2
  39. package/upload/UploadList.js +1 -1
  40. package/upload/UploadPicture.js +1 -1
  41. package/upload/UploadPictureList.js +1 -1
  42. package/upload/UploadPreviewAction.js +1 -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
+ ## [0.4.1](https://github.com/laser-ui/laser-ui/compare/v0.4.0...v0.4.1) (2023-12-12)
6
+
7
+ ### Bug Fixes
8
+
9
+ - **ui:** fix get window size ([c909d89](https://github.com/laser-ui/laser-ui/commit/c909d898d48d715758744d4201888824e1e09af4))
10
+
11
+ # [0.4.0](https://github.com/laser-ui/laser-ui/compare/v0.3.0...v0.4.0) (2023-12-06)
12
+
13
+ ### Features
14
+
15
+ - update `vite-plugin-svgr` to **v4** ([5d05979](https://github.com/laser-ui/laser-ui/commit/5d0597973f3f41968bf70542e96eb9318f439328))
16
+
5
17
  # [0.3.0](https://github.com/laser-ui/laser-ui/compare/v0.2.2...v0.3.0) (2023-11-03)
6
18
 
7
19
  **Note:** Version bump only for package @laser-ui/components
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <a href="//laser-ui.surge.sh/" rel="noopener" target="_blank"><img width="150" src="apps/site/public/logo.png" alt="logo"></a>
2
+ <a href="//laser-ui.github.io/" rel="noopener" target="_blank"><img width="150" src="apps/site/public/logo.png" alt="logo"></a>
3
3
  </p>
4
4
 
5
5
  <h1 align="center">Laser UI</h1>
@@ -59,7 +59,7 @@ export default function App() {
59
59
 
60
60
  ## Links
61
61
 
62
- - [laser-ui.surge.sh](//laser-ui.surge.sh)
62
+ - [laser-admin.surge.sh](//laser-admin.surge.sh)
63
63
 
64
64
  ## Contributing
65
65
 
@@ -1,7 +1,7 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { createElement as _createElement } from "react";
4
- import { ReactComponent as KeyboardArrowDownOutlined } from '@material-design-icons/svg/outlined/keyboard_arrow_down.svg';
4
+ import KeyboardArrowDownOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_down.svg?react';
5
5
  import { isNull, isUndefined, nth } from 'lodash';
6
6
  import { useId } from 'react';
7
7
  import { CLASSES } from './vars';
package/alert/Alert.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { checkNodeExist } from '@laser-ui/utils';
4
- import { ReactComponent as CheckCircleOutlined } from '@material-design-icons/svg/outlined/check_circle.svg';
5
- import { ReactComponent as CloseOutlined } from '@material-design-icons/svg/outlined/close.svg';
6
- import { ReactComponent as HighlightOffOutlined } from '@material-design-icons/svg/outlined/highlight_off.svg';
7
- import { ReactComponent as InfoOutlined } from '@material-design-icons/svg/outlined/info.svg';
8
- import { ReactComponent as WarningAmberOutlined } from '@material-design-icons/svg/outlined/warning_amber.svg';
4
+ import CheckCircleOutlined from '@material-design-icons/svg/outlined/check_circle.svg?react';
5
+ import CloseOutlined from '@material-design-icons/svg/outlined/close.svg?react';
6
+ import HighlightOffOutlined from '@material-design-icons/svg/outlined/highlight_off.svg?react';
7
+ import InfoOutlined from '@material-design-icons/svg/outlined/info.svg?react';
8
+ import WarningAmberOutlined from '@material-design-icons/svg/outlined/warning_amber.svg?react';
9
9
  import { isUndefined } from 'lodash';
10
10
  import { CLASSES } from './vars';
11
11
  import { useComponentProps, useControlled, useStyled, useTranslation } from '../hooks';
@@ -2,10 +2,10 @@ import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useEvent, useEventCallback, useForkRef, useResize } from '@laser-ui/hooks';
4
4
  import { findNested } from '@laser-ui/utils';
5
- import { ReactComponent as CancelFilled } from '@material-design-icons/svg/filled/cancel.svg';
6
- import { ReactComponent as CloseOutlined } from '@material-design-icons/svg/outlined/close.svg';
7
- import { ReactComponent as KeyboardArrowDownOutlined } from '@material-design-icons/svg/outlined/keyboard_arrow_down.svg';
8
- import { ReactComponent as SearchOutlined } from '@material-design-icons/svg/outlined/search.svg';
5
+ import CancelFilled from '@material-design-icons/svg/filled/cancel.svg?react';
6
+ import CloseOutlined from '@material-design-icons/svg/outlined/close.svg?react';
7
+ import KeyboardArrowDownOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_down.svg?react';
8
+ import SearchOutlined from '@material-design-icons/svg/outlined/search.svg?react';
9
9
  import { isNull, isUndefined } from 'lodash';
10
10
  import { createElement, forwardRef, useId, useImperativeHandle, useMemo, useRef, useState } from 'react';
11
11
  import { CascaderPanel } from './internal/CascaderPanel';
@@ -2,7 +2,7 @@ import { createElement as _createElement } from "react";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useEventCallback } from '@laser-ui/hooks';
4
4
  import { scrollIntoViewIfNeeded } from '@laser-ui/utils';
5
- import { ReactComponent as KeyboardArrowRightOutlined } from '@material-design-icons/svg/outlined/keyboard_arrow_right.svg';
5
+ import KeyboardArrowRightOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_right.svg?react';
6
6
  import { isNumber, isUndefined } from 'lodash';
7
7
  import { forwardRef, useImperativeHandle, useMemo, useRef } from 'react';
8
8
  import { Checkbox } from '../../checkbox';
@@ -2,9 +2,9 @@ import { __rest } from "tslib";
2
2
  import { createElement as _createElement } from "react";
3
3
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  import { useAsync, useEvent, useEventCallback, useForceUpdate, useForkRef, useImmer, useResize } from '@laser-ui/hooks';
5
- import { ReactComponent as CancelFilled } from '@material-design-icons/svg/filled/cancel.svg';
6
- import { ReactComponent as CalendarTodayOutlined } from '@material-design-icons/svg/outlined/calendar_today.svg';
7
- import { ReactComponent as SwapHorizOutlined } from '@material-design-icons/svg/outlined/swap_horiz.svg';
5
+ import CancelFilled from '@material-design-icons/svg/filled/cancel.svg?react';
6
+ import CalendarTodayOutlined from '@material-design-icons/svg/outlined/calendar_today.svg?react';
7
+ import SwapHorizOutlined from '@material-design-icons/svg/outlined/swap_horiz.svg?react';
8
8
  import { isArray, isBoolean, isNull, isUndefined } from 'lodash';
9
9
  import { forwardRef, useEffect, useImperativeHandle, useRef } from 'react';
10
10
  import { DatePickerPanel } from './internal/DatePickerPanel';
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useAsync, useEvent, useRefExtra } from '@laser-ui/hooks';
3
- import { ReactComponent as KeyboardArrowLeftOutlined } from '@material-design-icons/svg/outlined/keyboard_arrow_left.svg';
4
- import { ReactComponent as KeyboardArrowRightOutlined } from '@material-design-icons/svg/outlined/keyboard_arrow_right.svg';
5
- import { ReactComponent as KeyboardDoubleArrowLeftOutlined } from '@material-design-icons/svg/outlined/keyboard_double_arrow_left.svg';
6
- import { ReactComponent as KeyboardDoubleArrowRightOutlined } from '@material-design-icons/svg/outlined/keyboard_double_arrow_right.svg';
3
+ import KeyboardArrowLeftOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_left.svg?react';
4
+ import KeyboardArrowRightOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_right.svg?react';
5
+ import KeyboardDoubleArrowLeftOutlined from '@material-design-icons/svg/outlined/keyboard_double_arrow_left.svg?react';
6
+ import KeyboardDoubleArrowRightOutlined from '@material-design-icons/svg/outlined/keyboard_double_arrow_right.svg?react';
7
7
  import { forwardRef, useImperativeHandle, useRef, useState } from 'react';
8
8
  import dayjs from '../../dayjs';
9
9
  import { useTranslation } from '../../hooks';
@@ -1,6 +1,6 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { ReactComponent as CloseOutlined } from '@material-design-icons/svg/outlined/close.svg';
3
+ import CloseOutlined from '@material-design-icons/svg/outlined/close.svg?react';
4
4
  import { Children } from 'react';
5
5
  import { CLASSES } from './vars';
6
6
  import { Button } from '../button';
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useEventCallback } from '@laser-ui/hooks';
3
3
  import { checkNodeExist } from '@laser-ui/utils';
4
- import { ReactComponent as KeyboardArrowRightOutlined } from '@material-design-icons/svg/outlined/keyboard_arrow_right.svg';
4
+ import KeyboardArrowRightOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_right.svg?react';
5
5
  import { isUndefined } from 'lodash';
6
6
  import { forwardRef, useImperativeHandle, useRef } from 'react';
7
7
  import { useJSS, useTranslation } from '../../hooks';
package/fab/FabBacktop.js CHANGED
@@ -2,7 +2,7 @@ import { __rest } from "tslib";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { useEvent, useIsomorphicLayoutEffect, useRefExtra, useResize } from '@laser-ui/hooks';
4
4
  import { scrollTo, toPx } from '@laser-ui/utils';
5
- import { ReactComponent as VerticalAlignTopOutlined } from '@material-design-icons/svg/outlined/vertical_align_top.svg';
5
+ import VerticalAlignTopOutlined from '@material-design-icons/svg/outlined/vertical_align_top.svg?react';
6
6
  import { isString } from 'lodash';
7
7
  import { cloneElement, useRef, useState } from 'react';
8
8
  import { FabButton } from './FabButton';
package/fab/FabButton.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { ReactComponent as AddOutlined } from '@material-design-icons/svg/outlined/add.svg';
3
+ import AddOutlined from '@material-design-icons/svg/outlined/add.svg?react';
4
4
  import { forwardRef } from 'react';
5
5
  import { BUTTON_CLASSES } from './vars';
6
6
  import { useComponentProps, useStyled } from '../hooks';
package/form/FormItem.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { ReactComponent as CancelFilled } from '@material-design-icons/svg/filled/cancel.svg';
4
- import { ReactComponent as CheckCircleFilled } from '@material-design-icons/svg/filled/check_circle.svg';
5
- import { ReactComponent as ErrorFilled } from '@material-design-icons/svg/filled/error.svg';
6
- import { ReactComponent as HelpOutlineOutlined } from '@material-design-icons/svg/outlined/help_outline.svg';
3
+ import CancelFilled from '@material-design-icons/svg/filled/cancel.svg?react';
4
+ import CheckCircleFilled from '@material-design-icons/svg/filled/check_circle.svg?react';
5
+ import ErrorFilled from '@material-design-icons/svg/filled/error.svg?react';
6
+ import HelpOutlineOutlined from '@material-design-icons/svg/outlined/help_outline.svg?react';
7
7
  import { isBoolean, isFunction, isNull, isNumber, isString } from 'lodash';
8
8
  import { useContext, useId, useRef } from 'react';
9
9
  import { FormError } from './internal/FormError';
@@ -2,12 +2,12 @@ import { __rest } from "tslib";
2
2
  import { createElement as _createElement } from "react";
3
3
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  import { useEvent, useImmer, useRefExtra } from '@laser-ui/hooks';
5
- import { ReactComponent as CloseOutlined } from '@material-design-icons/svg/outlined/close.svg';
6
- import { ReactComponent as KeyboardArrowLeftOutlined } from '@material-design-icons/svg/outlined/keyboard_arrow_left.svg';
7
- import { ReactComponent as KeyboardArrowRightOutlined } from '@material-design-icons/svg/outlined/keyboard_arrow_right.svg';
8
- import { ReactComponent as Rotate90DegreesCwOutlined } from '@material-design-icons/svg/outlined/rotate_90_degrees_cw.svg';
9
- import { ReactComponent as ZoomInOutlined } from '@material-design-icons/svg/outlined/zoom_in.svg';
10
- import { ReactComponent as ZoomOutOutlined } from '@material-design-icons/svg/outlined/zoom_out.svg';
5
+ import CloseOutlined from '@material-design-icons/svg/outlined/close.svg?react';
6
+ import KeyboardArrowLeftOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_left.svg?react';
7
+ import KeyboardArrowRightOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_right.svg?react';
8
+ import Rotate90DegreesCwOutlined from '@material-design-icons/svg/outlined/rotate_90_degrees_cw.svg?react';
9
+ import ZoomInOutlined from '@material-design-icons/svg/outlined/zoom_in.svg?react';
10
+ import ZoomOutOutlined from '@material-design-icons/svg/outlined/zoom_out.svg?react';
11
11
  import { isNull, isUndefined } from 'lodash';
12
12
  import { useRef, useState } from 'react';
13
13
  import { PREVIEW_CLASSES } from './vars';
package/input/Input.js CHANGED
@@ -2,9 +2,9 @@ import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useForkRef } from '@laser-ui/hooks';
4
4
  import { checkNodeExist } from '@laser-ui/utils';
5
- import { ReactComponent as CancelFilled } from '@material-design-icons/svg/filled/cancel.svg';
6
- import { ReactComponent as VisibilityOutlined } from '@material-design-icons/svg/outlined/visibility.svg';
7
- import { ReactComponent as VisibilityOffOutlined } from '@material-design-icons/svg/outlined/visibility_off.svg';
5
+ import CancelFilled from '@material-design-icons/svg/filled/cancel.svg?react';
6
+ import VisibilityOutlined from '@material-design-icons/svg/outlined/visibility.svg?react';
7
+ import VisibilityOffOutlined from '@material-design-icons/svg/outlined/visibility_off.svg?react';
8
8
  import { useRef } from 'react';
9
9
  import { InputNumber } from './InputNumber';
10
10
  import { CLASSES } from './vars';
@@ -2,9 +2,9 @@ import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useAsync, useEvent, useForceUpdate, useForkRef, useRefExtra } from '@laser-ui/hooks';
4
4
  import { checkNodeExist } from '@laser-ui/utils';
5
- import { ReactComponent as CancelFilled } from '@material-design-icons/svg/filled/cancel.svg';
6
- import { ReactComponent as KeyboardArrowDownOutlined } from '@material-design-icons/svg/outlined/keyboard_arrow_down.svg';
7
- import { ReactComponent as KeyboardArrowUpOutlined } from '@material-design-icons/svg/outlined/keyboard_arrow_up.svg';
5
+ import CancelFilled from '@material-design-icons/svg/filled/cancel.svg?react';
6
+ import KeyboardArrowDownOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_down.svg?react';
7
+ import KeyboardArrowUpOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_up.svg?react';
8
8
  import { isNull, isUndefined } from 'lodash';
9
9
  import { useRef } from 'react';
10
10
  import { CLASSES } from './vars';
@@ -1,10 +1,10 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { checkNodeExist } from '@laser-ui/utils';
4
- import { ReactComponent as CheckCircleOutlined } from '@material-design-icons/svg/outlined/check_circle.svg';
5
- import { ReactComponent as HighlightOffOutlined } from '@material-design-icons/svg/outlined/highlight_off.svg';
6
- import { ReactComponent as InfoOutlined } from '@material-design-icons/svg/outlined/info.svg';
7
- import { ReactComponent as WarningAmberOutlined } from '@material-design-icons/svg/outlined/warning_amber.svg';
4
+ import CheckCircleOutlined from '@material-design-icons/svg/outlined/check_circle.svg?react';
5
+ import HighlightOffOutlined from '@material-design-icons/svg/outlined/highlight_off.svg?react';
6
+ import InfoOutlined from '@material-design-icons/svg/outlined/info.svg?react';
7
+ import WarningAmberOutlined from '@material-design-icons/svg/outlined/warning_amber.svg?react';
8
8
  import { CLASSES } from './vars';
9
9
  import { useComponentProps, useStyled } from '../hooks';
10
10
  import { Icon } from '../icon';
@@ -1,6 +1,6 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { ReactComponent as CloseOutlined } from '@material-design-icons/svg/outlined/close.svg';
3
+ import CloseOutlined from '@material-design-icons/svg/outlined/close.svg?react';
4
4
  import { Children } from 'react';
5
5
  import { CLASSES } from './vars';
6
6
  import { Button } from '../button';
@@ -2,11 +2,11 @@ import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useAsync, useMount } from '@laser-ui/hooks';
4
4
  import { checkNodeExist } from '@laser-ui/utils';
5
- import { ReactComponent as CheckCircleOutlined } from '@material-design-icons/svg/outlined/check_circle.svg';
6
- import { ReactComponent as CloseOutlined } from '@material-design-icons/svg/outlined/close.svg';
7
- import { ReactComponent as HighlightOffOutlined } from '@material-design-icons/svg/outlined/highlight_off.svg';
8
- import { ReactComponent as InfoOutlined } from '@material-design-icons/svg/outlined/info.svg';
9
- import { ReactComponent as WarningAmberOutlined } from '@material-design-icons/svg/outlined/warning_amber.svg';
5
+ import CheckCircleOutlined from '@material-design-icons/svg/outlined/check_circle.svg?react';
6
+ import CloseOutlined from '@material-design-icons/svg/outlined/close.svg?react';
7
+ import HighlightOffOutlined from '@material-design-icons/svg/outlined/highlight_off.svg?react';
8
+ import InfoOutlined from '@material-design-icons/svg/outlined/info.svg?react';
9
+ import WarningAmberOutlined from '@material-design-icons/svg/outlined/warning_amber.svg?react';
10
10
  import { isUndefined } from 'lodash';
11
11
  import { useId, useRef } from 'react';
12
12
  import { CLASSES, TTANSITION_DURING } from './vars';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laser-ui/components",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "React components.",
5
5
  "keywords": [
6
6
  "ui",
@@ -26,8 +26,8 @@
26
26
  "module": "./index.js",
27
27
  "types": "./index.d.ts",
28
28
  "dependencies": {
29
- "@laser-ui/hooks": "0.3.0",
30
- "@laser-ui/utils": "0.3.0",
29
+ "@laser-ui/hooks": "0.4.1",
30
+ "@laser-ui/utils": "0.4.1",
31
31
  "@material-design-icons/svg": "^0.14.12",
32
32
  "jss": "^10.10.0",
33
33
  "jss-preset-default": "^10.10.0",
@@ -45,5 +45,5 @@
45
45
  "access": "public",
46
46
  "directory": "../../dist/libs/components"
47
47
  },
48
- "gitHead": "4fe0b462c868d1b30b645af80d9e9690f3cefb5c"
48
+ "gitHead": "83ceac5bb361608b2886a6697fc0943d49f520cc"
49
49
  }
@@ -1,10 +1,10 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { ReactComponent as KeyboardArrowLeftOutlined } from '@material-design-icons/svg/outlined/keyboard_arrow_left.svg';
4
- import { ReactComponent as KeyboardArrowRightOutlined } from '@material-design-icons/svg/outlined/keyboard_arrow_right.svg';
5
- import { ReactComponent as KeyboardDoubleArrowLeftOutlined } from '@material-design-icons/svg/outlined/keyboard_double_arrow_left.svg';
6
- import { ReactComponent as KeyboardDoubleArrowRightOutlined } from '@material-design-icons/svg/outlined/keyboard_double_arrow_right.svg';
7
- import { ReactComponent as MoreHorizOutlined } from '@material-design-icons/svg/outlined/more_horiz.svg';
3
+ import KeyboardArrowLeftOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_left.svg?react';
4
+ import KeyboardArrowRightOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_right.svg?react';
5
+ import KeyboardDoubleArrowLeftOutlined from '@material-design-icons/svg/outlined/keyboard_double_arrow_left.svg?react';
6
+ import KeyboardDoubleArrowRightOutlined from '@material-design-icons/svg/outlined/keyboard_double_arrow_right.svg?react';
7
+ import MoreHorizOutlined from '@material-design-icons/svg/outlined/more_horiz.svg?react';
8
8
  import { isNull, isNumber } from 'lodash';
9
9
  import { Fragment, cloneElement, useRef, useState } from 'react';
10
10
  import { buttonProps } from './utils';
@@ -1,6 +1,6 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { ReactComponent as CloseOutlined } from '@material-design-icons/svg/outlined/close.svg';
3
+ import CloseOutlined from '@material-design-icons/svg/outlined/close.svg?react';
4
4
  import { Children } from 'react';
5
5
  import { CLASSES } from './vars';
6
6
  import { Button } from '../button';
@@ -1,12 +1,12 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { checkNodeExist } from '@laser-ui/utils';
4
- import { ReactComponent as CancelFilled } from '@material-design-icons/svg/filled/cancel.svg';
5
- import { ReactComponent as CheckCircleFilled } from '@material-design-icons/svg/filled/check_circle.svg';
6
- import { ReactComponent as WarningFilled } from '@material-design-icons/svg/filled/warning.svg';
7
- import { ReactComponent as CheckOutlined } from '@material-design-icons/svg/outlined/check.svg';
8
- import { ReactComponent as CloseOutlined } from '@material-design-icons/svg/outlined/close.svg';
9
- import { ReactComponent as WarningAmberOutlined } from '@material-design-icons/svg/outlined/warning_amber.svg';
4
+ import CancelFilled from '@material-design-icons/svg/filled/cancel.svg?react';
5
+ import CheckCircleFilled from '@material-design-icons/svg/filled/check_circle.svg?react';
6
+ import WarningFilled from '@material-design-icons/svg/filled/warning.svg?react';
7
+ import CheckOutlined from '@material-design-icons/svg/outlined/check.svg?react';
8
+ import CloseOutlined from '@material-design-icons/svg/outlined/close.svg?react';
9
+ import WarningAmberOutlined from '@material-design-icons/svg/outlined/warning_amber.svg?react';
10
10
  import { isUndefined } from 'lodash';
11
11
  import { useId } from 'react';
12
12
  import { CLASSES } from './vars';
package/rating/Rating.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { checkNodeExist } from '@laser-ui/utils';
4
- import { ReactComponent as StarFilled } from '@material-design-icons/svg/filled/star.svg';
4
+ import StarFilled from '@material-design-icons/svg/filled/star.svg?react';
5
5
  import { isFunction } from 'lodash';
6
6
  import { useId, useState } from 'react';
7
7
  import { RatingStar } from './internal/RatingStar';
package/root/Root.js CHANGED
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useEvent, useRefExtra } from '@laser-ui/hooks';
3
3
  import { isString, set } from 'lodash';
4
4
  import { useStore } from 'rcl-store';
@@ -7,10 +7,32 @@ import { ROOT_DATA, RootContext, Store } from './vars';
7
7
  import dayjs from '../dayjs';
8
8
  import { Portal } from '../internal/portal';
9
9
  import resources from '../resources.json';
10
+ function WindowSize() {
11
+ const windowSizeRef = useRef(null);
12
+ useEffect(() => {
13
+ if (windowSizeRef.current) {
14
+ const observer = new ResizeObserver((entries) => {
15
+ const entry = entries[0];
16
+ ROOT_DATA.windowSize = { width: entry.contentRect.width, height: entry.contentRect.height };
17
+ });
18
+ observer.observe(windowSizeRef.current);
19
+ return () => {
20
+ observer.disconnect();
21
+ };
22
+ }
23
+ });
24
+ return (_jsx("div", { ref: windowSizeRef, style: {
25
+ position: 'fixed',
26
+ top: 0,
27
+ right: 0,
28
+ bottom: 0,
29
+ left: 0,
30
+ pointerEvents: 'none',
31
+ } }));
32
+ }
10
33
  export function Root(props) {
11
34
  const { context: contextProp, children } = props;
12
35
  const windowRef = useRefExtra(() => window);
13
- const windowSizeRef = useRef(null);
14
36
  const [{ dialogs }] = useStore(Store, ['dialogs']);
15
37
  useEvent(windowRef, 'click', (e) => {
16
38
  // Check if click by keydown
@@ -25,18 +47,6 @@ export function Root(props) {
25
47
  }
26
48
  }
27
49
  }, { capture: true });
28
- useEffect(() => {
29
- if (windowSizeRef.current) {
30
- const observer = new ResizeObserver(() => {
31
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
32
- ROOT_DATA.windowSize = { width: windowSizeRef.current.clientWidth, height: windowSizeRef.current.clientHeight };
33
- });
34
- observer.observe(windowSizeRef.current);
35
- return () => {
36
- observer.disconnect();
37
- };
38
- }
39
- });
40
50
  const context = useMemo(() => {
41
51
  var _a, _b;
42
52
  const { i18n } = contextProp !== null && contextProp !== void 0 ? contextProp : {};
@@ -74,12 +84,5 @@ export function Root(props) {
74
84
  default:
75
85
  break;
76
86
  }
77
- return (_jsxs(RootContext.Provider, { value: context, children: [children, dialogs.map(({ type, key, props }) => createElement(type, Object.assign({ key }, props))), _jsx(Portal, { selector: () => document.body, children: _jsx("div", { ref: windowSizeRef, style: {
78
- position: 'fixed',
79
- top: 0,
80
- right: 0,
81
- bottom: 0,
82
- left: 0,
83
- pointerEvents: 'none',
84
- } }) })] }));
87
+ return (_jsxs(_Fragment, { children: [_jsxs(RootContext.Provider, { value: context, children: [children, dialogs.map(({ type, key, props }) => createElement(type, Object.assign({ key }, props)))] }), _jsx(Portal, { selector: () => document.body, children: _jsx(WindowSize, {}) })] }));
85
88
  }
package/select/Select.js CHANGED
@@ -3,11 +3,11 @@ import { createElement as _createElement } from "react";
3
3
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
4
4
  import { useEvent, useEventCallback, useForkRef, useResize } from '@laser-ui/hooks';
5
5
  import { findNested, scrollIntoViewIfNeeded } from '@laser-ui/utils';
6
- import { ReactComponent as CancelFilled } from '@material-design-icons/svg/filled/cancel.svg';
7
- import { ReactComponent as AddOutlined } from '@material-design-icons/svg/outlined/add.svg';
8
- import { ReactComponent as CloseOutlined } from '@material-design-icons/svg/outlined/close.svg';
9
- import { ReactComponent as KeyboardArrowDownOutlined } from '@material-design-icons/svg/outlined/keyboard_arrow_down.svg';
10
- import { ReactComponent as SearchOutlined } from '@material-design-icons/svg/outlined/search.svg';
6
+ import CancelFilled from '@material-design-icons/svg/filled/cancel.svg?react';
7
+ import AddOutlined from '@material-design-icons/svg/outlined/add.svg?react';
8
+ import CloseOutlined from '@material-design-icons/svg/outlined/close.svg?react';
9
+ import KeyboardArrowDownOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_down.svg?react';
10
+ import SearchOutlined from '@material-design-icons/svg/outlined/search.svg?react';
11
11
  import { isNull, isNumber, isUndefined } from 'lodash';
12
12
  import { createElement, forwardRef, useCallback, useId, useImperativeHandle, useMemo, useRef, useState } from 'react';
13
13
  import { CLASSES, IS_CREATED } from './vars';
package/slides/Slides.js CHANGED
@@ -2,8 +2,8 @@ import { __rest } from "tslib";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { createElement as _createElement } from "react";
4
4
  import { useAsync, useEvent, useRefExtra } from '@laser-ui/hooks';
5
- import { ReactComponent as KeyboardArrowLeftOutlined } from '@material-design-icons/svg/outlined/keyboard_arrow_left.svg';
6
- import { ReactComponent as KeyboardArrowRightOutlined } from '@material-design-icons/svg/outlined/keyboard_arrow_right.svg';
5
+ import KeyboardArrowLeftOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_left.svg?react';
6
+ import KeyboardArrowRightOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_right.svg?react';
7
7
  import { isBoolean, isNumber, isUndefined, nth } from 'lodash';
8
8
  import { useEffect, useId, useRef, useState } from 'react';
9
9
  import { CLASSES } from './vars';
@@ -2,8 +2,8 @@ import { __rest } from "tslib";
2
2
  import { createElement as _createElement } from "react";
3
3
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  import { checkNodeExist } from '@laser-ui/utils';
5
- import { ReactComponent as CheckOutlined } from '@material-design-icons/svg/outlined/check.svg';
6
- import { ReactComponent as CloseOutlined } from '@material-design-icons/svg/outlined/close.svg';
5
+ import CheckOutlined from '@material-design-icons/svg/outlined/check.svg?react';
6
+ import CloseOutlined from '@material-design-icons/svg/outlined/close.svg?react';
7
7
  import { isNumber, isUndefined } from 'lodash';
8
8
  import { CLASSES } from './vars';
9
9
  import { useComponentProps, useStyled } from '../hooks';
@@ -1,6 +1,6 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { ReactComponent as SearchOutlined } from '@material-design-icons/svg/outlined/search.svg';
3
+ import SearchOutlined from '@material-design-icons/svg/outlined/search.svg?react';
4
4
  import { CLASSES } from './vars';
5
5
  import { Button } from '../button';
6
6
  import { useComponentProps, useStyled, useTranslation } from '../hooks';
package/tabs/Tabs.js CHANGED
@@ -3,9 +3,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { createElement as _createElement } from "react";
4
4
  import { useEventCallback, useIsomorphicLayoutEffect, useResize } from '@laser-ui/hooks';
5
5
  import { checkScrollEnd, findNested } from '@laser-ui/utils';
6
- import { ReactComponent as AddOutlined } from '@material-design-icons/svg/outlined/add.svg';
7
- import { ReactComponent as CloseOutlined } from '@material-design-icons/svg/outlined/close.svg';
8
- import { ReactComponent as MoreHorizOutlined } from '@material-design-icons/svg/outlined/more_horiz.svg';
6
+ import AddOutlined from '@material-design-icons/svg/outlined/add.svg?react';
7
+ import CloseOutlined from '@material-design-icons/svg/outlined/close.svg?react';
8
+ import MoreHorizOutlined from '@material-design-icons/svg/outlined/more_horiz.svg?react';
9
9
  import { isUndefined, nth } from 'lodash';
10
10
  import { forwardRef, useEffect, useId, useImperativeHandle, useRef, useState } from 'react';
11
11
  import { CLASSES } from './vars';
@@ -1,9 +1,9 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useAsync, useEvent, useEventCallback, useForceUpdate, useForkRef, useImmer, useResize } from '@laser-ui/hooks';
4
- import { ReactComponent as CancelFilled } from '@material-design-icons/svg/filled/cancel.svg';
5
- import { ReactComponent as AccessTimeOutlined } from '@material-design-icons/svg/outlined/access_time.svg';
6
- import { ReactComponent as SwapHorizOutlined } from '@material-design-icons/svg/outlined/swap_horiz.svg';
4
+ import CancelFilled from '@material-design-icons/svg/filled/cancel.svg?react';
5
+ import AccessTimeOutlined from '@material-design-icons/svg/outlined/access_time.svg?react';
6
+ import SwapHorizOutlined from '@material-design-icons/svg/outlined/swap_horiz.svg?react';
7
7
  import { isNull, isUndefined } from 'lodash';
8
8
  import { forwardRef, useEffect, useImperativeHandle, useRef } from 'react';
9
9
  import { TimePickerPanel } from './internal/TimePickerPanel';
package/toast/Toast.js CHANGED
@@ -2,11 +2,11 @@ import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useAsync, useMount } from '@laser-ui/hooks';
4
4
  import { checkNodeExist } from '@laser-ui/utils';
5
- import { ReactComponent as CheckCircleOutlined } from '@material-design-icons/svg/outlined/check_circle.svg';
6
- import { ReactComponent as CloseOutlined } from '@material-design-icons/svg/outlined/close.svg';
7
- import { ReactComponent as HighlightOffOutlined } from '@material-design-icons/svg/outlined/highlight_off.svg';
8
- import { ReactComponent as InfoOutlined } from '@material-design-icons/svg/outlined/info.svg';
9
- import { ReactComponent as WarningAmberOutlined } from '@material-design-icons/svg/outlined/warning_amber.svg';
5
+ import CheckCircleOutlined from '@material-design-icons/svg/outlined/check_circle.svg?react';
6
+ import CloseOutlined from '@material-design-icons/svg/outlined/close.svg?react';
7
+ import HighlightOffOutlined from '@material-design-icons/svg/outlined/highlight_off.svg?react';
8
+ import InfoOutlined from '@material-design-icons/svg/outlined/info.svg?react';
9
+ import WarningAmberOutlined from '@material-design-icons/svg/outlined/warning_amber.svg?react';
10
10
  import { isUndefined } from 'lodash';
11
11
  import { useId, useRef } from 'react';
12
12
  import { CLASSES, TTANSITION_DURING } from './vars';
@@ -1,7 +1,7 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { ReactComponent as KeyboardArrowLeftOutlined } from '@material-design-icons/svg/outlined/keyboard_arrow_left.svg';
4
- import { ReactComponent as KeyboardArrowRightOutlined } from '@material-design-icons/svg/outlined/keyboard_arrow_right.svg';
3
+ import KeyboardArrowLeftOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_left.svg?react';
4
+ import KeyboardArrowRightOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_right.svg?react';
5
5
  import { isUndefined } from 'lodash';
6
6
  import { useMemo } from 'react';
7
7
  import { TransferPanel } from './internal/TransferPanel';
@@ -1,7 +1,7 @@
1
1
  import { createElement as _createElement } from "react";
2
2
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
3
3
  import { checkNodeExist } from '@laser-ui/utils';
4
- import { ReactComponent as SearchOutlined } from '@material-design-icons/svg/outlined/search.svg';
4
+ import SearchOutlined from '@material-design-icons/svg/outlined/search.svg?react';
5
5
  import { isNumber } from 'lodash';
6
6
  import { useCallback, useId, useMemo, useRef } from 'react';
7
7
  import { Checkbox } from '../../checkbox';
@@ -3,9 +3,9 @@ import { createElement as _createElement } from "react";
3
3
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  import { useEventCallback } from '@laser-ui/hooks';
5
5
  import { scrollIntoViewIfNeeded } from '@laser-ui/utils';
6
- import { ReactComponent as AddBoxOutlined } from '@material-design-icons/svg/outlined/add_box.svg';
7
- import { ReactComponent as ArrowRightOutlined } from '@material-design-icons/svg/outlined/arrow_right.svg';
8
- import { ReactComponent as IndeterminateCheckBoxOutlined } from '@material-design-icons/svg/outlined/indeterminate_check_box.svg';
6
+ import AddBoxOutlined from '@material-design-icons/svg/outlined/add_box.svg?react';
7
+ import ArrowRightOutlined from '@material-design-icons/svg/outlined/arrow_right.svg?react';
8
+ import IndeterminateCheckBoxOutlined from '@material-design-icons/svg/outlined/indeterminate_check_box.svg?react';
9
9
  import { isUndefined } from 'lodash';
10
10
  import { cloneElement, forwardRef, useImperativeHandle, useMemo, useRef } from 'react';
11
11
  import { Checkbox } from '../../checkbox';
@@ -2,10 +2,10 @@ import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useEvent, useEventCallback, useForkRef, useResize } from '@laser-ui/hooks';
4
4
  import { findNested } from '@laser-ui/utils';
5
- import { ReactComponent as CancelFilled } from '@material-design-icons/svg/filled/cancel.svg';
6
- import { ReactComponent as CloseOutlined } from '@material-design-icons/svg/outlined/close.svg';
7
- import { ReactComponent as KeyboardArrowDownOutlined } from '@material-design-icons/svg/outlined/keyboard_arrow_down.svg';
8
- import { ReactComponent as SearchOutlined } from '@material-design-icons/svg/outlined/search.svg';
5
+ import CancelFilled from '@material-design-icons/svg/filled/cancel.svg?react';
6
+ import CloseOutlined from '@material-design-icons/svg/outlined/close.svg?react';
7
+ import KeyboardArrowDownOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_down.svg?react';
8
+ import SearchOutlined from '@material-design-icons/svg/outlined/search.svg?react';
9
9
  import { isNull, isNumber, isUndefined } from 'lodash';
10
10
  import { createElement, forwardRef, useId, useImperativeHandle, useMemo, useRef, useState } from 'react';
11
11
  import { TreeSelectSearchPanel } from './internal/TreeSelectSearchPanel';
@@ -1,8 +1,8 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { saveFile } from '@laser-ui/utils';
4
- import { ReactComponent as DeleteOutlineOutlined } from '@material-design-icons/svg/outlined/delete_outline.svg';
5
- import { ReactComponent as FileDownloadOutlined } from '@material-design-icons/svg/outlined/file_download.svg';
4
+ import DeleteOutlineOutlined from '@material-design-icons/svg/outlined/delete_outline.svg?react';
5
+ import FileDownloadOutlined from '@material-design-icons/svg/outlined/file_download.svg?react';
6
6
  import { isUndefined } from 'lodash';
7
7
  import { forwardRef } from 'react';
8
8
  import { ACTION_CLASSES } from './vars';
@@ -1,7 +1,7 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { ReactComponent as AddOutlined } from '@material-design-icons/svg/outlined/add.svg';
4
- import { ReactComponent as InsertDriveFileTwoTone } from '@material-design-icons/svg/two-tone/insert_drive_file.svg';
3
+ import AddOutlined from '@material-design-icons/svg/outlined/add.svg?react';
4
+ import InsertDriveFileTwoTone from '@material-design-icons/svg/two-tone/insert_drive_file.svg?react';
5
5
  import { Children, cloneElement, forwardRef } from 'react';
6
6
  import { UploadAction } from './UploadAction';
7
7
  import { UploadPreviewAction } from './UploadPreviewAction';
@@ -1,7 +1,7 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useImmer } from '@laser-ui/hooks';
4
- import { ReactComponent as AttachFileOutlined } from '@material-design-icons/svg/outlined/attach_file.svg';
4
+ import AttachFileOutlined from '@material-design-icons/svg/outlined/attach_file.svg?react';
5
5
  import { isNumber, isUndefined } from 'lodash';
6
6
  import { Children, cloneElement, useContext } from 'react';
7
7
  import { UploadAction } from './UploadAction';
@@ -1,7 +1,7 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useImmer } from '@laser-ui/hooks';
4
- import { ReactComponent as InsertDriveFileTwoTone } from '@material-design-icons/svg/two-tone/insert_drive_file.svg';
4
+ import InsertDriveFileTwoTone from '@material-design-icons/svg/two-tone/insert_drive_file.svg?react';
5
5
  import { isNumber } from 'lodash';
6
6
  import { Children, cloneElement, useContext } from 'react';
7
7
  import { UploadAction } from './UploadAction';
@@ -1,7 +1,7 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useImmer } from '@laser-ui/hooks';
4
- import { ReactComponent as InsertDriveFileTwoTone } from '@material-design-icons/svg/two-tone/insert_drive_file.svg';
4
+ import InsertDriveFileTwoTone from '@material-design-icons/svg/two-tone/insert_drive_file.svg?react';
5
5
  import { isNumber, isUndefined } from 'lodash';
6
6
  import { Children, cloneElement, useContext } from 'react';
7
7
  import { UploadAction } from './UploadAction';
@@ -1,6 +1,6 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { ReactComponent as VisibilityOutlinedIcon } from '@material-design-icons/svg/outlined/visibility.svg';
3
+ import VisibilityOutlinedIcon from '@material-design-icons/svg/outlined/visibility.svg?react';
4
4
  import { isUndefined } from 'lodash';
5
5
  import { forwardRef } from 'react';
6
6
  import { ACTION_CLASSES } from './vars';