@pisell/materials 1.0.1034 → 1.0.1035
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/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +17 -17
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +18 -23
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +27 -32
- package/es/components/Pagination/index.js +1 -1
- package/es/components/PisellCards/index.d.ts +6 -6
- package/es/components/calendar/index.d.ts +2 -2
- package/es/components/checkbox/index.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Email/index.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Password/index.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +3 -3
- package/es/components/dataSourceComponents/fields/Input.TextArea/index.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/date-picker/index.d.ts +2 -2
- package/es/components/filter/components/Dropdown/index.js +6 -2
- package/es/components/filter/components/FilterButton/index.js +3 -2
- package/es/components/filter/components/FilterButton/types.d.ts +5 -2
- package/es/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +67 -0
- package/es/components/filter/components/FilterItem/index.js +105 -6
- package/es/components/filter/components/FilterItem/index.less +90 -0
- package/es/components/filter/types.d.ts +4 -2
- package/es/components/input/index.d.ts +2 -2
- package/es/components/pisell-config-provider/context.d.ts +2 -2
- package/es/components/pisellCurrency/PisellCurrency.less +163 -25
- package/es/components/pisellDatePicker/index.d.ts +2 -2
- package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +11 -10
- package/es/components/pisellDateTimeDisplay/types.d.ts +5 -0
- package/es/components/pisellEmail/PisellEmail.d.ts +2 -33
- package/es/components/pisellEmail/PisellEmail.js +1 -1
- package/es/components/pisellEmail/PisellEmail.less +119 -10
- package/es/components/pisellEmail/index.d.ts +1 -1
- package/es/components/pisellFilter/docs/PisellFilter.md +289 -232
- package/es/components/pisellFilter/index.js +66 -11
- package/es/components/pisellLongText/PisellLongText.less +72 -4
- package/es/components/pisellLookup/PisellLookup.js +3 -3
- package/es/components/pisellLookup/PisellLookup.less +14 -9
- package/es/components/pisellLookup/components/LookupTrigger.js +6 -2
- package/es/components/pisellMetricCard/PisellMetricCard.d.ts +38 -0
- package/es/components/pisellMetricCard/PisellMetricCard.js +136 -0
- package/es/components/pisellMetricCard/components/MetricComparison.js +54 -0
- package/es/components/pisellMetricCard/components/MetricTitle.js +41 -0
- package/es/components/pisellMetricCard/components/MetricValue.js +26 -0
- package/es/components/pisellMetricCard/components/TrendIcon.js +26 -0
- package/es/components/pisellMetricCard/docs/pisellMetricCard.$tab-design.md +2 -6
- package/es/components/pisellMetricCard/index.d.ts +2 -0
- package/es/components/pisellMetricCard/types.d.ts +143 -0
- package/es/components/pisellMetricCard/utils/calculateTrend.js +22 -0
- package/es/components/pisellMetricCard/utils/formatMetricValue.js +52 -0
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.less +151 -124
- package/es/components/pisellMultipleSelect/components/EditView.js +8 -1
- package/es/components/pisellMultipleSelect/components/ReadOnlyView.js +18 -6
- package/es/components/pisellNumber/PisellNumber.less +135 -17
- package/es/components/pisellPercent/PisellPercent.less +142 -24
- package/es/components/pisellPhone/PisellPhone.less +122 -27
- package/es/components/pisellPhone/components/EditView.js +1 -1
- package/es/components/pisellPhone/components/ReadOnlyView.js +15 -5
- package/es/components/pisellPhone/utils/countryCodeHelper.js +1 -10
- package/es/components/pisellRating/PisellRating.less +20 -12
- package/es/components/pisellRecordBoard/PisellRecordBoard.js +148 -0
- package/es/components/pisellRecordBoard/README.md +183 -0
- package/es/components/pisellRecordBoard/context/RecordBoardContext.js +7 -0
- package/es/components/pisellRecordBoard/context/RecordBoardProvider.js +14 -0
- package/es/components/pisellRecordBoard/docs/PisellRecordBoard.$tab-design.md +128 -0
- package/es/components/pisellRecordBoard/docs/PisellRecordBoard.$tab-dev.md +82 -0
- package/es/components/pisellRecordBoard/docs/PisellRecordBoard.$tab-test.md +70 -0
- package/es/components/pisellRecordBoard/docs/PisellRecordBoard.md +552 -0
- package/es/components/pisellRecordBoard/hooks/useRecordBoardContext.d.ts +20 -0
- package/es/components/pisellRecordBoard/hooks/useRecordBoardContext.js +16 -0
- package/es/components/pisellRecordBoard/index.d.ts +40 -0
- package/es/components/pisellRecordBoard/index.js +28 -0
- package/es/components/pisellRecordBoard/layouts/CardLayout/CardList.d.ts +15 -0
- package/es/components/pisellRecordBoard/layouts/CardLayout/CardList.js +24 -0
- package/es/components/pisellRecordBoard/layouts/CardLayout/index.d.ts +15 -0
- package/es/components/pisellRecordBoard/layouts/CardLayout/index.js +21 -0
- package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +17 -0
- package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.js +105 -0
- package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.less +13 -0
- package/es/components/pisellRecordBoard/layouts/GridLayout/index.d.ts +15 -0
- package/es/components/pisellRecordBoard/layouts/GridLayout/index.js +21 -0
- package/es/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +12 -0
- package/es/components/pisellRecordBoard/shellFrame/BatchActionBar/index.js +69 -0
- package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.js +40 -0
- package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +60 -0
- package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.less +2 -0
- package/es/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +17 -0
- package/es/components/pisellRecordBoard/shellFrame/Pagination/index.js +52 -0
- package/es/components/pisellRecordBoard/shellFrame/Pagination/index.less +61 -0
- package/es/components/pisellRecordBoard/shellFrame/Search/index.d.ts +13 -0
- package/es/components/pisellRecordBoard/shellFrame/Search/index.js +34 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +77 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +14 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +136 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.d.ts +2 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +62 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +2 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +45 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.less +41 -0
- package/es/components/pisellRecordBoard/shellFrame/index.d.ts +27 -0
- package/es/components/pisellRecordBoard/shellFrame/index.js +38 -0
- package/es/components/pisellRecordBoard/types.d.ts +259 -0
- package/es/components/pisellRecordBoard/utils/recordBoardColumns.js +287 -0
- package/es/components/pisellShellFrame/PisellShellFrame.d.ts +16 -0
- package/es/components/pisellShellFrame/PisellShellFrame.js +60 -0
- package/es/components/pisellShellFrame/PisellShellFrame.less +73 -0
- package/es/components/pisellShellFrame/README.md +58 -0
- package/es/components/pisellShellFrame/index.d.ts +2 -0
- package/es/components/pisellShellFrame/types.d.ts +60 -0
- package/es/components/pisellSingleSelect/PisellSingleSelect.less +88 -46
- package/es/components/pisellSingleSelect/components/EditView.js +8 -1
- package/es/components/pisellSingleSelect/components/ReadOnlyView.js +8 -2
- package/es/components/pisellUrl/PisellUrl.d.ts +2 -33
- package/es/components/pisellUrl/PisellUrl.js +1 -1
- package/es/components/pisellUrl/PisellUrl.less +120 -11
- package/es/components/pisellUrl/index.d.ts +1 -1
- package/es/components/radio/index.d.ts +2 -2
- package/es/components/section-footers/index.d.ts +2 -2
- package/es/components/skeleton/index.d.ts +2 -2
- package/es/components/sort/index.js +12 -1
- package/es/components/sort/types.d.ts +8 -2
- package/es/components/time-picker/index.d.ts +2 -2
- package/es/index.d.ts +19 -11
- package/es/index.js +19 -15
- package/es/locales/en-US.js +16 -2
- package/es/locales/zh-CN.js +18 -4
- package/es/locales/zh-TW.js +18 -4
- package/es/utils/tagColor.js +31 -0
- package/lib/components/Pagination/index.js +1 -1
- package/lib/components/checkbox/index.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Password/index.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Input.TextArea/index.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/filter/components/Dropdown/index.js +6 -2
- package/lib/components/filter/components/FilterButton/index.js +3 -2
- package/lib/components/filter/components/FilterButton/types.d.ts +5 -2
- package/lib/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +69 -0
- package/lib/components/filter/components/FilterItem/index.js +106 -6
- package/lib/components/filter/components/FilterItem/index.less +90 -0
- package/lib/components/filter/types.d.ts +4 -2
- package/lib/components/input/index.d.ts +2 -2
- package/lib/components/pisell-config-provider/context.d.ts +2 -2
- package/lib/components/pisellCurrency/PisellCurrency.less +163 -25
- package/lib/components/pisellDatePicker/index.d.ts +2 -2
- package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +11 -10
- package/lib/components/pisellDateTimeDisplay/types.d.ts +5 -0
- package/lib/components/pisellEmail/PisellEmail.d.ts +2 -33
- package/lib/components/pisellEmail/PisellEmail.js +1 -1
- package/lib/components/pisellEmail/PisellEmail.less +119 -10
- package/lib/components/pisellEmail/index.d.ts +1 -1
- package/lib/components/pisellFilter/docs/PisellFilter.md +289 -232
- package/lib/components/pisellFilter/index.js +65 -10
- package/lib/components/pisellLongText/PisellLongText.less +72 -4
- package/lib/components/pisellLookup/PisellLookup.js +3 -3
- package/lib/components/pisellLookup/PisellLookup.less +14 -9
- package/lib/components/pisellLookup/components/LookupTrigger.js +6 -2
- package/lib/components/pisellMetricCard/PisellMetricCard.d.ts +38 -0
- package/lib/components/pisellMetricCard/PisellMetricCard.js +138 -0
- package/lib/components/pisellMetricCard/components/MetricComparison.js +56 -0
- package/lib/components/pisellMetricCard/components/MetricTitle.js +43 -0
- package/lib/components/pisellMetricCard/components/MetricValue.js +28 -0
- package/lib/components/pisellMetricCard/components/TrendIcon.js +28 -0
- package/lib/components/pisellMetricCard/docs/pisellMetricCard.$tab-design.md +2 -6
- package/lib/components/pisellMetricCard/index.d.ts +2 -0
- package/lib/components/pisellMetricCard/types.d.ts +143 -0
- package/lib/components/pisellMetricCard/utils/calculateTrend.js +23 -0
- package/lib/components/pisellMetricCard/utils/formatMetricValue.js +53 -0
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.less +151 -124
- package/lib/components/pisellMultipleSelect/components/EditView.js +7 -0
- package/lib/components/pisellMultipleSelect/components/ReadOnlyView.js +17 -5
- package/lib/components/pisellNumber/PisellNumber.less +135 -17
- package/lib/components/pisellPercent/PisellPercent.less +142 -24
- package/lib/components/pisellPhone/PisellPhone.less +122 -27
- package/lib/components/pisellPhone/components/EditView.js +1 -1
- package/lib/components/pisellPhone/components/ReadOnlyView.js +15 -5
- package/lib/components/pisellPhone/utils/countryCodeHelper.js +0 -10
- package/lib/components/pisellRating/PisellRating.less +20 -12
- package/lib/components/pisellRecordBoard/PisellRecordBoard.js +150 -0
- package/lib/components/pisellRecordBoard/README.md +183 -0
- package/lib/components/pisellRecordBoard/context/RecordBoardContext.js +8 -0
- package/lib/components/pisellRecordBoard/context/RecordBoardProvider.js +16 -0
- package/lib/components/pisellRecordBoard/docs/PisellRecordBoard.$tab-design.md +128 -0
- package/lib/components/pisellRecordBoard/docs/PisellRecordBoard.$tab-dev.md +82 -0
- package/lib/components/pisellRecordBoard/docs/PisellRecordBoard.$tab-test.md +70 -0
- package/lib/components/pisellRecordBoard/docs/PisellRecordBoard.md +552 -0
- package/lib/components/pisellRecordBoard/hooks/useRecordBoardContext.d.ts +20 -0
- package/lib/components/pisellRecordBoard/hooks/useRecordBoardContext.js +17 -0
- package/lib/components/pisellRecordBoard/index.d.ts +40 -0
- package/lib/components/pisellRecordBoard/index.js +28 -0
- package/lib/components/pisellRecordBoard/layouts/CardLayout/CardList.d.ts +15 -0
- package/lib/components/pisellRecordBoard/layouts/CardLayout/CardList.js +26 -0
- package/lib/components/pisellRecordBoard/layouts/CardLayout/index.d.ts +15 -0
- package/lib/components/pisellRecordBoard/layouts/CardLayout/index.js +23 -0
- package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +17 -0
- package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.js +107 -0
- package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.less +13 -0
- package/lib/components/pisellRecordBoard/layouts/GridLayout/index.d.ts +15 -0
- package/lib/components/pisellRecordBoard/layouts/GridLayout/index.js +23 -0
- package/lib/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +12 -0
- package/lib/components/pisellRecordBoard/shellFrame/BatchActionBar/index.js +71 -0
- package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.js +43 -0
- package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +62 -0
- package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.less +2 -0
- package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +17 -0
- package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.js +54 -0
- package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.less +61 -0
- package/lib/components/pisellRecordBoard/shellFrame/Search/index.d.ts +13 -0
- package/lib/components/pisellRecordBoard/shellFrame/Search/index.js +36 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +77 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +14 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +139 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +64 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +2 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +47 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.less +41 -0
- package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +26 -0
- package/lib/components/pisellRecordBoard/shellFrame/index.js +40 -0
- package/lib/components/pisellRecordBoard/types.d.ts +259 -0
- package/lib/components/pisellRecordBoard/utils/recordBoardColumns.js +292 -0
- package/lib/components/pisellShellFrame/PisellShellFrame.d.ts +16 -0
- package/lib/components/pisellShellFrame/PisellShellFrame.js +62 -0
- package/lib/components/pisellShellFrame/PisellShellFrame.less +73 -0
- package/lib/components/pisellShellFrame/README.md +58 -0
- package/lib/components/pisellShellFrame/index.d.ts +2 -0
- package/lib/components/pisellShellFrame/types.d.ts +60 -0
- package/lib/components/pisellSingleSelect/PisellSingleSelect.less +88 -46
- package/lib/components/pisellSingleSelect/components/EditView.js +7 -0
- package/lib/components/pisellSingleSelect/components/ReadOnlyView.js +8 -2
- package/lib/components/pisellUrl/PisellUrl.d.ts +2 -33
- package/lib/components/pisellUrl/PisellUrl.js +1 -1
- package/lib/components/pisellUrl/PisellUrl.less +120 -11
- package/lib/components/pisellUrl/index.d.ts +1 -1
- package/lib/components/radio/index.d.ts +2 -2
- package/lib/components/section-footers/index.d.ts +2 -2
- package/lib/components/skeleton/index.d.ts +2 -2
- package/lib/components/sort/index.js +12 -1
- package/lib/components/sort/types.d.ts +8 -2
- package/lib/components/time-picker/index.d.ts +2 -2
- package/lib/components/upload/index.d.ts +2 -2
- package/lib/index.d.ts +19 -11
- package/lib/index.js +33 -25
- package/lib/locales/en-US.js +16 -2
- package/lib/locales/zh-CN.js +18 -4
- package/lib/locales/zh-TW.js +18 -4
- package/lib/utils/tagColor.js +32 -0
- package/package.json +3 -3
|
@@ -10,7 +10,7 @@ let _pisell_icon_es_FilterLines = require("@pisell/icon/es/FilterLines");
|
|
|
10
10
|
_pisell_icon_es_FilterLines = require_rolldown_runtime.__toESM(_pisell_icon_es_FilterLines);
|
|
11
11
|
|
|
12
12
|
//#region src/components/filter/components/FilterButton/index.tsx
|
|
13
|
-
const Filter = ({ value, hiddenQuickFilter, hiddenOtherFilter, onChange, quickFilterMaxLength, formFiltersPrefix, renderItem, placement }) => {
|
|
13
|
+
const Filter = ({ value, hiddenQuickFilter, hiddenOtherFilter, onChange, quickFilterMaxLength, formFiltersPrefix, renderItem, placement, size = "large", buttonClassName }) => {
|
|
14
14
|
const ref = (0, react.useRef)(null);
|
|
15
15
|
const [open, setOpen] = (0, react.useState)(false);
|
|
16
16
|
const [dateRangeOpen, setDateRangeOpen] = (0, react.useState)(false);
|
|
@@ -58,8 +58,9 @@ const Filter = ({ value, hiddenQuickFilter, hiddenOtherFilter, onChange, quickFi
|
|
|
58
58
|
},
|
|
59
59
|
placement
|
|
60
60
|
}, /* @__PURE__ */ react.default.createElement(antd.Button, {
|
|
61
|
+
className: buttonClassName,
|
|
61
62
|
icon: /* @__PURE__ */ react.default.createElement(_pisell_icon_es_FilterLines.default, null),
|
|
62
|
-
size
|
|
63
|
+
size
|
|
63
64
|
}, isMobileBool ? null : require_index.getText("table-action-filter-button"))));
|
|
64
65
|
};
|
|
65
66
|
var FilterButton_default = Filter;
|
|
@@ -4,7 +4,8 @@ import { FilterItemProps } from "../../types.js";
|
|
|
4
4
|
//#region src/components/filter/components/FilterButton/types.d.ts
|
|
5
5
|
type FilterValueType = {
|
|
6
6
|
quickFilter: FilterItemProps[];
|
|
7
|
-
otherFilter: FilterItemProps[];
|
|
7
|
+
otherFilter: FilterItemProps[]; /** 筛选项表单值,字段名 -> 值,与 Form 的 values 一致 */
|
|
8
|
+
values?: Record<string, any>;
|
|
8
9
|
};
|
|
9
10
|
type FilterListProps = {
|
|
10
11
|
value?: FilterValueType;
|
|
@@ -14,7 +15,9 @@ type FilterListProps = {
|
|
|
14
15
|
quickFilterMaxLength: number;
|
|
15
16
|
formFiltersPrefix: string;
|
|
16
17
|
renderItem?: (item: any, otherProps?: any) => React.ReactNode;
|
|
17
|
-
placement?: 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
18
|
+
placement?: 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom'; /** 筛选按钮尺寸,与 antd Button size 一致 */
|
|
19
|
+
size?: 'small' | 'middle' | 'large'; /** 筛选触发按钮的 className,用于定制样式(如与设计系统对齐) */
|
|
20
|
+
buttonClassName?: string;
|
|
18
21
|
};
|
|
19
22
|
//#endregion
|
|
20
23
|
export { FilterListProps };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
|
|
2
|
+
const require_objectSpread2 = require('../../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js');
|
|
3
|
+
const require_objectWithoutProperties = require('../../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutProperties.js');
|
|
4
|
+
const require_PisellSingleSelect = require('../../../pisellSingleSelect/PisellSingleSelect.js');
|
|
5
|
+
const require_PisellMultipleSelect = require('../../../pisellMultipleSelect/PisellMultipleSelect.js');
|
|
6
|
+
let antd = require("antd");
|
|
7
|
+
let react = require("react");
|
|
8
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
9
|
+
|
|
10
|
+
//#region src/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.tsx
|
|
11
|
+
/**
|
|
12
|
+
* 筛选项中 singleSelect/multipleSelect 的异步 options 包装器。
|
|
13
|
+
* 当列配置传入 getOptions(同步或异步)时,先解析再渲染 PisellSingleSelect/PisellMultipleSelect。
|
|
14
|
+
*/
|
|
15
|
+
const _excluded = [
|
|
16
|
+
"getOptions",
|
|
17
|
+
"fieldType",
|
|
18
|
+
"value",
|
|
19
|
+
"onChange"
|
|
20
|
+
];
|
|
21
|
+
function normalizeOptions(list) {
|
|
22
|
+
if (!Array.isArray(list)) return [];
|
|
23
|
+
return list.map((item) => item && typeof item === "object" && "label" in item && "value" in item ? {
|
|
24
|
+
label: String(item.label),
|
|
25
|
+
value: item.value
|
|
26
|
+
} : {
|
|
27
|
+
label: String(item),
|
|
28
|
+
value: item
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
const AsyncOptionsSelectWrapper = (props) => {
|
|
32
|
+
const { getOptions, fieldType, value, onChange } = props, rest = require_objectWithoutProperties._objectWithoutProperties(props, _excluded);
|
|
33
|
+
const [options, setOptions] = (0, react.useState)([]);
|
|
34
|
+
const [loading, setLoading] = (0, react.useState)(true);
|
|
35
|
+
(0, react.useEffect)(() => {
|
|
36
|
+
setLoading(true);
|
|
37
|
+
const result = getOptions();
|
|
38
|
+
Promise.resolve(result).then((list) => {
|
|
39
|
+
setOptions(normalizeOptions(list));
|
|
40
|
+
}).finally(() => {
|
|
41
|
+
setLoading(false);
|
|
42
|
+
});
|
|
43
|
+
}, [getOptions]);
|
|
44
|
+
const commonProps = require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, rest), {}, {
|
|
45
|
+
options,
|
|
46
|
+
mode: "edit"
|
|
47
|
+
});
|
|
48
|
+
if (loading) return /* @__PURE__ */ react.default.createElement(antd.Spin, {
|
|
49
|
+
spinning: true,
|
|
50
|
+
size: "small"
|
|
51
|
+
}, /* @__PURE__ */ react.default.createElement("span", { style: {
|
|
52
|
+
display: "inline-block",
|
|
53
|
+
minWidth: 120,
|
|
54
|
+
minHeight: 32
|
|
55
|
+
} }));
|
|
56
|
+
if (fieldType === "multipleSelect") return /* @__PURE__ */ react.default.createElement(require_PisellMultipleSelect.default, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, commonProps), {}, {
|
|
57
|
+
value,
|
|
58
|
+
onChange
|
|
59
|
+
}));
|
|
60
|
+
return /* @__PURE__ */ react.default.createElement(require_PisellSingleSelect.default, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, commonProps), {}, {
|
|
61
|
+
value,
|
|
62
|
+
onChange
|
|
63
|
+
}));
|
|
64
|
+
};
|
|
65
|
+
AsyncOptionsSelectWrapper.displayName = "AsyncOptionsSelectWrapper";
|
|
66
|
+
var AsyncOptionsSelectWrapper_default = AsyncOptionsSelectWrapper;
|
|
67
|
+
|
|
68
|
+
//#endregion
|
|
69
|
+
exports.default = AsyncOptionsSelectWrapper_default;
|
|
@@ -1,22 +1,122 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
|
|
2
2
|
const require_objectSpread2 = require('../../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js');
|
|
3
|
-
const
|
|
3
|
+
const require_objectWithoutProperties = require('../../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutProperties.js');
|
|
4
|
+
const require_index = require('../../../../locales/index.js');
|
|
5
|
+
const require_index$1 = require('../../../table/Table/fields/index.js');
|
|
6
|
+
const require_PisellSingleLineText = require('../../../pisellSingleLineText/PisellSingleLineText.js');
|
|
7
|
+
const require_PisellLongText = require('../../../pisellLongText/PisellLongText.js');
|
|
8
|
+
const require_PisellEmail = require('../../../pisellEmail/PisellEmail.js');
|
|
9
|
+
const require_PisellPhone = require('../../../pisellPhone/PisellPhone.js');
|
|
10
|
+
const require_PisellUrl = require('../../../pisellUrl/PisellUrl.js');
|
|
11
|
+
const require_PisellNumber = require('../../../pisellNumber/PisellNumber.js');
|
|
12
|
+
const require_PisellCurrency = require('../../../pisellCurrency/PisellCurrency.js');
|
|
13
|
+
const require_PisellPercent = require('../../../pisellPercent/PisellPercent.js');
|
|
14
|
+
const require_PisellRating = require('../../../pisellRating/PisellRating.js');
|
|
15
|
+
const require_PisellSingleSelect = require('../../../pisellSingleSelect/PisellSingleSelect.js');
|
|
16
|
+
const require_PisellMultipleSelect = require('../../../pisellMultipleSelect/PisellMultipleSelect.js');
|
|
17
|
+
const require_AsyncOptionsSelectWrapper = require('./AsyncOptionsSelectWrapper.js');
|
|
4
18
|
let antd = require("antd");
|
|
5
19
|
let react = require("react");
|
|
6
20
|
react = require_rolldown_runtime.__toESM(react);
|
|
21
|
+
let dayjs = require("dayjs");
|
|
22
|
+
dayjs = require_rolldown_runtime.__toESM(dayjs);
|
|
7
23
|
require("./index.less");
|
|
8
24
|
|
|
9
25
|
//#region src/components/filter/components/FilterItem/index.tsx
|
|
26
|
+
const _excluded = ["value", "onChange"], _excluded2 = ["getOptions"];
|
|
27
|
+
const { RangePicker } = antd.DatePicker;
|
|
28
|
+
/** 列 type(RecordBoardFieldType)对应 Pisell 组件,用于筛选项编辑态;与 RecordBoard 列 type 一致 */
|
|
29
|
+
const PISELL_FIELD_TYPE_MAP = {
|
|
30
|
+
singleLineText: require_PisellSingleLineText.default,
|
|
31
|
+
longText: require_PisellLongText.default,
|
|
32
|
+
email: require_PisellEmail.default,
|
|
33
|
+
phone: require_PisellPhone.default,
|
|
34
|
+
url: require_PisellUrl.default,
|
|
35
|
+
number: require_PisellNumber.default,
|
|
36
|
+
currency: require_PisellCurrency.default,
|
|
37
|
+
percent: require_PisellPercent.default,
|
|
38
|
+
rating: require_PisellRating.default,
|
|
39
|
+
singleSelect: require_PisellSingleSelect.default,
|
|
40
|
+
multipleSelect: require_PisellMultipleSelect.default
|
|
41
|
+
};
|
|
42
|
+
/** 筛选类型到 table field 类型的映射(table fields 无 single/input,用 select/text) */
|
|
43
|
+
const FILTER_TYPE_TO_FIELD = {
|
|
44
|
+
single: "select",
|
|
45
|
+
input: "text",
|
|
46
|
+
datePicker: "date",
|
|
47
|
+
rangePicker: "rangePicker",
|
|
48
|
+
search: "search"
|
|
49
|
+
};
|
|
50
|
+
/** 将 form 中可能为 string[] 或 dayjs[] 的值转为 RangePicker 需要的 [Dayjs, Dayjs] | null */
|
|
51
|
+
function toRangePickerValue(val) {
|
|
52
|
+
if (val == null) return null;
|
|
53
|
+
if (Array.isArray(val) && val.length >= 2) {
|
|
54
|
+
const start = val[0] ? dayjs.default.isDayjs(val[0]) ? val[0] : (0, dayjs.default)(val[0]) : null;
|
|
55
|
+
const end = val[1] ? dayjs.default.isDayjs(val[1]) ? val[1] : (0, dayjs.default)(val[1]) : null;
|
|
56
|
+
if (start && end) return [start, end];
|
|
57
|
+
}
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
/** 使用 antd RangePicker,仅做 value 归一化以兼容 form 里存的 string[] */
|
|
61
|
+
const AntdRangePickerWithValue = react.default.forwardRef(function AntdRangePickerWithValue(_ref, ref) {
|
|
62
|
+
let { value, onChange } = _ref, rest = require_objectWithoutProperties._objectWithoutProperties(_ref, _excluded);
|
|
63
|
+
const normalized = toRangePickerValue(value);
|
|
64
|
+
return /* @__PURE__ */ react.default.createElement(RangePicker, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, rest), {}, {
|
|
65
|
+
ref,
|
|
66
|
+
placeholder: [require_index.getText("table-action-range-picker-placeholder-start"), require_index.getText("table-action-range-picker-placeholder-end")],
|
|
67
|
+
value: normalized,
|
|
68
|
+
onChange: (dates) => onChange === null || onChange === void 0 ? void 0 : onChange(dates !== null && dates !== void 0 ? dates : void 0)
|
|
69
|
+
}));
|
|
70
|
+
});
|
|
10
71
|
const FilterItem = (props) => {
|
|
11
|
-
|
|
72
|
+
var _componentProps$getOp;
|
|
73
|
+
const { label, type, name, other, isHidden, props: itemProps } = props;
|
|
74
|
+
const fieldTypeFromColumn = other === null || other === void 0 ? void 0 : other.fieldType;
|
|
75
|
+
const PisellCom = fieldTypeFromColumn ? PISELL_FIELD_TYPE_MAP[fieldTypeFromColumn] : void 0;
|
|
76
|
+
if (type === "custom") {
|
|
77
|
+
const CustomComponent = other === null || other === void 0 ? void 0 : other.component;
|
|
78
|
+
if (!CustomComponent) return null;
|
|
79
|
+
const componentProps$1 = require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, itemProps || {}), other || {});
|
|
80
|
+
delete componentProps$1.component;
|
|
81
|
+
return /* @__PURE__ */ react.default.createElement(antd.Form.Item, require_objectSpread2._objectSpread2({
|
|
82
|
+
label,
|
|
83
|
+
name,
|
|
84
|
+
hidden: isHidden
|
|
85
|
+
}, (other === null || other === void 0 ? void 0 : other.formItemProps) || {}), /* @__PURE__ */ react.default.createElement(CustomComponent, componentProps$1));
|
|
86
|
+
}
|
|
87
|
+
if (type === "rangePicker") {
|
|
88
|
+
const componentProps$1 = require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, itemProps || {}), other || {}), {}, { prefixCls: "pisell-lowcode" });
|
|
89
|
+
return /* @__PURE__ */ react.default.createElement(antd.Form.Item, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({
|
|
90
|
+
label,
|
|
91
|
+
name
|
|
92
|
+
}, (other === null || other === void 0 ? void 0 : other.formItemProps) || {}), {}, {
|
|
93
|
+
hidden: isHidden,
|
|
94
|
+
className: "pisell-lowcode-range-picker-wrap"
|
|
95
|
+
}), /* @__PURE__ */ react.default.createElement(AntdRangePickerWithValue, componentProps$1));
|
|
96
|
+
}
|
|
12
97
|
const Com = (0, react.useMemo)(() => {
|
|
13
|
-
var _fieldMaps;
|
|
14
|
-
|
|
15
|
-
|
|
98
|
+
var _FILTER_TYPE_TO_FIELD, _fieldMaps;
|
|
99
|
+
if (PisellCom) return PisellCom;
|
|
100
|
+
return (_fieldMaps = require_index$1.fieldMaps[(_FILTER_TYPE_TO_FIELD = FILTER_TYPE_TO_FIELD[type]) !== null && _FILTER_TYPE_TO_FIELD !== void 0 ? _FILTER_TYPE_TO_FIELD : type]) === null || _fieldMaps === void 0 ? void 0 : _fieldMaps.edit;
|
|
101
|
+
}, [type, PisellCom]);
|
|
102
|
+
if (!Com) return null;
|
|
103
|
+
const isPisell = Boolean(PisellCom);
|
|
104
|
+
const componentProps = require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, itemProps || {}), other || {}), isPisell ? { mode: "edit" } : {});
|
|
105
|
+
const getOptions = (_componentProps$getOp = componentProps.getOptions) !== null && _componentProps$getOp !== void 0 ? _componentProps$getOp : other === null || other === void 0 ? void 0 : other.getOptions;
|
|
106
|
+
if (isPisell && typeof getOptions === "function" && (fieldTypeFromColumn === "singleSelect" || fieldTypeFromColumn === "multipleSelect") && fieldTypeFromColumn) {
|
|
107
|
+
const { getOptions: _go } = componentProps, restProps = require_objectWithoutProperties._objectWithoutProperties(componentProps, _excluded2);
|
|
108
|
+
return /* @__PURE__ */ react.default.createElement(antd.Form.Item, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({
|
|
109
|
+
label,
|
|
110
|
+
name
|
|
111
|
+
}, (other === null || other === void 0 ? void 0 : other.formItemProps) || {}), {}, { hidden: isHidden }), /* @__PURE__ */ react.default.createElement(require_AsyncOptionsSelectWrapper.default, require_objectSpread2._objectSpread2({
|
|
112
|
+
getOptions,
|
|
113
|
+
fieldType: fieldTypeFromColumn
|
|
114
|
+
}, restProps)));
|
|
115
|
+
}
|
|
16
116
|
return /* @__PURE__ */ react.default.createElement(antd.Form.Item, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({
|
|
17
117
|
label,
|
|
18
118
|
name
|
|
19
|
-
}, (other === null || other === void 0 ? void 0 : other.formItemProps) || {}), {}, { hidden: isHidden }), /* @__PURE__ */ react.default.createElement(Com,
|
|
119
|
+
}, (other === null || other === void 0 ? void 0 : other.formItemProps) || {}), {}, { hidden: isHidden }), /* @__PURE__ */ react.default.createElement(Com, componentProps));
|
|
20
120
|
};
|
|
21
121
|
var FilterItem_default = FilterItem;
|
|
22
122
|
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FilterItem 样式
|
|
3
|
+
* RangePicker 按 Figma Pisell 2.0 Component Library (node-id=13586-90520)
|
|
4
|
+
* 使用 pisell-lowcode- 前缀(RangePicker 传入 prefixCls="pisell-lowcode")
|
|
5
|
+
* - Border: Gray/300 #D0D5DD, 1px
|
|
6
|
+
* - Background: Base/White #FFFFFF
|
|
7
|
+
* - Text/Icon: Gray/500 #667085
|
|
8
|
+
* - Typography: Text md/Regular - Inter 16px, weight 400, line-height 24px
|
|
9
|
+
* - Shadow: Shadow/xs 0 1px 2px rgba(16, 24, 40, 0.05)
|
|
10
|
+
* - Border radius: 8px
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
.pisell-lowcode-range-picker-wrap {
|
|
14
|
+
width: 257px;
|
|
15
|
+
|
|
16
|
+
.pisell-lowcode-range {
|
|
17
|
+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
18
|
+
font-size: 16px;
|
|
19
|
+
font-weight: 400;
|
|
20
|
+
line-height: 24px;
|
|
21
|
+
letter-spacing: 0;
|
|
22
|
+
color: #667085;
|
|
23
|
+
border-radius: 8px;
|
|
24
|
+
border: 1px solid #d0d5dd;
|
|
25
|
+
background: #ffffff;
|
|
26
|
+
box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: 48px;
|
|
29
|
+
min-height: 48px;
|
|
30
|
+
padding: 6px 11px;
|
|
31
|
+
|
|
32
|
+
.pisell-lowcode-picker-input {
|
|
33
|
+
height: 36px;
|
|
34
|
+
|
|
35
|
+
> input {
|
|
36
|
+
font-family: inherit;
|
|
37
|
+
font-size: 16px;
|
|
38
|
+
font-weight: 400;
|
|
39
|
+
line-height: 24px;
|
|
40
|
+
color: #667085;
|
|
41
|
+
|
|
42
|
+
&::placeholder {
|
|
43
|
+
color: #667085;
|
|
44
|
+
opacity: 0.6;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.pisell-lowcode-picker-separator {
|
|
50
|
+
color: #667085;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.pisell-lowcode-picker-suffix,
|
|
54
|
+
.pisell-lowcode-picker-clear {
|
|
55
|
+
color: #667085;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:hover {
|
|
59
|
+
border-color: #d0d5dd;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&.pisell-lowcode-picker-focused {
|
|
63
|
+
border-color: #d0d5dd;
|
|
64
|
+
box-shadow: 0 0 0 2px rgba(16, 24, 40, 0.05);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.pisell-lowcode-picker-large {
|
|
68
|
+
height: 48px;
|
|
69
|
+
min-height: 48px;
|
|
70
|
+
padding: 6px 11px;
|
|
71
|
+
|
|
72
|
+
.pisell-lowcode-picker-input {
|
|
73
|
+
height: 36px;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&.pisell-lowcode-picker-small {
|
|
78
|
+
min-height: 32px;
|
|
79
|
+
padding: 2px 7px;
|
|
80
|
+
|
|
81
|
+
.pisell-lowcode-picker-input {
|
|
82
|
+
height: 24px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.pisell-lowcode-picker-input > input {
|
|
86
|
+
font-size: 14px;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -15,12 +15,14 @@ type FilterType = {
|
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
17
|
* 筛选列表项配置
|
|
18
|
+
* - type 为 single/input/rangePicker 等时使用内置或映射组件
|
|
19
|
+
* - type 为 "custom" 时使用 other.component,组件接收 value/onChange(由 Form 注入)
|
|
18
20
|
*/
|
|
19
21
|
type FilterItemProps = {
|
|
20
|
-
type: "single" | "input" | "datePicker" | "rangePicker" | "search";
|
|
22
|
+
type: "single" | "input" | "datePicker" | "rangePicker" | "search" | "custom";
|
|
21
23
|
name?: string | string[];
|
|
22
24
|
key: string;
|
|
23
|
-
props
|
|
25
|
+
props?: object;
|
|
24
26
|
label?: string;
|
|
25
27
|
sort?: boolean;
|
|
26
28
|
localFilter?: boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { InputProps, InputRef } from "antd";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react3 from "react";
|
|
4
4
|
import * as antd_es_input0 from "antd/es/input";
|
|
5
5
|
import * as antd_es_input_TextArea0 from "antd/es/input/TextArea";
|
|
6
6
|
|
|
7
7
|
//#region src/components/input/index.d.ts
|
|
8
|
-
declare const OriginalGroup:
|
|
8
|
+
declare const OriginalGroup: react3.FC<antd_es_input0.GroupProps>, OriginalTextArea: react3.ForwardRefExoticComponent<antd_es_input0.TextAreaProps & react3.RefAttributes<antd_es_input_TextArea0.TextAreaRef>>, OriginalPassword: react3.ForwardRefExoticComponent<antd_es_input0.PasswordProps & react3.RefAttributes<InputRef>>, OriginalSearch: react3.ForwardRefExoticComponent<antd_es_input0.SearchProps & react3.RefAttributes<InputRef>>;
|
|
9
9
|
type CompoundedComponent = React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>> & {
|
|
10
10
|
Group: typeof OriginalGroup;
|
|
11
11
|
Search: typeof OriginalSearch;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import * as
|
|
2
|
+
import * as react10 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/pisell-config-provider/context.d.ts
|
|
5
5
|
interface PisellContextType {
|
|
@@ -11,7 +11,7 @@ interface PisellContextType {
|
|
|
11
11
|
/** 获取货币符号 */
|
|
12
12
|
getSymbolic?: () => string;
|
|
13
13
|
}
|
|
14
|
-
declare const PisellContext:
|
|
14
|
+
declare const PisellContext: react10.Context<PisellContextType>;
|
|
15
15
|
/**
|
|
16
16
|
* provider外获取当前全局配置
|
|
17
17
|
*/
|
|
@@ -1,43 +1,181 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* PisellCurrency 组件样式
|
|
3
|
+
* 基于 Figma 设计规范,与 PisellNumber / SingleLineText 设计体系一致,覆盖时使用 pisell-lowcode-xxx
|
|
4
|
+
*/
|
|
2
5
|
|
|
3
6
|
.pisell-currency {
|
|
4
|
-
// 基础样式
|
|
5
7
|
display: inline-block;
|
|
8
|
+
width: 100%;
|
|
6
9
|
|
|
7
|
-
// 只读态样式
|
|
8
|
-
&-read {
|
|
9
|
-
color: rgba(0, 0, 0, 0.85);
|
|
10
|
-
line-height: 1.5715;
|
|
11
|
-
|
|
12
|
-
// 货币数值可以加粗显示(可选)
|
|
13
|
-
font-weight: 500;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// 编辑态样式
|
|
17
10
|
&-edit {
|
|
18
11
|
position: relative;
|
|
12
|
+
width: 100%;
|
|
13
|
+
|
|
14
|
+
// InputNumber 外层(Figma 设计规范,无边框避免双边框)
|
|
15
|
+
.pisell-lowcode-input-number {
|
|
16
|
+
width: 100% !important;
|
|
17
|
+
font-size: 16px !important;
|
|
18
|
+
line-height: 24px !important;
|
|
19
|
+
border-radius: 8px !important;
|
|
20
|
+
border: none !important;
|
|
21
|
+
color: #101828 !important; // Gray/900
|
|
22
|
+
background-color: #ffffff !important;
|
|
23
|
+
|
|
24
|
+
// 内层 input
|
|
25
|
+
.pisell-lowcode-input-number-input {
|
|
26
|
+
height: 46px !important; // 48 - 2px border
|
|
27
|
+
padding: 12px 16px !important;
|
|
28
|
+
font-size: 16px !important;
|
|
29
|
+
line-height: 24px !important;
|
|
30
|
+
color: #101828 !important;
|
|
31
|
+
background: transparent !important;
|
|
32
|
+
border: none !important;
|
|
33
|
+
|
|
34
|
+
&::placeholder {
|
|
35
|
+
color: #667085 !important; // Gray/500
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// 聚焦态
|
|
40
|
+
&.pisell-lowcode-input-number-focused,
|
|
41
|
+
&:focus,
|
|
42
|
+
&:focus-within {
|
|
43
|
+
border-color: #d6bbfb !important; // Primary/300
|
|
44
|
+
box-shadow: 0 0 0 4px #f4ebff !important; // Primary/100
|
|
45
|
+
outline: none !important;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Hover 态
|
|
49
|
+
&:hover:not(.pisell-lowcode-input-number-disabled):not(.pisell-lowcode-input-number-focused) {
|
|
50
|
+
border-color: #b692f6 !important; // Primary/400
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// 禁用态
|
|
54
|
+
&.pisell-lowcode-input-number-disabled {
|
|
55
|
+
background-color: #f9fafb !important; // Gray/50
|
|
56
|
+
border-color: #d0d5dd !important;
|
|
57
|
+
cursor: not-allowed !important;
|
|
58
|
+
|
|
59
|
+
.pisell-lowcode-input-number-input {
|
|
60
|
+
color: #98a2b3 !important; // Gray/400
|
|
61
|
+
cursor: not-allowed !important;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// 货币符号:前缀
|
|
66
|
+
.pisell-lowcode-input-number-prefix {
|
|
67
|
+
margin-right: 8px;
|
|
68
|
+
margin-left: 16px;
|
|
69
|
+
color: #667085; // Gray/500
|
|
70
|
+
font-size: 16px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// 货币符号:后置(addonAfter)
|
|
74
|
+
.pisell-lowcode-input-number-suffix {
|
|
75
|
+
margin-left: 8px;
|
|
76
|
+
margin-right: 16px;
|
|
77
|
+
color: #667085;
|
|
78
|
+
font-size: 16px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// addonBefore / addonAfter 包裹(InputNumber 后置符号可能用 addon 渲染)
|
|
82
|
+
.pisell-lowcode-input-number-group-addon {
|
|
83
|
+
background-color: #ffffff !important;
|
|
84
|
+
border: 1px solid #d0d5dd !important;
|
|
85
|
+
color: #344054; // Gray/700
|
|
86
|
+
font-size: 16px !important;
|
|
87
|
+
padding: 12px 16px !important;
|
|
88
|
+
|
|
89
|
+
&:first-child {
|
|
90
|
+
border-right: none !important;
|
|
91
|
+
border-radius: 8px 0 0 8px !important;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&:last-child {
|
|
95
|
+
border-left: none !important;
|
|
96
|
+
border-radius: 0 8px 8px 0 !important;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// 步进器按钮(controls)
|
|
101
|
+
.pisell-lowcode-input-number-handler-wrap {
|
|
102
|
+
border-left: 1px solid #d0d5dd !important;
|
|
103
|
+
background: #ffffff !important;
|
|
19
104
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
105
|
+
.pisell-lowcode-input-number-handler {
|
|
106
|
+
color: #667085;
|
|
107
|
+
border-color: #d0d5dd;
|
|
108
|
+
|
|
109
|
+
&:hover {
|
|
110
|
+
color: #344054;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&.pisell-lowcode-input-number-handler-up-disabled,
|
|
114
|
+
&.pisell-lowcode-input-number-handler-down-disabled {
|
|
115
|
+
color: #98a2b3;
|
|
116
|
+
cursor: not-allowed;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// 错误状态
|
|
122
|
+
&.pisell-lowcode-input-number-status-error {
|
|
123
|
+
border-color: #fda29b !important; // Error/300
|
|
124
|
+
|
|
125
|
+
&.pisell-lowcode-input-number-focused,
|
|
126
|
+
&:focus-within {
|
|
127
|
+
border-color: #f97066 !important; // Error/400
|
|
128
|
+
box-shadow: 0 0 0 4px #fee4e2 !important; // Error/100
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&:hover:not(:focus-within) {
|
|
132
|
+
border-color: #f97066 !important;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
26
135
|
}
|
|
27
136
|
}
|
|
28
137
|
|
|
29
|
-
//
|
|
138
|
+
// 错误提示(与设计体系一致)
|
|
139
|
+
&-error {
|
|
140
|
+
margin-top: 4px;
|
|
141
|
+
font-size: 12px;
|
|
142
|
+
color: #d92d20; // Error/600
|
|
143
|
+
line-height: 1.5;
|
|
144
|
+
animation: pisell-currency-fadeIn 0.3s ease-in-out;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// 只读态(Figma: Gray/900, 16px, Medium, line-height 24px)
|
|
148
|
+
&-read {
|
|
149
|
+
color: #101828; // Gray/900
|
|
150
|
+
font-size: 16px;
|
|
151
|
+
font-weight: 500;
|
|
152
|
+
line-height: 24px;
|
|
153
|
+
letter-spacing: 0;
|
|
154
|
+
}
|
|
155
|
+
|
|
30
156
|
&-disabled {
|
|
31
|
-
|
|
157
|
+
opacity: 0.4;
|
|
158
|
+
cursor: not-allowed;
|
|
32
159
|
}
|
|
33
|
-
|
|
34
|
-
//
|
|
160
|
+
|
|
161
|
+
// 负数显示(与设计体系 Error 色一致)
|
|
35
162
|
&.negative {
|
|
36
|
-
color: #
|
|
163
|
+
color: #d92d20; // Error/600
|
|
37
164
|
}
|
|
38
|
-
|
|
39
|
-
//
|
|
165
|
+
|
|
166
|
+
// 正数高亮(收益等场景)
|
|
40
167
|
&.positive {
|
|
41
168
|
color: #52c41a;
|
|
42
169
|
}
|
|
43
170
|
}
|
|
171
|
+
|
|
172
|
+
@keyframes pisell-currency-fadeIn {
|
|
173
|
+
from {
|
|
174
|
+
opacity: 0;
|
|
175
|
+
transform: translateY(-4px);
|
|
176
|
+
}
|
|
177
|
+
to {
|
|
178
|
+
opacity: 1;
|
|
179
|
+
transform: translateY(0);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import * as
|
|
2
|
+
import * as react16 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/pisellDatePicker/index.d.ts
|
|
5
|
-
declare const PisellDatePicker: (props: any) =>
|
|
5
|
+
declare const PisellDatePicker: (props: any) => react16.JSX.Element;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { PisellDatePicker };
|