rook-cli 1.3.2 → 1.3.4
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/package.json +3 -2
- package/rook-framework/PRD-INSTALL-COMMAND.md +379 -0
- package/rook-framework/PRD.md +1214 -0
- package/rook-framework/README.md +143 -0
- package/rook-framework/assets/rk-accordion.js +99 -0
- package/rook-framework/assets/rk-alert-dialog.js +132 -0
- package/rook-framework/assets/rk-bottom-app-bar.js +88 -0
- package/rook-framework/assets/rk-carousel.js +145 -0
- package/rook-framework/assets/rk-collapsible.js +151 -0
- package/rook-framework/assets/rk-dialog.js +161 -0
- package/rook-framework/assets/rk-drawer.js +214 -0
- package/rook-framework/assets/rk-framework-core.css +2554 -0
- package/rook-framework/assets/rk-framework-tokens.css +101 -0
- package/rook-framework/assets/rk-modal.js +91 -0
- package/rook-framework/assets/rk-popover.js +264 -0
- package/rook-framework/assets/rk-progress.js +81 -0
- package/rook-framework/assets/rk-quantity.js +91 -0
- package/rook-framework/assets/rk-scroll-area.js +286 -0
- package/rook-framework/assets/rk-sheet.js +157 -0
- package/rook-framework/assets/rk-tabs.js +179 -0
- package/rook-framework/assets/rk-toggle.js +153 -0
- package/rook-framework/blocks/rk-accordion.liquid +97 -0
- package/rook-framework/blocks/rk-badge.liquid +103 -0
- package/rook-framework/blocks/rk-button.liquid +166 -0
- package/rook-framework/blocks/rk-divider.liquid +100 -0
- package/rook-framework/blocks/rk-form-field.liquid +120 -0
- package/rook-framework/blocks/rk-icon.liquid +134 -0
- package/rook-framework/blocks/rk-image.liquid +198 -0
- package/rook-framework/blocks/rk-installments.liquid +99 -0
- package/rook-framework/blocks/rk-pix-discount.liquid +99 -0
- package/rook-framework/blocks/rk-price.liquid +128 -0
- package/rook-framework/blocks/rk-quantity.liquid +108 -0
- package/rook-framework/blocks/rk-quick-add.liquid +137 -0
- package/rook-framework/blocks/rk-skeleton.liquid +104 -0
- package/rook-framework/blocks/rk-typography.liquid +183 -0
- package/rook-framework/config/rk-settings_schema.json +259 -0
- package/rook-framework/snippets/rk-accordion.liquid +31 -0
- package/rook-framework/snippets/rk-alert-dialog.liquid +83 -0
- package/rook-framework/snippets/rk-aspect-ratio.liquid +23 -0
- package/rook-framework/snippets/rk-badge.liquid +17 -0
- package/rook-framework/snippets/rk-bottom-app-bar.liquid +51 -0
- package/rook-framework/snippets/rk-button.liquid +49 -0
- package/rook-framework/snippets/rk-card.liquid +64 -0
- package/rook-framework/snippets/rk-carousel.liquid +74 -0
- package/rook-framework/snippets/rk-checkbox.liquid +34 -0
- package/rook-framework/snippets/rk-collapsible.liquid +52 -0
- package/rook-framework/snippets/rk-dialog.liquid +85 -0
- package/rook-framework/snippets/rk-divider.liquid +25 -0
- package/rook-framework/snippets/rk-drawer.liquid +81 -0
- package/rook-framework/snippets/rk-external-assets copy.liquid +33 -0
- package/rook-framework/snippets/rk-external-assets.liquid +68 -0
- package/rook-framework/snippets/rk-form-field.liquid +83 -0
- package/rook-framework/snippets/rk-gap-style.liquid +32 -0
- package/rook-framework/snippets/rk-icon.liquid +28 -0
- package/rook-framework/snippets/rk-image.liquid +60 -0
- package/rook-framework/snippets/rk-input.liquid +35 -0
- package/rook-framework/snippets/rk-installments.liquid +54 -0
- package/rook-framework/snippets/rk-item.liquid +69 -0
- package/rook-framework/snippets/rk-layout-style.liquid +37 -0
- package/rook-framework/snippets/rk-modal.liquid +31 -0
- package/rook-framework/snippets/rk-pix-discount.liquid +34 -0
- package/rook-framework/snippets/rk-popover.liquid +77 -0
- package/rook-framework/snippets/rk-price.liquid +48 -0
- package/rook-framework/snippets/rk-progress.liquid +38 -0
- package/rook-framework/snippets/rk-quantity.liquid +56 -0
- package/rook-framework/snippets/rk-quick-add.liquid +67 -0
- package/rook-framework/snippets/rk-scripts.liquid +17 -0
- package/rook-framework/snippets/rk-scroll-area.liquid +60 -0
- package/rook-framework/snippets/rk-sheet.liquid +86 -0
- package/rook-framework/snippets/rk-size-style.liquid +48 -0
- package/rook-framework/snippets/rk-skeleton.liquid +25 -0
- package/rook-framework/snippets/rk-spacing-padding.liquid +18 -0
- package/rook-framework/snippets/rk-spacing-style.liquid +54 -0
- package/rook-framework/snippets/rk-spinner.liquid +43 -0
- package/rook-framework/snippets/rk-swatch.liquid +33 -0
- package/rook-framework/snippets/rk-table.liquid +44 -0
- package/rook-framework/snippets/rk-tabs.liquid +52 -0
- package/rook-framework/snippets/rk-textarea.liquid +42 -0
- package/rook-framework/snippets/rk-toggle-group.liquid +27 -0
- package/rook-framework/snippets/rk-toggle.liquid +58 -0
- package/rook-framework/snippets/rk-typography.liquid +27 -0
- package/rook-framework/snippets/rk-variables.liquid +74 -0
- package/src/app.js +24 -0
- package/src/commands/InstallCommand.js +133 -0
- package/src/mcp/server.js +111 -1
- package/src/services/FrameworkInstaller.js +379 -0
- package/src/templates/block.liquid.txt +0 -15
- package/src/ui/PromptUI.js +15 -1
- package/src/utils/logger.js +1 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
{% comment %}
|
|
2
|
+
Block: RK Price
|
|
3
|
+
Renders a rk-price display. Uses closest product context or manual product picker.
|
|
4
|
+
Uses rk-spacing-style for Horizon-compatible spacing.
|
|
5
|
+
{% endcomment %}
|
|
6
|
+
|
|
7
|
+
{%- liquid
|
|
8
|
+
assign target_product = block.settings.product | default: closest.product | default: product
|
|
9
|
+
-%}
|
|
10
|
+
|
|
11
|
+
<rk-price-block
|
|
12
|
+
id="block-{{ block.id }}"
|
|
13
|
+
{{ block.shopify_attributes }}
|
|
14
|
+
class="rk-block rk-spacing-style"
|
|
15
|
+
style="
|
|
16
|
+
{% render 'rk-spacing-style', settings: block.settings %}
|
|
17
|
+
--rk-price-size: {{ block.settings.font_size }};
|
|
18
|
+
font-size: var(--rk-price-size);
|
|
19
|
+
{% if block.settings.alignment == 'center' %}text-align: center;{% elsif block.settings.alignment == 'right' %}text-align: right;{% endif %}
|
|
20
|
+
"
|
|
21
|
+
>
|
|
22
|
+
{% render 'rk-price',
|
|
23
|
+
product: target_product,
|
|
24
|
+
from: block.settings.show_from,
|
|
25
|
+
compare_position: block.settings.compare_position
|
|
26
|
+
%}
|
|
27
|
+
</rk-price-block>
|
|
28
|
+
|
|
29
|
+
{% schema %}
|
|
30
|
+
{
|
|
31
|
+
"name": "RK | Preço",
|
|
32
|
+
"tag": null,
|
|
33
|
+
"settings": [
|
|
34
|
+
{
|
|
35
|
+
"type": "product",
|
|
36
|
+
"id": "product",
|
|
37
|
+
"label": "Produto",
|
|
38
|
+
"info": "Se vazio, usa o produto do contexto"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "checkbox",
|
|
42
|
+
"id": "show_from",
|
|
43
|
+
"label": "Exibir \"A partir de\"",
|
|
44
|
+
"default": false
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "select",
|
|
48
|
+
"id": "compare_position",
|
|
49
|
+
"label": "Posição do preço comparativo",
|
|
50
|
+
"options": [
|
|
51
|
+
{ "value": "before", "label": "Antes (De X Por Y)" },
|
|
52
|
+
{ "value": "after", "label": "Depois (Y era X)" }
|
|
53
|
+
],
|
|
54
|
+
"default": "before"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"type": "select",
|
|
58
|
+
"id": "font_size",
|
|
59
|
+
"label": "Tamanho da fonte",
|
|
60
|
+
"options": [
|
|
61
|
+
{ "value": "var(--rk-font-size-sm)", "label": "Pequeno (14px)" },
|
|
62
|
+
{ "value": "var(--rk-font-size-md)", "label": "Médio (16px)" },
|
|
63
|
+
{ "value": "var(--rk-font-size-lg)", "label": "Grande (18px)" },
|
|
64
|
+
{ "value": "var(--rk-font-size-xl)", "label": "Extra Grande (20px)" },
|
|
65
|
+
{ "value": "var(--rk-font-size-2xl)", "label": "2XL (24px)" },
|
|
66
|
+
{ "value": "var(--rk-font-size-3xl)", "label": "3XL (30px)" }
|
|
67
|
+
],
|
|
68
|
+
"default": "var(--rk-font-size-lg)"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "text_alignment",
|
|
72
|
+
"id": "alignment",
|
|
73
|
+
"label": "Alinhamento",
|
|
74
|
+
"default": "left"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "header",
|
|
78
|
+
"content": "Espaçamento"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "range",
|
|
82
|
+
"id": "padding-block-start",
|
|
83
|
+
"label": "Topo",
|
|
84
|
+
"min": 0,
|
|
85
|
+
"max": 100,
|
|
86
|
+
"step": 2,
|
|
87
|
+
"unit": "px",
|
|
88
|
+
"default": 0
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"type": "range",
|
|
92
|
+
"id": "padding-block-end",
|
|
93
|
+
"label": "Base",
|
|
94
|
+
"min": 0,
|
|
95
|
+
"max": 100,
|
|
96
|
+
"step": 2,
|
|
97
|
+
"unit": "px",
|
|
98
|
+
"default": 0
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"type": "range",
|
|
102
|
+
"id": "padding-inline-start",
|
|
103
|
+
"label": "Esquerda",
|
|
104
|
+
"min": 0,
|
|
105
|
+
"max": 100,
|
|
106
|
+
"step": 2,
|
|
107
|
+
"unit": "px",
|
|
108
|
+
"default": 0
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"type": "range",
|
|
112
|
+
"id": "padding-inline-end",
|
|
113
|
+
"label": "Direita",
|
|
114
|
+
"min": 0,
|
|
115
|
+
"max": 100,
|
|
116
|
+
"step": 2,
|
|
117
|
+
"unit": "px",
|
|
118
|
+
"default": 0
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"presets": [
|
|
122
|
+
{
|
|
123
|
+
"name": "RK | Preço",
|
|
124
|
+
"category": "Rook UI"
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
{% endschema %}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{% comment %}
|
|
2
|
+
Block: RK Quantity
|
|
3
|
+
Renders a rk-quantity selector.
|
|
4
|
+
Uses rk-spacing-style for Horizon-compatible spacing.
|
|
5
|
+
{% endcomment %}
|
|
6
|
+
|
|
7
|
+
{%- liquid
|
|
8
|
+
assign target_product = block.settings.product | default: closest.product | default: product
|
|
9
|
+
assign target_variant = target_product.selected_or_first_available_variant
|
|
10
|
+
|
|
11
|
+
assign qty_min = 1
|
|
12
|
+
assign qty_max = nil
|
|
13
|
+
assign qty_step = 1
|
|
14
|
+
|
|
15
|
+
if target_variant
|
|
16
|
+
assign qty_min = target_variant.quantity_rule.min | default: 1
|
|
17
|
+
assign qty_max = target_variant.quantity_rule.max
|
|
18
|
+
assign qty_step = target_variant.quantity_rule.increment | default: 1
|
|
19
|
+
endif
|
|
20
|
+
-%}
|
|
21
|
+
|
|
22
|
+
<rk-quantity-block
|
|
23
|
+
id="block-{{ block.id }}"
|
|
24
|
+
{{ block.shopify_attributes }}
|
|
25
|
+
class="rk-block rk-spacing-style"
|
|
26
|
+
style="
|
|
27
|
+
{% render 'rk-spacing-style', settings: block.settings %}
|
|
28
|
+
{% if block.settings.alignment == 'center' %}text-align: center;{% elsif block.settings.alignment == 'right' %}text-align: right;{% endif %}
|
|
29
|
+
"
|
|
30
|
+
>
|
|
31
|
+
{% render 'rk-quantity',
|
|
32
|
+
value: qty_min,
|
|
33
|
+
min: qty_min,
|
|
34
|
+
max: qty_max,
|
|
35
|
+
step: qty_step
|
|
36
|
+
%}
|
|
37
|
+
</rk-quantity-block>
|
|
38
|
+
|
|
39
|
+
{% schema %}
|
|
40
|
+
{
|
|
41
|
+
"name": "RK | Quantidade",
|
|
42
|
+
"tag": null,
|
|
43
|
+
"settings": [
|
|
44
|
+
{
|
|
45
|
+
"type": "product",
|
|
46
|
+
"id": "product",
|
|
47
|
+
"label": "Produto",
|
|
48
|
+
"info": "Se vazio, usa o produto do contexto. Respeita as regras de quantidade da variante."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "text_alignment",
|
|
52
|
+
"id": "alignment",
|
|
53
|
+
"label": "Alinhamento",
|
|
54
|
+
"default": "left"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"type": "header",
|
|
58
|
+
"content": "Espaçamento"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "range",
|
|
62
|
+
"id": "padding-block-start",
|
|
63
|
+
"label": "Topo",
|
|
64
|
+
"min": 0,
|
|
65
|
+
"max": 100,
|
|
66
|
+
"step": 2,
|
|
67
|
+
"unit": "px",
|
|
68
|
+
"default": 0
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "range",
|
|
72
|
+
"id": "padding-block-end",
|
|
73
|
+
"label": "Base",
|
|
74
|
+
"min": 0,
|
|
75
|
+
"max": 100,
|
|
76
|
+
"step": 2,
|
|
77
|
+
"unit": "px",
|
|
78
|
+
"default": 0
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "range",
|
|
82
|
+
"id": "padding-inline-start",
|
|
83
|
+
"label": "Esquerda",
|
|
84
|
+
"min": 0,
|
|
85
|
+
"max": 100,
|
|
86
|
+
"step": 2,
|
|
87
|
+
"unit": "px",
|
|
88
|
+
"default": 0
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"type": "range",
|
|
92
|
+
"id": "padding-inline-end",
|
|
93
|
+
"label": "Direita",
|
|
94
|
+
"min": 0,
|
|
95
|
+
"max": 100,
|
|
96
|
+
"step": 2,
|
|
97
|
+
"unit": "px",
|
|
98
|
+
"default": 0
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"presets": [
|
|
102
|
+
{
|
|
103
|
+
"name": "RK | Quantidade",
|
|
104
|
+
"category": "Rook UI"
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
{% endschema %}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{% comment %}
|
|
2
|
+
Block: RK Quick Add
|
|
3
|
+
Renders a rk-quick-add add-to-cart button.
|
|
4
|
+
⚠️ Exceção: usa quick-add.js e events.js do tema Horizon.
|
|
5
|
+
Uses rk-spacing-style for Horizon-compatible spacing.
|
|
6
|
+
{% endcomment %}
|
|
7
|
+
|
|
8
|
+
{%- liquid
|
|
9
|
+
assign target_product = block.settings.product | default: closest.product | default: product
|
|
10
|
+
-%}
|
|
11
|
+
|
|
12
|
+
<rk-quick-add-block
|
|
13
|
+
id="block-{{ block.id }}"
|
|
14
|
+
{{ block.shopify_attributes }}
|
|
15
|
+
class="rk-block rk-spacing-style"
|
|
16
|
+
style="
|
|
17
|
+
{% render 'rk-spacing-style', settings: block.settings %}
|
|
18
|
+
"
|
|
19
|
+
>
|
|
20
|
+
{% if target_product %}
|
|
21
|
+
{% render 'rk-quick-add',
|
|
22
|
+
product: target_product,
|
|
23
|
+
section_id: section.id,
|
|
24
|
+
show_quantity: block.settings.show_quantity,
|
|
25
|
+
button_text: block.settings.button_text,
|
|
26
|
+
button_style: block.settings.button_style,
|
|
27
|
+
button_size: block.settings.button_size
|
|
28
|
+
%}
|
|
29
|
+
{% else %}
|
|
30
|
+
{% render 'rk-button',
|
|
31
|
+
text: block.settings.button_text,
|
|
32
|
+
style: block.settings.button_style,
|
|
33
|
+
size: block.settings.button_size,
|
|
34
|
+
disabled: true,
|
|
35
|
+
full_width: true
|
|
36
|
+
%}
|
|
37
|
+
{% endif %}
|
|
38
|
+
</rk-quick-add-block>
|
|
39
|
+
|
|
40
|
+
{% schema %}
|
|
41
|
+
{
|
|
42
|
+
"name": "RK | Adicionar ao Carrinho",
|
|
43
|
+
"tag": null,
|
|
44
|
+
"settings": [
|
|
45
|
+
{
|
|
46
|
+
"type": "product",
|
|
47
|
+
"id": "product",
|
|
48
|
+
"label": "Produto",
|
|
49
|
+
"info": "Se vazio, usa o produto do contexto"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "text",
|
|
53
|
+
"id": "button_text",
|
|
54
|
+
"label": "Texto do botão",
|
|
55
|
+
"default": "Adicionar ao Carrinho"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "select",
|
|
59
|
+
"id": "button_style",
|
|
60
|
+
"label": "Estilo do botão",
|
|
61
|
+
"options": [
|
|
62
|
+
{ "value": "primary", "label": "Primário" },
|
|
63
|
+
{ "value": "secondary", "label": "Secundário" },
|
|
64
|
+
{ "value": "outline", "label": "Outline" }
|
|
65
|
+
],
|
|
66
|
+
"default": "primary"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "select",
|
|
70
|
+
"id": "button_size",
|
|
71
|
+
"label": "Tamanho do botão",
|
|
72
|
+
"options": [
|
|
73
|
+
{ "value": "sm", "label": "Pequeno" },
|
|
74
|
+
{ "value": "md", "label": "Médio" },
|
|
75
|
+
{ "value": "lg", "label": "Grande" }
|
|
76
|
+
],
|
|
77
|
+
"default": "md"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"type": "checkbox",
|
|
81
|
+
"id": "show_quantity",
|
|
82
|
+
"label": "Exibir seletor de quantidade",
|
|
83
|
+
"default": false
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "header",
|
|
87
|
+
"content": "Espaçamento"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"type": "range",
|
|
91
|
+
"id": "padding-block-start",
|
|
92
|
+
"label": "Topo",
|
|
93
|
+
"min": 0,
|
|
94
|
+
"max": 100,
|
|
95
|
+
"step": 2,
|
|
96
|
+
"unit": "px",
|
|
97
|
+
"default": 0
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"type": "range",
|
|
101
|
+
"id": "padding-block-end",
|
|
102
|
+
"label": "Base",
|
|
103
|
+
"min": 0,
|
|
104
|
+
"max": 100,
|
|
105
|
+
"step": 2,
|
|
106
|
+
"unit": "px",
|
|
107
|
+
"default": 0
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"type": "range",
|
|
111
|
+
"id": "padding-inline-start",
|
|
112
|
+
"label": "Esquerda",
|
|
113
|
+
"min": 0,
|
|
114
|
+
"max": 100,
|
|
115
|
+
"step": 2,
|
|
116
|
+
"unit": "px",
|
|
117
|
+
"default": 0
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"type": "range",
|
|
121
|
+
"id": "padding-inline-end",
|
|
122
|
+
"label": "Direita",
|
|
123
|
+
"min": 0,
|
|
124
|
+
"max": 100,
|
|
125
|
+
"step": 2,
|
|
126
|
+
"unit": "px",
|
|
127
|
+
"default": 0
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"presets": [
|
|
131
|
+
{
|
|
132
|
+
"name": "RK | Adicionar ao Carrinho",
|
|
133
|
+
"category": "Rook UI"
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
{% endschema %}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{% comment %}
|
|
2
|
+
Block: RK Skeleton
|
|
3
|
+
Renders a rk-skeleton placeholder for content loading.
|
|
4
|
+
Uses rk-spacing-style for Horizon-compatible spacing.
|
|
5
|
+
{% endcomment %}
|
|
6
|
+
|
|
7
|
+
<rk-skeleton-block
|
|
8
|
+
id="block-{{ block.id }}"
|
|
9
|
+
{{ block.shopify_attributes }}
|
|
10
|
+
class="rk-block rk-spacing-style"
|
|
11
|
+
style="
|
|
12
|
+
{% render 'rk-spacing-style', settings: block.settings %}
|
|
13
|
+
"
|
|
14
|
+
>
|
|
15
|
+
{% render 'rk-skeleton',
|
|
16
|
+
width: block.settings.width,
|
|
17
|
+
height: block.settings.height,
|
|
18
|
+
shape: block.settings.shape
|
|
19
|
+
%}
|
|
20
|
+
</rk-skeleton-block>
|
|
21
|
+
|
|
22
|
+
{% schema %}
|
|
23
|
+
{
|
|
24
|
+
"name": "RK | Skeleton",
|
|
25
|
+
"tag": null,
|
|
26
|
+
"settings": [
|
|
27
|
+
{
|
|
28
|
+
"type": "select",
|
|
29
|
+
"id": "shape",
|
|
30
|
+
"label": "Formato",
|
|
31
|
+
"options": [
|
|
32
|
+
{ "value": "text", "label": "Texto (linha)" },
|
|
33
|
+
{ "value": "rect", "label": "Retângulo" },
|
|
34
|
+
{ "value": "circle", "label": "Círculo" }
|
|
35
|
+
],
|
|
36
|
+
"default": "text"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "text",
|
|
40
|
+
"id": "width",
|
|
41
|
+
"label": "Largura",
|
|
42
|
+
"default": "100%",
|
|
43
|
+
"info": "Ex: 100%, 200px, 50%"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "text",
|
|
47
|
+
"id": "height",
|
|
48
|
+
"label": "Altura",
|
|
49
|
+
"default": "20px",
|
|
50
|
+
"info": "Ex: 20px, 1em, 48px"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "header",
|
|
54
|
+
"content": "Espaçamento"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"type": "range",
|
|
58
|
+
"id": "padding-block-start",
|
|
59
|
+
"label": "Topo",
|
|
60
|
+
"min": 0,
|
|
61
|
+
"max": 100,
|
|
62
|
+
"step": 2,
|
|
63
|
+
"unit": "px",
|
|
64
|
+
"default": 4
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "range",
|
|
68
|
+
"id": "padding-block-end",
|
|
69
|
+
"label": "Base",
|
|
70
|
+
"min": 0,
|
|
71
|
+
"max": 100,
|
|
72
|
+
"step": 2,
|
|
73
|
+
"unit": "px",
|
|
74
|
+
"default": 4
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "range",
|
|
78
|
+
"id": "padding-inline-start",
|
|
79
|
+
"label": "Esquerda",
|
|
80
|
+
"min": 0,
|
|
81
|
+
"max": 100,
|
|
82
|
+
"step": 2,
|
|
83
|
+
"unit": "px",
|
|
84
|
+
"default": 0
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"type": "range",
|
|
88
|
+
"id": "padding-inline-end",
|
|
89
|
+
"label": "Direita",
|
|
90
|
+
"min": 0,
|
|
91
|
+
"max": 100,
|
|
92
|
+
"step": 2,
|
|
93
|
+
"unit": "px",
|
|
94
|
+
"default": 0
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"presets": [
|
|
98
|
+
{
|
|
99
|
+
"name": "RK | Skeleton",
|
|
100
|
+
"category": "Rook UI"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
{% endschema %}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
{% comment %}
|
|
2
|
+
Block: RK Typography
|
|
3
|
+
Renders a rk-typography for headings and text blocks.
|
|
4
|
+
Uses rk-spacing-style for Horizon-compatible spacing.
|
|
5
|
+
{% endcomment %}
|
|
6
|
+
|
|
7
|
+
<rk-typography-block
|
|
8
|
+
id="block-{{ block.id }}"
|
|
9
|
+
{{ block.shopify_attributes }}
|
|
10
|
+
class="rk-block rk-spacing-style"
|
|
11
|
+
style="
|
|
12
|
+
{% render 'rk-spacing-style', settings: block.settings %}
|
|
13
|
+
{% if block.settings.custom_color != blank %}--rk-typo-color: {{ block.settings.custom_color }};{% endif %}
|
|
14
|
+
"
|
|
15
|
+
>
|
|
16
|
+
{%- liquid
|
|
17
|
+
assign use_richtext = false
|
|
18
|
+
if block.settings.use_richtext
|
|
19
|
+
assign use_richtext = true
|
|
20
|
+
endif
|
|
21
|
+
-%}
|
|
22
|
+
|
|
23
|
+
{% if use_richtext %}
|
|
24
|
+
<div
|
|
25
|
+
class="rk-typography rk-typography--{{ block.settings.size }}{% if block.settings.bold %} rk-typography--bold{% endif %}{% if block.settings.muted %} rk-typography--muted{% endif %}{% if block.settings.uppercase %} rk-typography--uppercase{% endif %}"
|
|
26
|
+
style="text-align: {{ block.settings.alignment }};{% if block.settings.custom_color != blank %} color: var(--rk-typo-color);{% endif %}"
|
|
27
|
+
>
|
|
28
|
+
{{ block.settings.richtext }}
|
|
29
|
+
</div>
|
|
30
|
+
{% else %}
|
|
31
|
+
{% render 'rk-typography',
|
|
32
|
+
text: block.settings.text,
|
|
33
|
+
tag: block.settings.tag,
|
|
34
|
+
size: block.settings.size,
|
|
35
|
+
align: block.settings.alignment,
|
|
36
|
+
bold: block.settings.bold,
|
|
37
|
+
muted: block.settings.muted,
|
|
38
|
+
uppercase: block.settings.uppercase,
|
|
39
|
+
custom_class: block.settings.custom_color | prepend: 'color:' | prepend: 'style="' | append: '"'
|
|
40
|
+
%}
|
|
41
|
+
{% endif %}
|
|
42
|
+
</rk-typography-block>
|
|
43
|
+
|
|
44
|
+
{% schema %}
|
|
45
|
+
{
|
|
46
|
+
"name": "RK | Texto",
|
|
47
|
+
"tag": null,
|
|
48
|
+
"settings": [
|
|
49
|
+
{
|
|
50
|
+
"type": "checkbox",
|
|
51
|
+
"id": "use_richtext",
|
|
52
|
+
"label": "Usar editor de texto avançado",
|
|
53
|
+
"default": false
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"type": "text",
|
|
57
|
+
"id": "text",
|
|
58
|
+
"label": "Texto",
|
|
59
|
+
"default": "Seu texto aqui",
|
|
60
|
+
"visible_if": "{{ block.settings.use_richtext == false }}"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "richtext",
|
|
64
|
+
"id": "richtext",
|
|
65
|
+
"label": "Texto avançado",
|
|
66
|
+
"default": "<p>Seu texto avançado aqui</p>",
|
|
67
|
+
"visible_if": "{{ block.settings.use_richtext == true }}"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "select",
|
|
71
|
+
"id": "tag",
|
|
72
|
+
"label": "Tag HTML",
|
|
73
|
+
"options": [
|
|
74
|
+
{ "value": "p", "label": "Parágrafo (p)" },
|
|
75
|
+
{ "value": "h1", "label": "Título H1" },
|
|
76
|
+
{ "value": "h2", "label": "Título H2" },
|
|
77
|
+
{ "value": "h3", "label": "Título H3" },
|
|
78
|
+
{ "value": "h4", "label": "Título H4" },
|
|
79
|
+
{ "value": "h5", "label": "Título H5" },
|
|
80
|
+
{ "value": "h6", "label": "Título H6" },
|
|
81
|
+
{ "value": "span", "label": "Span" }
|
|
82
|
+
],
|
|
83
|
+
"default": "p",
|
|
84
|
+
"visible_if": "{{ block.settings.use_richtext == false }}"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"type": "select",
|
|
88
|
+
"id": "size",
|
|
89
|
+
"label": "Tamanho",
|
|
90
|
+
"options": [
|
|
91
|
+
{ "value": "xs", "label": "Extra Pequeno (12px)" },
|
|
92
|
+
{ "value": "sm", "label": "Pequeno (14px)" },
|
|
93
|
+
{ "value": "md", "label": "Médio (16px)" },
|
|
94
|
+
{ "value": "lg", "label": "Grande (18px)" },
|
|
95
|
+
{ "value": "xl", "label": "Extra Grande (20px)" },
|
|
96
|
+
{ "value": "2xl", "label": "2XL (24px)" },
|
|
97
|
+
{ "value": "3xl", "label": "3XL (30px)" },
|
|
98
|
+
{ "value": "4xl", "label": "4XL (36px)" }
|
|
99
|
+
],
|
|
100
|
+
"default": "md"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"type": "text_alignment",
|
|
104
|
+
"id": "alignment",
|
|
105
|
+
"label": "Alinhamento",
|
|
106
|
+
"default": "left"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"type": "checkbox",
|
|
110
|
+
"id": "bold",
|
|
111
|
+
"label": "Negrito",
|
|
112
|
+
"default": false
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "checkbox",
|
|
116
|
+
"id": "muted",
|
|
117
|
+
"label": "Cor suave (muted)",
|
|
118
|
+
"default": false
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"type": "checkbox",
|
|
122
|
+
"id": "uppercase",
|
|
123
|
+
"label": "Caixa alta",
|
|
124
|
+
"default": false
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"type": "color",
|
|
128
|
+
"id": "custom_color",
|
|
129
|
+
"label": "Cor personalizada"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"type": "header",
|
|
133
|
+
"content": "Espaçamento"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"type": "range",
|
|
137
|
+
"id": "padding-block-start",
|
|
138
|
+
"label": "Topo",
|
|
139
|
+
"min": 0,
|
|
140
|
+
"max": 100,
|
|
141
|
+
"step": 2,
|
|
142
|
+
"unit": "px",
|
|
143
|
+
"default": 0
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"type": "range",
|
|
147
|
+
"id": "padding-block-end",
|
|
148
|
+
"label": "Base",
|
|
149
|
+
"min": 0,
|
|
150
|
+
"max": 100,
|
|
151
|
+
"step": 2,
|
|
152
|
+
"unit": "px",
|
|
153
|
+
"default": 0
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"type": "range",
|
|
157
|
+
"id": "padding-inline-start",
|
|
158
|
+
"label": "Esquerda",
|
|
159
|
+
"min": 0,
|
|
160
|
+
"max": 100,
|
|
161
|
+
"step": 2,
|
|
162
|
+
"unit": "px",
|
|
163
|
+
"default": 0
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"type": "range",
|
|
167
|
+
"id": "padding-inline-end",
|
|
168
|
+
"label": "Direita",
|
|
169
|
+
"min": 0,
|
|
170
|
+
"max": 100,
|
|
171
|
+
"step": 2,
|
|
172
|
+
"unit": "px",
|
|
173
|
+
"default": 0
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
"presets": [
|
|
177
|
+
{
|
|
178
|
+
"name": "RK | Texto",
|
|
179
|
+
"category": "Rook UI"
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
{% endschema %}
|