@varlet/ui 3.16.2 → 3.17.0
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/es/index.bundle.mjs +13 -1
- package/es/index.mjs +11 -1
- package/es/segmented-button/SegmentedButton.mjs +141 -0
- package/es/segmented-button/SegmentedButtonSfc.css +0 -0
- package/es/segmented-button/index.mjs +12 -0
- package/es/segmented-button/props.mjs +17 -0
- package/es/segmented-button/provide.mjs +16 -0
- package/es/segmented-button/segmentedButton.css +1 -0
- package/es/segmented-button/style/index.mjs +5 -0
- package/es/segmented-buttons/SegmentedButtons.mjs +218 -0
- package/es/segmented-buttons/SegmentedButtonsSfc.css +0 -0
- package/es/segmented-buttons/index.mjs +12 -0
- package/es/segmented-buttons/props.mjs +38 -0
- package/es/segmented-buttons/provide.mjs +16 -0
- package/es/segmented-buttons/segmentedButtons.css +1 -0
- package/es/segmented-buttons/style/index.mjs +7 -0
- package/es/style.mjs +2 -0
- package/es/themes/dark/index.mjs +4 -2
- package/es/themes/dark/segmentedButton.mjs +22 -0
- package/es/themes/dark/segmentedButtons.mjs +11 -0
- package/es/themes/md3-dark/index.mjs +4 -2
- package/es/themes/md3-dark/segmentedButton.mjs +22 -0
- package/es/themes/md3-dark/segmentedButtons.mjs +11 -0
- package/es/themes/md3-light/index.mjs +4 -2
- package/es/themes/md3-light/segmentedButton.mjs +22 -0
- package/es/themes/md3-light/segmentedButtons.mjs +11 -0
- package/es/utils/components.mjs +1 -1
- package/es/varlet.css +1 -1
- package/es/varlet.esm.js +6232 -5834
- package/highlight/web-types.en-US.json +156 -1
- package/highlight/web-types.zh-CN.json +156 -1
- package/lib/varlet.cjs.js +1980 -1493
- package/lib/varlet.css +1 -1
- package/package.json +7 -7
- package/types/index.d.ts +4 -0
- package/types/segmentedButton.d.ts +33 -0
- package/types/segmentedButtons.d.ts +58 -0
- package/types/styleVars.d.ts +23 -0
- package/umd/varlet.js +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.17.0",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -6914,6 +6914,161 @@
|
|
|
6914
6914
|
}
|
|
6915
6915
|
]
|
|
6916
6916
|
},
|
|
6917
|
+
{
|
|
6918
|
+
"name": "var-segmented-button",
|
|
6919
|
+
"attributes": [
|
|
6920
|
+
{
|
|
6921
|
+
"name": "checked-value",
|
|
6922
|
+
"description": "Value represented by the current button",
|
|
6923
|
+
"default": "-",
|
|
6924
|
+
"value": {
|
|
6925
|
+
"type": "any",
|
|
6926
|
+
"kind": "expression"
|
|
6927
|
+
}
|
|
6928
|
+
},
|
|
6929
|
+
{
|
|
6930
|
+
"name": "disabled",
|
|
6931
|
+
"description": "Whether to disable the current button",
|
|
6932
|
+
"default": "false",
|
|
6933
|
+
"value": {
|
|
6934
|
+
"type": "boolean",
|
|
6935
|
+
"kind": "expression"
|
|
6936
|
+
}
|
|
6937
|
+
},
|
|
6938
|
+
{
|
|
6939
|
+
"name": "readonly",
|
|
6940
|
+
"description": "Whether to make the current button readonly",
|
|
6941
|
+
"default": "false",
|
|
6942
|
+
"value": {
|
|
6943
|
+
"type": "boolean",
|
|
6944
|
+
"kind": "expression"
|
|
6945
|
+
}
|
|
6946
|
+
},
|
|
6947
|
+
{
|
|
6948
|
+
"name": "ripple",
|
|
6949
|
+
"description": "Whether to enable ripple effect for the current button",
|
|
6950
|
+
"default": "true",
|
|
6951
|
+
"value": {
|
|
6952
|
+
"type": "boolean",
|
|
6953
|
+
"kind": "expression"
|
|
6954
|
+
}
|
|
6955
|
+
}
|
|
6956
|
+
],
|
|
6957
|
+
"events": [
|
|
6958
|
+
{
|
|
6959
|
+
"name": "click",
|
|
6960
|
+
"description": "Triggered when the segmented button is clicked"
|
|
6961
|
+
}
|
|
6962
|
+
],
|
|
6963
|
+
"slots": [
|
|
6964
|
+
{
|
|
6965
|
+
"name": "checkmark",
|
|
6966
|
+
"description": "Custom checkmark icon content displayed when the segmented button is checked"
|
|
6967
|
+
},
|
|
6968
|
+
{
|
|
6969
|
+
"name": "default",
|
|
6970
|
+
"description": "Label content of the segmented button"
|
|
6971
|
+
}
|
|
6972
|
+
]
|
|
6973
|
+
},
|
|
6974
|
+
{
|
|
6975
|
+
"name": "var-segmented-buttons",
|
|
6976
|
+
"attributes": [
|
|
6977
|
+
{
|
|
6978
|
+
"name": "v-model",
|
|
6979
|
+
"description": "Bound value, uses a single value in single-select mode and an array in multiple mode",
|
|
6980
|
+
"default": "-",
|
|
6981
|
+
"value": {
|
|
6982
|
+
"type": "any",
|
|
6983
|
+
"kind": "expression"
|
|
6984
|
+
}
|
|
6985
|
+
},
|
|
6986
|
+
{
|
|
6987
|
+
"name": "options",
|
|
6988
|
+
"description": "Option list",
|
|
6989
|
+
"default": "[]",
|
|
6990
|
+
"value": {
|
|
6991
|
+
"type": "SegmentedButtonsOption[]",
|
|
6992
|
+
"kind": "expression"
|
|
6993
|
+
}
|
|
6994
|
+
},
|
|
6995
|
+
{
|
|
6996
|
+
"name": "label-key",
|
|
6997
|
+
"description": "As the key that uniquely identifies label",
|
|
6998
|
+
"default": "label",
|
|
6999
|
+
"value": {
|
|
7000
|
+
"type": "string",
|
|
7001
|
+
"kind": "expression"
|
|
7002
|
+
}
|
|
7003
|
+
},
|
|
7004
|
+
{
|
|
7005
|
+
"name": "value-key",
|
|
7006
|
+
"description": "As the key that uniquely identifies value",
|
|
7007
|
+
"default": "value",
|
|
7008
|
+
"value": {
|
|
7009
|
+
"type": "string",
|
|
7010
|
+
"kind": "expression"
|
|
7011
|
+
}
|
|
7012
|
+
},
|
|
7013
|
+
{
|
|
7014
|
+
"name": "multiple",
|
|
7015
|
+
"description": "Whether to enable multiple selection",
|
|
7016
|
+
"default": "false",
|
|
7017
|
+
"value": {
|
|
7018
|
+
"type": "boolean",
|
|
7019
|
+
"kind": "expression"
|
|
7020
|
+
}
|
|
7021
|
+
},
|
|
7022
|
+
{
|
|
7023
|
+
"name": "checkmark",
|
|
7024
|
+
"description": "Whether checked items display the checkmark icon",
|
|
7025
|
+
"default": "true",
|
|
7026
|
+
"value": {
|
|
7027
|
+
"type": "boolean",
|
|
7028
|
+
"kind": "expression"
|
|
7029
|
+
}
|
|
7030
|
+
},
|
|
7031
|
+
{
|
|
7032
|
+
"name": "size",
|
|
7033
|
+
"description": "Size of segmented buttons, can be `mini` `small` `normal` `large`",
|
|
7034
|
+
"default": "normal",
|
|
7035
|
+
"value": {
|
|
7036
|
+
"type": "string",
|
|
7037
|
+
"kind": "expression"
|
|
7038
|
+
}
|
|
7039
|
+
},
|
|
7040
|
+
{
|
|
7041
|
+
"name": "validate-trigger",
|
|
7042
|
+
"description": "Validation trigger timing, can be `onClick` `onChange`",
|
|
7043
|
+
"default": "['onChange']",
|
|
7044
|
+
"value": {
|
|
7045
|
+
"type": "Array<'onClick' | 'onChange'>",
|
|
7046
|
+
"kind": "expression"
|
|
7047
|
+
}
|
|
7048
|
+
},
|
|
7049
|
+
{
|
|
7050
|
+
"name": "rules",
|
|
7051
|
+
"description": "Validation rules",
|
|
7052
|
+
"default": "-",
|
|
7053
|
+
"value": {
|
|
7054
|
+
"type": "((v: any) => any) | ZodType | Array<((v: any) => any) | ZodType>",
|
|
7055
|
+
"kind": "expression"
|
|
7056
|
+
}
|
|
7057
|
+
}
|
|
7058
|
+
],
|
|
7059
|
+
"events": [
|
|
7060
|
+
{
|
|
7061
|
+
"name": "change",
|
|
7062
|
+
"description": "Triggered when the segmented buttons group value changes"
|
|
7063
|
+
}
|
|
7064
|
+
],
|
|
7065
|
+
"slots": [
|
|
7066
|
+
{
|
|
7067
|
+
"name": "default",
|
|
7068
|
+
"description": "Segmented button content"
|
|
7069
|
+
}
|
|
7070
|
+
]
|
|
7071
|
+
},
|
|
6917
7072
|
{
|
|
6918
7073
|
"name": "var-select",
|
|
6919
7074
|
"attributes": [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.17.0",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -7128,6 +7128,161 @@
|
|
|
7128
7128
|
}
|
|
7129
7129
|
]
|
|
7130
7130
|
},
|
|
7131
|
+
{
|
|
7132
|
+
"name": "var-segmented-button",
|
|
7133
|
+
"attributes": [
|
|
7134
|
+
{
|
|
7135
|
+
"name": "checked-value",
|
|
7136
|
+
"description": "当前按钮对应的值",
|
|
7137
|
+
"default": "-",
|
|
7138
|
+
"value": {
|
|
7139
|
+
"type": "any",
|
|
7140
|
+
"kind": "expression"
|
|
7141
|
+
}
|
|
7142
|
+
},
|
|
7143
|
+
{
|
|
7144
|
+
"name": "disabled",
|
|
7145
|
+
"description": "是否禁用当前按钮",
|
|
7146
|
+
"default": "false",
|
|
7147
|
+
"value": {
|
|
7148
|
+
"type": "boolean",
|
|
7149
|
+
"kind": "expression"
|
|
7150
|
+
}
|
|
7151
|
+
},
|
|
7152
|
+
{
|
|
7153
|
+
"name": "readonly",
|
|
7154
|
+
"description": "是否将当前按钮设为只读",
|
|
7155
|
+
"default": "false",
|
|
7156
|
+
"value": {
|
|
7157
|
+
"type": "boolean",
|
|
7158
|
+
"kind": "expression"
|
|
7159
|
+
}
|
|
7160
|
+
},
|
|
7161
|
+
{
|
|
7162
|
+
"name": "ripple",
|
|
7163
|
+
"description": "是否为当前按钮开启水波纹效果",
|
|
7164
|
+
"default": "true",
|
|
7165
|
+
"value": {
|
|
7166
|
+
"type": "boolean",
|
|
7167
|
+
"kind": "expression"
|
|
7168
|
+
}
|
|
7169
|
+
}
|
|
7170
|
+
],
|
|
7171
|
+
"events": [
|
|
7172
|
+
{
|
|
7173
|
+
"name": "click",
|
|
7174
|
+
"description": "点击分段按钮时触发"
|
|
7175
|
+
}
|
|
7176
|
+
],
|
|
7177
|
+
"slots": [
|
|
7178
|
+
{
|
|
7179
|
+
"name": "checkmark",
|
|
7180
|
+
"description": "分段按钮在选中时显示的自定义勾选图标内容"
|
|
7181
|
+
},
|
|
7182
|
+
{
|
|
7183
|
+
"name": "default",
|
|
7184
|
+
"description": "分段按钮的文字或标签内容"
|
|
7185
|
+
}
|
|
7186
|
+
]
|
|
7187
|
+
},
|
|
7188
|
+
{
|
|
7189
|
+
"name": "var-segmented-buttons",
|
|
7190
|
+
"attributes": [
|
|
7191
|
+
{
|
|
7192
|
+
"name": "v-model",
|
|
7193
|
+
"description": "绑定的值,单选模式下为单个值,多选模式下为数组",
|
|
7194
|
+
"default": "-",
|
|
7195
|
+
"value": {
|
|
7196
|
+
"type": "any",
|
|
7197
|
+
"kind": "expression"
|
|
7198
|
+
}
|
|
7199
|
+
},
|
|
7200
|
+
{
|
|
7201
|
+
"name": "options",
|
|
7202
|
+
"description": "选项数组",
|
|
7203
|
+
"default": "[]",
|
|
7204
|
+
"value": {
|
|
7205
|
+
"type": "SegmentedButtonsOption[]",
|
|
7206
|
+
"kind": "expression"
|
|
7207
|
+
}
|
|
7208
|
+
},
|
|
7209
|
+
{
|
|
7210
|
+
"name": "label-key",
|
|
7211
|
+
"description": "作为 label 唯一标识的键名",
|
|
7212
|
+
"default": "label",
|
|
7213
|
+
"value": {
|
|
7214
|
+
"type": "string",
|
|
7215
|
+
"kind": "expression"
|
|
7216
|
+
}
|
|
7217
|
+
},
|
|
7218
|
+
{
|
|
7219
|
+
"name": "value-key",
|
|
7220
|
+
"description": "作为 value 唯一标识的键名",
|
|
7221
|
+
"default": "value",
|
|
7222
|
+
"value": {
|
|
7223
|
+
"type": "string",
|
|
7224
|
+
"kind": "expression"
|
|
7225
|
+
}
|
|
7226
|
+
},
|
|
7227
|
+
{
|
|
7228
|
+
"name": "multiple",
|
|
7229
|
+
"description": "是否开启多选",
|
|
7230
|
+
"default": "false",
|
|
7231
|
+
"value": {
|
|
7232
|
+
"type": "boolean",
|
|
7233
|
+
"kind": "expression"
|
|
7234
|
+
}
|
|
7235
|
+
},
|
|
7236
|
+
{
|
|
7237
|
+
"name": "checkmark",
|
|
7238
|
+
"description": "选中项是否显示勾选图标",
|
|
7239
|
+
"default": "true",
|
|
7240
|
+
"value": {
|
|
7241
|
+
"type": "boolean",
|
|
7242
|
+
"kind": "expression"
|
|
7243
|
+
}
|
|
7244
|
+
},
|
|
7245
|
+
{
|
|
7246
|
+
"name": "size",
|
|
7247
|
+
"description": "分段按钮尺寸,可选值为 `mini` `small` `normal` `large`",
|
|
7248
|
+
"default": "normal",
|
|
7249
|
+
"value": {
|
|
7250
|
+
"type": "string",
|
|
7251
|
+
"kind": "expression"
|
|
7252
|
+
}
|
|
7253
|
+
},
|
|
7254
|
+
{
|
|
7255
|
+
"name": "validate-trigger",
|
|
7256
|
+
"description": "校验触发时机,可选值为 `onClick` `onChange`",
|
|
7257
|
+
"default": "['onChange']",
|
|
7258
|
+
"value": {
|
|
7259
|
+
"type": "Array<'onClick' | 'onChange'>",
|
|
7260
|
+
"kind": "expression"
|
|
7261
|
+
}
|
|
7262
|
+
},
|
|
7263
|
+
{
|
|
7264
|
+
"name": "rules",
|
|
7265
|
+
"description": "校验规则",
|
|
7266
|
+
"default": "-",
|
|
7267
|
+
"value": {
|
|
7268
|
+
"type": "((v: any) => any) | ZodType | Array<((v: any) => any) | ZodType>",
|
|
7269
|
+
"kind": "expression"
|
|
7270
|
+
}
|
|
7271
|
+
}
|
|
7272
|
+
],
|
|
7273
|
+
"events": [
|
|
7274
|
+
{
|
|
7275
|
+
"name": "change",
|
|
7276
|
+
"description": "分段按钮组的值变化时触发"
|
|
7277
|
+
}
|
|
7278
|
+
],
|
|
7279
|
+
"slots": [
|
|
7280
|
+
{
|
|
7281
|
+
"name": "default",
|
|
7282
|
+
"description": "分段按钮内容"
|
|
7283
|
+
}
|
|
7284
|
+
]
|
|
7285
|
+
},
|
|
7131
7286
|
{
|
|
7132
7287
|
"name": "var-select",
|
|
7133
7288
|
"attributes": [
|