@canlooks/can-ui 0.0.4 → 0.0.6
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/dist/cjs/components/accordion/accordion.d.ts +1 -1
- package/dist/cjs/components/actionSheet/actionSheet.d.ts +1 -1
- package/dist/cjs/components/alert/alert.d.ts +1 -1
- package/dist/cjs/components/alert/alert.style.d.ts +1 -1
- package/dist/cjs/components/app/app.d.ts +1 -1
- package/dist/cjs/components/app/appActionSheet.d.ts +1 -1
- package/dist/cjs/components/app/appNotification.d.ts +1 -1
- package/dist/cjs/components/app/theme.d.ts +1 -1
- package/dist/cjs/components/avatar/avatar.d.ts +1 -1
- package/dist/cjs/components/avatar/avatar.style.d.ts +1 -1
- package/dist/cjs/components/avatar/avatarGroup.d.ts +1 -1
- package/dist/cjs/components/badge/badge.d.ts +1 -1
- package/dist/cjs/components/badge/badge.style.d.ts +1 -1
- package/dist/cjs/components/bottomNavigation/bottomNavigation.d.ts +1 -1
- package/dist/cjs/components/bottomNavigation/bottomNavigationItem.d.ts +1 -1
- package/dist/cjs/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist/cjs/components/button/button.d.ts +1 -1
- package/dist/cjs/components/button/button.style.d.ts +1 -1
- package/dist/cjs/components/cascade/cascade.d.ts +1 -1
- package/dist/cjs/components/cascade/searchResult.d.ts +1 -1
- package/dist/cjs/components/checkbox/checkbox.d.ts +1 -1
- package/dist/cjs/components/checkboxBase/checkboxBase.d.ts +1 -1
- package/dist/cjs/components/checkboxBaseGroup/checkboxBaseGroup.d.ts +1 -1
- package/dist/cjs/components/clickAway/clickAway.d.ts +1 -1
- package/dist/cjs/components/colorPicker/colorPicker.d.ts +1 -1
- package/dist/cjs/components/counter/counter.d.ts +1 -1
- package/dist/cjs/components/curd/curd.d.ts +1 -1
- package/dist/cjs/components/curd/curdColumnConfig.d.ts +1 -1
- package/dist/cjs/components/curd/curdResizable.d.ts +1 -1
- package/dist/cjs/components/dataGrid/dataGrid.d.ts +1 -1
- package/dist/cjs/components/dataGrid/dataGridHead.d.ts +1 -1
- package/dist/cjs/components/dataGrid/dataGridRows.d.ts +1 -1
- package/dist/cjs/components/dateTimePicker/calendar.d.ts +1 -1
- package/dist/cjs/components/dateTimeRangePicker/dateTimeRangePicker.d.ts +1 -1
- package/dist/cjs/components/descriptions/descriptionItem.d.ts +1 -1
- package/dist/cjs/components/descriptions/descriptions.d.ts +1 -1
- package/dist/cjs/components/divider/divider.d.ts +1 -1
- package/dist/cjs/components/draggable/draggable.d.ts +1 -1
- package/dist/cjs/components/drawer/drawer.d.ts +1 -1
- package/dist/cjs/components/drawer/drawer.style.d.ts +1 -1
- package/dist/cjs/components/flex/flex.js +19 -14
- package/dist/cjs/components/form/form.d.ts +1 -1
- package/dist/cjs/components/form/formItem.d.ts +1 -1
- package/dist/cjs/components/formDialog/formDialog.d.ts +1 -1
- package/dist/cjs/components/grid/grid.d.ts +2 -2
- package/dist/cjs/components/grid/grid.js +2 -1
- package/dist/cjs/components/grid/grid.style.d.ts +1 -1
- package/dist/cjs/components/grid/gridItem.d.ts +1 -1
- package/dist/cjs/components/grid/gridItem.js +2 -1
- package/dist/cjs/components/image/image.d.ts +1 -1
- package/dist/cjs/components/inputBase/inputBase.d.ts +1 -1
- package/dist/cjs/components/loading/loading.d.ts +1 -1
- package/dist/cjs/components/loadingIndicator/loadingIndicator.d.ts +1 -1
- package/dist/cjs/components/menu/menu.d.ts +1 -1
- package/dist/cjs/components/menuItem/menuItem.d.ts +1 -1
- package/dist/cjs/components/optionsBase/optionsBase.d.ts +1 -1
- package/dist/cjs/components/overlayBase/overlayBase.d.ts +1 -1
- package/dist/cjs/components/pagination/counter.d.ts +1 -1
- package/dist/cjs/components/pagination/jumper.d.ts +1 -1
- package/dist/cjs/components/pagination/pager.d.ts +1 -1
- package/dist/cjs/components/pagination/pagination.d.ts +1 -1
- package/dist/cjs/components/pagination/sizer.d.ts +1 -1
- package/dist/cjs/components/palette/colorValueInput.d.ts +1 -1
- package/dist/cjs/components/palette/palette.d.ts +1 -1
- package/dist/cjs/components/pickerDialog/pickerDialog.d.ts +1 -1
- package/dist/cjs/components/placeholder/placeholder.d.ts +1 -1
- package/dist/cjs/components/popper/popper.d.ts +1 -1
- package/dist/cjs/components/progress/progress.d.ts +1 -1
- package/dist/cjs/components/radio/radio.d.ts +1 -1
- package/dist/cjs/components/rating/rating.d.ts +1 -1
- package/dist/cjs/components/rating/rating.style.d.ts +1 -1
- package/dist/cjs/components/resizable/resizable.d.ts +1 -1
- package/dist/cjs/components/segmented/SegmentedOption.d.ts +1 -1
- package/dist/cjs/components/segmented/segmented.d.ts +1 -1
- package/dist/cjs/components/select/select.d.ts +1 -1
- package/dist/cjs/components/selectedList/selectedList.d.ts +1 -1
- package/dist/cjs/components/selectionContext/selectionContext.d.ts +1 -1
- package/dist/cjs/components/selectionContext/selectionHook.d.ts +1 -1
- package/dist/cjs/components/skeleton/skeleton.d.ts +1 -1
- package/dist/cjs/components/slidableActions/slidableActions.d.ts +1 -1
- package/dist/cjs/components/slidableActions/slidableActionsAction.d.ts +1 -1
- package/dist/cjs/components/slider/slider.d.ts +1 -1
- package/dist/cjs/components/slider/slider.style.d.ts +1 -1
- package/dist/cjs/components/snackbarBase/snackbarBase.d.ts +1 -1
- package/dist/cjs/components/status/status.d.ts +1 -1
- package/dist/cjs/components/stepper/stepper.d.ts +1 -1
- package/dist/cjs/components/switch/switch.d.ts +1 -1
- package/dist/cjs/components/switch/switch.style.d.ts +1 -1
- package/dist/cjs/components/table/table.d.ts +1 -1
- package/dist/cjs/components/tabs/tab.d.ts +1 -1
- package/dist/cjs/components/tabs/tabs.d.ts +1 -1
- package/dist/cjs/components/tag/tag.d.ts +1 -1
- package/dist/cjs/components/timeline/timeline.d.ts +1 -1
- package/dist/cjs/components/timeline/timeline.style.d.ts +1 -1
- package/dist/cjs/components/toggleButton/toggleButton.d.ts +1 -1
- package/dist/cjs/components/tooltip/tooltip.d.ts +1 -1
- package/dist/cjs/components/touchRipple/touchRipple.d.ts +1 -1
- package/dist/cjs/components/touchRipple/touchRipple.style.d.ts +1 -1
- package/dist/cjs/components/transfer/transfer.d.ts +1 -1
- package/dist/cjs/components/transfer/transferPanel.d.ts +1 -1
- package/dist/cjs/components/transportStyle/transportStyle.d.ts +1 -1
- package/dist/cjs/components/tree/tree.d.ts +1 -1
- package/dist/cjs/components/tree/treeNode.d.ts +1 -1
- package/dist/cjs/components/treeSelect/treeSelect.d.ts +1 -1
- package/dist/cjs/components/typography/typography.d.ts +1 -1
- package/dist/cjs/components/upload/dropArea.d.ts +1 -1
- package/dist/cjs/components/upload/upload.d.ts +1 -1
- package/dist/cjs/components/waterfall/waterfall.d.ts +2 -2
- package/dist/cjs/components/waterfall/waterfall.js +2 -1
- package/dist/cjs/components/waterfall/waterfall.style.d.ts +1 -1
- package/dist/cjs/extensions/curd/curd.d.ts +1 -1
- package/dist/cjs/extensions/textFormatter/textFormatter.d.ts +1 -1
- package/dist/cjs/utils/curd.d.ts +1 -1
- package/dist/cjs/utils/dataGrid.d.ts +1 -1
- package/dist/cjs/utils/dnd.d.ts +1 -1
- package/dist/cjs/utils/form.d.ts +1 -1
- package/dist/cjs/utils/hooks.d.ts +1 -1
- package/dist/cjs/utils/style.d.ts +1 -1
- package/dist/cjs/utils/tree.d.ts +1 -1
- package/dist/cjs/utils/utils.d.ts +1 -1
- package/dist/esm/components/accordion/accordion.d.ts +1 -1
- package/dist/esm/components/actionSheet/actionSheet.d.ts +1 -1
- package/dist/esm/components/alert/alert.d.ts +1 -1
- package/dist/esm/components/alert/alert.style.d.ts +1 -1
- package/dist/esm/components/app/app.d.ts +1 -1
- package/dist/esm/components/app/appActionSheet.d.ts +1 -1
- package/dist/esm/components/app/appNotification.d.ts +1 -1
- package/dist/esm/components/app/theme.d.ts +1 -1
- package/dist/esm/components/avatar/avatar.d.ts +1 -1
- package/dist/esm/components/avatar/avatar.style.d.ts +1 -1
- package/dist/esm/components/avatar/avatarGroup.d.ts +1 -1
- package/dist/esm/components/badge/badge.d.ts +1 -1
- package/dist/esm/components/badge/badge.style.d.ts +1 -1
- package/dist/esm/components/bottomNavigation/bottomNavigation.d.ts +1 -1
- package/dist/esm/components/bottomNavigation/bottomNavigationItem.d.ts +1 -1
- package/dist/esm/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist/esm/components/button/button.d.ts +1 -1
- package/dist/esm/components/button/button.style.d.ts +1 -1
- package/dist/esm/components/cascade/cascade.d.ts +1 -1
- package/dist/esm/components/cascade/searchResult.d.ts +1 -1
- package/dist/esm/components/checkbox/checkbox.d.ts +1 -1
- package/dist/esm/components/checkboxBase/checkboxBase.d.ts +1 -1
- package/dist/esm/components/checkboxBaseGroup/checkboxBaseGroup.d.ts +1 -1
- package/dist/esm/components/clickAway/clickAway.d.ts +1 -1
- package/dist/esm/components/colorPicker/colorPicker.d.ts +1 -1
- package/dist/esm/components/counter/counter.d.ts +1 -1
- package/dist/esm/components/curd/curd.d.ts +1 -1
- package/dist/esm/components/curd/curdColumnConfig.d.ts +1 -1
- package/dist/esm/components/curd/curdResizable.d.ts +1 -1
- package/dist/esm/components/dataGrid/dataGrid.d.ts +1 -1
- package/dist/esm/components/dataGrid/dataGridHead.d.ts +1 -1
- package/dist/esm/components/dataGrid/dataGridRows.d.ts +1 -1
- package/dist/esm/components/dateTimePicker/calendar.d.ts +1 -1
- package/dist/esm/components/dateTimeRangePicker/dateTimeRangePicker.d.ts +1 -1
- package/dist/esm/components/descriptions/descriptionItem.d.ts +1 -1
- package/dist/esm/components/descriptions/descriptions.d.ts +1 -1
- package/dist/esm/components/divider/divider.d.ts +1 -1
- package/dist/esm/components/draggable/draggable.d.ts +1 -1
- package/dist/esm/components/drawer/drawer.d.ts +1 -1
- package/dist/esm/components/drawer/drawer.style.d.ts +1 -1
- package/dist/esm/components/flex/flex.js +19 -14
- package/dist/esm/components/form/form.d.ts +1 -1
- package/dist/esm/components/form/formItem.d.ts +1 -1
- package/dist/esm/components/formDialog/formDialog.d.ts +1 -1
- package/dist/esm/components/grid/grid.d.ts +2 -2
- package/dist/esm/components/grid/grid.js +2 -1
- package/dist/esm/components/grid/grid.style.d.ts +1 -1
- package/dist/esm/components/grid/gridItem.d.ts +1 -1
- package/dist/esm/components/grid/gridItem.js +2 -1
- package/dist/esm/components/image/image.d.ts +1 -1
- package/dist/esm/components/inputBase/inputBase.d.ts +1 -1
- package/dist/esm/components/loading/loading.d.ts +1 -1
- package/dist/esm/components/loadingIndicator/loadingIndicator.d.ts +1 -1
- package/dist/esm/components/menu/menu.d.ts +1 -1
- package/dist/esm/components/menuItem/menuItem.d.ts +1 -1
- package/dist/esm/components/optionsBase/optionsBase.d.ts +1 -1
- package/dist/esm/components/overlayBase/overlayBase.d.ts +1 -1
- package/dist/esm/components/pagination/counter.d.ts +1 -1
- package/dist/esm/components/pagination/jumper.d.ts +1 -1
- package/dist/esm/components/pagination/pager.d.ts +1 -1
- package/dist/esm/components/pagination/pagination.d.ts +1 -1
- package/dist/esm/components/pagination/sizer.d.ts +1 -1
- package/dist/esm/components/palette/colorValueInput.d.ts +1 -1
- package/dist/esm/components/palette/palette.d.ts +1 -1
- package/dist/esm/components/pickerDialog/pickerDialog.d.ts +1 -1
- package/dist/esm/components/placeholder/placeholder.d.ts +1 -1
- package/dist/esm/components/popper/popper.d.ts +1 -1
- package/dist/esm/components/progress/progress.d.ts +1 -1
- package/dist/esm/components/radio/radio.d.ts +1 -1
- package/dist/esm/components/rating/rating.d.ts +1 -1
- package/dist/esm/components/rating/rating.style.d.ts +1 -1
- package/dist/esm/components/resizable/resizable.d.ts +1 -1
- package/dist/esm/components/segmented/SegmentedOption.d.ts +1 -1
- package/dist/esm/components/segmented/segmented.d.ts +1 -1
- package/dist/esm/components/select/select.d.ts +1 -1
- package/dist/esm/components/selectedList/selectedList.d.ts +1 -1
- package/dist/esm/components/selectionContext/selectionContext.d.ts +1 -1
- package/dist/esm/components/selectionContext/selectionHook.d.ts +1 -1
- package/dist/esm/components/skeleton/skeleton.d.ts +1 -1
- package/dist/esm/components/slidableActions/slidableActions.d.ts +1 -1
- package/dist/esm/components/slidableActions/slidableActionsAction.d.ts +1 -1
- package/dist/esm/components/slider/slider.d.ts +1 -1
- package/dist/esm/components/slider/slider.style.d.ts +1 -1
- package/dist/esm/components/snackbarBase/snackbarBase.d.ts +1 -1
- package/dist/esm/components/status/status.d.ts +1 -1
- package/dist/esm/components/stepper/stepper.d.ts +1 -1
- package/dist/esm/components/switch/switch.d.ts +1 -1
- package/dist/esm/components/switch/switch.style.d.ts +1 -1
- package/dist/esm/components/table/table.d.ts +1 -1
- package/dist/esm/components/tabs/tab.d.ts +1 -1
- package/dist/esm/components/tabs/tabs.d.ts +1 -1
- package/dist/esm/components/tag/tag.d.ts +1 -1
- package/dist/esm/components/timeline/timeline.d.ts +1 -1
- package/dist/esm/components/timeline/timeline.style.d.ts +1 -1
- package/dist/esm/components/toggleButton/toggleButton.d.ts +1 -1
- package/dist/esm/components/tooltip/tooltip.d.ts +1 -1
- package/dist/esm/components/touchRipple/touchRipple.d.ts +1 -1
- package/dist/esm/components/touchRipple/touchRipple.style.d.ts +1 -1
- package/dist/esm/components/transfer/transfer.d.ts +1 -1
- package/dist/esm/components/transfer/transferPanel.d.ts +1 -1
- package/dist/esm/components/transportStyle/transportStyle.d.ts +1 -1
- package/dist/esm/components/tree/tree.d.ts +1 -1
- package/dist/esm/components/tree/treeNode.d.ts +1 -1
- package/dist/esm/components/treeSelect/treeSelect.d.ts +1 -1
- package/dist/esm/components/typography/typography.d.ts +1 -1
- package/dist/esm/components/upload/dropArea.d.ts +1 -1
- package/dist/esm/components/upload/upload.d.ts +1 -1
- package/dist/esm/components/waterfall/waterfall.d.ts +2 -2
- package/dist/esm/components/waterfall/waterfall.js +2 -1
- package/dist/esm/components/waterfall/waterfall.style.d.ts +1 -1
- package/dist/esm/extensions/curd/curd.d.ts +1 -1
- package/dist/esm/extensions/textFormatter/textFormatter.d.ts +1 -1
- package/dist/esm/utils/curd.d.ts +1 -1
- package/dist/esm/utils/dataGrid.d.ts +1 -1
- package/dist/esm/utils/dnd.d.ts +1 -1
- package/dist/esm/utils/form.d.ts +1 -1
- package/dist/esm/utils/hooks.d.ts +1 -1
- package/dist/esm/utils/style.d.ts +1 -1
- package/dist/esm/utils/tree.d.ts +1 -1
- package/dist/esm/utils/utils.d.ts +1 -1
- package/dist/types/index.d.ts +50 -0
- package/package.json +2 -2
- package/tscup.config.ts +2 -1
- package/types/index.d.ts +50 -0
- package/index.d.ts +0 -54
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { Button, ButtonProps } from '../button';
|
|
3
|
-
import { DIVProps, Obj } from '../../../
|
|
3
|
+
import { DIVProps, Obj } from '../../../types';
|
|
4
4
|
export interface BreadcrumbItemProps extends ButtonProps, Obj {
|
|
5
5
|
/** 对应button的prefix */
|
|
6
6
|
icon?: ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode, Ref } from 'react';
|
|
2
|
-
import { ColorPropsValue, Size } from '../../../
|
|
2
|
+
import { ColorPropsValue, Size } from '../../../types';
|
|
3
3
|
export interface ButtonProps extends Omit<JSX.IntrinsicElements['button'], 'ref' | 'prefix'> {
|
|
4
4
|
ref?: Ref<HTMLButtonElement>;
|
|
5
5
|
color?: ColorPropsValue;
|
|
@@ -4,7 +4,7 @@ import { InputBaseProps } from '../inputBase';
|
|
|
4
4
|
import { PopperProps, PopperRef } from '../popper';
|
|
5
5
|
import { SelectionContextProps } from '../selectionContext';
|
|
6
6
|
import { MenuOptionType, OptionsBaseSharedProps } from '../optionsBase';
|
|
7
|
-
import { Id } from '../../../
|
|
7
|
+
import { Id } from '../../../types';
|
|
8
8
|
export interface CascadeBaseProps<O extends MenuOptionType<V>, V extends Id = Id> extends Omit<OptionsBaseSharedProps<O>, 'filterPredicate'>, Omit<InputBaseProps<'input'>, 'children' | 'defaultValue' | 'value' | 'onChange'> {
|
|
9
9
|
/** cascade内部由<input />实现 */
|
|
10
10
|
inputProps?: JSX.IntrinsicElements['input'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { OptionType } from '../selectionContext';
|
|
3
|
-
import { Id } from '../../../
|
|
3
|
+
import { Id } from '../../../types';
|
|
4
4
|
type SearchResultProps<O extends OptionType<V>, V extends Id = Id> = {
|
|
5
5
|
primaryKey: keyof O;
|
|
6
6
|
labelKey: keyof O;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { CheckboxBaseProps } from '../checkboxBase';
|
|
3
3
|
import { CheckboxBaseGroupMultipleProps, ItemType } from '../checkboxBaseGroup';
|
|
4
|
-
import { Id } from '../../../
|
|
4
|
+
import { Id } from '../../../types';
|
|
5
5
|
export interface CheckboxProps extends Omit<CheckboxBaseProps, '_type'> {
|
|
6
6
|
}
|
|
7
7
|
export declare const Checkbox: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, Ref } from 'react';
|
|
2
|
-
import { ColorPropsValue, DIVProps, Id, Size } from '../../../
|
|
2
|
+
import { ColorPropsValue, DIVProps, Id, Size } from '../../../types';
|
|
3
3
|
export interface CheckboxBaseProps extends DIVProps {
|
|
4
4
|
inputProps?: JSX.IntrinsicElements['input'];
|
|
5
5
|
inputRef?: Ref<HTMLInputElement>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { FlexProps } from '../flex';
|
|
3
3
|
import { CheckboxBaseProps } from '../checkboxBase';
|
|
4
|
-
import { ColorPropsValue, Id, Obj, Size } from '../../../
|
|
4
|
+
import { ColorPropsValue, Id, Obj, Size } from '../../../types';
|
|
5
5
|
export interface ItemType extends Omit<CheckboxBaseProps, '_type'>, Obj {
|
|
6
6
|
}
|
|
7
7
|
export interface CheckboxBaseGroupCommonProps<I extends ItemType> extends Omit<FlexProps, 'defaultValue' | 'onChange'> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { DIVProps, DefineElement } from '../../../
|
|
2
|
+
import { DIVProps, DefineElement } from '../../../types';
|
|
3
3
|
export interface ClickAwayProps extends DIVProps {
|
|
4
4
|
container?: DefineElement<Element | Window>;
|
|
5
5
|
/** 传入addEventListener的事件类型,@default 'click' */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode, Ref } from 'react';
|
|
2
2
|
import { PopperProps, PopperRef } from '../popper';
|
|
3
|
-
import { ColorPropsValue, DIVProps, Size } from '../../../
|
|
3
|
+
import { ColorPropsValue, DIVProps, Size } from '../../../types';
|
|
4
4
|
import Color from 'color';
|
|
5
5
|
export interface ColorPickerProps extends Omit<DIVProps, 'defaultValue' | 'onChange'> {
|
|
6
6
|
inputProps?: JSX.IntrinsicElements['input'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactElement, ReactNode, Ref } from 'react';
|
|
2
|
-
import { DIVProps, Id, Obj } from '../../../
|
|
2
|
+
import { DIVProps, Id, Obj } from '../../../types';
|
|
3
3
|
import { ColumnType, DataGridBaseProps, DataGridMultipleProps, DataGridSingleProps, OrderType, RowType } from '../dataGrid';
|
|
4
4
|
import { FormItemProps, FormProps, FormRef, FormValue } from '../form';
|
|
5
5
|
import { CurdFilter, CurdFilterProps } from './curdFilter';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Dispatch, ReactElement, SetStateAction } from 'react';
|
|
2
2
|
import { CurdColumn } from './curd';
|
|
3
3
|
import { RowType } from '../dataGrid';
|
|
4
|
-
import { Id } from '../../../
|
|
4
|
+
import { Id } from '../../../types';
|
|
5
5
|
type CurdColumnConfigProps<R extends RowType> = {
|
|
6
6
|
columns?: CurdColumn<R>[];
|
|
7
7
|
innerVisible: Id[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
import { Size } from '../../../
|
|
2
|
+
import { Size } from '../../../types';
|
|
3
3
|
export declare const CurdResizable: import("react").MemoExoticComponent<({ innerSize, setInnerSize }: {
|
|
4
4
|
innerSize: Size;
|
|
5
5
|
setInnerSize: Dispatch<SetStateAction<Size>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { DIVProps, Id, Obj } from '../../../
|
|
2
|
+
import { DIVProps, Id, Obj } from '../../../types';
|
|
3
3
|
import { FieldPath } from '../../utils';
|
|
4
4
|
import { TableProps } from '../table';
|
|
5
5
|
import { PaginationProps } from '../pagination';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { DataGridProps, OrderType } from './dataGrid';
|
|
3
|
-
import { Id, Obj } from '../../../
|
|
3
|
+
import { Id, Obj } from '../../../types';
|
|
4
4
|
interface DataGridHeadProps<R extends Obj, V extends Id = Id> extends Pick<DataGridProps<R, V>, 'columns' | 'onOrderChange' | 'allowSelectAll' | 'multiple' | 'primaryKey' | 'rows'> {
|
|
5
5
|
orderColumn?: Id;
|
|
6
6
|
orderType?: OrderType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { DataGridProps } from './dataGrid';
|
|
3
|
-
import { Id, Obj } from '../../../
|
|
3
|
+
import { Id, Obj } from '../../../types';
|
|
4
4
|
interface DataGridRowsProps<R extends Obj, V extends Id = Id> extends Pick<DataGridProps<R, V>, 'rows'> {
|
|
5
5
|
/** @private 内部使用,用于缩进子行 */
|
|
6
6
|
_level?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ColorPropsValue, DIVProps, Size } from '../../../
|
|
2
|
+
import { ColorPropsValue, DIVProps, Size } from '../../../types';
|
|
3
3
|
import { DatePickerSharedProps, DateTimePickerProps } from '../dateTimePicker';
|
|
4
4
|
import { Dayjs } from 'dayjs';
|
|
5
5
|
type DateValueType = [Dayjs | null, Dayjs | null] | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { DescriptionsSharedProps } from './descriptions';
|
|
3
3
|
import { GridItemProps } from '../grid';
|
|
4
|
-
import { ResponsiveProp } from '../../../
|
|
4
|
+
import { ResponsiveProp } from '../../../types';
|
|
5
5
|
interface DescriptionItemBaseProps extends DescriptionsSharedProps {
|
|
6
6
|
label?: ReactNode;
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { Obj, ResponsiveProp, Size } from '../../../
|
|
2
|
+
import { Obj, ResponsiveProp, Size } from '../../../types';
|
|
3
3
|
import { GridProps } from '../grid';
|
|
4
4
|
import { DescriptionItem, DescriptionItemProps } from './descriptionItem';
|
|
5
5
|
export type DescriptionsSharedProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { DraggableOptions, HandleProps } from '../../utils';
|
|
3
|
-
import { DefineElement } from '../../../
|
|
3
|
+
import { DefineElement } from '../../../types';
|
|
4
4
|
export type DraggableTargetProps = {
|
|
5
5
|
style: {
|
|
6
6
|
translate: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { OverlayBaseProps } from '../overlayBase';
|
|
3
|
-
import { ResponsiveProp } from '../../../
|
|
3
|
+
import { ResponsiveProp } from '../../../types';
|
|
4
4
|
import { TransitionBaseProps } from '../transitionBase';
|
|
5
5
|
export interface DrawerProps extends Omit<OverlayBaseProps, 'title'> {
|
|
6
6
|
title?: ReactNode;
|
|
@@ -2,23 +2,28 @@ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
|
2
2
|
import { Children, cloneElement, forwardRef, isValidElement } from 'react';
|
|
3
3
|
import { classes } from './flex.style';
|
|
4
4
|
import { classnames } from '../../utils';
|
|
5
|
+
import { TransportStyle } from '../transportStyle';
|
|
5
6
|
export const Flex = forwardRef(({ inline, direction = 'row', wrap, gap = 0, columnGap, rowGap, compact, ...props }, ref) => {
|
|
6
|
-
const
|
|
7
|
-
|
|
7
|
+
const renderChildren = () => {
|
|
8
|
+
if (compact) {
|
|
9
|
+
return props.children;
|
|
10
|
+
}
|
|
11
|
+
const childrenCount = Children.count(props.children);
|
|
12
|
+
return Children.map(props.children, (child, index) => {
|
|
13
|
+
if (!isValidElement(child)) {
|
|
14
|
+
return child;
|
|
15
|
+
}
|
|
16
|
+
return cloneElement(child, {
|
|
17
|
+
...index === 0 && { 'data-first': true },
|
|
18
|
+
...index === childrenCount - 1 && { 'data-last': true },
|
|
19
|
+
...{ 'data-compact': direction.split('-')[0] }
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
return (_jsx(TransportStyle, { ...props, ref: ref, className: classnames(classes.root, props.className), style: {
|
|
8
24
|
display: inline ? 'inline-flex' : 'flex',
|
|
9
25
|
flexDirection: direction,
|
|
10
26
|
flexWrap: wrap, gap, columnGap, rowGap,
|
|
11
27
|
...props.style
|
|
12
|
-
}, children:
|
|
13
|
-
? Children.map(props.children, (child, index) => {
|
|
14
|
-
if (!isValidElement(child)) {
|
|
15
|
-
return child;
|
|
16
|
-
}
|
|
17
|
-
return cloneElement(child, {
|
|
18
|
-
...index === 0 && { 'data-first': true },
|
|
19
|
-
...index === childrenCount - 1 && { 'data-last': true },
|
|
20
|
-
...{ 'data-compact': direction.split('-')[0] }
|
|
21
|
-
});
|
|
22
|
-
})
|
|
23
|
-
: props.children }));
|
|
28
|
+
}, children: renderChildren() }));
|
|
24
29
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dispatch, ReactElement, ReactNode, Ref, RefObject, SetStateAction } from 'react';
|
|
2
|
-
import { Obj, ResponsiveProp } from '../../../
|
|
2
|
+
import { Obj, ResponsiveProp } from '../../../types';
|
|
3
3
|
import { FieldPath } from '../../utils';
|
|
4
4
|
import { FieldError, FormItem, FormItemProps, FormItemRef } from './formItem';
|
|
5
5
|
import { FormRelatable } from './formRelatable';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { FormRef, FormSharedProps, FormValue } from './form';
|
|
3
|
-
import { ColorPropsValue, Size } from '../../../
|
|
3
|
+
import { ColorPropsValue, Size } from '../../../types';
|
|
4
4
|
import { FieldPath } from '../../utils';
|
|
5
5
|
import { DescriptionItemProps, DescriptionsSharedProps } from '../descriptions';
|
|
6
6
|
export type FormItemRules<I> = {
|
|
@@ -2,7 +2,7 @@ import { ReactElement, ReactNode, Ref } from 'react';
|
|
|
2
2
|
import { DialogProps } from '../dialog';
|
|
3
3
|
import { FormProps, FormRef, FormValue } from '../form/form';
|
|
4
4
|
import { FormItemProps } from '../form/formItem';
|
|
5
|
-
import { Obj } from '../../../
|
|
5
|
+
import { Obj } from '../../../types';
|
|
6
6
|
interface FormDialogItemProps<I = any> extends Omit<FormItemProps<I>, 'key'>, Obj {
|
|
7
7
|
key?: string | number;
|
|
8
8
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { ResponsiveProp } from '../../../
|
|
2
|
+
import { ResponsiveProp } from '../../../types';
|
|
3
3
|
import { GridItem } from './gridItem';
|
|
4
4
|
import { TransportStyleProps } from '../transportStyle';
|
|
5
5
|
export interface GridProps extends TransportStyleProps {
|
|
6
6
|
inline?: boolean;
|
|
7
|
-
/** 网格列数,@default
|
|
7
|
+
/** 网格列数,@default xs: 12 */
|
|
8
8
|
columnCount?: ResponsiveProp;
|
|
9
9
|
gap?: ResponsiveProp;
|
|
10
10
|
columnGap?: ResponsiveProp;
|
|
@@ -3,12 +3,13 @@ import { forwardRef } from 'react';
|
|
|
3
3
|
import { classes, containerStyle } from './grid.style';
|
|
4
4
|
import { GridItem } from './gridItem';
|
|
5
5
|
import { classnames, responsiveValue } from '../../utils';
|
|
6
|
+
import { TransportStyle } from '../transportStyle';
|
|
6
7
|
export const Grid = forwardRef(({ inline, columnCount = { xs: 12 }, gap = { xs: 0 }, columnGap, rowGap, ...props }, ref) => {
|
|
7
8
|
columnCount = responsiveValue(columnCount);
|
|
8
9
|
gap = responsiveValue(gap);
|
|
9
10
|
columnGap = responsiveValue(columnGap) ?? gap;
|
|
10
11
|
rowGap = responsiveValue(rowGap) ?? gap;
|
|
11
|
-
return (_jsx(
|
|
12
|
+
return (_jsx(TransportStyle, { ...props, ref: ref, css: containerStyle({ columnCount, columnGap, rowGap }), className: classnames(classes.root, props.className), style: {
|
|
12
13
|
display: inline ? 'inline-flex' : 'flex',
|
|
13
14
|
...props.style
|
|
14
15
|
} }));
|
|
@@ -2,8 +2,9 @@ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { classnames, responsiveValue } from '../../utils';
|
|
4
4
|
import { classes, itemStyle } from './grid.style';
|
|
5
|
+
import { TransportStyle } from '../transportStyle';
|
|
5
6
|
export const GridItem = forwardRef(({ span = { xs: 1 }, offset = { xs: 0 }, ...props }, ref) => {
|
|
6
7
|
span = responsiveValue(span);
|
|
7
8
|
offset = responsiveValue(offset);
|
|
8
|
-
return (_jsx(
|
|
9
|
+
return (_jsx(TransportStyle, { ...props, ref: ref, css: itemStyle({ span, offset }), className: classnames(classes.item, props.className) }));
|
|
9
10
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactElement, ReactNode, Ref } from 'react';
|
|
2
|
-
import { ColorPropsValue, DIVProps, Size } from '../../../
|
|
2
|
+
import { ColorPropsValue, DIVProps, Size } from '../../../types';
|
|
3
3
|
export interface InputBaseProps<T extends 'input' | 'textarea'> extends Omit<DIVProps, 'prefix' | 'onChange' | 'children'> {
|
|
4
4
|
variant?: 'outlined' | 'underlined' | 'plain';
|
|
5
5
|
size?: Size;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ColorPropsValue, DIVProps } from '../../../
|
|
2
|
+
import { ColorPropsValue, DIVProps } from '../../../types';
|
|
3
3
|
import { LoadingIndicatorProps } from '../loadingIndicator';
|
|
4
4
|
import { ProgressProps } from '../progress';
|
|
5
5
|
export interface LoadingProps extends DIVProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ColorPropsValue, DIVProps, Size } from '../../../
|
|
2
|
+
import { ColorPropsValue, DIVProps, Size } from '../../../types';
|
|
3
3
|
import { CheckboxProps } from '../checkbox';
|
|
4
4
|
export interface MenuItemProps extends Omit<DIVProps, 'prefix'> {
|
|
5
5
|
value?: string | number;
|
|
@@ -2,7 +2,7 @@ import { ReactElement, ReactNode } from 'react';
|
|
|
2
2
|
import { MenuItemProps } from '../menuItem';
|
|
3
3
|
import { LoadingProps } from '../loading';
|
|
4
4
|
import { OptionType } from '../selectionContext';
|
|
5
|
-
import { Id } from '../../../
|
|
5
|
+
import { Id } from '../../../types';
|
|
6
6
|
export interface MenuOptionType<V extends Id = Id> extends Omit<MenuItemProps, 'children'>, Omit<OptionType<V>, 'children'> {
|
|
7
7
|
}
|
|
8
8
|
export type OptionsBaseSharedProps<O extends MenuOptionType<V>, V extends Id = Id> = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DIVProps } from '../../../
|
|
1
|
+
import { DIVProps } from '../../../types';
|
|
2
2
|
export interface PaginationCounterProps extends DIVProps {
|
|
3
3
|
}
|
|
4
4
|
export declare const PaginationCounter: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<PaginationCounterProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DIVProps } from '../../../
|
|
1
|
+
import { DIVProps } from '../../../types';
|
|
2
2
|
export interface PaginationPagerProps extends DIVProps {
|
|
3
3
|
}
|
|
4
4
|
export declare const PaginationPager: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<PaginationPagerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { DIVProps, Size } from '../../../
|
|
2
|
+
import { DIVProps, Size } from '../../../types';
|
|
3
3
|
import { PaginationPager } from './pager';
|
|
4
4
|
import { PaginationSizer } from './sizer';
|
|
5
5
|
import { PaginationJumper } from './jumper';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SelectSingleProps } from '../select';
|
|
2
2
|
import { MenuOptionType } from '../optionsBase';
|
|
3
|
-
import { Id } from '../../../
|
|
3
|
+
import { Id } from '../../../types';
|
|
4
4
|
export type PaginationSizerProps<O extends MenuOptionType, V extends Id = Id> = SelectSingleProps<O, V>;
|
|
5
5
|
export declare const PaginationSizer: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<PaginationSizerProps<MenuOptionType<Id>, Id>, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { FixInputNumberParam } from '../../utils';
|
|
3
|
-
import { DIVProps } from '../../../
|
|
3
|
+
import { DIVProps } from '../../../types';
|
|
4
4
|
interface ColorValueInputProps extends Omit<DIVProps, 'onChange'>, FixInputNumberParam {
|
|
5
5
|
value: string | number;
|
|
6
6
|
label: ReactNode;
|
|
@@ -2,7 +2,7 @@ import { ReactElement, ReactNode, Ref } from 'react';
|
|
|
2
2
|
import { DialogProps } from '../dialog';
|
|
3
3
|
import { OptionType, SelectionContextBaseProps } from '../selectionContext';
|
|
4
4
|
import { SelectedListProps } from '../selectedList';
|
|
5
|
-
import { Id } from '../../../
|
|
5
|
+
import { Id } from '../../../types';
|
|
6
6
|
export interface PickerDialogProps<O extends OptionType<V>, V extends Id = Id> extends Omit<DialogProps, 'ref' | 'children' | 'onConfirm'>, Omit<SelectionContextBaseProps<O, V>, 'children'> {
|
|
7
7
|
ref?: Ref<PickerDialogRef<V>>;
|
|
8
8
|
/** 默认的ref已被PickerDialogRef取代,需要dialogRef指向dialog元素 */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactElement, ReactNode, Ref } from 'react';
|
|
2
|
-
import { DIVProps, DefineElement, Placement } from '../../../
|
|
2
|
+
import { DIVProps, DefineElement, Placement } from '../../../types';
|
|
3
3
|
export type Trigger = 'click' | 'hover' | 'focus' | 'enter' | 'contextMenu';
|
|
4
4
|
export interface PopperProps extends Omit<DIVProps, 'content' | 'children'> {
|
|
5
5
|
popperRef?: Ref<PopperRef | null>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { CheckboxBaseProps } from '../checkboxBase';
|
|
3
3
|
import { CheckboxBaseGroupSingleProps, ItemType } from '../checkboxBaseGroup';
|
|
4
|
-
import { Id } from '../../../
|
|
4
|
+
import { Id } from '../../../types';
|
|
5
5
|
export interface RadioProps extends Omit<CheckboxBaseProps, '_type' | 'indeterminate'> {
|
|
6
6
|
}
|
|
7
7
|
export declare const Radio: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColorPropsValue, DIVProps, Placement } from '../../../
|
|
1
|
+
import { ColorPropsValue, DIVProps, Placement } from '../../../types';
|
|
2
2
|
import { DraggableOptions } from '../../utils';
|
|
3
3
|
export type Handle = Placement | 't' | 'r' | 'b' | 'l' | 'tl' | 'tr' | 'br' | 'bl' | 'lt' | 'rt' | 'lb' | 'rb';
|
|
4
4
|
export interface ResizableProps extends Omit<DIVProps, 'onResize'> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { DIVProps, Id } from '../../../
|
|
2
|
+
import { DIVProps, Id } from '../../../types';
|
|
3
3
|
export interface SegmentedOptionProps extends Omit<DIVProps, 'prefix'> {
|
|
4
4
|
orientation?: 'horizontal' | 'vertical';
|
|
5
5
|
prefix?: ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { DIVProps, Id, Obj, Size } from '../../../
|
|
2
|
+
import { DIVProps, Id, Obj, Size } from '../../../types';
|
|
3
3
|
import { SegmentedOption, SegmentedOptionProps } from './SegmentedOption';
|
|
4
4
|
export type SegmentedOption = SegmentedOptionProps & Obj;
|
|
5
5
|
export interface SegmentedProps<O extends SegmentedOption> extends Omit<DIVProps, 'defaultValue' | 'onChange'> {
|
|
@@ -4,7 +4,7 @@ import { PopperProps, PopperRef } from '../popper';
|
|
|
4
4
|
import { MenuItem } from '../menuItem';
|
|
5
5
|
import { MenuOptionType, OptionsBaseSharedProps } from '../optionsBase';
|
|
6
6
|
import { InputProps } from '../input';
|
|
7
|
-
import { Id } from '../../../
|
|
7
|
+
import { Id } from '../../../types';
|
|
8
8
|
export interface SelectBaseProps<O extends MenuOptionType> extends OptionsBaseSharedProps<O>, Omit<InputBaseProps<'input'>, 'children' | 'defaultValue' | 'value' | 'onChange'> {
|
|
9
9
|
/** <select />内部由<input />实现 */
|
|
10
10
|
inputProps?: JSX.IntrinsicElements['input'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dispatch, MutableRefObject, ReactNode, SetStateAction } from 'react';
|
|
2
|
-
import { Id, Obj } from '../../../
|
|
2
|
+
import { Id, Obj } from '../../../types';
|
|
3
3
|
export interface OptionType<V extends Id = Id> extends Obj {
|
|
4
4
|
children?: OptionType<V>[];
|
|
5
5
|
_parentId?: V;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OptionType, SelectionContextProps } from './selectionContext';
|
|
2
|
-
import { Id } from '../../../
|
|
2
|
+
import { Id } from '../../../types';
|
|
3
3
|
export declare function useTreeSelect<O extends OptionType<V>, V extends Id = Id>({ ...props }: Omit<SelectionContextProps<O, V>, 'children'>): {
|
|
4
4
|
innerValue: import("react").MutableRefObject<V | V[] | undefined>;
|
|
5
5
|
setInnerValue: import("react").Dispatch<import("react").SetStateAction<V | V[] | undefined>>;
|