rook-cli 1.3.8 → 1.3.9
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 +1 -1
- package/rook-framework/PRD.md +240 -34
- package/rook-framework/assets/rk-framework-core.css +102 -15
- package/rook-framework/assets/rk-modal.js +104 -24
- package/rook-framework/assets/rk-reveal.js +212 -0
- package/rook-framework/blocks/rk-heading.liquid +233 -0
- package/rook-framework/blocks/rk-icon-or-image.liquid +704 -0
- package/rook-framework/blocks/rk-quick-add.liquid +2 -2
- package/rook-framework/blocks/rk-typography.liquid +209 -45
- package/rook-framework/snippets/rk-icon-list.liquid +446 -0
- package/rook-framework/snippets/rk-icon-or-image.liquid +68 -0
- package/rook-framework/snippets/rk-icon.liquid +3 -3
- package/rook-framework/snippets/rk-modal.liquid +108 -19
- package/rook-framework/snippets/rk-reveal.liquid +56 -0
- package/rook-framework/snippets/rk-scripts.liquid +1 -1
- package/src/utils/logger.js +1 -1
- package/rook-framework/blocks/rk-button.liquid +0 -166
- package/rook-framework/blocks/rk-icon.liquid +0 -134
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
|
|
40
40
|
{% schema %}
|
|
41
41
|
{
|
|
42
|
-
"name": "RK |
|
|
42
|
+
"name": "RK | Quick Add",
|
|
43
43
|
"tag": null,
|
|
44
44
|
"settings": [
|
|
45
45
|
{
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
],
|
|
130
130
|
"presets": [
|
|
131
131
|
{
|
|
132
|
-
"name": "RK |
|
|
132
|
+
"name": "RK | Quick Add",
|
|
133
133
|
"category": "Rook UI"
|
|
134
134
|
}
|
|
135
135
|
]
|
|
@@ -1,46 +1,87 @@
|
|
|
1
1
|
{% comment %}
|
|
2
|
-
Block: RK Typography
|
|
3
|
-
Renders
|
|
4
|
-
|
|
2
|
+
Block: RK Typography (Text)
|
|
3
|
+
Renders text content using rk-typography snippet.
|
|
4
|
+
Supports plain text and richtext modes with full styling controls.
|
|
5
5
|
{% endcomment %}
|
|
6
6
|
|
|
7
|
+
{%- liquid
|
|
8
|
+
assign bs = block.settings
|
|
9
|
+
assign use_richtext = bs.use_richtext
|
|
10
|
+
assign el_size = bs.size | default: 'md'
|
|
11
|
+
-%}
|
|
12
|
+
|
|
7
13
|
<rk-typography-block
|
|
8
14
|
id="block-{{ block.id }}"
|
|
9
15
|
{{ block.shopify_attributes }}
|
|
10
|
-
class="rk-block rk-spacing-style"
|
|
16
|
+
class="rk-block rk-block--text rk-spacing-style rk-size-style"
|
|
11
17
|
style="
|
|
12
|
-
{% render 'rk-spacing-style', settings:
|
|
13
|
-
{%
|
|
18
|
+
{% render 'rk-spacing-style', settings: bs %}
|
|
19
|
+
{% render 'rk-size-style', settings: bs %}
|
|
20
|
+
{% if bs.custom_color != blank %}--rk-text-color: {{ bs.custom_color }};{% endif %}
|
|
21
|
+
{% if bs.max_width != 'none' %}--rk-text-max-width: {{ bs.max_width }};{% endif %}
|
|
22
|
+
{% if bs.line_height != 'default' %}--rk-text-line-height: var(--rk-line-height-{{ bs.line_height }});{% endif %}
|
|
23
|
+
{% if bs.letter_spacing != 'normal' %}--rk-text-letter-spacing: var(--rk-letter-spacing-{{ bs.letter_spacing }});{% endif %}
|
|
24
|
+
{% if bs.wrap != 'pretty' %}--rk-text-wrap: {{ bs.wrap }};{% endif %}
|
|
25
|
+
{% if bs.background %}--rk-text-bg: {{ bs.background_color }};--rk-text-radius: {{ bs.corner_radius }}px;{% endif %}
|
|
14
26
|
"
|
|
15
27
|
>
|
|
16
|
-
{%- liquid
|
|
17
|
-
assign use_richtext = false
|
|
18
|
-
if block.settings.use_richtext
|
|
19
|
-
assign use_richtext = true
|
|
20
|
-
endif
|
|
21
|
-
-%}
|
|
22
|
-
|
|
23
28
|
{% if use_richtext %}
|
|
24
29
|
<div
|
|
25
|
-
class="rk-typography rk-typography--{{
|
|
26
|
-
style="text-align: {{
|
|
30
|
+
class="rk-typography rk-typography--{{ el_size }}{% if bs.bold %} rk-typography--bold{% endif %}{% if bs.muted %} rk-typography--muted{% endif %}{% if bs.uppercase %} rk-typography--uppercase{% endif %} rk-block__text"
|
|
31
|
+
{% if bs.alignment %}style="text-align: {{ bs.alignment }};"{% endif %}
|
|
27
32
|
>
|
|
28
|
-
{{
|
|
33
|
+
{{ bs.richtext }}
|
|
29
34
|
</div>
|
|
30
35
|
{% else %}
|
|
31
36
|
{% render 'rk-typography',
|
|
32
|
-
text:
|
|
33
|
-
tag:
|
|
34
|
-
size:
|
|
35
|
-
align:
|
|
36
|
-
bold:
|
|
37
|
-
muted:
|
|
38
|
-
uppercase:
|
|
39
|
-
custom_class:
|
|
37
|
+
text: bs.text,
|
|
38
|
+
tag: bs.tag,
|
|
39
|
+
size: el_size,
|
|
40
|
+
align: bs.alignment,
|
|
41
|
+
bold: bs.bold,
|
|
42
|
+
muted: bs.muted,
|
|
43
|
+
uppercase: bs.uppercase,
|
|
44
|
+
custom_class: 'rk-block__text'
|
|
40
45
|
%}
|
|
41
46
|
{% endif %}
|
|
42
47
|
</rk-typography-block>
|
|
43
48
|
|
|
49
|
+
{% stylesheet %}
|
|
50
|
+
.rk-block--text {
|
|
51
|
+
width: var(--rk-width, fit-content);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.rk-block--text .rk-block__text {
|
|
55
|
+
margin: 0;
|
|
56
|
+
color: var(--rk-text-color, inherit);
|
|
57
|
+
max-width: var(--rk-text-max-width, none);
|
|
58
|
+
line-height: var(--rk-text-line-height, var(--rk-line-height-relaxed));
|
|
59
|
+
letter-spacing: var(--rk-text-letter-spacing, normal);
|
|
60
|
+
text-wrap: var(--rk-text-wrap, pretty);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.rk-block--text .rk-block__text p {
|
|
64
|
+
margin: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.rk-block--text .rk-block__text p + p {
|
|
68
|
+
margin-top: var(--rk-space-sm);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Background mode */
|
|
72
|
+
.rk-block--text[style*="--rk-text-bg"] .rk-block__text {
|
|
73
|
+
background-color: var(--rk-text-bg);
|
|
74
|
+
border-radius: var(--rk-text-radius, 0);
|
|
75
|
+
padding: var(--rk-space-sm) var(--rk-space-md);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@media (max-width: 749px) {
|
|
79
|
+
.rk-block--text {
|
|
80
|
+
width: var(--rk-width-mobile, var(--rk-width, fit-content));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
{% endstylesheet %}
|
|
84
|
+
|
|
44
85
|
{% schema %}
|
|
45
86
|
{
|
|
46
87
|
"name": "RK | Texto",
|
|
@@ -72,39 +113,37 @@
|
|
|
72
113
|
"label": "Tag HTML",
|
|
73
114
|
"options": [
|
|
74
115
|
{ "value": "p", "label": "Parágrafo (p)" },
|
|
75
|
-
{ "value": "h1", "label": "
|
|
76
|
-
{ "value": "h2", "label": "
|
|
77
|
-
{ "value": "h3", "label": "
|
|
78
|
-
{ "value": "h4", "label": "
|
|
79
|
-
{ "value": "h5", "label": "
|
|
80
|
-
{ "value": "h6", "label": "
|
|
116
|
+
{ "value": "h1", "label": "H1" },
|
|
117
|
+
{ "value": "h2", "label": "H2" },
|
|
118
|
+
{ "value": "h3", "label": "H3" },
|
|
119
|
+
{ "value": "h4", "label": "H4" },
|
|
120
|
+
{ "value": "h5", "label": "H5" },
|
|
121
|
+
{ "value": "h6", "label": "H6" },
|
|
81
122
|
{ "value": "span", "label": "Span" }
|
|
82
123
|
],
|
|
83
124
|
"default": "p",
|
|
84
125
|
"visible_if": "{{ block.settings.use_richtext == false }}"
|
|
85
126
|
},
|
|
127
|
+
{
|
|
128
|
+
"type": "header",
|
|
129
|
+
"content": "Tipografia"
|
|
130
|
+
},
|
|
86
131
|
{
|
|
87
132
|
"type": "select",
|
|
88
133
|
"id": "size",
|
|
89
134
|
"label": "Tamanho",
|
|
90
135
|
"options": [
|
|
91
|
-
{ "value": "xs", "label": "
|
|
92
|
-
{ "value": "sm", "label": "
|
|
93
|
-
{ "value": "md", "label": "
|
|
94
|
-
{ "value": "lg", "label": "
|
|
95
|
-
{ "value": "xl", "label": "
|
|
136
|
+
{ "value": "xs", "label": "XS (12px)" },
|
|
137
|
+
{ "value": "sm", "label": "SM (14px)" },
|
|
138
|
+
{ "value": "md", "label": "MD (16px)" },
|
|
139
|
+
{ "value": "lg", "label": "LG (18px)" },
|
|
140
|
+
{ "value": "xl", "label": "XL (20px)" },
|
|
96
141
|
{ "value": "2xl", "label": "2XL (24px)" },
|
|
97
142
|
{ "value": "3xl", "label": "3XL (30px)" },
|
|
98
143
|
{ "value": "4xl", "label": "4XL (36px)" }
|
|
99
144
|
],
|
|
100
145
|
"default": "md"
|
|
101
146
|
},
|
|
102
|
-
{
|
|
103
|
-
"type": "text_alignment",
|
|
104
|
-
"id": "alignment",
|
|
105
|
-
"label": "Alinhamento",
|
|
106
|
-
"default": "left"
|
|
107
|
-
},
|
|
108
147
|
{
|
|
109
148
|
"type": "checkbox",
|
|
110
149
|
"id": "bold",
|
|
@@ -114,19 +153,133 @@
|
|
|
114
153
|
{
|
|
115
154
|
"type": "checkbox",
|
|
116
155
|
"id": "muted",
|
|
117
|
-
"label": "Cor
|
|
156
|
+
"label": "Cor Suave (muted)",
|
|
118
157
|
"default": false
|
|
119
158
|
},
|
|
120
159
|
{
|
|
121
160
|
"type": "checkbox",
|
|
122
161
|
"id": "uppercase",
|
|
123
|
-
"label": "Caixa
|
|
162
|
+
"label": "Caixa Alta",
|
|
124
163
|
"default": false
|
|
125
164
|
},
|
|
165
|
+
{
|
|
166
|
+
"type": "select",
|
|
167
|
+
"id": "line_height",
|
|
168
|
+
"label": "Altura da Linha",
|
|
169
|
+
"options": [
|
|
170
|
+
{ "value": "default", "label": "Padrão" },
|
|
171
|
+
{ "value": "tight", "label": "Compacto" },
|
|
172
|
+
{ "value": "normal", "label": "Normal" },
|
|
173
|
+
{ "value": "relaxed", "label": "Espaçado" }
|
|
174
|
+
],
|
|
175
|
+
"default": "default"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"type": "select",
|
|
179
|
+
"id": "letter_spacing",
|
|
180
|
+
"label": "Espaçamento entre Letras",
|
|
181
|
+
"options": [
|
|
182
|
+
{ "value": "normal", "label": "Normal" },
|
|
183
|
+
{ "value": "tight", "label": "Compacto" },
|
|
184
|
+
{ "value": "wide", "label": "Espaçado" }
|
|
185
|
+
],
|
|
186
|
+
"default": "normal"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"type": "select",
|
|
190
|
+
"id": "wrap",
|
|
191
|
+
"label": "Quebra de Texto",
|
|
192
|
+
"options": [
|
|
193
|
+
{ "value": "pretty", "label": "Pretty" },
|
|
194
|
+
{ "value": "balance", "label": "Balance" },
|
|
195
|
+
{ "value": "nowrap", "label": "Sem quebra" }
|
|
196
|
+
],
|
|
197
|
+
"default": "pretty"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"type": "header",
|
|
201
|
+
"content": "Layout"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"type": "select",
|
|
205
|
+
"id": "alignment",
|
|
206
|
+
"label": "Alinhamento",
|
|
207
|
+
"options": [
|
|
208
|
+
{ "value": "left", "label": "Esquerda" },
|
|
209
|
+
{ "value": "center", "label": "Centro" },
|
|
210
|
+
{ "value": "right", "label": "Direita" }
|
|
211
|
+
],
|
|
212
|
+
"default": "left"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"type": "select",
|
|
216
|
+
"id": "width",
|
|
217
|
+
"label": "Largura",
|
|
218
|
+
"options": [
|
|
219
|
+
{ "value": "fit-content", "label": "Ajustar ao conteúdo" },
|
|
220
|
+
{ "value": "fill", "label": "Preencher (100%)" }
|
|
221
|
+
],
|
|
222
|
+
"default": "fit-content"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"type": "select",
|
|
226
|
+
"id": "width_mobile",
|
|
227
|
+
"label": "Largura Mobile",
|
|
228
|
+
"options": [
|
|
229
|
+
{ "value": "fit-content", "label": "Ajustar ao conteúdo" },
|
|
230
|
+
{ "value": "fill", "label": "Preencher (100%)" }
|
|
231
|
+
],
|
|
232
|
+
"default": "fill"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"type": "select",
|
|
236
|
+
"id": "max_width",
|
|
237
|
+
"label": "Largura Máxima",
|
|
238
|
+
"options": [
|
|
239
|
+
{ "value": "none", "label": "Sem limite" },
|
|
240
|
+
{ "value": "40ch", "label": "Estreita (40ch)" },
|
|
241
|
+
{ "value": "60ch", "label": "Normal (60ch)" },
|
|
242
|
+
{ "value": "80ch", "label": "Larga (80ch)" }
|
|
243
|
+
],
|
|
244
|
+
"default": "none"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"type": "header",
|
|
248
|
+
"content": "Cor"
|
|
249
|
+
},
|
|
126
250
|
{
|
|
127
251
|
"type": "color",
|
|
128
252
|
"id": "custom_color",
|
|
129
|
-
"label": "Cor
|
|
253
|
+
"label": "Cor Personalizada",
|
|
254
|
+
"info": "Deixe vazio para herdar a cor do contexto."
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"type": "header",
|
|
258
|
+
"content": "Aparência"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"type": "checkbox",
|
|
262
|
+
"id": "background",
|
|
263
|
+
"label": "Fundo Colorido",
|
|
264
|
+
"default": false
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"type": "color",
|
|
268
|
+
"id": "background_color",
|
|
269
|
+
"label": "Cor de Fundo",
|
|
270
|
+
"default": "#00000026",
|
|
271
|
+
"visible_if": "{{ block.settings.background }}"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"type": "range",
|
|
275
|
+
"id": "corner_radius",
|
|
276
|
+
"label": "Raio da Borda",
|
|
277
|
+
"min": 0,
|
|
278
|
+
"max": 50,
|
|
279
|
+
"step": 1,
|
|
280
|
+
"unit": "px",
|
|
281
|
+
"default": 0,
|
|
282
|
+
"visible_if": "{{ block.settings.background }}"
|
|
130
283
|
},
|
|
131
284
|
{
|
|
132
285
|
"type": "header",
|
|
@@ -176,7 +329,18 @@
|
|
|
176
329
|
"presets": [
|
|
177
330
|
{
|
|
178
331
|
"name": "RK | Texto",
|
|
179
|
-
"category": "Rook UI"
|
|
332
|
+
"category": "Rook UI",
|
|
333
|
+
"settings": {
|
|
334
|
+
"text": "Seu texto aqui"
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"name": "RK | Texto Avançado",
|
|
339
|
+
"category": "Rook UI",
|
|
340
|
+
"settings": {
|
|
341
|
+
"use_richtext": true,
|
|
342
|
+
"width": "fill"
|
|
343
|
+
}
|
|
180
344
|
}
|
|
181
345
|
]
|
|
182
346
|
}
|