@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,30 +1,148 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* PisellNumber 组件样式
|
|
3
|
+
* 基于 Figma 设计规范,与 SingleLineText / PisellEmail 设计体系一致,覆盖时使用 pisell-lowcode-xxx
|
|
4
|
+
*/
|
|
2
5
|
|
|
3
6
|
.pisell-number {
|
|
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
|
-
// 编辑态样式
|
|
14
10
|
&-edit {
|
|
15
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: 1px solid #d0d5dd !important; // Gray/300
|
|
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;
|
|
70
|
+
font-size: 16px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.pisell-lowcode-input-number-suffix {
|
|
74
|
+
margin-left: 8px;
|
|
75
|
+
margin-right: 16px;
|
|
76
|
+
color: #667085;
|
|
77
|
+
font-size: 16px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// 步进器按钮(controls)
|
|
81
|
+
.pisell-lowcode-input-number-handler-wrap {
|
|
82
|
+
border-left: 1px solid #d0d5dd !important;
|
|
83
|
+
background: #ffffff !important;
|
|
84
|
+
|
|
85
|
+
.pisell-lowcode-input-number-handler {
|
|
86
|
+
color: #667085;
|
|
87
|
+
border-color: #d0d5dd;
|
|
16
88
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
89
|
+
&:hover {
|
|
90
|
+
color: #344054;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&.pisell-lowcode-input-number-handler-up-disabled,
|
|
94
|
+
&.pisell-lowcode-input-number-handler-down-disabled {
|
|
95
|
+
color: #98a2b3;
|
|
96
|
+
cursor: not-allowed;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// 错误状态
|
|
102
|
+
&.pisell-lowcode-input-number-status-error {
|
|
103
|
+
border-color: #fda29b !important; // Error/300
|
|
104
|
+
|
|
105
|
+
&.pisell-lowcode-input-number-focused,
|
|
106
|
+
&:focus-within {
|
|
107
|
+
border-color: #f97066 !important; // Error/400
|
|
108
|
+
box-shadow: 0 0 0 4px #fee4e2 !important; // Error/100
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&:hover:not(:focus-within) {
|
|
112
|
+
border-color: #f97066 !important;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
23
115
|
}
|
|
24
116
|
}
|
|
25
117
|
|
|
26
|
-
//
|
|
118
|
+
// 错误提示(与设计体系一致)
|
|
119
|
+
&-error {
|
|
120
|
+
margin-top: 4px;
|
|
121
|
+
font-size: 12px;
|
|
122
|
+
color: #d92d20; // Error/600
|
|
123
|
+
line-height: 1.5;
|
|
124
|
+
animation: pisell-number-fadeIn 0.3s ease-in-out;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&-read {
|
|
128
|
+
color: #101828; // Gray/900
|
|
129
|
+
line-height: 1.5;
|
|
130
|
+
font-size: 16px;
|
|
131
|
+
}
|
|
132
|
+
|
|
27
133
|
&-disabled {
|
|
28
|
-
|
|
134
|
+
opacity: 0.4;
|
|
135
|
+
cursor: not-allowed;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@keyframes pisell-number-fadeIn {
|
|
140
|
+
from {
|
|
141
|
+
opacity: 0;
|
|
142
|
+
transform: translateY(-4px);
|
|
143
|
+
}
|
|
144
|
+
to {
|
|
145
|
+
opacity: 1;
|
|
146
|
+
transform: translateY(0);
|
|
29
147
|
}
|
|
30
148
|
}
|
|
@@ -1,21 +1,141 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* PisellPercent 组件样式
|
|
3
|
+
* 基于 Figma 设计规范,与 PisellNumber 设计体系一致,覆盖时使用 pisell-lowcode-xxx
|
|
4
|
+
*/
|
|
2
5
|
|
|
3
6
|
.pisell-percent {
|
|
4
|
-
// 基础样式
|
|
5
7
|
display: inline-block;
|
|
8
|
+
width: 100%;
|
|
9
|
+
|
|
10
|
+
&-edit {
|
|
11
|
+
position: relative;
|
|
12
|
+
width: 100%;
|
|
13
|
+
|
|
14
|
+
// InputNumber 外层(无边框避免双边框)
|
|
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
|
+
.pisell-lowcode-input-number-input {
|
|
25
|
+
height: 46px !important;
|
|
26
|
+
padding: 12px 16px !important;
|
|
27
|
+
font-size: 16px !important;
|
|
28
|
+
line-height: 24px !important;
|
|
29
|
+
color: #101828 !important;
|
|
30
|
+
background: transparent !important;
|
|
31
|
+
border: none !important;
|
|
32
|
+
box-shadow: none !important;
|
|
33
|
+
outline: none !important;
|
|
34
|
+
|
|
35
|
+
&::placeholder {
|
|
36
|
+
color: #667085 !important; // Gray/500
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:focus {
|
|
40
|
+
box-shadow: none !important;
|
|
41
|
+
outline: none !important;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&.pisell-lowcode-input-number-focused,
|
|
46
|
+
&:focus,
|
|
47
|
+
&:focus-within {
|
|
48
|
+
border-color: #d6bbfb !important; // Primary/300
|
|
49
|
+
box-shadow: 0 0 0 4px #f4ebff !important; // Primary/100
|
|
50
|
+
outline: none !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:hover:not(.pisell-lowcode-input-number-disabled):not(.pisell-lowcode-input-number-focused) {
|
|
54
|
+
border-color: #b692f6 !important; // Primary/400
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.pisell-lowcode-input-number-disabled {
|
|
58
|
+
background-color: #f9fafb !important; // Gray/50
|
|
59
|
+
border-color: #d0d5dd !important;
|
|
60
|
+
cursor: not-allowed !important;
|
|
61
|
+
|
|
62
|
+
.pisell-lowcode-input-number-input {
|
|
63
|
+
color: #98a2b3 !important;
|
|
64
|
+
cursor: not-allowed !important;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// % 后缀
|
|
69
|
+
.pisell-lowcode-input-number-prefix {
|
|
70
|
+
margin-right: 8px;
|
|
71
|
+
margin-left: 16px;
|
|
72
|
+
color: #667085;
|
|
73
|
+
font-size: 16px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.pisell-lowcode-input-number-suffix {
|
|
77
|
+
margin-left: 8px;
|
|
78
|
+
margin-right: 16px;
|
|
79
|
+
color: #667085;
|
|
80
|
+
font-size: 16px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.pisell-lowcode-input-number-handler-wrap {
|
|
84
|
+
border-left: 1px solid #d0d5dd !important;
|
|
85
|
+
background: #ffffff !important;
|
|
86
|
+
|
|
87
|
+
.pisell-lowcode-input-number-handler {
|
|
88
|
+
color: #667085;
|
|
89
|
+
border-color: #d0d5dd;
|
|
90
|
+
|
|
91
|
+
&:hover {
|
|
92
|
+
color: #344054;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&.pisell-lowcode-input-number-handler-up-disabled,
|
|
96
|
+
&.pisell-lowcode-input-number-handler-down-disabled {
|
|
97
|
+
color: #98a2b3;
|
|
98
|
+
cursor: not-allowed;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&.pisell-lowcode-input-number-status-error {
|
|
104
|
+
border-color: #fda29b !important; // Error/300
|
|
105
|
+
|
|
106
|
+
&.pisell-lowcode-input-number-focused,
|
|
107
|
+
&:focus-within {
|
|
108
|
+
border-color: #f97066 !important; // Error/400
|
|
109
|
+
box-shadow: 0 0 0 4px #fee4e2 !important; // Error/100
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&:hover:not(:focus-within) {
|
|
113
|
+
border-color: #f97066 !important;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// 错误提示(与设计体系一致)
|
|
120
|
+
&-error {
|
|
121
|
+
margin-top: 4px;
|
|
122
|
+
font-size: 12px;
|
|
123
|
+
color: #d92d20; // Error/600
|
|
124
|
+
line-height: 1.5;
|
|
125
|
+
animation: pisell-percent-fadeIn 0.3s ease-in-out;
|
|
126
|
+
}
|
|
6
127
|
|
|
7
|
-
// 只读态样式 - text 变体
|
|
8
128
|
&-read {
|
|
9
|
-
color:
|
|
10
|
-
|
|
129
|
+
color: #101828; // Gray/900
|
|
130
|
+
font-size: 16px;
|
|
131
|
+
line-height: 1.5;
|
|
11
132
|
}
|
|
12
133
|
|
|
13
134
|
// 进度条变体
|
|
14
135
|
&-progress {
|
|
15
136
|
width: 100%;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
.ant-progress {
|
|
137
|
+
|
|
138
|
+
.pisell-lowcode-progress {
|
|
19
139
|
width: 100%;
|
|
20
140
|
}
|
|
21
141
|
}
|
|
@@ -27,28 +147,26 @@
|
|
|
27
147
|
justify-content: center;
|
|
28
148
|
}
|
|
29
149
|
|
|
30
|
-
// 编辑态样式
|
|
31
|
-
&-edit {
|
|
32
|
-
position: relative;
|
|
33
|
-
|
|
34
|
-
// 错误提示
|
|
35
|
-
.pisell-percent-error {
|
|
36
|
-
margin-top: 4px;
|
|
37
|
-
color: #ff4d4f;
|
|
38
|
-
font-size: 14px;
|
|
39
|
-
line-height: 1.5;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
150
|
// 带滑块的编辑态
|
|
44
151
|
&-with-slider {
|
|
45
|
-
.
|
|
152
|
+
.pisell-lowcode-slider {
|
|
46
153
|
margin-bottom: 16px;
|
|
47
154
|
}
|
|
48
155
|
}
|
|
49
156
|
|
|
50
|
-
// 禁用态样式
|
|
51
157
|
&-disabled {
|
|
52
|
-
|
|
158
|
+
opacity: 0.4;
|
|
159
|
+
cursor: not-allowed;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@keyframes pisell-percent-fadeIn {
|
|
164
|
+
from {
|
|
165
|
+
opacity: 0;
|
|
166
|
+
transform: translateY(-4px);
|
|
167
|
+
}
|
|
168
|
+
to {
|
|
169
|
+
opacity: 1;
|
|
170
|
+
transform: translateY(0);
|
|
53
171
|
}
|
|
54
172
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* PisellPhone 组件样式
|
|
3
|
+
* 基于 Figma 设计规范,覆盖时使用 pisell-lowcode-xxx
|
|
3
4
|
*/
|
|
4
5
|
|
|
5
6
|
.pisell-phone {
|
|
@@ -7,41 +8,132 @@
|
|
|
7
8
|
position: relative;
|
|
8
9
|
width: 100%;
|
|
9
10
|
|
|
10
|
-
.
|
|
11
|
+
.pisell-lowcode-space-compact {
|
|
11
12
|
width: 100%;
|
|
13
|
+
position: relative;
|
|
14
|
+
border-radius: 8px;
|
|
12
15
|
|
|
13
|
-
//
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
.ant-select-selector {
|
|
18
|
-
// 去掉右边框
|
|
19
|
-
border-right: none !important;
|
|
20
|
-
// 右侧不要圆角
|
|
21
|
-
border-top-right-radius: 0 !important;
|
|
22
|
-
border-bottom-right-radius: 0 !important;
|
|
23
|
-
}
|
|
16
|
+
// 聚焦时整体外圈(与 SingleLineText 一致)
|
|
17
|
+
&:focus-within {
|
|
18
|
+
box-shadow: 0 0 0 4px #f4ebff; // Primary/100
|
|
24
19
|
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// 国家码 Select 与 号码 Input 共用 Figma 设计 token
|
|
23
|
+
.pisell-lowcode-select-selector,
|
|
24
|
+
.pisell-lowcode-input {
|
|
25
|
+
font-size: 16px !important;
|
|
26
|
+
line-height: 24px !important;
|
|
27
|
+
border: 1px solid #d0d5dd !important; // Gray/300
|
|
28
|
+
color: #101828 !important; // Gray/900
|
|
29
|
+
background-color: #ffffff !important;
|
|
30
|
+
height: 48px !important;
|
|
31
|
+
padding: 12px 16px !important;
|
|
32
|
+
|
|
33
|
+
&::placeholder {
|
|
34
|
+
color: #667085 !important; // Gray/500
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&:hover:not(:focus):not(.pisell-lowcode-select-open):not([disabled]) {
|
|
38
|
+
border-color: #b692f6 !important; // Primary/400
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&[disabled],
|
|
42
|
+
&.pisell-lowcode-input-disabled {
|
|
43
|
+
background-color: #f9fafb !important; // Gray/50
|
|
44
|
+
color: #98a2b3 !important; // Gray/400
|
|
45
|
+
border-color: #d0d5dd !important;
|
|
46
|
+
cursor: not-allowed !important;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
25
49
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
border-
|
|
32
|
-
|
|
33
|
-
border-
|
|
34
|
-
border-
|
|
50
|
+
// 国家码选择器:左侧部分,去掉右侧边框与圆角
|
|
51
|
+
.pisell-lowcode-select {
|
|
52
|
+
flex-shrink: 0;
|
|
53
|
+
|
|
54
|
+
.pisell-lowcode-select-selector {
|
|
55
|
+
border-right: none !important;
|
|
56
|
+
border-top-right-radius: 0 !important;
|
|
57
|
+
border-bottom-right-radius: 0 !important;
|
|
58
|
+
border-top-left-radius: 8px !important;
|
|
59
|
+
border-bottom-left-radius: 8px !important;
|
|
60
|
+
min-height: 48px !important;
|
|
61
|
+
padding: 4px 12px 4px 16px !important;
|
|
62
|
+
align-items: center !important;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&.pisell-lowcode-select-focused .pisell-lowcode-select-selector {
|
|
66
|
+
border-color: #d6bbfb !important; // Primary/300
|
|
67
|
+
box-shadow: none !important;
|
|
35
68
|
}
|
|
36
69
|
}
|
|
70
|
+
|
|
71
|
+
// 号码输入框:右侧部分,去掉左侧边框与圆角
|
|
72
|
+
.pisell-lowcode-input {
|
|
73
|
+
flex: 1;
|
|
74
|
+
border-left: none !important;
|
|
75
|
+
border-top-left-radius: 0 !important;
|
|
76
|
+
border-bottom-left-radius: 0 !important;
|
|
77
|
+
border-top-right-radius: 8px !important;
|
|
78
|
+
border-bottom-right-radius: 8px !important;
|
|
79
|
+
|
|
80
|
+
&:focus {
|
|
81
|
+
border-color: #d6bbfb !important; // Primary/300
|
|
82
|
+
box-shadow: none !important;
|
|
83
|
+
outline: none !important;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// 整体聚焦时两侧边框统一为 Primary
|
|
88
|
+
.pisell-lowcode-space-compact:focus-within .pisell-lowcode-select-selector,
|
|
89
|
+
.pisell-lowcode-space-compact:focus-within .pisell-lowcode-input {
|
|
90
|
+
border-color: #d6bbfb !important;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.pisell-lowcode-space-compact:focus-within .pisell-lowcode-select-selector {
|
|
94
|
+
box-shadow: none !important;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// 清空按钮
|
|
98
|
+
.pisell-lowcode-input-clear-icon {
|
|
99
|
+
color: #667085 !important;
|
|
100
|
+
font-size: 14px !important;
|
|
101
|
+
|
|
102
|
+
&:hover {
|
|
103
|
+
color: #344054 !important; // Gray/700
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// 错误状态:Select + Input 整体
|
|
108
|
+
.pisell-lowcode-select-status-error .pisell-lowcode-select-selector,
|
|
109
|
+
.pisell-lowcode-input-status-error {
|
|
110
|
+
border-color: #fda29b !important; // Error/300
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.pisell-lowcode-space-compact:has(.pisell-lowcode-select-status-error) .pisell-lowcode-select-selector,
|
|
114
|
+
.pisell-lowcode-space-compact:has(.pisell-lowcode-input-status-error) .pisell-lowcode-input {
|
|
115
|
+
border-color: #fda29b !important;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.pisell-lowcode-space-compact:focus-within:has(.pisell-lowcode-input-status-error) .pisell-lowcode-select-selector,
|
|
119
|
+
.pisell-lowcode-space-compact:focus-within:has(.pisell-lowcode-input-status-error) .pisell-lowcode-input,
|
|
120
|
+
.pisell-lowcode-space-compact:focus-within:has(.pisell-lowcode-select-status-error) .pisell-lowcode-select-selector,
|
|
121
|
+
.pisell-lowcode-space-compact:focus-within:has(.pisell-lowcode-select-status-error) .pisell-lowcode-input {
|
|
122
|
+
border-color: #f97066 !important; // Error/400
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.pisell-lowcode-space-compact:focus-within:has(.pisell-lowcode-input-status-error),
|
|
126
|
+
.pisell-lowcode-space-compact:focus-within:has(.pisell-lowcode-select-status-error) {
|
|
127
|
+
box-shadow: 0 0 0 4px #fee4e2 !important; // Error/100
|
|
128
|
+
}
|
|
37
129
|
}
|
|
38
130
|
|
|
39
131
|
&-error {
|
|
40
132
|
margin-top: 4px;
|
|
41
133
|
font-size: 12px;
|
|
42
|
-
color: #
|
|
134
|
+
color: #d92d20; // Error/600
|
|
43
135
|
line-height: 1.5;
|
|
44
|
-
animation: fadeIn 0.3s ease-in-out;
|
|
136
|
+
animation: pisell-phone-fadeIn 0.3s ease-in-out;
|
|
45
137
|
}
|
|
46
138
|
|
|
47
139
|
&-read {
|
|
@@ -54,15 +146,19 @@
|
|
|
54
146
|
line-height: 1;
|
|
55
147
|
}
|
|
56
148
|
|
|
149
|
+
&-country-code {
|
|
150
|
+
line-height: 1.5;
|
|
151
|
+
}
|
|
152
|
+
|
|
57
153
|
&-clickable {
|
|
58
154
|
transition: color 0.2s ease-in-out;
|
|
59
155
|
|
|
60
156
|
&:hover {
|
|
61
|
-
color: #
|
|
157
|
+
color: #6d48c4 !important;
|
|
62
158
|
}
|
|
63
159
|
|
|
64
160
|
&:active {
|
|
65
|
-
color: #
|
|
161
|
+
color: #5f3da8 !important;
|
|
66
162
|
}
|
|
67
163
|
}
|
|
68
164
|
|
|
@@ -72,8 +168,7 @@
|
|
|
72
168
|
}
|
|
73
169
|
}
|
|
74
170
|
|
|
75
|
-
|
|
76
|
-
@keyframes fadeIn {
|
|
171
|
+
@keyframes pisell-phone-fadeIn {
|
|
77
172
|
from {
|
|
78
173
|
opacity: 0;
|
|
79
174
|
transform: translateY(-4px);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js";
|
|
2
2
|
import { formatPhone, maskPhone } from "../utils/phoneFormatter.js";
|
|
3
|
-
import { getCountryFlag } from "../utils/countryCodeHelper.js";
|
|
4
3
|
import { Button, Space, Typography } from "antd";
|
|
5
4
|
import React from "react";
|
|
6
5
|
import { PhoneOutlined } from "@ant-design/icons";
|
|
@@ -20,6 +19,7 @@ import { PhoneOutlined } from "@ant-design/icons";
|
|
|
20
19
|
* @param props 组件 Props
|
|
21
20
|
*/
|
|
22
21
|
const ReadOnlyView = (props) => {
|
|
22
|
+
var _props$fontSize, _props$fontWeight;
|
|
23
23
|
const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
|
|
24
24
|
const countryCode = props.countryCode || "+86";
|
|
25
25
|
let displayValue;
|
|
@@ -35,13 +35,23 @@ const ReadOnlyView = (props) => {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
const canDial = props.enableDial !== false && isMobile;
|
|
38
|
-
|
|
38
|
+
const textColor = canDial ? "#7F56DA" : props.color || "#101828";
|
|
39
|
+
const textFontSize = (_props$fontSize = props.fontSize) !== null && _props$fontSize !== void 0 ? _props$fontSize : 16;
|
|
40
|
+
const textFontWeight = (_props$fontWeight = props.fontWeight) !== null && _props$fontWeight !== void 0 ? _props$fontWeight : 500;
|
|
41
|
+
return /* @__PURE__ */ React.createElement("div", { className: `pisell-phone-read ${props.className || ""}` }, /* @__PURE__ */ React.createElement(Space, { size: "small" }, props.showFlag !== false && /* @__PURE__ */ React.createElement("span", {
|
|
42
|
+
className: "pisell-phone-country-code",
|
|
43
|
+
style: {
|
|
44
|
+
fontSize: textFontSize,
|
|
45
|
+
fontWeight: textFontWeight,
|
|
46
|
+
color: textColor
|
|
47
|
+
}
|
|
48
|
+
}, countryCode), /* @__PURE__ */ React.createElement(Typography.Text, {
|
|
39
49
|
className: canDial ? "pisell-phone-clickable" : "",
|
|
40
50
|
onClick: canDial ? handleDial : void 0,
|
|
41
51
|
style: _objectSpread2({
|
|
42
|
-
fontSize:
|
|
43
|
-
fontWeight:
|
|
44
|
-
color:
|
|
52
|
+
fontSize: textFontSize,
|
|
53
|
+
fontWeight: textFontWeight,
|
|
54
|
+
color: textColor,
|
|
45
55
|
cursor: canDial ? "pointer" : "default",
|
|
46
56
|
textDecoration: canDial ? "underline" : "none"
|
|
47
57
|
}, props.style)
|
|
@@ -2,15 +2,6 @@ import { PRESET_COUNTRY_CODES } from "../constants/countryCodes.js";
|
|
|
2
2
|
|
|
3
3
|
//#region src/components/pisellPhone/utils/countryCodeHelper.ts
|
|
4
4
|
/**
|
|
5
|
-
* 根据国家码获取国旗 emoji
|
|
6
|
-
* @param countryCode 国家码
|
|
7
|
-
* @returns 国旗 emoji
|
|
8
|
-
*/
|
|
9
|
-
function getCountryFlag(countryCode) {
|
|
10
|
-
const country = PRESET_COUNTRY_CODES.find((c) => c.code === countryCode);
|
|
11
|
-
return (country === null || country === void 0 ? void 0 : country.flag) || "🌐";
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
5
|
* 根据国家码获取最大长度
|
|
15
6
|
* @param countryCode 国家码
|
|
16
7
|
* @param countryCodes 国家码列表
|
|
@@ -47,4 +38,4 @@ function getCountryCodes(props) {
|
|
|
47
38
|
}
|
|
48
39
|
|
|
49
40
|
//#endregion
|
|
50
|
-
export { getCountryCodes,
|
|
41
|
+
export { getCountryCodes, getMaxLength };
|
|
@@ -1,41 +1,49 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* PisellRating 组件样式
|
|
3
|
+
* 基于 Figma 设计规范,覆盖时使用 pisell-lowcode-xxx
|
|
4
|
+
*/
|
|
2
5
|
|
|
3
6
|
.pisell-rating {
|
|
4
7
|
display: inline-flex;
|
|
5
8
|
align-items: center;
|
|
6
|
-
|
|
9
|
+
|
|
7
10
|
// 只读态
|
|
8
11
|
&-read {
|
|
9
|
-
.
|
|
12
|
+
.pisell-lowcode-rate {
|
|
10
13
|
cursor: default;
|
|
11
14
|
pointer-events: none;
|
|
12
15
|
}
|
|
13
16
|
}
|
|
14
|
-
|
|
17
|
+
|
|
15
18
|
// 编辑态
|
|
16
19
|
&-edit {
|
|
17
|
-
.
|
|
20
|
+
.pisell-lowcode-rate {
|
|
18
21
|
cursor: pointer;
|
|
19
22
|
}
|
|
20
23
|
}
|
|
21
|
-
|
|
24
|
+
|
|
22
25
|
// 禁用态
|
|
23
26
|
&-disabled {
|
|
24
27
|
opacity: 0.4;
|
|
25
|
-
|
|
26
|
-
.
|
|
28
|
+
|
|
29
|
+
.pisell-lowcode-rate {
|
|
27
30
|
cursor: not-allowed;
|
|
28
31
|
}
|
|
29
32
|
}
|
|
30
|
-
|
|
31
|
-
//
|
|
33
|
+
|
|
34
|
+
// 评分数值文本(与设计体系一致)
|
|
32
35
|
&-value {
|
|
33
36
|
font-size: 14px;
|
|
34
|
-
|
|
37
|
+
line-height: 1.5;
|
|
38
|
+
color: #101828; // Gray/900
|
|
39
|
+
margin-left: 8px;
|
|
35
40
|
}
|
|
36
|
-
|
|
41
|
+
|
|
37
42
|
// 评分人数文本
|
|
38
43
|
&-count {
|
|
39
44
|
font-size: 14px;
|
|
45
|
+
line-height: 1.5;
|
|
46
|
+
color: #667085; // Gray/500
|
|
47
|
+
margin-left: 8px;
|
|
40
48
|
}
|
|
41
49
|
}
|