mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
a5400ddd0e
commit_hash:469c743d2f3e4242b31bc9be469661948af83bcd
181 lines
3.8 KiB
JSON
181 lines
3.8 KiB
JSON
{
|
|
"templates": {
|
|
"pretty_input": {
|
|
"type": "input",
|
|
"width": {
|
|
"type": "match_parent"
|
|
},
|
|
"height": {
|
|
"type": "wrap_content"
|
|
},
|
|
"margins": {
|
|
"left": 16,
|
|
"top": 8,
|
|
"right": 16,
|
|
"bottom": 8
|
|
},
|
|
"paddings": {
|
|
"left": 16,
|
|
"top": 10,
|
|
"right": 16,
|
|
"bottom": 10
|
|
},
|
|
"alpha": 1.0,
|
|
"alignment_horizontal": "center",
|
|
"alignment_vertical": "center",
|
|
"background": [
|
|
{
|
|
"type": "solid",
|
|
"color": "#0e000000"
|
|
}
|
|
],
|
|
"border": {
|
|
"corner_radius": 8
|
|
},
|
|
"font_size": 16,
|
|
"font_weight": "medium",
|
|
"text_color": "#000000",
|
|
"$text_variable": "variable",
|
|
"$hint_text": "hint",
|
|
"hint_color": "#888888",
|
|
"highlight_color": "#e0bae3",
|
|
"line_height": 22
|
|
},
|
|
"pretty_text": {
|
|
"type": "text",
|
|
"width": {
|
|
"type": "match_parent"
|
|
},
|
|
"height": {
|
|
"type": "wrap_content"
|
|
},
|
|
"paddings": {
|
|
"left": 32,
|
|
"top": 8,
|
|
"right": 16,
|
|
"bottom": 8
|
|
},
|
|
"alpha": 1.0,
|
|
"alignment_horizontal": "center",
|
|
"alignment_vertical": "center",
|
|
"font_size": 16,
|
|
"font_weight": "medium",
|
|
"text_alignment_horizontal": "left",
|
|
"text_alignment_vertical": "center",
|
|
"text_color": "#000000"
|
|
},
|
|
"button": {
|
|
"type": "text",
|
|
"width": {
|
|
"type": "match_parent"
|
|
},
|
|
"height": {
|
|
"type": "wrap_content"
|
|
},
|
|
"margins": {
|
|
"left": 16,
|
|
"top": 16,
|
|
"right": 16,
|
|
"bottom": 16
|
|
},
|
|
"paddings": {
|
|
"left": 16,
|
|
"top": 16,
|
|
"right": 16,
|
|
"bottom": 16
|
|
},
|
|
"alpha": 1.0,
|
|
"alignment_horizontal": "center",
|
|
"alignment_vertical": "center",
|
|
"background": [
|
|
{
|
|
"type": "solid",
|
|
"color": "#ffdc60"
|
|
}
|
|
],
|
|
"border": {
|
|
"corner_radius": 4,
|
|
"has_shadow": 1
|
|
},
|
|
"font_size": 20,
|
|
"font_weight": "medium",
|
|
"text_alignment_horizontal": "center",
|
|
"text_alignment_vertical": "center",
|
|
"text_color": "#000000"
|
|
}
|
|
},
|
|
"card": {
|
|
"log_id": "ui_test_card",
|
|
"variables": [
|
|
{
|
|
"name": "input",
|
|
"type": "string",
|
|
"value": ""
|
|
},
|
|
{
|
|
"name": "raw_input",
|
|
"type": "string",
|
|
"value": ""
|
|
},
|
|
{
|
|
"name": "always_visible",
|
|
"type": "boolean",
|
|
"value": 0
|
|
}
|
|
],
|
|
"states": [
|
|
{
|
|
"state_id": 0,
|
|
"div": {
|
|
"type": "container",
|
|
"width": {
|
|
"type": "match_parent"
|
|
},
|
|
"height": {
|
|
"type": "wrap_content"
|
|
},
|
|
"paddings": {
|
|
"top": 8,
|
|
"bottom": 8
|
|
},
|
|
"items": [
|
|
{
|
|
"type": "pretty_text",
|
|
"text": "Value: @{input}",
|
|
"ranges": [
|
|
{
|
|
"start": 0,
|
|
"end": 6,
|
|
"text_color": "#777777"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "pretty_text",
|
|
"text": "Raw input: @{raw_input}",
|
|
"ranges": [
|
|
{
|
|
"start": 0,
|
|
"end": 10,
|
|
"text_color": "#777777"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "pretty_input",
|
|
"variable": "input",
|
|
"hint": "value",
|
|
"keyboard_type": "phone",
|
|
"mask": {
|
|
"type": "phone",
|
|
"raw_text_variable": "raw_input",
|
|
"always_visible": "@{always_visible}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|