@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.
- package/CHANGELOG.md +12 -0
- package/accordion/Accordion.d.ts +0 -1
- package/accordion/types.d.ts +0 -1
- package/affix/Affix.d.ts +0 -1
- package/affix/types.d.ts +0 -1
- package/alert/Alert.d.ts +0 -1
- package/alert/types.d.ts +0 -1
- package/anchor/Anchor.d.ts +0 -1
- package/anchor/types.d.ts +0 -1
- package/avatar/Avatar.d.ts +0 -1
- package/avatar/types.d.ts +0 -1
- package/badge/Badge.d.ts +0 -1
- package/badge/internal/BadgeNumber.d.ts +0 -1
- package/badge/types.d.ts +0 -1
- package/base-input/types.d.ts +0 -1
- package/breadcrumb/Breadcrumb.d.ts +0 -1
- package/breadcrumb/types.d.ts +0 -1
- package/button/types.d.ts +0 -1
- package/card/Card.d.ts +0 -1
- package/card/CardAction.d.ts +0 -1
- package/card/CardActions.d.ts +0 -1
- package/card/CardContent.d.ts +0 -1
- package/card/CardHeader.d.ts +0 -1
- package/card/types.d.ts +0 -1
- package/cascader/Cascader.d.ts +0 -1
- package/cascader/Cascader.js +5 -9
- package/cascader/internal/CascaderPanel.d.ts +0 -1
- package/cascader/internal/CascaderSearchPanel.d.ts +0 -1
- package/cascader/internal/types.d.ts +0 -1
- package/cascader/types.d.ts +0 -1
- package/checkbox/Checkbox.d.ts +0 -1
- package/checkbox/Checkbox.js +4 -1
- package/checkbox/CheckboxGroup.d.ts +0 -1
- package/checkbox/types.d.ts +0 -1
- package/circular-progress/CircularProgress.d.ts +0 -1
- package/compose/Compose.d.ts +0 -1
- package/compose/ComposeItem.d.ts +0 -1
- package/compose/types.d.ts +0 -1
- package/config-provider/ConfigProvider.d.ts +0 -1
- package/config-provider/types.d.ts +0 -1
- package/context/index.d.ts +0 -1
- package/date-picker/DatePicker.d.ts +0 -1
- package/date-picker/DatePicker.js +13 -5
- package/date-picker/internal/DatePickerPanel.d.ts +0 -1
- package/date-picker/types.d.ts +0 -1
- package/dialog-service.d.ts +0 -1
- package/drawer/Drawer.d.ts +0 -1
- package/drawer/DrawerFooter.d.ts +0 -1
- package/drawer/DrawerHeader.d.ts +0 -1
- package/drawer/types.d.ts +0 -1
- package/drawer/vars.d.ts +0 -1
- package/dropdown/Dropdown.d.ts +0 -1
- package/dropdown/internal/DropdownList.d.ts +0 -1
- package/dropdown/internal/DropdownList.js +6 -6
- package/dropdown/internal/DropdownSub.d.ts +0 -1
- package/dropdown/types.d.ts +0 -1
- package/dropdown/utils.d.ts +0 -1
- package/empty/Empty.d.ts +0 -1
- package/empty/types.d.ts +0 -1
- package/fab/Fab.d.ts +0 -1
- package/fab/FabBacktop.d.ts +0 -1
- package/fab/FabButton.d.ts +0 -1
- package/fab/types.d.ts +0 -1
- package/fab/vars.d.ts +0 -1
- package/form/Form.d.ts +0 -1
- package/form/FormItem.d.ts +0 -1
- package/form/internal/FormError.d.ts +0 -1
- package/form/types.d.ts +0 -1
- package/form/vars.d.ts +0 -1
- package/hooks/useContainerScrolling.d.ts +0 -1
- package/hooks/useFocusVisible.d.ts +0 -1
- package/hooks/useLayout.d.ts +0 -1
- package/hooks/useNestedPopup.d.ts +0 -1
- package/hooks/useStyled.d.ts +0 -1
- package/hooks/useStyled.js +0 -2
- package/hooks/useZIndex.js +5 -2
- package/icon/Icon.d.ts +0 -1
- package/icon/types.d.ts +0 -1
- package/image/Image.d.ts +0 -1
- package/image/ImageAction.d.ts +0 -1
- package/image/ImageLoader.d.ts +0 -1
- package/image/ImagePreview.d.ts +0 -1
- package/image/types.d.ts +0 -1
- package/input/Input.d.ts +0 -1
- package/input/Input.js +4 -1
- package/input/InputNumber.js +4 -1
- package/input/types.d.ts +0 -1
- package/internal/lazy-loading/LazyLoading.d.ts +0 -1
- package/internal/lazy-loading/types.d.ts +0 -1
- package/internal/popup/Popup.d.ts +0 -1
- package/internal/popup/types.d.ts +0 -1
- package/internal/portal/Portal.d.ts +0 -1
- package/internal/portal/types.d.ts +0 -1
- package/mask/Mask.d.ts +0 -1
- package/mask/types.d.ts +0 -1
- package/menu/Menu.d.ts +0 -1
- package/menu/Menu.js +6 -6
- package/menu/internal/MenuGroup.d.ts +0 -1
- package/menu/internal/MenuItem.d.ts +0 -1
- package/menu/internal/MenuSub.d.ts +0 -1
- package/menu/types.d.ts +0 -1
- package/menu/utils.d.ts +0 -1
- package/modal/Modal.d.ts +0 -1
- package/modal/ModalAlert.d.ts +0 -1
- package/modal/ModalFooter.d.ts +0 -1
- package/modal/ModalHeader.d.ts +0 -1
- package/modal/types.d.ts +0 -1
- package/modal/vars.d.ts +0 -1
- package/notification/Notification.d.ts +0 -1
- package/notification/types.d.ts +0 -1
- package/package.json +2 -2
- package/pagination/Pagination.d.ts +0 -1
- package/pagination/types.d.ts +0 -1
- package/pagination/utils.d.ts +1 -2
- package/popover/Popover.d.ts +0 -1
- package/popover/PopoverFooter.d.ts +0 -1
- package/popover/PopoverHeader.d.ts +0 -1
- package/popover/types.d.ts +0 -1
- package/popover/vars.d.ts +0 -1
- package/progress/Progress.d.ts +0 -1
- package/progress/types.d.ts +0 -1
- package/radio/Radio.d.ts +0 -1
- package/radio/Radio.js +4 -1
- package/radio/RadioGroup.d.ts +0 -1
- package/radio/types.d.ts +0 -1
- package/radio/vars.d.ts +1 -2
- package/rating/Rating.d.ts +0 -1
- package/rating/internal/RatingStar.d.ts +0 -1
- package/rating/types.d.ts +0 -1
- package/root/Dialogs.d.ts +0 -1
- package/root/Root.d.ts +0 -1
- package/root/types.d.ts +0 -1
- package/root/vars.d.ts +0 -1
- package/select/Select.d.ts +0 -1
- package/select/Select.js +4 -8
- package/select/types.d.ts +0 -1
- package/separator/Separator.d.ts +0 -1
- package/separator/types.d.ts +0 -1
- package/skeleton/Skeleton.d.ts +0 -1
- package/skeleton/types.d.ts +0 -1
- package/slider/Slider.d.ts +0 -1
- package/slider/Slider.js +45 -39
- package/slider/types.d.ts +0 -1
- package/slides/Slides.d.ts +0 -1
- package/slides/Slides.js +5 -5
- package/slides/types.d.ts +0 -1
- package/spinner/Spinner.d.ts +0 -1
- package/spinner/types.d.ts +0 -1
- package/stepper/Stepper.d.ts +0 -1
- package/stepper/types.d.ts +0 -1
- package/switch/Switch.js +4 -1
- package/switch/types.d.ts +0 -1
- package/table/Table.d.ts +0 -1
- package/table/TableEmpty.d.ts +0 -1
- package/table/TableExpand.d.ts +0 -1
- package/table/TableFilter.d.ts +0 -1
- package/table/TableTd.d.ts +0 -1
- package/table/TableTh.d.ts +0 -1
- package/table/TableThAction.d.ts +0 -1
- package/table/internal/TableCell.d.ts +0 -1
- package/table/types.d.ts +0 -1
- package/table/vars.d.ts +0 -1
- package/tabs/Tabs.d.ts +0 -1
- package/tabs/types.d.ts +0 -1
- package/tag/Tag.d.ts +0 -1
- package/tag/types.d.ts +0 -1
- package/textarea/Textarea.d.ts +0 -1
- package/textarea/types.d.ts +0 -1
- package/time-picker/TimePicker.d.ts +0 -1
- package/time-picker/TimePicker.js +5 -1
- package/time-picker/internal/TimePickerPanel.d.ts +0 -1
- package/time-picker/types.d.ts +0 -1
- package/timeline/Timeline.d.ts +0 -1
- package/timeline/types.d.ts +0 -1
- package/toast/Toast.d.ts +0 -1
- package/toast/types.d.ts +0 -1
- package/tooltip/Tooltip.d.ts +0 -1
- package/tooltip/types.d.ts +0 -1
- package/transfer/Transfer.d.ts +0 -1
- package/transfer/Transfer.js +4 -5
- package/transfer/internal/TransferPanel.d.ts +0 -1
- package/transfer/types.d.ts +0 -1
- package/transition/CollapseTransition.d.ts +0 -1
- package/transition/Transition.d.ts +0 -1
- package/transition/types.d.ts +0 -1
- package/tree/Tree.d.ts +0 -1
- package/tree/internal/TreePanel.d.ts +0 -1
- package/tree/node/abstract-node.d.ts +0 -1
- package/tree/node/multiple-node.d.ts +0 -1
- package/tree/node/single-node.d.ts +0 -1
- package/tree/types.d.ts +0 -1
- package/tree/utils.d.ts +0 -1
- package/tree-select/TreeSelect.d.ts +0 -1
- package/tree-select/TreeSelect.js +4 -8
- package/tree-select/internal/TreeSelectSearchPanel.d.ts +0 -1
- package/tree-select/internal/types.d.ts +0 -1
- package/tree-select/types.d.ts +0 -1
- package/types.d.ts +0 -1
- package/upload/Upload.d.ts +0 -1
- package/upload/Upload.js +4 -3
- package/upload/UploadAction.d.ts +0 -1
- package/upload/UploadButton.d.ts +0 -1
- package/upload/UploadList.d.ts +0 -1
- package/upload/UploadPicture.d.ts +0 -1
- package/upload/UploadPictureList.d.ts +0 -1
- package/upload/UploadPreviewAction.d.ts +0 -1
- package/upload/hooks.d.ts +0 -1
- package/upload/types.d.ts +0 -1
- package/upload/vars.d.ts +5 -6
- package/utils/handleModalKeyDown.d.ts +0 -1
- package/utils/mergeCS.d.ts +0 -1
- package/virtual-scroll/VirtualScroll.d.ts +0 -1
- package/virtual-scroll/types.d.ts +0 -1
- package/wave/Wave.d.ts +0 -1
- package/wave/types.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
# [2.4.0](https://github.com/laser-ui/laser-ui/compare/v2.3.5...v2.4.0) (2026-03-27)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- fix `no-non-null-assertion` ([0080403](https://github.com/laser-ui/laser-ui/commit/0080403dcf3c8d82f473d5ce62c2222efdfc0e06))
|
|
10
|
+
|
|
11
|
+
## [2.3.5](https://github.com/laser-ui/laser-ui/compare/v2.3.4...v2.3.5) (2026-03-16)
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
- **components:** fix pass class or style to `inputProps` ([1f7a6ba](https://github.com/laser-ui/laser-ui/commit/1f7a6ba7524742cb7095b2f335a87f91434203a0))
|
|
16
|
+
|
|
5
17
|
## [2.3.4](https://github.com/laser-ui/laser-ui/compare/v2.3.3...v2.3.4) (2026-03-06)
|
|
6
18
|
|
|
7
19
|
### Bug Fixes
|
package/accordion/Accordion.d.ts
CHANGED
package/accordion/types.d.ts
CHANGED
package/affix/Affix.d.ts
CHANGED
package/affix/types.d.ts
CHANGED
package/alert/Alert.d.ts
CHANGED
package/alert/types.d.ts
CHANGED
package/anchor/Anchor.d.ts
CHANGED
package/anchor/types.d.ts
CHANGED
package/avatar/Avatar.d.ts
CHANGED
package/avatar/types.d.ts
CHANGED
package/badge/Badge.d.ts
CHANGED
package/badge/types.d.ts
CHANGED
package/base-input/types.d.ts
CHANGED
package/breadcrumb/types.d.ts
CHANGED
package/button/types.d.ts
CHANGED
package/card/Card.d.ts
CHANGED
package/card/CardAction.d.ts
CHANGED
package/card/CardActions.d.ts
CHANGED
package/card/CardContent.d.ts
CHANGED
package/card/CardHeader.d.ts
CHANGED
package/card/types.d.ts
CHANGED
package/cascader/Cascader.d.ts
CHANGED
package/cascader/Cascader.js
CHANGED
|
@@ -6,7 +6,7 @@ import CancelFilled from '@material-design-icons/svg/filled/cancel.svg?react';
|
|
|
6
6
|
import CloseOutlined from '@material-design-icons/svg/outlined/close.svg?react';
|
|
7
7
|
import KeyboardArrowDownOutlined from '@material-design-icons/svg/outlined/keyboard_arrow_down.svg?react';
|
|
8
8
|
import SearchOutlined from '@material-design-icons/svg/outlined/search.svg?react';
|
|
9
|
-
import { isNull
|
|
9
|
+
import { isNull } from 'lodash';
|
|
10
10
|
import { useId, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
11
11
|
import { CascaderPanel } from './internal/CascaderPanel';
|
|
12
12
|
import { CascaderSearchPanel } from './internal/CascaderSearchPanel';
|
|
@@ -113,10 +113,8 @@ export function Cascader(props) {
|
|
|
113
113
|
if (!hasSearch) {
|
|
114
114
|
return [];
|
|
115
115
|
}
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
: // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
119
|
-
(item) => customSearch.filter(searchValue, item);
|
|
116
|
+
const customFilterFn = customSearch && customSearch.filter ? customSearch.filter : undefined;
|
|
117
|
+
const filterFn = customFilterFn ? (item) => customFilterFn(searchValue, item) : (item) => item.label.includes(searchValue);
|
|
120
118
|
const sortFn = customSearch === null || customSearch === void 0 ? void 0 : customSearch.sort;
|
|
121
119
|
const searchList = [];
|
|
122
120
|
const reduceNodes = (nodes) => {
|
|
@@ -281,10 +279,8 @@ export function Cascader(props) {
|
|
|
281
279
|
changeVisible((draft) => (searchable ? true : !draft));
|
|
282
280
|
}, children: [_jsxs("div", Object.assign({}, styled('cascader__container'), { title: selectedLabel, children: [(() => {
|
|
283
281
|
const nodeProps = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, inputProps), mergeCS(styled('cascader__search'), {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
zIndex: inputable ? undefined : -1,
|
|
287
|
-
},
|
|
282
|
+
className: inputProps === null || inputProps === void 0 ? void 0 : inputProps.className,
|
|
283
|
+
style: Object.assign(Object.assign({}, inputProps === null || inputProps === void 0 ? void 0 : inputProps.style), { opacity: inputable ? undefined : 0, zIndex: inputable ? undefined : -1 }),
|
|
288
284
|
})), formControl === null || formControl === void 0 ? void 0 : formControl.inputAria), { ref: (instance) => {
|
|
289
285
|
inputRef.current = instance;
|
|
290
286
|
const ret = setRef(inputProps === null || inputProps === void 0 ? void 0 : inputProps.ref, instance);
|
package/cascader/types.d.ts
CHANGED
package/checkbox/Checkbox.d.ts
CHANGED
package/checkbox/Checkbox.js
CHANGED
|
@@ -17,7 +17,10 @@ export const Checkbox = (props) => {
|
|
|
17
17
|
}), {
|
|
18
18
|
className: restProps.className,
|
|
19
19
|
style: restProps.style,
|
|
20
|
-
}), { children: [_jsxs("div", Object.assign({}, styled('checkbox__state-container'), { children: [_jsx("input", Object.assign({}, inputProps, styled('checkbox__input'),
|
|
20
|
+
}), { children: [_jsxs("div", Object.assign({}, styled('checkbox__state-container'), { children: [_jsx("input", Object.assign({}, inputProps, mergeCS(styled('checkbox__input'), {
|
|
21
|
+
className: inputProps === null || inputProps === void 0 ? void 0 : inputProps.className,
|
|
22
|
+
style: inputProps === null || inputProps === void 0 ? void 0 : inputProps.style,
|
|
23
|
+
}), formControl === null || formControl === void 0 ? void 0 : formControl.inputAria, { type: "checkbox", disabled: disabled, "aria-checked": indeterminate ? 'mixed' : checked, onChange: () => {
|
|
21
24
|
changeChecked((draft) => !draft);
|
|
22
25
|
} })), indeterminate ? _jsx("div", Object.assign({}, styled('checkbox__indeterminate'))) : checked && _jsx("div", Object.assign({}, styled('checkbox__tick')))] })), checkNodeExist(children) && _jsx("div", Object.assign({}, styled('checkbox__label'), { children: children }))] })));
|
|
23
26
|
};
|
package/checkbox/types.d.ts
CHANGED
package/compose/Compose.d.ts
CHANGED
package/compose/ComposeItem.d.ts
CHANGED
package/compose/types.d.ts
CHANGED
package/context/index.d.ts
CHANGED
|
@@ -191,10 +191,14 @@ export function DatePicker(props) {
|
|
|
191
191
|
};
|
|
192
192
|
const clearable = clearableProp && !isNull(_value) && !visible && !disabled;
|
|
193
193
|
const inputNode = (isLeft) => {
|
|
194
|
+
var _a, _b;
|
|
194
195
|
const index = isLeft ? 0 : 1;
|
|
195
196
|
const value = isLeft ? valueLeft : valueRight;
|
|
196
197
|
const inputRef = isLeft ? inputLeftRef : inputRightRef;
|
|
197
|
-
return (_jsx(BaseInput, Object.assign({}, inputProps === null || inputProps === void 0 ? void 0 : inputProps[index], styled('date-picker__input'),
|
|
198
|
+
return (_jsx(BaseInput, Object.assign({}, inputProps === null || inputProps === void 0 ? void 0 : inputProps[index], mergeCS(styled('date-picker__input'), {
|
|
199
|
+
className: (_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps[index]) === null || _a === void 0 ? void 0 : _a.className,
|
|
200
|
+
style: (_b = inputProps === null || inputProps === void 0 ? void 0 : inputProps[index]) === null || _b === void 0 ? void 0 : _b.style,
|
|
201
|
+
}), formControl === null || formControl === void 0 ? void 0 : formControl.inputAria, { ref: (instance) => {
|
|
198
202
|
var _a;
|
|
199
203
|
inputRef.current = instance;
|
|
200
204
|
const ret = setRef((_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps[index]) === null || _a === void 0 ? void 0 : _a.ref, instance);
|
|
@@ -382,10 +386,14 @@ export function DatePicker(props) {
|
|
|
382
386
|
return () => {
|
|
383
387
|
timePickerPanelRef.current = null;
|
|
384
388
|
};
|
|
385
|
-
}, styled: styled, time: dataRef.current.latestFocused === 'start' ? valueLeft : valueRight, format: format, config:
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
+
}, styled: styled, time: dataRef.current.latestFocused === 'start' ? valueLeft : valueRight, format: format, config: (() => {
|
|
390
|
+
if (showTime && !isBoolean(showTime)) {
|
|
391
|
+
const fn = showTime.config;
|
|
392
|
+
if (fn) {
|
|
393
|
+
return (...args) => fn(...args, dataRef.current.latestFocused, [valueLeft, valueRight]);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
})(), inDatePicker: true, onTimeChange: (time) => {
|
|
389
397
|
changeValue(time);
|
|
390
398
|
} })), _jsx("div", Object.assign({}, styled('date-picker__footer'), { children: _jsx(Button, { pattern: "link", onClick: () => {
|
|
391
399
|
const now = new Date();
|
package/date-picker/types.d.ts
CHANGED
package/dialog-service.d.ts
CHANGED
package/drawer/Drawer.d.ts
CHANGED
package/drawer/DrawerFooter.d.ts
CHANGED
package/drawer/DrawerHeader.d.ts
CHANGED
package/drawer/types.d.ts
CHANGED
package/drawer/vars.d.ts
CHANGED
package/dropdown/Dropdown.d.ts
CHANGED
|
@@ -147,12 +147,12 @@ export function DropdownList(props) {
|
|
|
147
147
|
})(),
|
|
148
148
|
},
|
|
149
149
|
}), { role: "group", "aria-labelledby": id, children: childrenNode }))] })) : (_jsx(DropdownSub, { ref: (instance) => {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
150
|
+
if (instance) {
|
|
151
|
+
updateSubPosition.current.set(itemId, instance);
|
|
152
|
+
return () => {
|
|
153
|
+
updateSubPosition.current.delete(itemId);
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
156
|
}, namespace: namespace, styled: styled, id: id, icon: itemIcon, theme: itemTheme, list: _jsx(DropdownList, { namespace: namespace, styled: styled, ulProps: { 'aria-labelledby': id }, list: (children !== null && children !== void 0 ? children : []), ancestryOfSub: currentAncestryOfSub, virtual: virtual, focusVisible: focusVisible, focusId: focusId, popupIds: popupIds, updateSubPosition: updateSubPosition, trigger: trigger, zIndex: zIndex, handleKeyDown: handleKeyDown, getItemId: getItemId, onClick: onClick, onFocusIdsChange: onFocusIdsChange, onPopupIdsChange: onPopupIdsChange, addPopupId: addPopupId, removePopupId: removePopupId, onVisibleChange: onVisibleChange }), popupState: popupState === null || popupState === void 0 ? void 0 : popupState.visible, trigger: trigger, focus: focusVisible && isFocus, disabled: itemDisabled, zIndex: isUndefined(zIndex)
|
|
157
157
|
? zIndex
|
|
158
158
|
: isNumber(zIndex)
|
package/dropdown/types.d.ts
CHANGED
package/dropdown/utils.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { DropdownItem } from './types';
|
|
3
2
|
export declare function checkEnableItem<ID extends React.Key, T extends DropdownItem<ID>>(item: T): boolean;
|
|
4
3
|
export declare function getSameLevelEnableItems<ID extends React.Key, T extends DropdownItem<ID>>(arr: T[]): T[];
|
package/empty/Empty.d.ts
CHANGED
package/empty/types.d.ts
CHANGED
package/fab/Fab.d.ts
CHANGED
package/fab/FabBacktop.d.ts
CHANGED
package/fab/FabButton.d.ts
CHANGED
package/fab/types.d.ts
CHANGED
package/fab/vars.d.ts
CHANGED
package/form/Form.d.ts
CHANGED
package/form/FormItem.d.ts
CHANGED
package/form/types.d.ts
CHANGED
package/form/vars.d.ts
CHANGED
package/hooks/useLayout.d.ts
CHANGED
package/hooks/useStyled.d.ts
CHANGED
package/hooks/useStyled.js
CHANGED
|
@@ -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;
|
package/hooks/useZIndex.js
CHANGED
|
@@ -6,8 +6,11 @@ export function useZIndex(visible) {
|
|
|
6
6
|
const [zIndex, setZIndex] = useState(0);
|
|
7
7
|
useIsomorphicLayoutEffect(() => {
|
|
8
8
|
if (visible) {
|
|
9
|
-
|
|
10
|
-
const
|
|
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
package/icon/types.d.ts
CHANGED
package/image/Image.d.ts
CHANGED
package/image/ImageAction.d.ts
CHANGED
package/image/ImageLoader.d.ts
CHANGED