Skip to content

Commit cb4a962

Browse files
authored
feat: support read_only property for Input & upgrade to antd 5.27.0, antdx 1.6.0 (#87)
* feat: support `read_only` property for `Input` * chore: upgrade to antd 5.27.0, antdx 1.6.0
1 parent 89ae7b6 commit cb4a962

29 files changed

Lines changed: 1423 additions & 1156 deletions

File tree

.changeset/fancy-swans-help.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'modelscope_studio': patch
3+
---
4+
5+
feat: support `read_only` property for `Input`

.changeset/gentle-rocks-tap.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@modelscope-studio/legacy-multimodal-input': patch
3+
'@modelscope-studio/legacy-compiled': patch
4+
'@modelscope-studio/lint-config': patch
5+
'@modelscope-studio/changelog': patch
6+
'@modelscope-studio/antdx': patch
7+
'@modelscope-studio/antd': patch
8+
'@modelscope-studio/pro': patch
9+
'@modelscope-studio/frontend': patch
10+
'modelscope_studio': patch
11+
---
12+
13+
chore: upgrade to antd 5.27.0, antdx 1.6.0

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,8 @@
4949
},
5050
"[css]": {
5151
"editor.defaultFormatter": "esbenp.prettier-vscode"
52-
}
52+
},
53+
"python-envs.defaultEnvManager": "ms-python.python:conda",
54+
"python-envs.defaultPackageManager": "ms-python.python:conda",
55+
"python-envs.pythonProjects": []
5356
}

backend/modelscope_studio/components/antd/card/__init__.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,21 @@ class AntdCard(ModelScopeLayoutComponent):
3131

3232
# supported slots
3333
SLOTS = [
34-
"actions",
34+
'actions',
3535
'cover',
3636
'extra',
3737
'tabBarExtraContent',
38+
'tabBarExtraContent.left',
39+
'tabBarExtraContent.right',
3840
'title',
3941
'tabList',
42+
'tabProps.addIcon',
43+
'tabProps.removeIcon',
44+
'tabProps.renderTabBar',
45+
'tabProps.tabBarExtraContent',
46+
'tabProps.tabBarExtraContent.left',
47+
'tabProps.tabBarExtraContent.right',
48+
'tabProps.more.icon',
4049
]
4150

4251
def __exit__(self, *args, **kwargs):

backend/modelscope_studio/components/antd/input/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def __init__(
5151
class_names: dict | None = None,
5252
count: dict | None = None,
5353
default_value: str | None = None,
54+
read_only: bool | None = None,
5455
disabled: bool | None = None,
5556
max_length: int | None = None,
5657
prefix: str | None = None,
@@ -88,6 +89,7 @@ def __init__(
8889
self.class_names = class_names
8990
self.count = count
9091
self.default_value = default_value
92+
self.read_only = read_only
9193
self.disabled = disabled
9294
self.max_length = max_length
9395
self.prefix = prefix

backend/modelscope_studio/components/antd/input/otp/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def __init__(
3131
*,
3232
default_value: str | None = None,
3333
disabled: bool | None = None,
34+
read_only: bool | None = None,
3435
formatter: str | None = None,
3536
mask: str | bool | None = None,
3637
separator: str | None = None,
@@ -62,6 +63,7 @@ def __init__(
6263
self.default_value = default_value
6364
self.separator = separator
6465
self.disabled = disabled
66+
self.read_only = read_only
6567
self.formatter = formatter
6668
self.mask = mask
6769
self.length = length

backend/modelscope_studio/components/antd/input/password/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def __init__(
4646
class_names: dict | None = None,
4747
count: dict | None = None,
4848
default_value: str | None = None,
49+
read_only: bool | None = None,
4950
disabled: bool | None = None,
5051
max_length: int | None = None,
5152
prefix: str | None = None,
@@ -85,6 +86,7 @@ def __init__(
8586
self.class_names = class_names
8687
self.count = count
8788
self.default_value = default_value
89+
self.read_only = read_only
8890
self.disabled = disabled
8991
self.max_length = max_length
9092
self.prefix = prefix

backend/modelscope_studio/components/antd/input/search/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def __init__(
4646
class_names: dict | None = None,
4747
count: dict | None = None,
4848
default_value: str | None = None,
49+
read_only: bool | None = None,
4950
disabled: bool | None = None,
5051
max_length: int | None = None,
5152
prefix: str | None = None,
@@ -85,6 +86,7 @@ def __init__(
8586
self.class_names = class_names
8687
self.count = count
8788
self.default_value = default_value
89+
self.read_only = read_only
8890
self.disabled = disabled
8991
self.max_length = max_length
9092
self.prefix = prefix

backend/modelscope_studio/components/antd/input/textarea/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def __init__(
3737
class_names: dict | None = None,
3838
count: dict | None = None,
3939
default_value: str | None = None,
40+
read_only: bool | None = None,
4041
disabled: bool | None = None,
4142
max_length: int | None = None,
4243
show_count: bool | dict = None,
@@ -72,6 +73,7 @@ def __init__(
7273
self.count = count
7374
self.default_value = default_value
7475
self.disabled = disabled
76+
self.read_only = read_only
7577
self.max_length = max_length
7678
self.show_count = show_count
7779
self.size = size

backend/modelscope_studio/components/antd/progress/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def __init__(
2222
status: Literal['success', 'exception', 'normal', 'active']
2323
| None = None,
2424
rounding: str | None = None,
25-
stroke_color: str | None = None,
25+
stroke_color: str | list[str] | dict | None = None,
2626
stroke_linecap: Literal['round', 'butt', 'square']
2727
| None = None,
2828
success: dict | None = None,

0 commit comments

Comments
 (0)