📄 原始资料 (已截断) | 展开查看原始 JSON(divider.json)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "bricks://elements/divider",
"schemaVersion": "2.3",
"type": "object",
"title": "Divider",
"description": "Schema for Bricks Divider element",
"metadata": {
"name": "divider",
"category": "general",
"tag": "div",
"nestable": false
},
"settings": {
"height": {
"label": "Height",
"units": true,
"css": [
{
"property": "height",
"selector": ".line"
},
{
"property": "border-top-width",
"selector": "&.horizontal .line"
}
],
"valueSchema": {
"oneOf": [
{
"type": "string",
"description": "Value with unit (e.g., \"10px\", \"50%\")",
"descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
},
{
"type": "number"
}
]
},
"controlType": "number",
"labelZh": "高度"
},
"width": {
"label": "Width",
"units": true,
"css": [
{
"property": "width",
"selector": "&.horizontal .line"
},
{
"property": "border-right-width",
"selector": "&.vertical .line"
}
],
"valueSchema": {
"oneOf": [
{
"type": "string",
"description": "Value with unit (e.g., \"10px\", \"50%\")",
"descriptionZh": "带单位的值(例如 \"10px\"、\"50%\")。"
},
{
"type": "number"
}
]
},
"controlType": "number",
"labelZh": "宽度"
},
"style": {
"label": "Style",
"options": {
"none": "None",
"hidden": "Hidden",
"solid": "Solid",
"dotted": "Dotted",
"dashed": "Dashed",
"double": "Double",
"groove": "Groove",
"ridge": "Ridge",
"inset": "Inset",
"outset": "Outset",
"noneZh": "无",
"hiddenZh": "隐藏",
"solidZh": "实线",
"dottedZh": "点线",
"dashedZh": "虚线",
"doubleZh": "双线",
"grooveZh": "凹槽",
"ridgeZh": "凸脊",
"insetZh": "内嵌",
"outsetZh": "外凸"
},
"css": [
{
"property": "border-top-style",
"selector": "&.horizontal .line"
},
{
"property": "border-right-style",
"selector": "&.vertical .line"
}
],
"valueSchema": {
"oneOf": [
{
"type": "string",
"description": "Single selection",
"descriptionZh": "单选。"
},
{
"type": "array",
"items": {
"type": "string"
},
"description": "Multiple selection",
"descriptionZh": "多选。"
}
]
},
"controlType": "select",
"labelZh": "样式"
},
"direction": {
"label": "Direction",
"options": {
"horizontal": "Horizontal",
"vertical": "Vertical",
"horizontalZh": "水平",
"verticalZh": "垂直"
},
"valueSchema": {
"oneOf": [
{
"type": "string",
"description": "Single selection",
"descriptionZh": "单选。"
},
{
"type": "array",
"items": {
"type": "string"
},
"description": "Multiple selection",
"descriptionZh": "多选。"
}
]
},
"controlType": "select",
"labelZh": "方向"
},
"justifyContent": {
"label": "Align",
"css": [
{
"property": "justify-content",
"selector": "&.horizontal"
},
{
"property": "align-self",
"selector": "&.vertical"
}
],
"valueSchema": {
"type": "string",
"enum": [
"flex-start",
"flex-end",
"center",
"space-between",
"space-around",
"space-evenly"
]
},
"controlType": "justify-content",
"labelZh": "对齐"
},
"color": {
"label": "Color",
"css": [
{
"property": "border-top-color",
"selector": "&.horizontal .line"
},
{
"property": "border-right-color",
"selector": "&.vertical .line"
},
{
"property": "color",
"selector": ".icon"
}
],
"valueSchema": {
"description": "Color value in various formats",
"oneOf": [
{
"type": "object",
"properties": {
"hex": {
"type": "string",
"pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
}
},
"required": [
"hex"
]
},
{
"type": "object",
"properties": {
"rgb": {
"type": "string",
"pattern": "^rgba?\\("
}
},
"required": [
"rgb"
]
},
{
"type": "object",
"properties": {
"hsl": {
"type": "string",
"pattern": "^hsla?\\("
}
},
"required": [
"hsl"
]
},
{
"type": "object",
"properties": {
"raw": {
"type": "string",
"description": "Raw color value or CSS variable",
"descriptionZh": "原始颜色值或 CSS 变量。"
}
},
"required": [
"raw"
]
}
],
"descriptionZh": "各种格式的颜色值。"
},
"controlType": "color",
"labelZh": "颜色"
},
"icon": {
"label": "Icon",
"valueSchema": {
"type": "object",
"description": "Icon settings",
"properties": {
"library": {
"type": "string"
},
"icon": {
"type": "string"
},
"svg": {
"type": "object"
}
},
"descriptionZh": "图标设置。"
},
"controlType": "icon",
"labelZh": "图标"
},
"iconTypography": {
"label": "Typography",
"css": [
{
"property": "font",
"selector": ".icon"
}
],
"hasRequired": true,
"valueSchema": {
"type": "object",
"description": "Typography settings",
"properties": {
"font-family": {
"type": "string"
},
"font-size": {
"type": "string"
},
"font-weight": {
"type": [
"string",
"integer"
]
},
"font-style": {
"type": "string",
"enum": [
"normal",
"italic",
"oblique"
]
},
"line-height": {
"type": "string"
},
"letter-spacing": {
"type": "string"
},
"text-align": {
"type": "string",
"enum": [
"left",
"center",
"right",
"justify"
]
},
"text-transform": {
"type": "string",
"enum": [
"none",
"uppercase",
"lowercase",
"capitalize"
]
},
"text-decoration": {
"type": "string"
},
"color": {
"description": "Color value in various formats",
"oneOf": [
{
"type": "object",
"properties": {
"hex": {
"type": "string",
"pattern": "^#([A-Fa-f
... (内容过长已截断,完整 JSON 见原始文件)