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,120 @@
|
|
|
1
|
+
{% comment %}
|
|
2
|
+
Block: RK Form Field
|
|
3
|
+
Renders a rk-form-field with label, input and error slot.
|
|
4
|
+
Uses rk-spacing-style for Horizon-compatible spacing.
|
|
5
|
+
{% endcomment %}
|
|
6
|
+
|
|
7
|
+
<rk-form-field-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-form-field',
|
|
16
|
+
name: block.settings.name,
|
|
17
|
+
label: block.settings.label,
|
|
18
|
+
type: block.settings.type,
|
|
19
|
+
placeholder: block.settings.placeholder,
|
|
20
|
+
required: block.settings.required
|
|
21
|
+
%}
|
|
22
|
+
</rk-form-field-block>
|
|
23
|
+
|
|
24
|
+
{% schema %}
|
|
25
|
+
{
|
|
26
|
+
"name": "RK | Campo de Formulário",
|
|
27
|
+
"tag": null,
|
|
28
|
+
"settings": [
|
|
29
|
+
{
|
|
30
|
+
"type": "text",
|
|
31
|
+
"id": "label",
|
|
32
|
+
"label": "Label",
|
|
33
|
+
"default": "Nome"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "text",
|
|
37
|
+
"id": "name",
|
|
38
|
+
"label": "Nome do campo (name)",
|
|
39
|
+
"default": "name",
|
|
40
|
+
"info": "Identificador único do campo no formulário"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "select",
|
|
44
|
+
"id": "type",
|
|
45
|
+
"label": "Tipo do input",
|
|
46
|
+
"options": [
|
|
47
|
+
{ "value": "text", "label": "Texto" },
|
|
48
|
+
{ "value": "email", "label": "E-mail" },
|
|
49
|
+
{ "value": "password", "label": "Senha" },
|
|
50
|
+
{ "value": "tel", "label": "Telefone" },
|
|
51
|
+
{ "value": "number", "label": "Número" },
|
|
52
|
+
{ "value": "url", "label": "URL" }
|
|
53
|
+
],
|
|
54
|
+
"default": "text"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"type": "text",
|
|
58
|
+
"id": "placeholder",
|
|
59
|
+
"label": "Placeholder",
|
|
60
|
+
"default": "Digite aqui..."
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "checkbox",
|
|
64
|
+
"id": "required",
|
|
65
|
+
"label": "Campo obrigatório",
|
|
66
|
+
"default": false
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "header",
|
|
70
|
+
"content": "Espaçamento"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"type": "range",
|
|
74
|
+
"id": "padding-block-start",
|
|
75
|
+
"label": "Topo",
|
|
76
|
+
"min": 0,
|
|
77
|
+
"max": 100,
|
|
78
|
+
"step": 2,
|
|
79
|
+
"unit": "px",
|
|
80
|
+
"default": 0
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"type": "range",
|
|
84
|
+
"id": "padding-block-end",
|
|
85
|
+
"label": "Base",
|
|
86
|
+
"min": 0,
|
|
87
|
+
"max": 100,
|
|
88
|
+
"step": 2,
|
|
89
|
+
"unit": "px",
|
|
90
|
+
"default": 0
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"type": "range",
|
|
94
|
+
"id": "padding-inline-start",
|
|
95
|
+
"label": "Esquerda",
|
|
96
|
+
"min": 0,
|
|
97
|
+
"max": 100,
|
|
98
|
+
"step": 2,
|
|
99
|
+
"unit": "px",
|
|
100
|
+
"default": 0
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"type": "range",
|
|
104
|
+
"id": "padding-inline-end",
|
|
105
|
+
"label": "Direita",
|
|
106
|
+
"min": 0,
|
|
107
|
+
"max": 100,
|
|
108
|
+
"step": 2,
|
|
109
|
+
"unit": "px",
|
|
110
|
+
"default": 0
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"presets": [
|
|
114
|
+
{
|
|
115
|
+
"name": "RK | Campo de Formulário",
|
|
116
|
+
"category": "Rook UI"
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
{% endschema %}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{% comment %}
|
|
2
|
+
Block: RK Icon
|
|
3
|
+
Renders a rk-icon standalone block.
|
|
4
|
+
Uses rk-spacing-style for Horizon-compatible spacing.
|
|
5
|
+
{% endcomment %}
|
|
6
|
+
|
|
7
|
+
<rk-icon-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.alignment == 'center' %}text-align: center;{% elsif block.settings.alignment == 'right' %}text-align: right;{% endif %}
|
|
14
|
+
"
|
|
15
|
+
>
|
|
16
|
+
{% render 'rk-icon',
|
|
17
|
+
icon: block.settings.icon,
|
|
18
|
+
size: block.settings.size,
|
|
19
|
+
color: block.settings.color
|
|
20
|
+
%}
|
|
21
|
+
</rk-icon-block>
|
|
22
|
+
|
|
23
|
+
{% schema %}
|
|
24
|
+
{
|
|
25
|
+
"name": "RK | Ícone",
|
|
26
|
+
"tag": null,
|
|
27
|
+
"settings": [
|
|
28
|
+
{
|
|
29
|
+
"type": "select",
|
|
30
|
+
"id": "icon",
|
|
31
|
+
"label": "Ícone",
|
|
32
|
+
"options": [
|
|
33
|
+
{ "value": "heart", "label": "Coração" },
|
|
34
|
+
{ "value": "star", "label": "Estrela" },
|
|
35
|
+
{ "value": "truck", "label": "Caminhão" },
|
|
36
|
+
{ "value": "lock", "label": "Cadeado" },
|
|
37
|
+
{ "value": "return", "label": "Devolução" },
|
|
38
|
+
{ "value": "chat_bubble", "label": "Chat" },
|
|
39
|
+
{ "value": "fire", "label": "Fogo" },
|
|
40
|
+
{ "value": "lightning_bolt", "label": "Raio" },
|
|
41
|
+
{ "value": "leaf", "label": "Folha" },
|
|
42
|
+
{ "value": "plant", "label": "Planta" },
|
|
43
|
+
{ "value": "recycle", "label": "Reciclável" },
|
|
44
|
+
{ "value": "snowflake", "label": "Floco de neve" },
|
|
45
|
+
{ "value": "map_pin", "label": "Pin de mapa" },
|
|
46
|
+
{ "value": "eye", "label": "Olho" },
|
|
47
|
+
{ "value": "ruler", "label": "Régua" },
|
|
48
|
+
{ "value": "price_tag", "label": "Etiqueta de preço" },
|
|
49
|
+
{ "value": "question_mark", "label": "Interrogação" },
|
|
50
|
+
{ "value": "error", "label": "Erro" },
|
|
51
|
+
{ "value": "check_box", "label": "Checkbox" },
|
|
52
|
+
{ "value": "clipboard", "label": "Clipboard" },
|
|
53
|
+
{ "value": "plane", "label": "Avião" },
|
|
54
|
+
{ "value": "stopwatch", "label": "Cronômetro" },
|
|
55
|
+
{ "value": "silhouette", "label": "Perfil" }
|
|
56
|
+
],
|
|
57
|
+
"default": "heart"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"type": "select",
|
|
61
|
+
"id": "size",
|
|
62
|
+
"label": "Tamanho",
|
|
63
|
+
"options": [
|
|
64
|
+
{ "value": "sm", "label": "Pequeno (16px)" },
|
|
65
|
+
{ "value": "md", "label": "Médio (20px)" },
|
|
66
|
+
{ "value": "lg", "label": "Grande (24px)" },
|
|
67
|
+
{ "value": "xl", "label": "Extra Grande (32px)" }
|
|
68
|
+
],
|
|
69
|
+
"default": "md"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "color",
|
|
73
|
+
"id": "color",
|
|
74
|
+
"label": "Cor"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "text_alignment",
|
|
78
|
+
"id": "alignment",
|
|
79
|
+
"label": "Alinhamento",
|
|
80
|
+
"default": "left"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"type": "header",
|
|
84
|
+
"content": "Espaçamento"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"type": "range",
|
|
88
|
+
"id": "padding-block-start",
|
|
89
|
+
"label": "Topo",
|
|
90
|
+
"min": 0,
|
|
91
|
+
"max": 100,
|
|
92
|
+
"step": 2,
|
|
93
|
+
"unit": "px",
|
|
94
|
+
"default": 0
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"type": "range",
|
|
98
|
+
"id": "padding-block-end",
|
|
99
|
+
"label": "Base",
|
|
100
|
+
"min": 0,
|
|
101
|
+
"max": 100,
|
|
102
|
+
"step": 2,
|
|
103
|
+
"unit": "px",
|
|
104
|
+
"default": 0
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "range",
|
|
108
|
+
"id": "padding-inline-start",
|
|
109
|
+
"label": "Esquerda",
|
|
110
|
+
"min": 0,
|
|
111
|
+
"max": 100,
|
|
112
|
+
"step": 2,
|
|
113
|
+
"unit": "px",
|
|
114
|
+
"default": 0
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"type": "range",
|
|
118
|
+
"id": "padding-inline-end",
|
|
119
|
+
"label": "Direita",
|
|
120
|
+
"min": 0,
|
|
121
|
+
"max": 100,
|
|
122
|
+
"step": 2,
|
|
123
|
+
"unit": "px",
|
|
124
|
+
"default": 0
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"presets": [
|
|
128
|
+
{
|
|
129
|
+
"name": "RK | Ícone",
|
|
130
|
+
"category": "Rook UI"
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
{% endschema %}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
{% comment %}
|
|
2
|
+
Block: RK Image
|
|
3
|
+
Renders a rk-image with image picker and customizer controls.
|
|
4
|
+
Uses rk-size-style and rk-spacing-style for Horizon-compatible sizing and spacing.
|
|
5
|
+
{% endcomment %}
|
|
6
|
+
|
|
7
|
+
<rk-image-block
|
|
8
|
+
id="block-{{ block.id }}"
|
|
9
|
+
{{ block.shopify_attributes }}
|
|
10
|
+
class="rk-block rk-size-style rk-spacing-style"
|
|
11
|
+
style="
|
|
12
|
+
{% render 'rk-size-style', settings: block.settings %}
|
|
13
|
+
{% render 'rk-spacing-style', settings: block.settings %}
|
|
14
|
+
--rk-block-radius: {{ block.settings.border_radius }}px;
|
|
15
|
+
"
|
|
16
|
+
>
|
|
17
|
+
{% if block.settings.image != blank %}
|
|
18
|
+
{% render 'rk-image',
|
|
19
|
+
image: block.settings.image,
|
|
20
|
+
loading: block.settings.loading,
|
|
21
|
+
shape: block.settings.shape,
|
|
22
|
+
alt: block.settings.alt,
|
|
23
|
+
style: 'border-radius: var(--rk-block-radius);'
|
|
24
|
+
%}
|
|
25
|
+
{% else %}
|
|
26
|
+
<div class="rk-image__placeholder" style="aspect-ratio: 16/9; border-radius: var(--rk-block-radius);">
|
|
27
|
+
{{ 'image' | placeholder_svg_tag }}
|
|
28
|
+
</div>
|
|
29
|
+
{% endif %}
|
|
30
|
+
</rk-image-block>
|
|
31
|
+
|
|
32
|
+
{% schema %}
|
|
33
|
+
{
|
|
34
|
+
"name": "RK | Imagem",
|
|
35
|
+
"tag": null,
|
|
36
|
+
"settings": [
|
|
37
|
+
{
|
|
38
|
+
"type": "image_picker",
|
|
39
|
+
"id": "image",
|
|
40
|
+
"label": "Imagem"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "text",
|
|
44
|
+
"id": "alt",
|
|
45
|
+
"label": "Texto alternativo (alt)"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"type": "select",
|
|
49
|
+
"id": "shape",
|
|
50
|
+
"label": "Formato",
|
|
51
|
+
"options": [
|
|
52
|
+
{ "value": "", "label": "Padrão" },
|
|
53
|
+
{ "value": "rounded", "label": "Arredondado" },
|
|
54
|
+
{ "value": "circle", "label": "Circular" }
|
|
55
|
+
],
|
|
56
|
+
"default": ""
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "select",
|
|
60
|
+
"id": "loading",
|
|
61
|
+
"label": "Carregamento",
|
|
62
|
+
"options": [
|
|
63
|
+
{ "value": "lazy", "label": "Lazy (padrão)" },
|
|
64
|
+
{ "value": "eager", "label": "Eager (prioridade)" }
|
|
65
|
+
],
|
|
66
|
+
"default": "lazy"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "range",
|
|
70
|
+
"id": "border_radius",
|
|
71
|
+
"label": "Arredondamento",
|
|
72
|
+
"min": 0,
|
|
73
|
+
"max": 40,
|
|
74
|
+
"step": 2,
|
|
75
|
+
"unit": "px",
|
|
76
|
+
"default": 0
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"type": "header",
|
|
80
|
+
"content": "Dimensionamento"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"type": "select",
|
|
84
|
+
"id": "width",
|
|
85
|
+
"label": "Largura",
|
|
86
|
+
"options": [
|
|
87
|
+
{ "value": "fit-content", "label": "Ajustar ao conteúdo" },
|
|
88
|
+
{ "value": "fill", "label": "Preencher" },
|
|
89
|
+
{ "value": "custom", "label": "Personalizado" }
|
|
90
|
+
],
|
|
91
|
+
"default": "fill"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"type": "range",
|
|
95
|
+
"id": "custom_width",
|
|
96
|
+
"label": "Largura personalizada",
|
|
97
|
+
"min": 10,
|
|
98
|
+
"max": 100,
|
|
99
|
+
"step": 5,
|
|
100
|
+
"unit": "%",
|
|
101
|
+
"default": 100
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "select",
|
|
105
|
+
"id": "height",
|
|
106
|
+
"label": "Altura",
|
|
107
|
+
"options": [
|
|
108
|
+
{ "value": "auto", "label": "Automática" },
|
|
109
|
+
{ "value": "fill", "label": "Preencher" },
|
|
110
|
+
{ "value": "custom", "label": "Personalizado" }
|
|
111
|
+
],
|
|
112
|
+
"default": "auto"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "range",
|
|
116
|
+
"id": "custom_height",
|
|
117
|
+
"label": "Altura personalizada",
|
|
118
|
+
"min": 10,
|
|
119
|
+
"max": 100,
|
|
120
|
+
"step": 5,
|
|
121
|
+
"unit": "%",
|
|
122
|
+
"default": 100
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "select",
|
|
126
|
+
"id": "width_mobile",
|
|
127
|
+
"label": "Largura no mobile",
|
|
128
|
+
"options": [
|
|
129
|
+
{ "value": "", "label": "Mesmo do desktop" },
|
|
130
|
+
{ "value": "fill", "label": "Preencher" },
|
|
131
|
+
{ "value": "fit-content", "label": "Ajustar ao conteúdo" },
|
|
132
|
+
{ "value": "custom", "label": "Personalizado" }
|
|
133
|
+
],
|
|
134
|
+
"default": ""
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"type": "range",
|
|
138
|
+
"id": "custom_width_mobile",
|
|
139
|
+
"label": "Largura mobile personalizada",
|
|
140
|
+
"min": 10,
|
|
141
|
+
"max": 100,
|
|
142
|
+
"step": 5,
|
|
143
|
+
"unit": "%",
|
|
144
|
+
"default": 100
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"type": "header",
|
|
148
|
+
"content": "Espaçamento"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"type": "range",
|
|
152
|
+
"id": "padding-block-start",
|
|
153
|
+
"label": "Topo",
|
|
154
|
+
"min": 0,
|
|
155
|
+
"max": 100,
|
|
156
|
+
"step": 2,
|
|
157
|
+
"unit": "px",
|
|
158
|
+
"default": 0
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"type": "range",
|
|
162
|
+
"id": "padding-block-end",
|
|
163
|
+
"label": "Base",
|
|
164
|
+
"min": 0,
|
|
165
|
+
"max": 100,
|
|
166
|
+
"step": 2,
|
|
167
|
+
"unit": "px",
|
|
168
|
+
"default": 0
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"type": "range",
|
|
172
|
+
"id": "padding-inline-start",
|
|
173
|
+
"label": "Esquerda",
|
|
174
|
+
"min": 0,
|
|
175
|
+
"max": 100,
|
|
176
|
+
"step": 2,
|
|
177
|
+
"unit": "px",
|
|
178
|
+
"default": 0
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"type": "range",
|
|
182
|
+
"id": "padding-inline-end",
|
|
183
|
+
"label": "Direita",
|
|
184
|
+
"min": 0,
|
|
185
|
+
"max": 100,
|
|
186
|
+
"step": 2,
|
|
187
|
+
"unit": "px",
|
|
188
|
+
"default": 0
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"presets": [
|
|
192
|
+
{
|
|
193
|
+
"name": "RK | Imagem",
|
|
194
|
+
"category": "Rook UI"
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
{% endschema %}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{% comment %}
|
|
2
|
+
Block: RK Installments
|
|
3
|
+
Renders a rk-installments component. Uses closest product context or 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
|
+
assign target_variant = target_product.selected_or_first_available_variant
|
|
10
|
+
-%}
|
|
11
|
+
|
|
12
|
+
<rk-installments-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
|
+
{% if block.settings.alignment == 'center' %}text-align: center;{% elsif block.settings.alignment == 'right' %}text-align: right;{% endif %}
|
|
19
|
+
"
|
|
20
|
+
>
|
|
21
|
+
{% if target_variant %}
|
|
22
|
+
{% render 'rk-installments', price: target_variant.price %}
|
|
23
|
+
{% endif %}
|
|
24
|
+
</rk-installments-block>
|
|
25
|
+
|
|
26
|
+
{% schema %}
|
|
27
|
+
{
|
|
28
|
+
"name": "RK | Parcelamento",
|
|
29
|
+
"tag": null,
|
|
30
|
+
"settings": [
|
|
31
|
+
{
|
|
32
|
+
"type": "product",
|
|
33
|
+
"id": "product",
|
|
34
|
+
"label": "Produto",
|
|
35
|
+
"info": "Se vazio, usa o produto do contexto"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "paragraph",
|
|
39
|
+
"content": "As configurações de parcelas (máximo, sem juros, valor mínimo, taxa) são definidas nas settings globais do tema em \"Rook UI Core Framework\"."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "text_alignment",
|
|
43
|
+
"id": "alignment",
|
|
44
|
+
"label": "Alinhamento",
|
|
45
|
+
"default": "left"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"type": "header",
|
|
49
|
+
"content": "Espaçamento"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "range",
|
|
53
|
+
"id": "padding-block-start",
|
|
54
|
+
"label": "Topo",
|
|
55
|
+
"min": 0,
|
|
56
|
+
"max": 100,
|
|
57
|
+
"step": 2,
|
|
58
|
+
"unit": "px",
|
|
59
|
+
"default": 0
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "range",
|
|
63
|
+
"id": "padding-block-end",
|
|
64
|
+
"label": "Base",
|
|
65
|
+
"min": 0,
|
|
66
|
+
"max": 100,
|
|
67
|
+
"step": 2,
|
|
68
|
+
"unit": "px",
|
|
69
|
+
"default": 0
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "range",
|
|
73
|
+
"id": "padding-inline-start",
|
|
74
|
+
"label": "Esquerda",
|
|
75
|
+
"min": 0,
|
|
76
|
+
"max": 100,
|
|
77
|
+
"step": 2,
|
|
78
|
+
"unit": "px",
|
|
79
|
+
"default": 0
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"type": "range",
|
|
83
|
+
"id": "padding-inline-end",
|
|
84
|
+
"label": "Direita",
|
|
85
|
+
"min": 0,
|
|
86
|
+
"max": 100,
|
|
87
|
+
"step": 2,
|
|
88
|
+
"unit": "px",
|
|
89
|
+
"default": 0
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"presets": [
|
|
93
|
+
{
|
|
94
|
+
"name": "RK | Parcelamento",
|
|
95
|
+
"category": "Rook UI"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
{% endschema %}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{% comment %}
|
|
2
|
+
Block: RK Pix Discount
|
|
3
|
+
Renders a rk-pix-discount component. Uses closest product context or 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
|
+
assign target_variant = target_product.selected_or_first_available_variant
|
|
10
|
+
-%}
|
|
11
|
+
|
|
12
|
+
<rk-pix-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
|
+
{% if block.settings.alignment == 'center' %}text-align: center;{% elsif block.settings.alignment == 'right' %}text-align: right;{% endif %}
|
|
19
|
+
"
|
|
20
|
+
>
|
|
21
|
+
{% if target_variant %}
|
|
22
|
+
{% render 'rk-pix-discount', price: target_variant.price %}
|
|
23
|
+
{% endif %}
|
|
24
|
+
</rk-pix-block>
|
|
25
|
+
|
|
26
|
+
{% schema %}
|
|
27
|
+
{
|
|
28
|
+
"name": "RK | Desconto Pix",
|
|
29
|
+
"tag": null,
|
|
30
|
+
"settings": [
|
|
31
|
+
{
|
|
32
|
+
"type": "product",
|
|
33
|
+
"id": "product",
|
|
34
|
+
"label": "Produto",
|
|
35
|
+
"info": "Se vazio, usa o produto do contexto"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "paragraph",
|
|
39
|
+
"content": "A porcentagem de desconto e o texto do Pix são definidos nas settings globais do tema em \"Rook UI Core Framework\"."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "text_alignment",
|
|
43
|
+
"id": "alignment",
|
|
44
|
+
"label": "Alinhamento",
|
|
45
|
+
"default": "left"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"type": "header",
|
|
49
|
+
"content": "Espaçamento"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "range",
|
|
53
|
+
"id": "padding-block-start",
|
|
54
|
+
"label": "Topo",
|
|
55
|
+
"min": 0,
|
|
56
|
+
"max": 100,
|
|
57
|
+
"step": 2,
|
|
58
|
+
"unit": "px",
|
|
59
|
+
"default": 0
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "range",
|
|
63
|
+
"id": "padding-block-end",
|
|
64
|
+
"label": "Base",
|
|
65
|
+
"min": 0,
|
|
66
|
+
"max": 100,
|
|
67
|
+
"step": 2,
|
|
68
|
+
"unit": "px",
|
|
69
|
+
"default": 0
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "range",
|
|
73
|
+
"id": "padding-inline-start",
|
|
74
|
+
"label": "Esquerda",
|
|
75
|
+
"min": 0,
|
|
76
|
+
"max": 100,
|
|
77
|
+
"step": 2,
|
|
78
|
+
"unit": "px",
|
|
79
|
+
"default": 0
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"type": "range",
|
|
83
|
+
"id": "padding-inline-end",
|
|
84
|
+
"label": "Direita",
|
|
85
|
+
"min": 0,
|
|
86
|
+
"max": 100,
|
|
87
|
+
"step": 2,
|
|
88
|
+
"unit": "px",
|
|
89
|
+
"default": 0
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"presets": [
|
|
93
|
+
{
|
|
94
|
+
"name": "RK | Desconto Pix",
|
|
95
|
+
"category": "Rook UI"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
{% endschema %}
|