@pisell/materials 6.12.1 → 6.12.2
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/PisellCards/components/GraphicTextCard/GraphicTextCard.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +14 -14
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -1
- package/es/components/drag-sort-tree/index.d.ts +0 -1
- package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/pisellDatePicker/datePickerCpt.d.ts +0 -1
- package/es/components/pisellInformationEntry/Scan/index.d.ts +0 -1
- package/es/components/pisellInput/components/BankCard/index.d.ts +0 -1
- package/es/components/pisellInput/components/SecurityCode/index.d.ts +0 -1
- package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.js +8 -1
- package/es/components/pisellSort/index.d.ts +0 -1
- package/es/components/pisellTooltip/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +2 -2
- package/es/components/productCard/components/Packages/utils.d.ts +2 -2
- package/es/components/productCard/lineItem/BookingLineItem.d.ts +1 -0
- package/es/components/productCard/lineItem/components/Holders/index.d.ts +1 -0
- package/es/components/productCard/lineItem/index.d.ts +1 -0
- package/es/components/table/Actions/component/ColumnsSetting/index.d.ts +0 -1
- package/es/components/table/Actions/component/Group/PopoverContent.d.ts +0 -1
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/fields/image/index.d.ts +0 -1
- package/es/components/table/Table/fields/index.d.ts +2 -2
- package/es/components/table/Table/fields/pSwitch/index.d.ts +0 -1
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/hooks/useResponsive.d.ts +1 -1
- package/es/utils/index.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/PisellCards/components/GraphicTextCard/GraphicTextCard.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +14 -14
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -1
- package/lib/components/drag-sort-tree/index.d.ts +0 -1
- package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/pisellDatePicker/datePickerCpt.d.ts +0 -1
- package/lib/components/pisellInformationEntry/Scan/index.d.ts +0 -1
- package/lib/components/pisellInput/components/BankCard/index.d.ts +0 -1
- package/lib/components/pisellInput/components/SecurityCode/index.d.ts +0 -1
- package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.js +2 -1
- package/lib/components/pisellSort/index.d.ts +0 -1
- package/lib/components/pisellTooltip/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +2 -2
- package/lib/components/productCard/components/Packages/utils.d.ts +2 -2
- package/lib/components/productCard/lineItem/BookingLineItem.d.ts +1 -0
- package/lib/components/productCard/lineItem/components/Holders/index.d.ts +1 -0
- package/lib/components/productCard/lineItem/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ColumnsSetting/index.d.ts +0 -1
- package/lib/components/table/Actions/component/Group/PopoverContent.d.ts +0 -1
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/image/index.d.ts +0 -1
- package/lib/components/table/Table/fields/index.d.ts +2 -2
- package/lib/components/table/Table/fields/pSwitch/index.d.ts +0 -1
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/hooks/useResponsive.d.ts +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -1
- package/package.json +1 -1
- package/es/components/PisellCards/components/MultilevelCard/components/PanelWrapper.d.ts +0 -7
- package/es/components/PisellScrollView/PisellScrollView.d.ts +0 -5
- package/es/components/PisellScrollView/components/Actions/index.d.ts +0 -18
- package/es/components/PisellScrollView/hooks/useScrollState.d.ts +0 -13
- package/es/components/PisellScrollView/types.d.ts +0 -203
- package/es/components/PisellSteps/PisellSteps.d.ts +0 -14
- package/es/components/PisellSuperTabs/PisellSuperTabs.d.ts +0 -8
- package/es/components/PisellSuperTabs/hooks/useTabsState.d.ts +0 -7
- package/es/components/PisellSuperTabs/types.d.ts +0 -212
- package/es/components/PisellTabbar/constants.d.ts +0 -47
- package/es/components/PisellTabbar/hooks/useActiveKey.d.ts +0 -55
- package/es/components/PisellTabbar/hooks/useExpand.d.ts +0 -42
- package/es/components/PisellTabbar/template/Template1/constants.d.ts +0 -10
- package/es/components/PisellTabbar/types.d.ts +0 -92
- package/es/components/PisellTabbar/utils/index.d.ts +0 -69
- package/es/components/SafeAreaTop/index.d.ts +0 -5
- package/es/components/SafeAreaTop/types.d.ts +0 -9
- package/es/components/buttonGroupPreview/index.d.ts +0 -19
- package/es/components/cardPro/index.d.ts +0 -4
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -26
- package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +0 -5
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +0 -22
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -15
- package/es/components/filter/components/Dropdown/types.d.ts +0 -15
- package/es/components/filter/components/FilterButton/types.d.ts +0 -29
- package/es/components/filter/types.d.ts +0 -52
- package/es/components/keyboard/index.d.ts +0 -22
- package/es/components/pisell-config-provider/context.d.ts +0 -22
- package/es/components/pisell-config-provider/index.d.ts +0 -13
- package/es/components/pisellAdjustPrice/type.d.ts +0 -22
- package/es/components/pisellFloorMapLayout/components/FloorMapEditQuickActions.d.ts +0 -23
- package/es/components/pisellFloorMapLayout/components/HistoryIcons.d.ts +0 -39
- package/es/components/pisellFloorMapLayout/floorMapLayoutConstants.d.ts +0 -35
- package/es/components/pisellFloorMapLayout/hooks/floorMapViewportPersistence.d.ts +0 -25
- package/es/components/pisellFloorMapLayout/hooks/useDraftConfigHistory.d.ts +0 -18
- package/es/components/pisellFloorMapLayout/locales-ja.d.ts +0 -184
- package/es/components/pisellFloorMapLayout/locales-pt.d.ts +0 -184
- package/es/components/pisellFloorMapLayout/locales.d.ts +0 -969
- package/es/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanTypes.d.ts +0 -80
- package/es/components/pisellFloorMapLayout/utils/alignSnap.d.ts +0 -64
- package/es/components/pisellFloorMapLayout/utils/floorMapBuiltinShapes.d.ts +0 -59
- package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +0 -33
- package/es/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.d.ts +0 -50
- package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +0 -27
- package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +0 -109
- package/es/components/pisellLookup/PisellLookup.d.ts +0 -4
- package/es/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
- package/es/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/es/components/pisellLookup/components/SearchHistory.d.ts +0 -7
- package/es/components/pisellLookup/types.d.ts +0 -761
- package/es/components/pisellMobileDateRangePicker/PisellMobileDateRangePicker.d.ts +0 -8
- package/es/components/pisellMobileDateRangePicker/index.d.ts +0 -2
- package/es/components/pisellMobileDateRangePicker/types.d.ts +0 -28
- package/es/components/pisellRecordBoard/shellFrame/Calendar/calendarI18n.d.ts +0 -4
- package/es/components/pisellRecordBoard/shellFrame/Calendar/calendarPersistGuard.d.ts +0 -18
- package/es/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.d.ts +0 -102
- package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarAxis.d.ts +0 -32
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/NoteTicker.d.ts +0 -14
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallViewportToolbar.d.ts +0 -18
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/resourceWallConstants.d.ts +0 -2
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarConstants.d.ts +0 -8
- package/es/components/pisellReservationSchedule/locales.d.ts +0 -43
- package/es/components/pisellReservationSchedule/types.d.ts +0 -52
- package/es/components/pisellReservationScheduleBand/types.d.ts +0 -68
- package/es/components/pisellReservationScheduleBand/utils/formatScheduleAtLabel.d.ts +0 -9
- package/es/components/pisellShellFrame/PisellShellFrame.d.ts +0 -13
- package/es/components/pisellShellFrame/types.d.ts +0 -62
- package/es/components/pisellTimeNavigator/components/CursorLayer.d.ts +0 -29
- package/es/components/pisellTimeNavigator/components/GestureLayer.d.ts +0 -41
- package/es/components/pisellTimeNavigator/components/ScaleLayer.d.ts +0 -40
- package/es/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +0 -37
- package/es/components/pisellTimeNavigator/timeNavigatorConstants.d.ts +0 -20
- package/es/components/pisellTimeNavigator/types.d.ts +0 -175
- package/es/components/pisellTimeNavigator/utils/index.d.ts +0 -79
- package/es/components/pisellTimeRangeDisplay/types.d.ts +0 -145
- package/es/components/pisellToast/squareToast/index.d.ts +0 -15
- package/es/components/pisellToast/squareToast/methods.d.ts +0 -13
- package/es/components/pisellToast/squareToast/renderImperatively.d.ts +0 -28
- package/es/components/pisellToast/squareToast/toast.d.ts +0 -25
- package/es/components/productCard/cartSkuCard/components/Gift/types.d.ts +0 -29
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/es/components/productCard/cartSkuCard/components/Promotion/index.d.ts +0 -7
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
- package/es/components/productCard/cartSkuCard/locales.d.ts +0 -203
- package/es/components/productCard/components/Action/index.d.ts +0 -4
- package/es/components/productCard/lineItem/components/Resources/index.d.ts +0 -7
- package/es/components/productCard/lineItem/locales.d.ts +0 -38
- package/es/components/productCard/lineItem/types.d.ts +0 -13
- package/es/components/productCard/locales.d.ts +0 -138
- package/es/components/productCard/status.d.ts +0 -32
- package/es/components/productCard/types.d.ts +0 -96
- package/es/components/select/index.d.ts +0 -9
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
- package/es/components/virtual-keyboard/Number/types.d.ts +0 -26
- package/es/locales/en-US.d.ts +0 -566
- package/es/locales/ja.d.ts +0 -534
- package/es/locales/pt.d.ts +0 -534
- package/es/locales/zh-CN.d.ts +0 -561
- package/es/locales/zh-TW.d.ts +0 -561
- package/lib/components/PisellCards/components/MultilevelCard/components/PanelWrapper.d.ts +0 -7
- package/lib/components/PisellScrollView/PisellScrollView.d.ts +0 -5
- package/lib/components/PisellScrollView/components/Actions/index.d.ts +0 -18
- package/lib/components/PisellScrollView/hooks/useScrollState.d.ts +0 -13
- package/lib/components/PisellScrollView/types.d.ts +0 -203
- package/lib/components/PisellSteps/PisellSteps.d.ts +0 -14
- package/lib/components/PisellSuperTabs/PisellSuperTabs.d.ts +0 -8
- package/lib/components/PisellSuperTabs/hooks/useTabsState.d.ts +0 -7
- package/lib/components/PisellSuperTabs/types.d.ts +0 -212
- package/lib/components/PisellTabbar/constants.d.ts +0 -47
- package/lib/components/PisellTabbar/hooks/useActiveKey.d.ts +0 -55
- package/lib/components/PisellTabbar/hooks/useExpand.d.ts +0 -42
- package/lib/components/PisellTabbar/template/Template1/constants.d.ts +0 -10
- package/lib/components/PisellTabbar/types.d.ts +0 -92
- package/lib/components/PisellTabbar/utils/index.d.ts +0 -69
- package/lib/components/SafeAreaTop/index.d.ts +0 -5
- package/lib/components/SafeAreaTop/types.d.ts +0 -9
- package/lib/components/buttonGroupPreview/index.d.ts +0 -19
- package/lib/components/cardPro/index.d.ts +0 -4
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -26
- package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +0 -5
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +0 -22
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -15
- package/lib/components/filter/components/Dropdown/types.d.ts +0 -15
- package/lib/components/filter/components/FilterButton/types.d.ts +0 -29
- package/lib/components/filter/types.d.ts +0 -52
- package/lib/components/keyboard/index.d.ts +0 -22
- package/lib/components/pisell-config-provider/context.d.ts +0 -22
- package/lib/components/pisell-config-provider/index.d.ts +0 -13
- package/lib/components/pisellAdjustPrice/type.d.ts +0 -22
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditQuickActions.d.ts +0 -23
- package/lib/components/pisellFloorMapLayout/components/HistoryIcons.d.ts +0 -39
- package/lib/components/pisellFloorMapLayout/floorMapLayoutConstants.d.ts +0 -35
- package/lib/components/pisellFloorMapLayout/hooks/floorMapViewportPersistence.d.ts +0 -25
- package/lib/components/pisellFloorMapLayout/hooks/useDraftConfigHistory.d.ts +0 -18
- package/lib/components/pisellFloorMapLayout/locales-ja.d.ts +0 -184
- package/lib/components/pisellFloorMapLayout/locales-pt.d.ts +0 -184
- package/lib/components/pisellFloorMapLayout/locales.d.ts +0 -969
- package/lib/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanTypes.d.ts +0 -80
- package/lib/components/pisellFloorMapLayout/utils/alignSnap.d.ts +0 -64
- package/lib/components/pisellFloorMapLayout/utils/floorMapBuiltinShapes.d.ts +0 -59
- package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +0 -33
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.d.ts +0 -50
- package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +0 -27
- package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +0 -109
- package/lib/components/pisellLookup/PisellLookup.d.ts +0 -4
- package/lib/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
- package/lib/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/lib/components/pisellLookup/components/SearchHistory.d.ts +0 -7
- package/lib/components/pisellLookup/types.d.ts +0 -761
- package/lib/components/pisellMobileDateRangePicker/PisellMobileDateRangePicker.d.ts +0 -8
- package/lib/components/pisellMobileDateRangePicker/index.d.ts +0 -2
- package/lib/components/pisellMobileDateRangePicker/types.d.ts +0 -28
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/calendarI18n.d.ts +0 -4
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/calendarPersistGuard.d.ts +0 -18
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.d.ts +0 -102
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarAxis.d.ts +0 -32
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/NoteTicker.d.ts +0 -14
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallViewportToolbar.d.ts +0 -18
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/resourceWallConstants.d.ts +0 -2
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarConstants.d.ts +0 -8
- package/lib/components/pisellReservationSchedule/locales.d.ts +0 -43
- package/lib/components/pisellReservationSchedule/types.d.ts +0 -52
- package/lib/components/pisellReservationScheduleBand/types.d.ts +0 -68
- package/lib/components/pisellReservationScheduleBand/utils/formatScheduleAtLabel.d.ts +0 -9
- package/lib/components/pisellShellFrame/PisellShellFrame.d.ts +0 -13
- package/lib/components/pisellShellFrame/types.d.ts +0 -62
- package/lib/components/pisellTimeNavigator/components/CursorLayer.d.ts +0 -29
- package/lib/components/pisellTimeNavigator/components/GestureLayer.d.ts +0 -41
- package/lib/components/pisellTimeNavigator/components/ScaleLayer.d.ts +0 -40
- package/lib/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +0 -37
- package/lib/components/pisellTimeNavigator/timeNavigatorConstants.d.ts +0 -20
- package/lib/components/pisellTimeNavigator/types.d.ts +0 -175
- package/lib/components/pisellTimeNavigator/utils/index.d.ts +0 -79
- package/lib/components/pisellTimeRangeDisplay/types.d.ts +0 -145
- package/lib/components/pisellToast/squareToast/index.d.ts +0 -15
- package/lib/components/pisellToast/squareToast/methods.d.ts +0 -13
- package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +0 -28
- package/lib/components/pisellToast/squareToast/toast.d.ts +0 -25
- package/lib/components/productCard/cartSkuCard/components/Gift/types.d.ts +0 -29
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/lib/components/productCard/cartSkuCard/components/Promotion/index.d.ts +0 -7
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
- package/lib/components/productCard/cartSkuCard/locales.d.ts +0 -203
- package/lib/components/productCard/components/Action/index.d.ts +0 -4
- package/lib/components/productCard/lineItem/components/Resources/index.d.ts +0 -7
- package/lib/components/productCard/lineItem/locales.d.ts +0 -38
- package/lib/components/productCard/lineItem/types.d.ts +0 -13
- package/lib/components/productCard/locales.d.ts +0 -138
- package/lib/components/productCard/status.d.ts +0 -32
- package/lib/components/productCard/types.d.ts +0 -96
- package/lib/components/select/index.d.ts +0 -9
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
- package/lib/components/virtual-keyboard/Number/types.d.ts +0 -26
- package/lib/locales/en-US.d.ts +0 -566
- package/lib/locales/ja.d.ts +0 -534
- package/lib/locales/pt.d.ts +0 -534
- package/lib/locales/zh-CN.d.ts +0 -561
- package/lib/locales/zh-TW.d.ts +0 -561
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode, CSSProperties } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* 滚动位置配置
|
|
4
|
-
*/
|
|
5
|
-
export interface ScrollPosition {
|
|
6
|
-
/** 竖向滚动位置(像素) */
|
|
7
|
-
scrollTop?: number;
|
|
8
|
-
/** 横向滚动位置(像素) */
|
|
9
|
-
scrollLeft?: number;
|
|
10
|
-
/** 滚动行为 */
|
|
11
|
-
behavior?: 'auto' | 'smooth';
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* 滚动到元素配置
|
|
15
|
-
*/
|
|
16
|
-
export interface ScrollToElementConfig {
|
|
17
|
-
/** 目标元素 ID */
|
|
18
|
-
targetId: string;
|
|
19
|
-
/** 对齐方式 */
|
|
20
|
-
align?: 'start' | 'center' | 'end' | 'nearest';
|
|
21
|
-
/** 滚动行为 */
|
|
22
|
-
behavior?: 'auto' | 'smooth';
|
|
23
|
-
/** 偏移量 */
|
|
24
|
-
offset?: number;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* 滚动百分比配置
|
|
28
|
-
*/
|
|
29
|
-
export interface ScrollPercentage {
|
|
30
|
-
/** 竖向滚动百分比 (0-100) */
|
|
31
|
-
percentY?: number;
|
|
32
|
-
/** 横向滚动百分比 (0-100) */
|
|
33
|
-
percentX?: number;
|
|
34
|
-
/** 滚动行为 */
|
|
35
|
-
behavior?: 'auto' | 'smooth';
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* 滚动按钮配置
|
|
39
|
-
*/
|
|
40
|
-
export interface ScrollActionsConfig {
|
|
41
|
-
show?: boolean;
|
|
42
|
-
/** 按钮类型 */
|
|
43
|
-
type: "backTop" | "rArrows" | "lrArrows" | "tbArrows" | "indicator" | "custom";
|
|
44
|
-
style?: CSSProperties;
|
|
45
|
-
scrollDistance?: number;
|
|
46
|
-
/** 按钮配置 根据type不同,配置不同 */
|
|
47
|
-
config?: any;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* 滚动事件数据
|
|
51
|
-
*/
|
|
52
|
-
export interface ScrollEventData {
|
|
53
|
-
/** 当前滚动位置 */
|
|
54
|
-
scrollTop: number;
|
|
55
|
-
scrollLeft: number;
|
|
56
|
-
/** 滚动百分比 */
|
|
57
|
-
percentY: number;
|
|
58
|
-
percentX: number;
|
|
59
|
-
/** 可滚动高度/宽度 */
|
|
60
|
-
scrollHeight: number;
|
|
61
|
-
scrollWidth: number;
|
|
62
|
-
/** 容器尺寸 */
|
|
63
|
-
clientHeight: number;
|
|
64
|
-
clientWidth: number;
|
|
65
|
-
/** 滚动方向 */
|
|
66
|
-
direction: 'up' | 'down' | 'left' | 'right' | null;
|
|
67
|
-
/** 是否滚动到顶部 */
|
|
68
|
-
isScrollToTop: boolean;
|
|
69
|
-
/** 是否滚动到底部 */
|
|
70
|
-
isScrollToBottom: boolean;
|
|
71
|
-
/** 是否滚动到左边 */
|
|
72
|
-
isScrollToLeft: boolean;
|
|
73
|
-
/** 是否滚动到右边 */
|
|
74
|
-
isScrollToRight: boolean;
|
|
75
|
-
/** 是否已经产生滚动条 */
|
|
76
|
-
isOverflows: boolean;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* 视图监听配置
|
|
80
|
-
*/
|
|
81
|
-
export interface IntersectionConfig {
|
|
82
|
-
/** 是否启用视图监听 */
|
|
83
|
-
enabled?: boolean;
|
|
84
|
-
/** 交叉阈值 (0-1) */
|
|
85
|
-
threshold?: number | number[];
|
|
86
|
-
/** 根边距 */
|
|
87
|
-
rootMargin?: string;
|
|
88
|
-
/** 元素进入视图回调 */
|
|
89
|
-
onEnterViewport?: (entry: IntersectionObserverEntry, element: Element) => void;
|
|
90
|
-
/** 元素离开视图回调 */
|
|
91
|
-
onLeaveViewport?: (entry: IntersectionObserverEntry, element: Element) => void;
|
|
92
|
-
/** 可见度变化回调 */
|
|
93
|
-
onVisibilityChange?: (entry: IntersectionObserverEntry, element: Element) => void;
|
|
94
|
-
/** 需要监听的元素选择器 */
|
|
95
|
-
targetSelector?: string;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* 吸附滚动配置
|
|
99
|
-
*/
|
|
100
|
-
export interface SnapScrollConfig {
|
|
101
|
-
/** 是否启用吸附滚动 */
|
|
102
|
-
enabled?: boolean;
|
|
103
|
-
/** 吸附类型 */
|
|
104
|
-
type?: 'mandatory' | 'proximity';
|
|
105
|
-
/** 吸附对齐方式 */
|
|
106
|
-
align?: 'start' | 'center' | 'end';
|
|
107
|
-
/** 吸附开始回调 */
|
|
108
|
-
onSnapStart?: (targetIndex: number, targetPosition: number) => void;
|
|
109
|
-
/** 吸附结束回调 */
|
|
110
|
-
onSnapEnd?: (currentIndex: number, currentPosition: number) => void;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* PisellScrollView 组件 Props
|
|
114
|
-
*/
|
|
115
|
-
export interface PisellScrollViewProps {
|
|
116
|
-
/** 子元素 */
|
|
117
|
-
children?: ReactNode;
|
|
118
|
-
/** 自定义类名 */
|
|
119
|
-
className?: string;
|
|
120
|
-
/** 自定义样式 */
|
|
121
|
-
style?: CSSProperties;
|
|
122
|
-
/** 滚动方向 */
|
|
123
|
-
overflow?: 'auto' | 'scroll' | 'hidden' | 'x' | 'y' | 'both';
|
|
124
|
-
/** 滚动条样式 */
|
|
125
|
-
scrollbarStyle?: 'default' | 'thin' | 'minimal' | 'rounded' | 'overlay' | 'custom' | 'none';
|
|
126
|
-
/** 自定义滚动条类名(当 scrollbarStyle 为 'custom' 时使用) */
|
|
127
|
-
scrollbarClassName?: string;
|
|
128
|
-
/** 是否显示滚动按钮 */
|
|
129
|
-
showScrollButtons?: boolean;
|
|
130
|
-
/** 箭头操作 */
|
|
131
|
-
scrollActionsConfig?: ScrollActionsConfig;
|
|
132
|
-
/** 滚动时触发 */
|
|
133
|
-
onScroll?: (data: ScrollEventData) => void;
|
|
134
|
-
/** 开始滚动时触发 */
|
|
135
|
-
onScrollStart?: (data: ScrollEventData) => void;
|
|
136
|
-
/** 滚动结束时触发(防抖延迟,默认 150ms) */
|
|
137
|
-
onScrollEnd?: (data: ScrollEventData) => void;
|
|
138
|
-
/** 滚动结束防抖延迟时间(ms) */
|
|
139
|
-
scrollEndDelay?: number;
|
|
140
|
-
/** 到达顶部时触发 */
|
|
141
|
-
onReachTop?: (data: ScrollEventData) => void;
|
|
142
|
-
/** 到达底部时触发 */
|
|
143
|
-
onReachBottom?: (data: ScrollEventData) => void;
|
|
144
|
-
/** 到达左边时触发 */
|
|
145
|
-
onReachLeft?: (data: ScrollEventData) => void;
|
|
146
|
-
/** 到达右边时触发 */
|
|
147
|
-
onReachRight?: (data: ScrollEventData) => void;
|
|
148
|
-
/** 边界阈值(到达边界的像素阈值) */
|
|
149
|
-
reachThreshold?: number;
|
|
150
|
-
/** IntersectionObserver 配置 */
|
|
151
|
-
intersection?: IntersectionConfig;
|
|
152
|
-
/** 吸附滚动配置 */
|
|
153
|
-
snapScroll?: SnapScrollConfig;
|
|
154
|
-
/** 容器宽度 */
|
|
155
|
-
width?: number | string;
|
|
156
|
-
/** 容器高度 */
|
|
157
|
-
height?: number | string;
|
|
158
|
-
/** 最大宽度 */
|
|
159
|
-
maxWidth?: number | string;
|
|
160
|
-
/** 最大高度 */
|
|
161
|
-
maxHeight?: number | string;
|
|
162
|
-
/** 最小宽度 */
|
|
163
|
-
minWidth?: number | string;
|
|
164
|
-
/** 最小高度 */
|
|
165
|
-
minHeight?: number | string;
|
|
166
|
-
/** Ref 引用 */
|
|
167
|
-
ref?: React.Ref<PisellScrollViewRef>;
|
|
168
|
-
/** 设计模式 */
|
|
169
|
-
__designMode?: boolean;
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* 组件暴露的方法
|
|
173
|
-
*/
|
|
174
|
-
export interface PisellScrollViewRef {
|
|
175
|
-
/** 滚动到指定位置 */
|
|
176
|
-
scrollTo: (position: ScrollPosition) => void;
|
|
177
|
-
/** 滚动到指定元素 */
|
|
178
|
-
scrollToElement: (config: ScrollToElementConfig) => void;
|
|
179
|
-
/** 滚动到百分比位置 */
|
|
180
|
-
scrollToPercentage: (percentage: ScrollPercentage) => void;
|
|
181
|
-
/** 滚动到顶部 */
|
|
182
|
-
scrollToTop: (behavior?: 'auto' | 'smooth') => void;
|
|
183
|
-
/** 滚动到底部 */
|
|
184
|
-
scrollToBottom: (behavior?: 'auto' | 'smooth') => void;
|
|
185
|
-
/** 滚动到最左侧 */
|
|
186
|
-
scrollToLeft: (behavior?: 'auto' | 'smooth') => void;
|
|
187
|
-
/** 滚动到最右侧 */
|
|
188
|
-
scrollToRight: (behavior?: 'auto' | 'smooth') => void;
|
|
189
|
-
/** 获取当前滚动信息 */
|
|
190
|
-
getScrollData: () => ScrollEventData;
|
|
191
|
-
/** 获取滚动容器 DOM 元素 */
|
|
192
|
-
getScrollContainer: () => HTMLElement | null;
|
|
193
|
-
/** 滚动到指定吸附点(索引) */
|
|
194
|
-
scrollToSnapPoint: (index: number, behavior?: 'auto' | 'smooth') => void;
|
|
195
|
-
/** 获取所有吸附点位置 */
|
|
196
|
-
getSnapPoints: () => number[];
|
|
197
|
-
/** 获取当前吸附点索引 */
|
|
198
|
-
getCurrentSnapIndex: () => number;
|
|
199
|
-
/** 滚动到下一个吸附点 */
|
|
200
|
-
scrollToNextSnap: (behavior?: 'auto' | 'smooth') => void;
|
|
201
|
-
/** 滚动到上一个吸附点 */
|
|
202
|
-
scrollToPrevSnap: (behavior?: 'auto' | 'smooth') => void;
|
|
203
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './PisellSteps.less';
|
|
3
|
-
import type { PisellStepsProps } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* PisellSteps 步骤条组件
|
|
6
|
-
*
|
|
7
|
-
* 基于 Ant Design Steps 组件进行二次封装和增强
|
|
8
|
-
* 支持多种展示样式、布局方式和丰富的交互功能
|
|
9
|
-
*
|
|
10
|
-
* @author Pisell Team
|
|
11
|
-
* @version 1.0.0
|
|
12
|
-
*/
|
|
13
|
-
declare const PisellSteps: React.FC<PisellStepsProps>;
|
|
14
|
-
export default PisellSteps;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './PisellSuperTabs.less';
|
|
3
|
-
import type { PisellSuperTabsProps } from './types';
|
|
4
|
-
interface PisellSuperTabsRef {
|
|
5
|
-
scrollItemByRowKey: (key: string) => void;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: React.ForwardRefExoticComponent<PisellSuperTabsProps<unknown> & React.RefAttributes<PisellSuperTabsRef>>;
|
|
8
|
-
export default _default;
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import type { PisellBasicGridProps } from '../PisellBasicGrid/types';
|
|
3
|
-
import type { PisellScrollViewProps } from '../PisellScrollView/types';
|
|
4
|
-
import type { PisellBasicCardProps } from '../PisellCards/types';
|
|
5
|
-
/**
|
|
6
|
-
* useTabsState Hook 参数
|
|
7
|
-
*/
|
|
8
|
-
export interface UseTabsStateParams<T = any> {
|
|
9
|
-
isControlled: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* 当前激活的 Tab key(受控)
|
|
12
|
-
*/
|
|
13
|
-
value?: string;
|
|
14
|
-
/**
|
|
15
|
-
* 默认激活的 Tab key(非受控)
|
|
16
|
-
*/
|
|
17
|
-
defaultValue?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Tab 切换时的回调
|
|
20
|
-
*/
|
|
21
|
-
onChange?: (key: string, item: T) => void;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* useTabsState Hook 返回值
|
|
25
|
-
*/
|
|
26
|
-
export interface UseTabsStateReturn<T = any> {
|
|
27
|
-
/**
|
|
28
|
-
* 当前激活的 Tab key
|
|
29
|
-
*/
|
|
30
|
-
activeKey: string | undefined;
|
|
31
|
-
/**
|
|
32
|
-
* 切换 Tab 的方法
|
|
33
|
-
*/
|
|
34
|
-
handleTabChange: (key: string, item: T) => void;
|
|
35
|
-
}
|
|
36
|
-
export interface RenderItemProps<T = any> extends PisellBasicCardProps {
|
|
37
|
-
index: number;
|
|
38
|
-
tabsState: UseTabsStateReturn<T>;
|
|
39
|
-
tabsProps: PisellSuperTabsProps<T>;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* PisellSuperTabs 组件 Props
|
|
43
|
-
* @template T - 数据源项的类型
|
|
44
|
-
* @description 通用导航框架封装的全能型 Tab 组件
|
|
45
|
-
*/
|
|
46
|
-
export interface PisellSuperTabsProps<T = any> {
|
|
47
|
-
isControlled?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* 自定义类名
|
|
50
|
-
* @description 添加到最外层容器的类名
|
|
51
|
-
*/
|
|
52
|
-
className?: string;
|
|
53
|
-
tabItemClassName?: string;
|
|
54
|
-
tabItemStyle?: CSSProperties;
|
|
55
|
-
/**
|
|
56
|
-
* 自定义样式
|
|
57
|
-
* @description 添加到最外层容器的样式
|
|
58
|
-
*/
|
|
59
|
-
style?: CSSProperties;
|
|
60
|
-
/**
|
|
61
|
-
* 唯一标识
|
|
62
|
-
* @description 必填,用于区分不同的 TabItem
|
|
63
|
-
*/
|
|
64
|
-
id?: string;
|
|
65
|
-
/**
|
|
66
|
-
* 数据源
|
|
67
|
-
* @description 支持多级嵌套,递归字段为 children
|
|
68
|
-
* @example
|
|
69
|
-
* [
|
|
70
|
-
* { key: 'home', label: '首页' },
|
|
71
|
-
* { key: 'products', label: '产品', children: [...] }
|
|
72
|
-
* ]
|
|
73
|
-
*/
|
|
74
|
-
dataSource?: T[];
|
|
75
|
-
/**
|
|
76
|
-
* 数据项的唯一标识字段
|
|
77
|
-
* @default 'key'
|
|
78
|
-
* @description 可以是字符串(字段名)或函数(自定义获取逻辑)
|
|
79
|
-
* @example
|
|
80
|
-
* // 字符串形式
|
|
81
|
-
* rowKey="id"
|
|
82
|
-
*
|
|
83
|
-
* // 函数形式
|
|
84
|
-
* rowKey={(record, index) => `${record.type}-${index}`}
|
|
85
|
-
*/
|
|
86
|
-
rowKey?: string | ((record: T, index: number) => string);
|
|
87
|
-
/**
|
|
88
|
-
* 当前激活的 Tab key
|
|
89
|
-
* @description 受控模式,需配合 onChange 使用
|
|
90
|
-
*/
|
|
91
|
-
value?: string;
|
|
92
|
-
/**
|
|
93
|
-
* 默认激活的 Tab key
|
|
94
|
-
* @description 非受控模式,仅初始化时生效
|
|
95
|
-
*/
|
|
96
|
-
defaultValue?: string;
|
|
97
|
-
/**
|
|
98
|
-
* Tab 切换时的回调
|
|
99
|
-
* @param key - 切换到的 Tab key
|
|
100
|
-
* @param item - 切换到的数据项
|
|
101
|
-
*/
|
|
102
|
-
onChange?: (key: string, item: T) => void;
|
|
103
|
-
/**
|
|
104
|
-
* 自定义 TabItem 渲染
|
|
105
|
-
* @description 支持两种模式:
|
|
106
|
-
* 1. 函数模式:(item, index, active) => ReactNode
|
|
107
|
-
* 2. 插槽模式:直接传入 ReactNode
|
|
108
|
-
* @example
|
|
109
|
-
* // 函数模式
|
|
110
|
-
* renderItem={(item, index, active) => (
|
|
111
|
-
* <PisellCards.TabCard
|
|
112
|
-
* {...item}
|
|
113
|
-
* active={{ value: active }}
|
|
114
|
-
* />
|
|
115
|
-
* )}
|
|
116
|
-
*
|
|
117
|
-
* // 插槽模式
|
|
118
|
-
* renderItem={<PisellCards.TabCard />}
|
|
119
|
-
*/
|
|
120
|
-
renderItem?: ((props: RenderItemProps<T>) => ReactNode) | ReactNode;
|
|
121
|
-
/**
|
|
122
|
-
* PisellBasicGrid 组件的配置
|
|
123
|
-
* @description 透传给 PisellBasicGrid 组件的所有 Props
|
|
124
|
-
* @see PisellBasicGridProps
|
|
125
|
-
* @example
|
|
126
|
-
* gridProps={{
|
|
127
|
-
* direction: 'horizontal',
|
|
128
|
-
* gap: 16,
|
|
129
|
-
* wrap: 'wrap',
|
|
130
|
-
* columns: 4,
|
|
131
|
-
* }}
|
|
132
|
-
*/
|
|
133
|
-
gridProps?: Omit<PisellBasicGridProps<T>, 'dataSource' | 'renderItem' | 'rowKey' | 'children'>;
|
|
134
|
-
/**
|
|
135
|
-
* PisellScrollView 组件的配置
|
|
136
|
-
* @description 透传给 PisellScrollView 组件的所有 Props
|
|
137
|
-
* @see PisellScrollViewProps
|
|
138
|
-
* @example
|
|
139
|
-
* scrollViewProps={{
|
|
140
|
-
* overflow: 'x',
|
|
141
|
-
* scrollbarStyle: 'thin',
|
|
142
|
-
* scrollActionsConfig: { show: true, type: 'lrArrows' },
|
|
143
|
-
* }}
|
|
144
|
-
*/
|
|
145
|
-
scrollViewProps?: Omit<PisellScrollViewProps, 'children'>;
|
|
146
|
-
children?: ReactNode;
|
|
147
|
-
/**
|
|
148
|
-
* 左侧插槽
|
|
149
|
-
*/
|
|
150
|
-
slotLeft?: ReactNode;
|
|
151
|
-
slotLeftClassName?: string;
|
|
152
|
-
slotLeftStyle?: CSSProperties;
|
|
153
|
-
/**
|
|
154
|
-
* 右侧插槽
|
|
155
|
-
*/
|
|
156
|
-
slotRight?: ReactNode;
|
|
157
|
-
slotRightClassName?: string;
|
|
158
|
-
slotRightStyle?: CSSProperties;
|
|
159
|
-
/**
|
|
160
|
-
* 顶部插槽
|
|
161
|
-
*/
|
|
162
|
-
slotTop?: ReactNode;
|
|
163
|
-
slotTopClassName?: string;
|
|
164
|
-
slotTopStyle?: CSSProperties;
|
|
165
|
-
/**
|
|
166
|
-
* 底部插槽
|
|
167
|
-
*/
|
|
168
|
-
slotBottom?: ReactNode;
|
|
169
|
-
slotBottomClassName?: string;
|
|
170
|
-
slotBottomStyle?: CSSProperties;
|
|
171
|
-
__designMode?: boolean;
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* 数据项基础类型
|
|
175
|
-
* @description 建议数据源中的每一项都包含这些字段
|
|
176
|
-
*/
|
|
177
|
-
export interface TabDataItem {
|
|
178
|
-
/**
|
|
179
|
-
* 唯一标识
|
|
180
|
-
* @description 必填,用于区分不同的 TabItem
|
|
181
|
-
*/
|
|
182
|
-
key: string;
|
|
183
|
-
/**
|
|
184
|
-
* 标签文本
|
|
185
|
-
*/
|
|
186
|
-
label?: string;
|
|
187
|
-
/**
|
|
188
|
-
* 图标
|
|
189
|
-
*/
|
|
190
|
-
icon?: ReactNode;
|
|
191
|
-
/**
|
|
192
|
-
* 徽章配置
|
|
193
|
-
*/
|
|
194
|
-
badge?: {
|
|
195
|
-
count?: number;
|
|
196
|
-
dot?: boolean;
|
|
197
|
-
text?: string;
|
|
198
|
-
};
|
|
199
|
-
/**
|
|
200
|
-
* 子级数据(多级嵌套)
|
|
201
|
-
* @description 用于多级导航场景,具体渲染逻辑由 Card 组件实现
|
|
202
|
-
*/
|
|
203
|
-
children?: TabDataItem[];
|
|
204
|
-
/**
|
|
205
|
-
* 是否禁用
|
|
206
|
-
*/
|
|
207
|
-
disabled?: boolean;
|
|
208
|
-
/**
|
|
209
|
-
* 其他自定义字段
|
|
210
|
-
*/
|
|
211
|
-
[key: string]: any;
|
|
212
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { TabbarLevelConfig, ExpandConfig, LevelType } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* 默认层级配置
|
|
4
|
-
*/
|
|
5
|
-
export declare const DEFAULT_LEVEL_CONFIG: Record<LevelType, TabbarLevelConfig>;
|
|
6
|
-
/**
|
|
7
|
-
* 获取展开配置
|
|
8
|
-
*/
|
|
9
|
-
export declare const getExpandConfig: () => ExpandConfig;
|
|
10
|
-
/**
|
|
11
|
-
* 默认数据项配置
|
|
12
|
-
*/
|
|
13
|
-
export declare const DEFAULT_ITEMS: {
|
|
14
|
-
all: {
|
|
15
|
-
id: string;
|
|
16
|
-
shop_id: number;
|
|
17
|
-
parent_id: number;
|
|
18
|
-
name: any;
|
|
19
|
-
slug: string;
|
|
20
|
-
icon: string;
|
|
21
|
-
};
|
|
22
|
-
search: {
|
|
23
|
-
id: string;
|
|
24
|
-
shop_id: number;
|
|
25
|
-
parent_id: number;
|
|
26
|
-
name: any;
|
|
27
|
-
text: any;
|
|
28
|
-
slug: string;
|
|
29
|
-
key: string;
|
|
30
|
-
icon: string;
|
|
31
|
-
customClick: boolean;
|
|
32
|
-
};
|
|
33
|
-
expand: {
|
|
34
|
-
id: string;
|
|
35
|
-
shop_id: number;
|
|
36
|
-
parent_id: number;
|
|
37
|
-
key: string;
|
|
38
|
-
icon: string;
|
|
39
|
-
name: string;
|
|
40
|
-
slug: string;
|
|
41
|
-
customClick: boolean;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* 获取层级对应的添加项配置
|
|
46
|
-
*/
|
|
47
|
-
export declare const LEVEL_ADD_ITEMS: Record<LevelType, ('all' | 'search' | 'expand')[]>;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* useActiveKey Hook 参数
|
|
3
|
-
*/
|
|
4
|
-
interface UseActiveKeyProps {
|
|
5
|
-
/** 初始激活的 key 数组(对应多层级) */
|
|
6
|
-
initialActiveKey?: (string | number)[];
|
|
7
|
-
/** key 变化回调 */
|
|
8
|
-
onChange?: (value: (string | number)[]) => void;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* useActiveKey Hook 返回值
|
|
12
|
-
*/
|
|
13
|
-
interface UseActiveKeyReturn {
|
|
14
|
-
/** 当前激活的 key 数组 */
|
|
15
|
-
activeKey: (string | number)[];
|
|
16
|
-
/** 设置指定层级的激活 key */
|
|
17
|
-
setActiveKey: (level: number, key: string | number, cKey?: string | number) => void;
|
|
18
|
-
/** 获取指定层级的激活 key */
|
|
19
|
-
getActiveKey: (level: number) => string | number;
|
|
20
|
-
/** 内部设置方法(用于同步外部值) */
|
|
21
|
-
_setActiveKey: (value: (string | number)[]) => void;
|
|
22
|
-
/** 设置缓存key */
|
|
23
|
-
setCacheActiveKey: (val: (string | number)[]) => void;
|
|
24
|
-
/** 重置value为缓存key */
|
|
25
|
-
resetActiveKey: () => void;
|
|
26
|
-
/** 获取缓存key */
|
|
27
|
-
getCacheActiveKey: () => (string | number)[];
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Tabbar 激活状态管理 Hook
|
|
31
|
-
*
|
|
32
|
-
* 用于管理多层级 Tabbar 的激活状态,支持级联选择
|
|
33
|
-
*
|
|
34
|
-
* @param props - Hook 配置参数
|
|
35
|
-
* @returns 激活状态和操作方法
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```tsx
|
|
39
|
-
* const { activeKey, setActiveKey, getActiveKey } = useActiveKey({
|
|
40
|
-
* initialActiveKey: [1, 10],
|
|
41
|
-
* onChange: (value) => console.log('当前选中:', value)
|
|
42
|
-
* });
|
|
43
|
-
*
|
|
44
|
-
* // 设置第 0 层级的 key,并清除后续层级
|
|
45
|
-
* setActiveKey(0, '2');
|
|
46
|
-
*
|
|
47
|
-
* // 设置第 0 层级的 key,并同时设置第 1 层级
|
|
48
|
-
* setActiveKey(0, '2', '20');
|
|
49
|
-
*
|
|
50
|
-
* // 获取第 0 层级的 key
|
|
51
|
-
* const level0Key = getActiveKey(0);
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
declare const useActiveKey: (props: UseActiveKeyProps) => UseActiveKeyReturn;
|
|
55
|
-
export default useActiveKey;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ExpandState, LevelType } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* useExpand Hook 参数
|
|
4
|
-
*/
|
|
5
|
-
interface UseExpandProps {
|
|
6
|
-
/** 初始展开状态 */
|
|
7
|
-
initialExpand?: Partial<ExpandState>;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* useExpand Hook 返回值
|
|
11
|
-
*/
|
|
12
|
-
interface UseExpandReturn {
|
|
13
|
-
/** 展开状态 */
|
|
14
|
-
expand: ExpandState;
|
|
15
|
-
/** 设置展开状态 */
|
|
16
|
-
setExpand: (state: ExpandState) => void;
|
|
17
|
-
/** 切换指定层级的展开状态 */
|
|
18
|
-
toggleExpand: (level: LevelType) => void;
|
|
19
|
-
/** 获取指定层级的展开状态 */
|
|
20
|
-
getExpand: (level: LevelType) => boolean;
|
|
21
|
-
closeAll: () => void;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Tabbar 展开状态管理 Hook
|
|
25
|
-
* 用于管理多层级的展开/收起状态
|
|
26
|
-
*
|
|
27
|
-
* @param props - Hook 配置参数
|
|
28
|
-
* @returns 展开状态和操作方法
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```tsx
|
|
32
|
-
* const { expand, toggleExpand, getExpand } = useExpand({
|
|
33
|
-
* initialExpand: { level1: false }
|
|
34
|
-
* });
|
|
35
|
-
*
|
|
36
|
-
* <button onClick={() => toggleExpand('level1')}>
|
|
37
|
-
* {getExpand('level1') ? '收起' : '展开'}
|
|
38
|
-
* </button>
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
declare const useExpand: (props?: UseExpandProps) => UseExpandReturn;
|
|
42
|
-
export default useExpand;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { TabbarLevelConfig, LevelType } from '../../types';
|
|
2
|
-
export { getExpandConfig, DEFAULT_ITEMS } from '../../constants';
|
|
3
|
-
/**
|
|
4
|
-
* 默认层级配置
|
|
5
|
-
*/
|
|
6
|
-
export declare const DEFAULT_LEVEL_CONFIG: Record<LevelType, TabbarLevelConfig>;
|
|
7
|
-
/**
|
|
8
|
-
* 获取层级对应的添加项配置
|
|
9
|
-
*/
|
|
10
|
-
export declare const LEVEL_ADD_ITEMS: Record<LevelType, ('all' | 'search' | 'expand')[]>;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Tabbar 数据源项类型
|
|
4
|
-
*/
|
|
5
|
-
export interface TabbarDataSource {
|
|
6
|
-
/** 唯一标识 */
|
|
7
|
-
id: string | number;
|
|
8
|
-
/** 店铺ID */
|
|
9
|
-
shop_id?: number;
|
|
10
|
-
/** 父级ID */
|
|
11
|
-
parent_id?: number;
|
|
12
|
-
/** 显示名称 */
|
|
13
|
-
name: string;
|
|
14
|
-
/** URL slug */
|
|
15
|
-
slug?: string;
|
|
16
|
-
/** 图标 URL 或图标名称 */
|
|
17
|
-
icon?: string;
|
|
18
|
-
/** 子级数据 */
|
|
19
|
-
children?: TabbarDataSource[];
|
|
20
|
-
/** 自定义点击事件标识 */
|
|
21
|
-
customClick?: boolean;
|
|
22
|
-
/** 唯一 key */
|
|
23
|
-
key?: string;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* 层级配置
|
|
27
|
-
*/
|
|
28
|
-
export interface TabbarLevelConfig {
|
|
29
|
-
/** SuperTabs 背景色 */
|
|
30
|
-
superTabsBg: string;
|
|
31
|
-
/** 卡片宽度 */
|
|
32
|
-
cardWidth: number;
|
|
33
|
-
/** 卡片高度 */
|
|
34
|
-
cardHeight: number;
|
|
35
|
-
/** 左侧缩进 */
|
|
36
|
-
paddingLeft?: number;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* 展开配置
|
|
40
|
-
*/
|
|
41
|
-
export interface ExpandConfig {
|
|
42
|
-
/** 激活状态配置 */
|
|
43
|
-
active: {
|
|
44
|
-
icon: string;
|
|
45
|
-
text: string;
|
|
46
|
-
};
|
|
47
|
-
/** 未激活状态配置 */
|
|
48
|
-
inactive: {
|
|
49
|
-
icon: string;
|
|
50
|
-
text: string;
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* 展开状态
|
|
55
|
-
*/
|
|
56
|
-
export interface ExpandState {
|
|
57
|
-
level1: boolean;
|
|
58
|
-
level2: boolean;
|
|
59
|
-
level3: boolean;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* 层级类型
|
|
63
|
-
*/
|
|
64
|
-
export declare type LevelType = 'level1' | 'level2' | 'level3';
|
|
65
|
-
/**
|
|
66
|
-
* PisellTabbar 组件属性
|
|
67
|
-
*/
|
|
68
|
-
export interface PisellTabbarProps {
|
|
69
|
-
/** 数据源 */
|
|
70
|
-
dataSource?: TabbarDataSource[];
|
|
71
|
-
/** 当前选中的值(多层级 key 数组) */
|
|
72
|
-
value?: (string | number)[];
|
|
73
|
-
/** 值变化回调 */
|
|
74
|
-
onChange?: (value: (string | number)[]) => void;
|
|
75
|
-
/** 自定义类名 */
|
|
76
|
-
className?: string;
|
|
77
|
-
/** 自定义样式 */
|
|
78
|
-
style?: CSSProperties;
|
|
79
|
-
/** 层级配置(可按层级自定义) */
|
|
80
|
-
levelConfig?: Partial<Record<LevelType, Partial<TabbarLevelConfig>>>;
|
|
81
|
-
/** 展开配置 */
|
|
82
|
-
expandConfig?: ExpandConfig;
|
|
83
|
-
/** 最大层级数 */
|
|
84
|
-
maxLevel?: 1 | 2 | 3;
|
|
85
|
-
onSearch?: (value: string) => void;
|
|
86
|
-
/** 透传给内部 PisellFind 的搜索配置(如 inputRender 插槽)。 */
|
|
87
|
-
searchProps?: Record<string, any>;
|
|
88
|
-
__designMode?: boolean;
|
|
89
|
-
}
|
|
90
|
-
export interface PisellTabbarRef {
|
|
91
|
-
closeSearchMode: () => void;
|
|
92
|
-
}
|