@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
|
@@ -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 react9 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) => react9.JSX.Element;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { PisellDatePicker };
|
|
@@ -43,7 +43,7 @@ import "./PisellDateTimeDisplay.less";
|
|
|
43
43
|
*/
|
|
44
44
|
const PisellDateTimeDisplay = (props) => {
|
|
45
45
|
var _ref, _presetSource$localeK;
|
|
46
|
-
const { layout = "horizontal", textAlign = "center", fields, formatByLocale, timeFormat, dateFormat, weekdayFormat, customFormat, inlineSeparator = " · ", containerStyle, timeStyle, dateStyle, weekdayStyle, refreshInterval, disableAutoRefresh = false, locale, onTimeUpdate, onClick, className, style } = props;
|
|
46
|
+
const { value: valueProp, layout = "horizontal", textAlign = "center", fields, formatByLocale, timeFormat, dateFormat, weekdayFormat, customFormat, inlineSeparator = " · ", containerStyle, timeStyle, dateStyle, weekdayStyle, refreshInterval, disableAutoRefresh = false, locale, onTimeUpdate, onClick, className, style } = props;
|
|
47
47
|
const localeKey = getDayjsLocale(locale);
|
|
48
48
|
const baseLocale = localeKey.split("-")[0];
|
|
49
49
|
const presetSource = formatByLocale !== null && formatByLocale !== void 0 ? formatByLocale : DATETIME_DISPLAY_FORMATS;
|
|
@@ -54,12 +54,13 @@ const PisellDateTimeDisplay = (props) => {
|
|
|
54
54
|
const effectiveWeekdayFormat = _objectSpread2(_objectSpread2({}, preset.weekdayFormat), weekdayFormat);
|
|
55
55
|
const currentTime = useCurrentTime({
|
|
56
56
|
refreshInterval: refreshInterval !== null && refreshInterval !== void 0 ? refreshInterval : getRefreshInterval(effectiveTimeFormat),
|
|
57
|
-
disabled: disableAutoRefresh,
|
|
57
|
+
disabled: disableAutoRefresh || valueProp !== void 0,
|
|
58
58
|
locale,
|
|
59
59
|
onUpdate: onTimeUpdate
|
|
60
60
|
});
|
|
61
|
+
const displayTime = valueProp !== void 0 && valueProp !== null ? dayjs(valueProp) : currentTime;
|
|
61
62
|
if (customFormat) {
|
|
62
|
-
const formattedTime =
|
|
63
|
+
const formattedTime = displayTime.format(customFormat);
|
|
63
64
|
const containerInlineStyle$1 = _objectSpread2({
|
|
64
65
|
background: containerStyle === null || containerStyle === void 0 ? void 0 : containerStyle.background,
|
|
65
66
|
borderRadius: containerStyle === null || containerStyle === void 0 ? void 0 : containerStyle.borderRadius,
|
|
@@ -80,7 +81,7 @@ const PisellDateTimeDisplay = (props) => {
|
|
|
80
81
|
"weekday"
|
|
81
82
|
] } = effectiveFields || {};
|
|
82
83
|
const referenceDate = dayjs();
|
|
83
|
-
const relativeDay = (effectiveDateFormat === null || effectiveDateFormat === void 0 ? void 0 : effectiveDateFormat.showRelativeDay) ? getRelativeDay(
|
|
84
|
+
const relativeDay = (effectiveDateFormat === null || effectiveDateFormat === void 0 ? void 0 : effectiveDateFormat.showRelativeDay) ? getRelativeDay(displayTime, referenceDate) : null;
|
|
84
85
|
const hideWeekdayWhenDateRelative = showDate && relativeDay !== null;
|
|
85
86
|
const containerInlineStyle = _objectSpread2({
|
|
86
87
|
background: containerStyle === null || containerStyle === void 0 ? void 0 : containerStyle.background,
|
|
@@ -95,20 +96,20 @@ const PisellDateTimeDisplay = (props) => {
|
|
|
95
96
|
switch (fieldType) {
|
|
96
97
|
case "time": return showTime ? /* @__PURE__ */ React.createElement(TimeDisplay, {
|
|
97
98
|
key: "time",
|
|
98
|
-
time:
|
|
99
|
+
time: displayTime,
|
|
99
100
|
format: effectiveTimeFormat,
|
|
100
101
|
style: timeStyle
|
|
101
102
|
}) : null;
|
|
102
103
|
case "date": return showDate ? /* @__PURE__ */ React.createElement(DateDisplay, {
|
|
103
104
|
key: "date",
|
|
104
|
-
date:
|
|
105
|
+
date: displayTime,
|
|
105
106
|
format: effectiveDateFormat,
|
|
106
107
|
referenceDate: dayjs(),
|
|
107
108
|
style: dateStyle
|
|
108
109
|
}) : null;
|
|
109
110
|
case "weekday": return showWeekday && !hideWeekdayWhenDateRelative ? /* @__PURE__ */ React.createElement(WeekdayDisplay, {
|
|
110
111
|
key: "weekday",
|
|
111
|
-
weekday:
|
|
112
|
+
weekday: displayTime,
|
|
112
113
|
format: effectiveWeekdayFormat,
|
|
113
114
|
style: weekdayStyle
|
|
114
115
|
}) : null;
|
|
@@ -132,12 +133,12 @@ const PisellDateTimeDisplay = (props) => {
|
|
|
132
133
|
if (renderedFields.length === 0) return null;
|
|
133
134
|
if (layout === "horizontal") {
|
|
134
135
|
const timeField = showTime ? renderField("time") : null;
|
|
135
|
-
const isChinese$1 = isChinese(
|
|
136
|
+
const isChinese$1 = isChinese(displayTime.locale());
|
|
136
137
|
if (showDate && showWeekday) {
|
|
137
138
|
var _labels$relativeDay;
|
|
138
139
|
const labels = effectiveDateFormat === null || effectiveDateFormat === void 0 ? void 0 : effectiveDateFormat.relativeDayLabels;
|
|
139
|
-
const dateStr = relativeDay ? (_labels$relativeDay = labels === null || labels === void 0 ? void 0 : labels[relativeDay]) !== null && _labels$relativeDay !== void 0 ? _labels$relativeDay : getRelativeDayLabel(relativeDay,
|
|
140
|
-
const weekdayStr =
|
|
140
|
+
const dateStr = relativeDay ? (_labels$relativeDay = labels === null || labels === void 0 ? void 0 : labels[relativeDay]) !== null && _labels$relativeDay !== void 0 ? _labels$relativeDay : getRelativeDayLabel(relativeDay, displayTime.locale()) : isChinese$1 ? displayTime.format("M月D日") : displayTime.format("D MMM");
|
|
141
|
+
const weekdayStr = displayTime.format("ddd");
|
|
141
142
|
const combinedStr = relativeDay ? dateStr : isChinese$1 ? `${weekdayStr} ${dateStr}` : `${weekdayStr}, ${dateStr}`;
|
|
142
143
|
const dateInlineStyle = {
|
|
143
144
|
fontSize: dateStyle === null || dateStyle === void 0 ? void 0 : dateStyle.fontSize,
|
|
@@ -249,6 +249,11 @@ interface DateTimeDisplayFormatPreset {
|
|
|
249
249
|
* PisellDateTimeDisplay 组件 Props
|
|
250
250
|
*/
|
|
251
251
|
interface PisellDateTimeDisplayProps {
|
|
252
|
+
/**
|
|
253
|
+
* 传入时展示该时间,不传则展示当前时间(并可按 refreshInterval 刷新)
|
|
254
|
+
* @description 用于表格列、详情等展示给定时间;支持 dayjs、时间戳、ISO 字符串
|
|
255
|
+
*/
|
|
256
|
+
value?: Dayjs | string | number;
|
|
252
257
|
/**
|
|
253
258
|
* 布局方向
|
|
254
259
|
* @default 'horizontal'
|
|
@@ -3,37 +3,6 @@ import React from "react";
|
|
|
3
3
|
import "./PisellEmail.less";
|
|
4
4
|
|
|
5
5
|
//#region src/components/pisellEmail/PisellEmail.d.ts
|
|
6
|
-
|
|
7
|
-
* PisellEmail 邮箱地址组件
|
|
8
|
-
*
|
|
9
|
-
* 邮箱地址输入/展示组件,支持只读、编辑、禁用三种状态。
|
|
10
|
-
* 基于 Ant Design AutoComplete 和 Input 组件开发,提供邮箱格式校验、域名智能补全、
|
|
11
|
-
* mailto 邮件发送和域名隐藏功能。
|
|
12
|
-
*
|
|
13
|
-
* @param props 组件 Props
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* // 编辑态(邮箱输入)
|
|
17
|
-
* <PisellEmail
|
|
18
|
-
* placeholder="请输入邮箱地址"
|
|
19
|
-
* required
|
|
20
|
-
* />
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* // 只读态(可发邮件)
|
|
24
|
-
* <PisellEmail
|
|
25
|
-
* mode="read"
|
|
26
|
-
* value="user@example.com"
|
|
27
|
-
* enableMailto
|
|
28
|
-
* />
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* // 域名补全
|
|
32
|
-
* <PisellEmail
|
|
33
|
-
* enableAutoComplete
|
|
34
|
-
* autoCompleteDomains={['gmail.com', 'company.com']}
|
|
35
|
-
* />
|
|
36
|
-
*/
|
|
37
|
-
declare const PisellEmail: React.FC<PisellEmailProps>;
|
|
6
|
+
declare const _default: React.NamedExoticComponent<PisellEmailProps>;
|
|
38
7
|
//#endregion
|
|
39
|
-
export {
|
|
8
|
+
export { _default };
|
|
@@ -1,31 +1,129 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* PisellEmail 组件样式
|
|
3
|
+
* 基于 Figma 设计规范,与 SingleLineText 设计体系一致
|
|
3
4
|
*/
|
|
4
5
|
|
|
5
6
|
.pisell-email {
|
|
6
7
|
&-edit {
|
|
8
|
+
position: relative;
|
|
7
9
|
width: 100%;
|
|
8
10
|
|
|
9
|
-
//
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
// 仅对 affix-wrapper 设边框,避免与内层 input 双边框(Figma 设计规范)
|
|
12
|
+
.pisell-lowcode-input-affix-wrapper {
|
|
13
|
+
font-size: 16px !important;
|
|
14
|
+
line-height: 24px !important;
|
|
15
|
+
border-radius: 8px !important;
|
|
16
|
+
border: 1px solid #d0d5dd !important; // Gray/300
|
|
17
|
+
padding: 0 !important;
|
|
18
|
+
height: 48px !important;
|
|
19
|
+
color: #101828 !important; // Gray/900
|
|
20
|
+
background-color: #ffffff !important;
|
|
21
|
+
|
|
22
|
+
&:focus,
|
|
23
|
+
&:focus-within {
|
|
24
|
+
border-color: #d6bbfb !important; // Primary/300
|
|
25
|
+
box-shadow: 0 0 0 4px #f4ebff !important; // Primary/100
|
|
26
|
+
outline: none !important;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&:hover:not(:focus):not(:focus-within):not([disabled]) {
|
|
30
|
+
border-color: #b692f6 !important; // Primary/400
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&[disabled],
|
|
34
|
+
&.pisell-lowcode-input-disabled {
|
|
35
|
+
background-color: #f9fafb !important; // Gray/50
|
|
36
|
+
color: #98a2b3 !important; // Gray/400
|
|
37
|
+
border-color: #d0d5dd !important;
|
|
38
|
+
cursor: not-allowed !important;
|
|
39
|
+
}
|
|
15
40
|
}
|
|
41
|
+
|
|
42
|
+
// 内层 input(无边框,由 wrapper 统一描边)
|
|
43
|
+
.pisell-lowcode-input-affix-wrapper .pisell-lowcode-input {
|
|
44
|
+
&::placeholder {
|
|
45
|
+
color: #667085 !important; // Gray/500
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// 带前缀(邮箱图标)的 Input 容器
|
|
50
|
+
.pisell-lowcode-input-affix-wrapper {
|
|
51
|
+
|
|
52
|
+
.pisell-lowcode-input-prefix {
|
|
53
|
+
margin-right: 8px;
|
|
54
|
+
margin-left: 16px;
|
|
55
|
+
color: #667085; // Gray/500
|
|
56
|
+
font-size: 16px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.pisell-lowcode-input-suffix {
|
|
60
|
+
margin-left: 8px;
|
|
61
|
+
margin-right: 16px;
|
|
62
|
+
color: #667085;
|
|
63
|
+
font-size: 16px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.pisell-lowcode-input {
|
|
67
|
+
padding: 12px 0 !important;
|
|
68
|
+
border: none !important;
|
|
69
|
+
box-shadow: none !important;
|
|
70
|
+
|
|
71
|
+
&:focus {
|
|
72
|
+
box-shadow: none !important;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// 清空按钮
|
|
78
|
+
.pisell-lowcode-input-clear-icon {
|
|
79
|
+
color: #667085 !important;
|
|
80
|
+
font-size: 14px !important;
|
|
81
|
+
|
|
82
|
+
&:hover {
|
|
83
|
+
color: #344054 !important; // Gray/700
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// 错误状态
|
|
88
|
+
.pisell-lowcode-input-status-error,
|
|
89
|
+
.pisell-lowcode-input-affix-wrapper-status-error {
|
|
90
|
+
border-color: #fda29b !important; // Error/300
|
|
91
|
+
|
|
92
|
+
&:focus,
|
|
93
|
+
&:focus-within {
|
|
94
|
+
border-color: #f97066 !important; // Error/400
|
|
95
|
+
box-shadow: 0 0 0 4px #fee4e2 !important; // Error/100
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&:hover:not(:focus):not(:focus-within) {
|
|
99
|
+
border-color: #f97066 !important; // Error/400
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// 错误提示(与设计体系一致)
|
|
105
|
+
&-edit-error {
|
|
106
|
+
margin-top: 4px;
|
|
107
|
+
font-size: 12px;
|
|
108
|
+
color: #d92d20; // Error/600
|
|
109
|
+
line-height: 1.5;
|
|
110
|
+
animation: pisell-email-fadeIn 0.3s ease-in-out;
|
|
16
111
|
}
|
|
17
112
|
|
|
18
113
|
&-read {
|
|
19
114
|
display: inline-flex;
|
|
20
115
|
align-items: center;
|
|
21
116
|
|
|
22
|
-
// 链接样式
|
|
23
117
|
.pisell-lowcode-typography-link {
|
|
24
118
|
cursor: pointer;
|
|
25
|
-
transition:
|
|
119
|
+
transition: color 0.2s ease-in-out;
|
|
26
120
|
|
|
27
121
|
&:hover {
|
|
28
|
-
|
|
122
|
+
color: #6d48c4 !important;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&:active {
|
|
126
|
+
color: #5f3da8 !important;
|
|
29
127
|
}
|
|
30
128
|
}
|
|
31
129
|
}
|
|
@@ -40,7 +138,7 @@
|
|
|
40
138
|
}
|
|
41
139
|
}
|
|
42
140
|
|
|
43
|
-
// AutoComplete
|
|
141
|
+
// AutoComplete 下拉样式
|
|
44
142
|
.pisell-email-autocomplete-dropdown {
|
|
45
143
|
.pisell-lowcode-select-item-option-content {
|
|
46
144
|
display: flex;
|
|
@@ -48,3 +146,14 @@
|
|
|
48
146
|
gap: 8px;
|
|
49
147
|
}
|
|
50
148
|
}
|
|
149
|
+
|
|
150
|
+
@keyframes pisell-email-fadeIn {
|
|
151
|
+
from {
|
|
152
|
+
opacity: 0;
|
|
153
|
+
transform: translateY(-4px);
|
|
154
|
+
}
|
|
155
|
+
to {
|
|
156
|
+
opacity: 1;
|
|
157
|
+
transform: translateY(0);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MailtoOptions, PisellEmailProps } from "./types.js";
|
|
2
|
-
import {
|
|
2
|
+
import { _default } from "./PisellEmail.js";
|