rook-cli 1.3.8 → 1.3.10
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 +232 -15
- package/rook-framework/assets/rk-modal.js +250 -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 +137 -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
|
@@ -1,31 +1,149 @@
|
|
|
1
1
|
{% doc %}
|
|
2
2
|
Snippet: RkModal
|
|
3
|
-
Renders a
|
|
3
|
+
Renders a media lightbox for images, videos, and embedded content.
|
|
4
|
+
Uses Web Component <rk-modal-element> for behaviour.
|
|
5
|
+
Videos use custom Instagram-style controls (autoplay + muted by default).
|
|
4
6
|
|
|
5
|
-
@param {string} id - Unique modal id
|
|
6
|
-
@param {string}
|
|
7
|
-
@param {
|
|
7
|
+
@param {string} id - Unique modal id (required)
|
|
8
|
+
@param {string} [type] - 'image' | 'video' | 'youtube' | 'vimeo' | 'html' (default: 'image')
|
|
9
|
+
@param {object} [image] - Shopify image object (when type is 'image')
|
|
10
|
+
@param {string} [video_url] - Video URL for hosted .mp4 (when type is 'video')
|
|
11
|
+
@param {string} [youtube_id] - YouTube video ID (when type is 'youtube')
|
|
12
|
+
@param {string} [vimeo_id] - Vimeo video ID (when type is 'vimeo')
|
|
13
|
+
@param {string} [content] - Raw HTML content (when type is 'html')
|
|
14
|
+
@param {string} [alt] - Alt text for images / aria-label for media
|
|
15
|
+
@param {string} [aspect_ratio] - Aspect ratio for video (e.g. '16/9', default: '16/9')
|
|
8
16
|
@param {string} [custom_class] - Extra CSS classes
|
|
9
17
|
|
|
10
|
-
@example
|
|
11
|
-
{% render 'rk-modal', id: '
|
|
18
|
+
@example — Image lightbox
|
|
19
|
+
{% render 'rk-modal', id: 'product-zoom', type: 'image', image: product.featured_image, alt: product.title %}
|
|
20
|
+
|
|
21
|
+
@example — YouTube lightbox
|
|
22
|
+
{% render 'rk-modal', id: 'brand-video', type: 'youtube', youtube_id: 'dQw4w9WgXcQ' %}
|
|
23
|
+
|
|
24
|
+
@example — Hosted video
|
|
25
|
+
{% render 'rk-modal', id: 'story-video', type: 'video', video_url: video_source %}
|
|
12
26
|
{% enddoc %}
|
|
13
27
|
|
|
14
|
-
|
|
28
|
+
{%- liquid
|
|
29
|
+
assign modal_type = type | default: 'image'
|
|
30
|
+
assign modal_aspect = aspect_ratio | default: '16/9'
|
|
31
|
+
assign modal_alt = alt | default: ''
|
|
32
|
+
-%}
|
|
33
|
+
|
|
34
|
+
<rk-modal-element
|
|
35
|
+
data-modal-id="{{ id }}"
|
|
36
|
+
data-type="{{ modal_type }}"
|
|
37
|
+
>
|
|
15
38
|
<div id="{{ id }}" class="rk-modal{% if custom_class %} {{ custom_class }}{% endif %}">
|
|
39
|
+
{%- comment -%} Overlay {%- endcomment -%}
|
|
16
40
|
<div class="rk-modal__overlay" data-action="close"></div>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
{{
|
|
41
|
+
|
|
42
|
+
{%- comment -%} Close button {%- endcomment -%}
|
|
43
|
+
<button type="button" class="rk-modal__close" data-action="close" aria-label="Fechar">
|
|
44
|
+
{% render 'rk-icon', icon: 'close', size: 'md', color: '#fff' %}
|
|
45
|
+
</button>
|
|
46
|
+
|
|
47
|
+
{%- comment -%} Media content {%- endcomment -%}
|
|
48
|
+
<div
|
|
49
|
+
class="rk-modal__content"
|
|
50
|
+
role="dialog"
|
|
51
|
+
aria-modal="true"
|
|
52
|
+
{% if modal_alt != blank %}aria-label="{{ modal_alt }}"{% endif %}
|
|
53
|
+
>
|
|
54
|
+
{%- case modal_type -%}
|
|
55
|
+
|
|
56
|
+
{%- when 'image' -%}
|
|
57
|
+
{%- if image != blank -%}
|
|
58
|
+
{%- assign img_alt = modal_alt | default: image.alt | escape -%}
|
|
59
|
+
<div class="rk-modal__media rk-modal__media--image">
|
|
60
|
+
{{
|
|
61
|
+
image
|
|
62
|
+
| image_url: width: 1600
|
|
63
|
+
| image_tag:
|
|
64
|
+
class: 'rk-modal__img',
|
|
65
|
+
loading: 'lazy',
|
|
66
|
+
alt: img_alt,
|
|
67
|
+
sizes: '(min-width: 1200px) 1200px, 90vw'
|
|
68
|
+
}}
|
|
69
|
+
</div>
|
|
70
|
+
{%- endif -%}
|
|
71
|
+
|
|
72
|
+
{%- when 'video' -%}
|
|
73
|
+
<div class="rk-modal__media rk-modal__media--video" style="aspect-ratio: {{ modal_aspect }};">
|
|
74
|
+
<video
|
|
75
|
+
class="rk-modal__video"
|
|
76
|
+
playsinline
|
|
77
|
+
muted
|
|
78
|
+
loop
|
|
79
|
+
preload="metadata"
|
|
80
|
+
data-autoplay
|
|
81
|
+
{% if modal_alt != blank %}aria-label="{{ modal_alt }}"{% endif %}
|
|
82
|
+
>
|
|
83
|
+
<source src="{{ video_url }}" type="video/mp4">
|
|
84
|
+
</video>
|
|
85
|
+
|
|
86
|
+
{%- comment -%} Custom controls — Instagram style {%- endcomment -%}
|
|
87
|
+
<div class="rk-modal__controls">
|
|
88
|
+
<button type="button" class="rk-modal__ctrl-btn" data-ctrl="play-pause" aria-label="Play / Pause">
|
|
89
|
+
<svg class="rk-modal__ctrl-icon rk-modal__ctrl-icon--play" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
90
|
+
<path d="M6.3 3.24A1 1 0 0 0 5 4.13v11.74a1 1 0 0 0 1.5.87l10-5.87a1 1 0 0 0 0-1.74l-10-5.87-.2-.02Z"/>
|
|
91
|
+
</svg>
|
|
92
|
+
<svg class="rk-modal__ctrl-icon rk-modal__ctrl-icon--pause" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
93
|
+
<path d="M5 3h3v14H5V3Zm7 0h3v14h-3V3Z"/>
|
|
94
|
+
</svg>
|
|
95
|
+
</button>
|
|
96
|
+
|
|
97
|
+
<div class="rk-modal__progress" data-ctrl="progress">
|
|
98
|
+
<div class="rk-modal__progress-bar"></div>
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
<span class="rk-modal__time" data-ctrl="time">0:00</span>
|
|
102
|
+
|
|
103
|
+
<button type="button" class="rk-modal__ctrl-btn" data-ctrl="mute" aria-label="Mudo / Som">
|
|
104
|
+
<svg class="rk-modal__ctrl-icon rk-modal__ctrl-icon--muted" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
105
|
+
<path d="M10 3.5a.5.5 0 0 0-.8-.4L5.38 6H2.5a.5.5 0 0 0-.5.5v7a.5.5 0 0 0 .5.5h2.88l3.82 2.9a.5.5 0 0 0 .8-.4v-13ZM14.15 6.15a.5.5 0 0 1 .7 0l1.65 1.65 1.65-1.65a.5.5 0 0 1 .7.7L17.2 8.5l1.65 1.65a.5.5 0 0 1-.7.7L16.5 9.2l-1.65 1.65a.5.5 0 0 1-.7-.7l1.65-1.65-1.65-1.65a.5.5 0 0 1 0-.7Z"/>
|
|
106
|
+
</svg>
|
|
107
|
+
<svg class="rk-modal__ctrl-icon rk-modal__ctrl-icon--unmuted" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
108
|
+
<path d="M10 3.5a.5.5 0 0 0-.8-.4L5.38 6H2.5a.5.5 0 0 0-.5.5v7a.5.5 0 0 0 .5.5h2.88l3.82 2.9a.5.5 0 0 0 .8-.4v-13ZM13.54 6.16a.5.5 0 0 1 .7 0A6.47 6.47 0 0 1 16 10.5a6.47 6.47 0 0 1-1.76 4.34.5.5 0 0 1-.7-.7A5.47 5.47 0 0 0 15 10.5c0-1.5-.52-2.88-1.46-3.64a.5.5 0 0 1 0-.7Zm-1.08 2.3a.5.5 0 0 1 .7 0c.55.5.84 1.24.84 2.04s-.29 1.54-.84 2.04a.5.5 0 0 1-.7-.7c.35-.32.54-.79.54-1.34s-.19-1.02-.54-1.34a.5.5 0 0 1 0-.7Z"/>
|
|
109
|
+
</svg>
|
|
110
|
+
</button>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
{%- comment -%} Tap-to-toggle play overlay {%- endcomment -%}
|
|
114
|
+
<div class="rk-modal__tap-overlay" data-ctrl="tap"></div>
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
{%- when 'youtube' -%}
|
|
118
|
+
<div class="rk-modal__media rk-modal__media--embed" style="aspect-ratio: {{ modal_aspect }};">
|
|
119
|
+
<iframe
|
|
120
|
+
class="rk-modal__iframe"
|
|
121
|
+
data-src="https://www.youtube.com/embed/{{ youtube_id }}?rel=0&enablejsapi=1&mute=1&autoplay=1"
|
|
122
|
+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
|
123
|
+
allowfullscreen
|
|
124
|
+
loading="lazy"
|
|
125
|
+
{% if modal_alt != blank %}title="{{ modal_alt }}"{% endif %}
|
|
126
|
+
></iframe>
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
{%- when 'vimeo' -%}
|
|
130
|
+
<div class="rk-modal__media rk-modal__media--embed" style="aspect-ratio: {{ modal_aspect }};">
|
|
131
|
+
<iframe
|
|
132
|
+
class="rk-modal__iframe"
|
|
133
|
+
data-src="https://player.vimeo.com/video/{{ vimeo_id }}?title=0&byline=0&portrait=0&muted=1&autoplay=1"
|
|
134
|
+
allow="autoplay; fullscreen; picture-in-picture"
|
|
135
|
+
allowfullscreen
|
|
136
|
+
loading="lazy"
|
|
137
|
+
{% if modal_alt != blank %}title="{{ modal_alt }}"{% endif %}
|
|
138
|
+
></iframe>
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
{%- when 'html' -%}
|
|
142
|
+
<div class="rk-modal__media rk-modal__media--html">
|
|
143
|
+
{{ content }}
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
{%- endcase -%}
|
|
29
147
|
</div>
|
|
30
148
|
</div>
|
|
31
149
|
</rk-modal-element>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{% doc %}
|
|
2
|
+
Snippet: RkReveal
|
|
3
|
+
Wrapper que aplica animacao de revelacao progressiva por scroll (fade-in + slide-up).
|
|
4
|
+
Usa IntersectionObserver para detectar quando o elemento entra na viewport
|
|
5
|
+
e dispara a animacao com suporte a stagger (cascata entre filhos).
|
|
6
|
+
|
|
7
|
+
@param {string} [animation] - Tipo de animacao: 'fade-up' | 'fade-down' | 'fade-left' | 'fade-right' | 'fade' | 'zoom' (default: 'fade-up')
|
|
8
|
+
@param {number} [duration] - Duracao da animacao em ms (default: 600)
|
|
9
|
+
@param {number} [delay] - Atraso antes de iniciar em ms (default: 0)
|
|
10
|
+
@param {number} [stagger] - Atraso incremental entre filhos diretos em ms (default: 0, desativado)
|
|
11
|
+
@param {number} [threshold] - Percentual visivel para disparar (0.0 a 1.0, default: 0.1)
|
|
12
|
+
@param {string} [easing] - CSS easing function (default: 'cubic-bezier(0.16, 1, 0.3, 1)')
|
|
13
|
+
@param {boolean} [once] - Anima apenas uma vez (default: true)
|
|
14
|
+
@param {string} [content] - HTML do conteudo interno
|
|
15
|
+
@param {string} [custom_class] - Classes CSS extras
|
|
16
|
+
@param {string} [tag] - Tag HTML do wrapper (default: 'div')
|
|
17
|
+
|
|
18
|
+
@example
|
|
19
|
+
{% capture card_content %}
|
|
20
|
+
<div>Card 1</div>
|
|
21
|
+
<div>Card 2</div>
|
|
22
|
+
<div>Card 3</div>
|
|
23
|
+
{% endcapture %}
|
|
24
|
+
{% render 'rk-reveal', content: card_content, animation: 'fade-up', stagger: 100 %}
|
|
25
|
+
|
|
26
|
+
{% capture banner %}
|
|
27
|
+
<h2>Titulo do Banner</h2>
|
|
28
|
+
{% endcapture %}
|
|
29
|
+
{% render 'rk-reveal', content: banner, animation: 'fade-up', delay: 200, duration: 800 %}
|
|
30
|
+
{% enddoc %}
|
|
31
|
+
|
|
32
|
+
{%- liquid
|
|
33
|
+
assign rv_animation = animation | default: 'fade-up'
|
|
34
|
+
assign rv_duration = duration | default: 600
|
|
35
|
+
assign rv_delay = delay | default: 0
|
|
36
|
+
assign rv_stagger = stagger | default: 0
|
|
37
|
+
assign rv_threshold = threshold | default: '0.1'
|
|
38
|
+
assign rv_easing = easing | default: 'cubic-bezier(0.16, 1, 0.3, 1)'
|
|
39
|
+
assign rv_once = once | default: true
|
|
40
|
+
assign rv_tag = tag | default: 'div'
|
|
41
|
+
-%}
|
|
42
|
+
|
|
43
|
+
<rk-reveal-element
|
|
44
|
+
class="rk-reveal{% if custom_class %} {{ custom_class }}{% endif %}"
|
|
45
|
+
data-animation="{{ rv_animation }}"
|
|
46
|
+
data-duration="{{ rv_duration }}"
|
|
47
|
+
data-delay="{{ rv_delay }}"
|
|
48
|
+
data-stagger="{{ rv_stagger }}"
|
|
49
|
+
data-threshold="{{ rv_threshold }}"
|
|
50
|
+
data-easing="{{ rv_easing }}"
|
|
51
|
+
data-once="{{ rv_once }}"
|
|
52
|
+
>
|
|
53
|
+
<{{ rv_tag }} class="rk-reveal__content">
|
|
54
|
+
{{ content }}
|
|
55
|
+
</{{ rv_tag }}>
|
|
56
|
+
</rk-reveal-element>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
{%- liquid
|
|
9
9
|
# Lista de componentes JS essenciais do Rook Framework
|
|
10
|
-
assign rk_components = 'quantity,modal,accordion,popover,scroll-area,drawer,dialog,sheet,tabs,toggle,progress,collapsible,carousel,bottom-app-bar'
|
|
10
|
+
assign rk_components = 'quantity,modal,accordion,popover,scroll-area,drawer,dialog,sheet,tabs,toggle,progress,collapsible,carousel,bottom-app-bar,reveal'
|
|
11
11
|
assign rk_components_array = rk_components | split: ','
|
|
12
12
|
-%}
|
|
13
13
|
|
package/src/utils/logger.js
CHANGED
|
@@ -49,7 +49,7 @@ export class Logger {
|
|
|
49
49
|
banner() {
|
|
50
50
|
console.log('');
|
|
51
51
|
console.log(pc.bold(pc.white(' ╔══════════════════════════════╗')));
|
|
52
|
-
console.log(pc.bold(pc.white(' ║ ♟️ ROOK CLI v1.3.
|
|
52
|
+
console.log(pc.bold(pc.white(' ║ ♟️ ROOK CLI v1.3.10 ║')));
|
|
53
53
|
console.log(pc.bold(pc.white(' ║ Shopify Component Tool ║')));
|
|
54
54
|
console.log(pc.bold(pc.white(' ╚══════════════════════════════╝')));
|
|
55
55
|
console.log('');
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
{% comment %}
|
|
2
|
-
Block: RK Button
|
|
3
|
-
Renders a rk-button with full customizer control.
|
|
4
|
-
Uses rk-size-style and rk-spacing-style for Horizon-compatible sizing and spacing.
|
|
5
|
-
{% endcomment %}
|
|
6
|
-
|
|
7
|
-
<rk-button-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
|
-
{% if block.settings.alignment == 'center' %}text-align: center;{% elsif block.settings.alignment == 'right' %}text-align: right;{% endif %}
|
|
15
|
-
"
|
|
16
|
-
>
|
|
17
|
-
{% render 'rk-button',
|
|
18
|
-
text: block.settings.text,
|
|
19
|
-
url: block.settings.url,
|
|
20
|
-
style: block.settings.style,
|
|
21
|
-
size: block.settings.size,
|
|
22
|
-
full_width: block.settings.full_width,
|
|
23
|
-
icon: block.settings.icon
|
|
24
|
-
%}
|
|
25
|
-
</rk-button-block>
|
|
26
|
-
|
|
27
|
-
{% schema %}
|
|
28
|
-
{
|
|
29
|
-
"name": "RK | Botão",
|
|
30
|
-
"tag": null,
|
|
31
|
-
"settings": [
|
|
32
|
-
{
|
|
33
|
-
"type": "text",
|
|
34
|
-
"id": "text",
|
|
35
|
-
"label": "Texto do botão",
|
|
36
|
-
"default": "Clique aqui"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"type": "url",
|
|
40
|
-
"id": "url",
|
|
41
|
-
"label": "Link"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"type": "select",
|
|
45
|
-
"id": "style",
|
|
46
|
-
"label": "Estilo",
|
|
47
|
-
"options": [
|
|
48
|
-
{ "value": "primary", "label": "Primário" },
|
|
49
|
-
{ "value": "secondary", "label": "Secundário" },
|
|
50
|
-
{ "value": "outline", "label": "Outline" },
|
|
51
|
-
{ "value": "ghost", "label": "Ghost" },
|
|
52
|
-
{ "value": "link", "label": "Link" }
|
|
53
|
-
],
|
|
54
|
-
"default": "primary"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"type": "select",
|
|
58
|
-
"id": "size",
|
|
59
|
-
"label": "Tamanho",
|
|
60
|
-
"options": [
|
|
61
|
-
{ "value": "sm", "label": "Pequeno" },
|
|
62
|
-
{ "value": "md", "label": "Médio" },
|
|
63
|
-
{ "value": "lg", "label": "Grande" }
|
|
64
|
-
],
|
|
65
|
-
"default": "md"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"type": "checkbox",
|
|
69
|
-
"id": "full_width",
|
|
70
|
-
"label": "Largura total",
|
|
71
|
-
"default": false
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"type": "text",
|
|
75
|
-
"id": "icon",
|
|
76
|
-
"label": "Ícone (nome)",
|
|
77
|
-
"info": "Ex: heart, cart, arrow"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"type": "header",
|
|
81
|
-
"content": "Dimensionamento"
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"type": "select",
|
|
85
|
-
"id": "width",
|
|
86
|
-
"label": "Largura",
|
|
87
|
-
"options": [
|
|
88
|
-
{ "value": "fit-content", "label": "Ajustar ao conteúdo" },
|
|
89
|
-
{ "value": "fill", "label": "Preencher" },
|
|
90
|
-
{ "value": "custom", "label": "Personalizado" }
|
|
91
|
-
],
|
|
92
|
-
"default": "fit-content"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"type": "range",
|
|
96
|
-
"id": "custom_width",
|
|
97
|
-
"label": "Largura personalizada",
|
|
98
|
-
"min": 10,
|
|
99
|
-
"max": 100,
|
|
100
|
-
"step": 5,
|
|
101
|
-
"unit": "%",
|
|
102
|
-
"default": 100
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"type": "header",
|
|
106
|
-
"content": "Layout"
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"type": "text_alignment",
|
|
110
|
-
"id": "alignment",
|
|
111
|
-
"label": "Alinhamento",
|
|
112
|
-
"default": "left"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"type": "header",
|
|
116
|
-
"content": "Espaçamento"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"type": "range",
|
|
120
|
-
"id": "padding-block-start",
|
|
121
|
-
"label": "Topo",
|
|
122
|
-
"min": 0,
|
|
123
|
-
"max": 100,
|
|
124
|
-
"step": 2,
|
|
125
|
-
"unit": "px",
|
|
126
|
-
"default": 0
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"type": "range",
|
|
130
|
-
"id": "padding-block-end",
|
|
131
|
-
"label": "Base",
|
|
132
|
-
"min": 0,
|
|
133
|
-
"max": 100,
|
|
134
|
-
"step": 2,
|
|
135
|
-
"unit": "px",
|
|
136
|
-
"default": 0
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
"type": "range",
|
|
140
|
-
"id": "padding-inline-start",
|
|
141
|
-
"label": "Esquerda",
|
|
142
|
-
"min": 0,
|
|
143
|
-
"max": 100,
|
|
144
|
-
"step": 2,
|
|
145
|
-
"unit": "px",
|
|
146
|
-
"default": 0
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"type": "range",
|
|
150
|
-
"id": "padding-inline-end",
|
|
151
|
-
"label": "Direita",
|
|
152
|
-
"min": 0,
|
|
153
|
-
"max": 100,
|
|
154
|
-
"step": 2,
|
|
155
|
-
"unit": "px",
|
|
156
|
-
"default": 0
|
|
157
|
-
}
|
|
158
|
-
],
|
|
159
|
-
"presets": [
|
|
160
|
-
{
|
|
161
|
-
"name": "RK | Botão",
|
|
162
|
-
"category": "Rook UI"
|
|
163
|
-
}
|
|
164
|
-
]
|
|
165
|
-
}
|
|
166
|
-
{% endschema %}
|
|
@@ -1,134 +0,0 @@
|
|
|
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 %}
|