rook-cli 1.3.2 → 1.3.5

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.
Files changed (92) hide show
  1. package/package.json +3 -2
  2. package/rook-framework/PRD-INSTALL-COMMAND.md +379 -0
  3. package/rook-framework/PRD.md +1214 -0
  4. package/rook-framework/README.md +143 -0
  5. package/rook-framework/assets/rk-accordion.js +99 -0
  6. package/rook-framework/assets/rk-alert-dialog.js +132 -0
  7. package/rook-framework/assets/rk-bottom-app-bar.js +88 -0
  8. package/rook-framework/assets/rk-carousel.js +145 -0
  9. package/rook-framework/assets/rk-collapsible.js +151 -0
  10. package/rook-framework/assets/rk-dialog.js +161 -0
  11. package/rook-framework/assets/rk-drawer.js +214 -0
  12. package/rook-framework/assets/rk-framework-core.css +2554 -0
  13. package/rook-framework/assets/rk-framework-tokens.css +101 -0
  14. package/rook-framework/assets/rk-modal.js +91 -0
  15. package/rook-framework/assets/rk-popover.js +264 -0
  16. package/rook-framework/assets/rk-progress.js +81 -0
  17. package/rook-framework/assets/rk-quantity.js +91 -0
  18. package/rook-framework/assets/rk-scroll-area.js +286 -0
  19. package/rook-framework/assets/rk-sheet.js +157 -0
  20. package/rook-framework/assets/rk-tabs.js +179 -0
  21. package/rook-framework/assets/rk-toggle.js +153 -0
  22. package/rook-framework/blocks/rk-accordion.liquid +97 -0
  23. package/rook-framework/blocks/rk-badge.liquid +103 -0
  24. package/rook-framework/blocks/rk-button.liquid +166 -0
  25. package/rook-framework/blocks/rk-divider.liquid +100 -0
  26. package/rook-framework/blocks/rk-form-field.liquid +120 -0
  27. package/rook-framework/blocks/rk-icon.liquid +134 -0
  28. package/rook-framework/blocks/rk-image.liquid +198 -0
  29. package/rook-framework/blocks/rk-installments.liquid +99 -0
  30. package/rook-framework/blocks/rk-pix-discount.liquid +99 -0
  31. package/rook-framework/blocks/rk-price.liquid +128 -0
  32. package/rook-framework/blocks/rk-quantity.liquid +108 -0
  33. package/rook-framework/blocks/rk-quick-add.liquid +137 -0
  34. package/rook-framework/blocks/rk-skeleton.liquid +104 -0
  35. package/rook-framework/blocks/rk-typography.liquid +183 -0
  36. package/rook-framework/config/rk-color-scheme-group.json +138 -0
  37. package/rook-framework/config/rk-settings_schema.json +259 -0
  38. package/rook-framework/snippets/rk-accordion.liquid +31 -0
  39. package/rook-framework/snippets/rk-alert-dialog.liquid +83 -0
  40. package/rook-framework/snippets/rk-aspect-ratio.liquid +23 -0
  41. package/rook-framework/snippets/rk-badge.liquid +17 -0
  42. package/rook-framework/snippets/rk-bottom-app-bar.liquid +51 -0
  43. package/rook-framework/snippets/rk-button.liquid +49 -0
  44. package/rook-framework/snippets/rk-card.liquid +64 -0
  45. package/rook-framework/snippets/rk-carousel.liquid +74 -0
  46. package/rook-framework/snippets/rk-checkbox.liquid +34 -0
  47. package/rook-framework/snippets/rk-collapsible.liquid +52 -0
  48. package/rook-framework/snippets/rk-color-schemes-standalone.liquid +61 -0
  49. package/rook-framework/snippets/rk-color-schemes.liquid +43 -0
  50. package/rook-framework/snippets/rk-dialog.liquid +85 -0
  51. package/rook-framework/snippets/rk-divider.liquid +25 -0
  52. package/rook-framework/snippets/rk-drawer.liquid +81 -0
  53. package/rook-framework/snippets/rk-external-assets copy.liquid +33 -0
  54. package/rook-framework/snippets/rk-external-assets.liquid +68 -0
  55. package/rook-framework/snippets/rk-form-field.liquid +83 -0
  56. package/rook-framework/snippets/rk-gap-style.liquid +32 -0
  57. package/rook-framework/snippets/rk-icon.liquid +28 -0
  58. package/rook-framework/snippets/rk-image.liquid +60 -0
  59. package/rook-framework/snippets/rk-input.liquid +35 -0
  60. package/rook-framework/snippets/rk-installments.liquid +54 -0
  61. package/rook-framework/snippets/rk-item.liquid +69 -0
  62. package/rook-framework/snippets/rk-layout-style.liquid +37 -0
  63. package/rook-framework/snippets/rk-modal.liquid +31 -0
  64. package/rook-framework/snippets/rk-pix-discount.liquid +34 -0
  65. package/rook-framework/snippets/rk-popover.liquid +77 -0
  66. package/rook-framework/snippets/rk-price.liquid +48 -0
  67. package/rook-framework/snippets/rk-progress.liquid +38 -0
  68. package/rook-framework/snippets/rk-quantity.liquid +56 -0
  69. package/rook-framework/snippets/rk-quick-add.liquid +67 -0
  70. package/rook-framework/snippets/rk-scripts.liquid +17 -0
  71. package/rook-framework/snippets/rk-scroll-area.liquid +60 -0
  72. package/rook-framework/snippets/rk-sheet.liquid +86 -0
  73. package/rook-framework/snippets/rk-size-style.liquid +48 -0
  74. package/rook-framework/snippets/rk-skeleton.liquid +25 -0
  75. package/rook-framework/snippets/rk-spacing-padding.liquid +18 -0
  76. package/rook-framework/snippets/rk-spacing-style.liquid +54 -0
  77. package/rook-framework/snippets/rk-spinner.liquid +43 -0
  78. package/rook-framework/snippets/rk-swatch.liquid +33 -0
  79. package/rook-framework/snippets/rk-table.liquid +44 -0
  80. package/rook-framework/snippets/rk-tabs.liquid +52 -0
  81. package/rook-framework/snippets/rk-textarea.liquid +42 -0
  82. package/rook-framework/snippets/rk-toggle-group.liquid +27 -0
  83. package/rook-framework/snippets/rk-toggle.liquid +58 -0
  84. package/rook-framework/snippets/rk-typography.liquid +27 -0
  85. package/rook-framework/snippets/rk-variables.liquid +76 -0
  86. package/src/app.js +24 -0
  87. package/src/commands/InstallCommand.js +133 -0
  88. package/src/mcp/server.js +111 -1
  89. package/src/services/FrameworkInstaller.js +485 -0
  90. package/src/templates/block.liquid.txt +0 -15
  91. package/src/ui/PromptUI.js +15 -1
  92. package/src/utils/logger.js +1 -1
@@ -0,0 +1,64 @@
1
+ {% doc %}
2
+ Snippet: RkCard
3
+ Container flexível para agrupar conteúdos e ações sobre um único tópico.
4
+
5
+ @param {string} [as] - Tag do container principal (ex: 'div', 'article', 'a'). Padrão: 'div'
6
+ @param {string} [href] - URL caso o card seja um link (exige as: 'a').
7
+ @param {boolean} [interactive] - Se true (ativo por padrão em links), adiciona efeito de hover e focus.
8
+ @param {string} [custom_class] - Classes CSS customizadas para o root.
9
+ @param {string} [header] - HTML para o cabeçalho (título/descrição).
10
+ @param {string} [content] - HTML para o corpo principal (dados/mídias).
11
+ @param {string} [footer] - HTML para o rodapé (ações/metadados).
12
+
13
+ @example
14
+ {% capture card_header %}
15
+ <h3 class="rk-card__title">Título do Card</h3>
16
+ <p class="rk-card__description">Descrição de apoio</p>
17
+ {% endcapture %}
18
+
19
+ {% render 'rk-card',
20
+ as: 'article',
21
+ interactive: true,
22
+ header: card_header,
23
+ content: '<p>Corpo</p>',
24
+ footer: '<button>Ação</button>'
25
+ %}
26
+ {% enddoc %}
27
+
28
+ {%- liquid
29
+ assign t_as = as | default: 'div'
30
+ assign is_link = false
31
+
32
+ if t_as == 'a' and href != blank
33
+ assign is_link = true
34
+ endif
35
+
36
+ # Set interactive state
37
+ assign is_interactive = false
38
+ if interactive == true or interactive == 'true' or is_link
39
+ assign is_interactive = true
40
+ endif
41
+ -%}
42
+
43
+ <{{ t_as }}
44
+ class="rk-card{% if is_interactive %} rk-card--interactive{% endif %}{% if custom_class %} {{ custom_class }}{% endif %}"
45
+ {% if is_link %}href="{{ href }}"{% endif %}
46
+ >
47
+ {%- if header != blank -%}
48
+ <div class="rk-card__header">
49
+ {{ header }}
50
+ </div>
51
+ {%- endif -%}
52
+
53
+ {%- if content != blank -%}
54
+ <div class="rk-card__content">
55
+ {{ content }}
56
+ </div>
57
+ {%- endif -%}
58
+
59
+ {%- if footer != blank -%}
60
+ <div class="rk-card__footer">
61
+ {{ footer }}
62
+ </div>
63
+ {%- endif -%}
64
+ </{{ t_as }}>
@@ -0,0 +1,74 @@
1
+ {% doc %}
2
+ Snippet: RkCarousel
3
+ Renders a powerful Slider/Carousel powered by Swiper.js.
4
+ The `<rk-carousel-element>` dynamically loads the library and handles init/destroy lifecycle.
5
+
6
+ @param {string} content - HTML content. MUST yield elements with class `swiper-slide`
7
+ @param {string} [id] - Unique ID
8
+ @param {string} [custom_class] - Extra CSS classes for the root wrapper
9
+ @param {boolean} [show_arrows] - Show previous/next buttons (default: true)
10
+ @param {boolean} [show_pagination] - Show bottom pagination dots (default: true)
11
+ @param {boolean} [loop] - Enable infinite loop
12
+ @param {boolean} [autoplay] - Enable automatic sliding
13
+ @param {number} [autoplay_delay] - Delay between slides in ms for autoplay (default: 3000)
14
+ @param {number} [gap] - Space between slides in pixels (default: 16)
15
+ @param {number} [desktop_items] - Slides to show on desktop >= 768px (default: 3)
16
+ @param {number} [mobile_items] - Slides to show on mobile < 768px (default: 1)
17
+ @param {boolean} [free_mode] - Free scroll mode instead of snap-to-slide
18
+ @param {string} [options_json] - Escaped JSON string for raw Swiper options override
19
+
20
+ @example
21
+ {% capture carousel_slides %}
22
+ <div class="swiper-slide rk-carousel__slide">Slide 1</div>
23
+ <div class="swiper-slide rk-carousel__slide">Slide 2</div>
24
+ {% endcapture %}
25
+
26
+ {% render 'rk-carousel',
27
+ content: carousel_slides,
28
+ show_arrows: true,
29
+ desktop_items: 4,
30
+ loop: true
31
+ %}
32
+ {% enddoc %}
33
+
34
+ {%- liquid
35
+ assign t_show_arrows = show_arrows | default: true, allow_false: true
36
+ assign t_show_pagination = show_pagination | default: true, allow_false: true
37
+ assign t_loop = loop | default: false
38
+ assign t_autoplay = autoplay | default: false
39
+ assign t_gap = gap | default: 16
40
+ assign t_desktop_items = desktop_items | default: 3
41
+ assign t_mobile_items = mobile_items | default: 1
42
+ -%}
43
+
44
+ <rk-carousel-element
45
+ class="rk-carousel{% if custom_class %} {{ custom_class }}{% endif %}"
46
+ {% if id %}id="{{ id }}"{% endif %}
47
+ data-gap="{{ t_gap }}"
48
+ data-desktop-items="{{ t_desktop_items }}"
49
+ data-mobile-items="{{ t_mobile_items }}"
50
+ {% if t_loop %}data-loop="true"{% endif %}
51
+ {% if free_mode %}data-free-mode="true"{% endif %}
52
+ {% if t_autoplay %}
53
+ data-autoplay="true"
54
+ {% if autoplay_delay %}data-autoplay-delay="{{ autoplay_delay }}"{% endif %}
55
+ {% endif %}
56
+ {% if options_json %}data-swiper-options="{{ options_json | escape }}"{% endif %}
57
+ >
58
+ <div class="swiper rk-carousel__swiper">
59
+ <div class="swiper-wrapper rk-carousel__wrapper">
60
+ {{ content }}
61
+ </div>
62
+
63
+ {%- if t_show_arrows -%}
64
+ <div class="swiper-button-prev rk-carousel__nav rk-carousel__nav--prev"></div>
65
+ <div class="swiper-button-next rk-carousel__nav rk-carousel__nav--next"></div>
66
+ {%- endif -%}
67
+
68
+ {%- if t_show_pagination -%}
69
+ <div class="rk-carousel__pagination-wrapper">
70
+ <div class="swiper-pagination rk-carousel__pagination"></div>
71
+ </div>
72
+ {%- endif -%}
73
+ </div>
74
+ </rk-carousel-element>
@@ -0,0 +1,34 @@
1
+ {% doc %}
2
+ Snippet: RkCheckbox
3
+ Renders a checkbox input with label.
4
+
5
+ @param {string} name - Input name
6
+ @param {string} id - Unique id
7
+ @param {string} label - Label text
8
+ @param {string} [value] - Input value (default: 'on')
9
+ @param {boolean} [checked] - Pre-checked state
10
+ @param {boolean} [disabled] - Disabled state
11
+ @param {boolean} [required] - Required state
12
+ @param {string} [custom_class] - Extra CSS classes
13
+
14
+ @example
15
+ {% render 'rk-checkbox', name: 'agree', id: 'agree', label: 'Concordo com os termos' %}
16
+ {% enddoc %}
17
+
18
+ {%- liquid
19
+ assign cb_value = value | default: 'on'
20
+ -%}
21
+
22
+ <label class="rk-checkbox{% if custom_class %} {{ custom_class }}{% endif %}" for="{{ id }}">
23
+ <input
24
+ type="checkbox"
25
+ class="rk-checkbox__input"
26
+ id="{{ id }}"
27
+ name="{{ name }}"
28
+ value="{{ cb_value }}"
29
+ {% if checked %}checked{% endif %}
30
+ {% if disabled %}disabled{% endif %}
31
+ {% if required %}required aria-required="true"{% endif %}
32
+ >
33
+ <span class="rk-checkbox__label">{{ label }}</span>
34
+ </label>
@@ -0,0 +1,52 @@
1
+ {% doc %}
2
+ Snippet: RkCollapsible
3
+ Renders a Collapsible element (Shadcn/UI pattern).
4
+ Unlike Accordion (details/summary), this uses standard divs and JS for exact height animation control and WAI-ARIA roles.
5
+
6
+ @param {string} id - Unique id for aria linking
7
+ @param {string} trigger - HTML content for the trigger button
8
+ @param {string} content - HTML content to hide/show
9
+ @param {boolean} [open] - Should it render open initially? (default: false)
10
+ @param {string} [custom_class] - Extra CSS classes
11
+
12
+ @example
13
+ {% capture coll_trigger %}
14
+ <span>Mais Informações</span>
15
+ <span class="rk-collapsible__icon">⬇️</span>
16
+ {% endcapture %}
17
+ {% capture coll_content %}
18
+ <p>Aqui você encontra todas as informações sobre a garantia e devoluções.</p>
19
+ {% endcapture %}
20
+ {% render 'rk-collapsible', id: 'info-1', trigger: coll_trigger, content: coll_content %}
21
+ {% enddoc %}
22
+
23
+ {%- liquid
24
+ assign t_open = open | default: false
25
+ -%}
26
+
27
+ <rk-collapsible-element
28
+ id="{{ id }}"
29
+ class="rk-collapsible{% if custom_class %} {{ custom_class }}{% endif %}"
30
+ data-open="{{ t_open }}"
31
+ >
32
+ {%- comment -%} Trigger {%- endcomment -%}
33
+ <button
34
+ type="button"
35
+ class="rk-collapsible__trigger"
36
+ aria-expanded="{{ t_open }}"
37
+ aria-controls="{{ id }}-content"
38
+ >
39
+ {{ trigger }}
40
+ </button>
41
+
42
+ {%- comment -%} Content Animated Wrapper {%- endcomment -%}
43
+ <div
44
+ id="{{ id }}-content"
45
+ class="rk-collapsible__content{% if t_open %} rk-collapsible__content--expanded{% endif %}"
46
+ {% unless t_open %}hidden{% endunless %}
47
+ >
48
+ <div class="rk-collapsible__content-inner">
49
+ {{ content }}
50
+ </div>
51
+ </div>
52
+ </rk-collapsible-element>
@@ -0,0 +1,61 @@
1
+ {% comment %}
2
+ Rook UI Core Framework — Color Schemes (Standalone)
3
+ ====================================================
4
+ Gera CSS variables para cada esquema de cores do Rook UI.
5
+ Usado quando o tema NÃO possui color_scheme_group próprio.
6
+
7
+ O color_scheme_group "rk_color_schemes" é definido no settings_schema.json.
8
+ Cada esquema gera uma classe .rk-scheme-{id} para tematização por seção.
9
+
10
+ Uso em seções:
11
+ <div class="rk-scheme-{{ section.settings.rk_color_scheme }}">
12
+ {% render 'rk-button', variant: 'primary' %}
13
+ </div>
14
+
15
+ No schema da seção:
16
+ { "type": "color_scheme", "id": "rk_color_scheme", "label": "Esquema de Cores Rook UI", "default": "scheme-1" }
17
+ {% endcomment %}
18
+
19
+ {% style %}
20
+ {% for scheme in settings.rk_color_schemes -%}
21
+ {% if forloop.index == 1 %}
22
+ :root,
23
+ {% endif %}
24
+ .rk-scheme-{{ scheme.id }} {
25
+ --rk-color-bg: {{ scheme.settings.background }};
26
+ --rk-color-bg-secondary: {{ scheme.settings.background_secondary }};
27
+
28
+ --rk-color-primary: {{ scheme.settings.primary }};
29
+ --rk-color-primary-hover: {{ scheme.settings.primary_hover }};
30
+ --rk-color-primary-foreground: {{ scheme.settings.primary_foreground }};
31
+
32
+ --rk-color-secondary: {{ scheme.settings.secondary }};
33
+ --rk-color-secondary-hover: {{ scheme.settings.secondary_hover }};
34
+
35
+ --rk-color-success: {{ scheme.settings.success }};
36
+ --rk-color-danger: {{ scheme.settings.danger }};
37
+ --rk-color-destructive: {{ scheme.settings.danger }};
38
+
39
+ --rk-color-text: {{ scheme.settings.text }};
40
+ --rk-color-text-muted: {{ scheme.settings.text_muted }};
41
+
42
+ --rk-color-border: {{ scheme.settings.border }};
43
+ --rk-color-ring: {{ scheme.settings.ring }};
44
+ --rk-color-shadow: {{ scheme.settings.shadow }};
45
+
46
+ {%- assign rk_border_c = scheme.settings.border -%}
47
+ --rk-color-border-rgb: {{ rk_border_c.red }} {{ rk_border_c.green }} {{ rk_border_c.blue }};
48
+
49
+ {%- assign rk_text_c = scheme.settings.text -%}
50
+ --rk-color-text-rgb: {{ rk_text_c.red }} {{ rk_text_c.green }} {{ rk_text_c.blue }};
51
+
52
+ {%- assign rk_shadow_c = scheme.settings.shadow -%}
53
+ --rk-color-shadow-rgb: {{ rk_shadow_c.red }} {{ rk_shadow_c.green }} {{ rk_shadow_c.blue }};
54
+
55
+ --rk-color-border-hover: rgb({{ rk_text_c.red }} {{ rk_text_c.green }} {{ rk_text_c.blue }} / 0.3);
56
+
57
+ color: {{ scheme.settings.text }};
58
+ background-color: {{ scheme.settings.background }};
59
+ }
60
+ {% endfor %}
61
+ {% endstyle %}
@@ -0,0 +1,43 @@
1
+ {% comment %}
2
+ Rook UI Core Framework — Color Scheme Bridge
3
+ =============================================
4
+ Mapeia os color_schemes nativos do tema para as variáveis --rk-* do framework.
5
+ Assim, seções que usam `.color-{scheme.id}` automaticamente aplicam as cores
6
+ corretas nos componentes rk-*.
7
+
8
+ Deve ser renderizado no <head> do layout/theme.liquid:
9
+ {% render 'rk-color-schemes' %}
10
+
11
+ Uso em seções (com o color_scheme nativo do tema):
12
+ <div class="color-{{ section.settings.color_scheme }}">
13
+ {% render 'rk-button', variant: 'primary' %}
14
+ </div>
15
+ {% endcomment %}
16
+
17
+ {% style %}
18
+ {% for scheme in settings.color_schemes -%}
19
+ .color-{{ scheme.id }} {
20
+ /* Mapeia cores do tema → variáveis Rook UI */
21
+ --rk-color-bg: rgb({{ scheme.settings.background.rgba }});
22
+ --rk-color-bg-secondary: rgb({{ scheme.settings.background.rgba }});
23
+
24
+ --rk-color-primary: rgb({{ scheme.settings.primary_button_background.rgba }});
25
+ --rk-color-primary-hover: rgb({{ scheme.settings.primary_button_hover_background.rgba }});
26
+ --rk-color-primary-foreground: rgb({{ scheme.settings.primary_button_text.rgba }});
27
+
28
+ --rk-color-secondary: rgb({{ scheme.settings.secondary_button_background.rgba }});
29
+ --rk-color-secondary-hover: rgb({{ scheme.settings.secondary_button_hover_background.rgba }});
30
+
31
+ --rk-color-text: rgb({{ scheme.settings.foreground.rgba }});
32
+ --rk-color-text-muted: rgb({{ scheme.settings.foreground.rgb }} / 0.65);
33
+
34
+ --rk-color-border: rgb({{ scheme.settings.border.rgba }});
35
+ --rk-color-ring: rgb({{ scheme.settings.primary.rgba }});
36
+
37
+ /* Derivados RGB */
38
+ --rk-color-border-rgb: {{ scheme.settings.border.rgb }};
39
+ --rk-color-text-rgb: {{ scheme.settings.foreground.rgb }};
40
+ --rk-color-border-hover: rgb({{ scheme.settings.foreground.rgb }} / 0.3);
41
+ }
42
+ {% endfor %}
43
+ {% endstyle %}
@@ -0,0 +1,85 @@
1
+ {% doc %}
2
+ Snippet: RkDialog
3
+ Renders a Dialog / Modal (Shadcn/UI pattern) with full anatomy.
4
+ Uses Web Component <rk-dialog-element> for behaviour.
5
+
6
+ @param {string} id - Unique dialog id (required)
7
+ @param {string} title - Dialog title (required for a11y)
8
+ @param {string} [description] - Header description / subtitle
9
+ @param {string} [body] - HTML for the body content
10
+ @param {string} [footer] - HTML for the footer (action buttons)
11
+ @param {boolean} [overlay_close] - Close on overlay click (default: true)
12
+ @param {boolean} [show_close] - Show X close button (default: true)
13
+ @param {string} [width] - Content width (e.g. '540px')
14
+ @param {string} [custom_class] - Extra CSS classes
15
+
16
+ @example
17
+ {% capture dialog_body %}
18
+ <p>Content here</p>
19
+ {% endcapture %}
20
+ {% capture dialog_footer %}
21
+ <button class="rk-btn rk-btn--secondary rk-btn--md" data-action="close">
22
+ <span class="rk-btn__text">Cancelar</span>
23
+ </button>
24
+ {% render 'rk-button', text: 'Salvar', style: 'primary' %}
25
+ {% endcapture %}
26
+ {% render 'rk-dialog', id: 'my-dialog', title: 'Editar Perfil', description: 'Atualize suas informações.', body: dialog_body, footer: dialog_footer %}
27
+ {% enddoc %}
28
+
29
+ {%- liquid
30
+ assign d_overlay_close = overlay_close | default: true
31
+ assign d_show_close = show_close | default: true
32
+ -%}
33
+
34
+ {%- capture title_id -%}{{ id }}-title{%- endcapture -%}
35
+ {%- capture desc_id -%}{{ id }}-desc{%- endcapture -%}
36
+
37
+ <rk-dialog-element
38
+ data-dialog-id="{{ id }}"
39
+ data-overlay-close="{{ d_overlay_close }}"
40
+ >
41
+ <div id="{{ id }}" class="rk-dialog{% if custom_class %} {{ custom_class }}{% endif %}">
42
+ {%- comment -%} Overlay {%- endcomment -%}
43
+ <div class="rk-dialog__overlay"></div>
44
+
45
+ {%- comment -%} Content {%- endcomment -%}
46
+ <div
47
+ class="rk-dialog__content"
48
+ role="dialog"
49
+ aria-modal="true"
50
+ aria-labelledby="{{ title_id }}"
51
+ {% if description %}aria-describedby="{{ desc_id }}"{% endif %}
52
+ {% if width %}style="--rk-dialog-width: {{ width }};"{% endif %}
53
+ >
54
+ {%- if d_show_close -%}
55
+ <button type="button" class="rk-dialog__close" data-action="close" aria-label="Fechar">
56
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none">
57
+ <path d="M15 5L5 15M5 5l10 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
58
+ </svg>
59
+ </button>
60
+ {%- endif -%}
61
+
62
+ {%- comment -%} Header {%- endcomment -%}
63
+ <div class="rk-dialog__header">
64
+ <h2 id="{{ title_id }}" class="rk-dialog__title">{{ title }}</h2>
65
+ {%- if description -%}
66
+ <p id="{{ desc_id }}" class="rk-dialog__description">{{ description }}</p>
67
+ {%- endif -%}
68
+ </div>
69
+
70
+ {%- comment -%} Body {%- endcomment -%}
71
+ {%- if body -%}
72
+ <div class="rk-dialog__body">
73
+ {{ body }}
74
+ </div>
75
+ {%- endif -%}
76
+
77
+ {%- comment -%} Footer {%- endcomment -%}
78
+ {%- if footer -%}
79
+ <div class="rk-dialog__footer">
80
+ {{ footer }}
81
+ </div>
82
+ {%- endif -%}
83
+ </div>
84
+ </div>
85
+ </rk-dialog-element>
@@ -0,0 +1,25 @@
1
+ {% doc %}
2
+ Snippet: RkDivider
3
+ Renders a visual divider line.
4
+
5
+ @param {string} [thickness] - CSS thickness (default: '1px')
6
+ @param {string} [width] - CSS width (default: '100%')
7
+ @param {string} [align] - 'left' | 'center' | 'right' (default: 'center')
8
+ @param {string} [custom_class] - Extra CSS classes
9
+
10
+ @example
11
+ {% render 'rk-divider', width: '80%' %}
12
+ {% enddoc %}
13
+
14
+ {%- liquid
15
+ assign d_thickness = thickness | default: '1px'
16
+ assign d_width = width | default: '100%'
17
+ assign d_align = align | default: 'center'
18
+ -%}
19
+
20
+ <div
21
+ class="rk-divider{% if custom_class %} {{ custom_class }}{% endif %}"
22
+ style="--rk-divider-align: {{ d_align }};"
23
+ >
24
+ <hr class="rk-divider__line" style="--rk-divider-thickness: {{ d_thickness }}; --rk-divider-width: {{ d_width }};">
25
+ </div>
@@ -0,0 +1,81 @@
1
+ {% doc %}
2
+ Snippet: RkDrawer
3
+ Renders a Drawer (sliding panel from screen edge).
4
+ Uses Web Component <rk-drawer-element> for behaviour.
5
+
6
+ @param {string} id - Unique drawer id
7
+ @param {string} [side] - 'bottom' | 'top' | 'left' | 'right' (default: 'bottom')
8
+ @param {boolean} [show_handle] - Show drag handle indicator (default: true)
9
+ @param {string} [title] - Optional header title
10
+ @param {string} [description] - Optional header description
11
+ @param {string} [body] - HTML for the body content
12
+ @param {string} [footer] - HTML for the footer (action buttons)
13
+ @param {string} [custom_class] - Extra CSS classes
14
+ @param {string} [width] - Panel width for left/right drawers (e.g. '400px')
15
+ @param {string} [height] - Panel height for top/bottom drawers (e.g. '50vh')
16
+
17
+ @example
18
+ {% capture drawer_body %}
19
+ <p>Drawer content here</p>
20
+ {% endcapture %}
21
+ {% capture drawer_footer %}
22
+ {% render 'rk-button', text: 'Confirmar', style: 'primary', full_width: true %}
23
+ {% endcapture %}
24
+ {% render 'rk-drawer', id: 'my-drawer', side: 'bottom', title: 'Filtros', body: drawer_body, footer: drawer_footer %}
25
+ {% enddoc %}
26
+
27
+ {%- liquid
28
+ assign d_side = side | default: 'bottom'
29
+ assign d_show_handle = show_handle | default: true
30
+ -%}
31
+
32
+ <rk-drawer-element data-drawer-id="{{ id }}" data-side="{{ d_side }}">
33
+ <div id="{{ id }}" class="rk-drawer{% if custom_class %} {{ custom_class }}{% endif %}">
34
+ {%- comment -%} Overlay {%- endcomment -%}
35
+ <div class="rk-drawer__overlay"></div>
36
+
37
+ {%- comment -%} Panel {%- endcomment -%}
38
+ <div
39
+ class="rk-drawer__panel rk-drawer__panel--{{ d_side }}"
40
+ role="dialog"
41
+ aria-modal="true"
42
+ {% if title %}aria-label="{{ title }}"{% endif %}
43
+ {% if width %}style="--rk-drawer-width: {{ width }};"{% endif %}
44
+ {% if height %}style="--rk-drawer-height: {{ height }};"{% endif %}
45
+ >
46
+ {%- if d_show_handle and d_side == 'bottom' or d_show_handle and d_side == 'top' -%}
47
+ <div class="rk-drawer__handle">
48
+ <div class="rk-drawer__handle-bar"></div>
49
+ </div>
50
+ {%- endif -%}
51
+
52
+ {%- comment -%} Close button {%- endcomment -%}
53
+ <button type="button" class="rk-drawer__close" data-action="close" aria-label="Fechar">
54
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none">
55
+ <path d="M15 5L5 15M5 5l10 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
56
+ </svg>
57
+ </button>
58
+
59
+ {%- if title or description -%}
60
+ <div class="rk-drawer__header">
61
+ {%- if title -%}
62
+ <h2 class="rk-drawer__title">{{ title }}</h2>
63
+ {%- endif -%}
64
+ {%- if description -%}
65
+ <p class="rk-drawer__description">{{ description }}</p>
66
+ {%- endif -%}
67
+ </div>
68
+ {%- endif -%}
69
+
70
+ <div class="rk-drawer__body">
71
+ {{ body }}
72
+ </div>
73
+
74
+ {%- if footer -%}
75
+ <div class="rk-drawer__footer">
76
+ {{ footer }}
77
+ </div>
78
+ {%- endif -%}
79
+ </div>
80
+ </div>
81
+ </rk-drawer-element>
@@ -0,0 +1,33 @@
1
+ {% doc %}
2
+ Snippet: RkExternalAssets
3
+ Módulo de CDNs e serviços externos.
4
+
5
+ @param {string} location - 'head' ou 'body'
6
+
7
+ @example
8
+ {% render 'rk-external-assets', location: 'head' %}
9
+ {% enddoc %}
10
+
11
+ {%- liquid
12
+ assign location = location | default: 'head'
13
+ -%}
14
+
15
+ {%- if location == 'head' -%}
16
+ <!-- [RkExternalAssets] Preconnects -->
17
+ <link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin>
18
+ <link rel="preconnect" href="https://cdnjs.cloudflare.com" crossorigin>
19
+ <link rel="preconnect" href="https://unpkg.com" crossorigin>
20
+
21
+ <!-- [RkExternalAssets] Stylesheets CSS -->
22
+ {%- comment -%} Add external CSS here {%- endcomment -%}
23
+
24
+ {%- elsif location == 'body' -%}
25
+ <!-- [RkExternalAssets] Javascripts -->
26
+
27
+ <!-- [RkExternalAssets] Inline Initializations -->
28
+ <script>
29
+ if (typeof anime !== 'undefined') {
30
+ window.animate = anime.animate;
31
+ }
32
+ </script>
33
+ {%- endif -%}
@@ -0,0 +1,68 @@
1
+ {% doc %}
2
+ Snippet: RkExternalAssets
3
+ Módulo de CDNs e serviços externos.
4
+
5
+ @param {string} location - 'head' ou 'body'
6
+
7
+ @example
8
+ {% render 'rk-external-assets', location: 'head' %}
9
+ {% enddoc %}
10
+
11
+ {%- liquid
12
+ assign location = location | default: 'head'
13
+
14
+ # 1. CONFIG MAP - DOMÍNIOS PARA PRECONNECT
15
+ assign preconnects_str = "https://cdn.jsdelivr.net, https://cdnjs.cloudflare.com, https://unpkg.com"
16
+
17
+ # 2. CONFIG MAP - CSS ASSETS (Formato: id | url)
18
+ assign css_assets_str = ""
19
+
20
+ # 3. CONFIG MAP - JS ASSETS (Formato: id | url | strategy)
21
+ assign js_assets_str = "gsap | https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/gsap.min.js | defer, scrolltrigger | https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/ScrollTrigger.min.js | defer"
22
+ -%}
23
+
24
+ {%- if location == 'head' -%}
25
+ <!-- [RkExternalAssets] Preconnects -->
26
+ {%- assign preconnect_domains = preconnects_str | split: ',' -%}
27
+ {%- for domain in preconnect_domains -%}
28
+ {%- assign domain_clean = domain | strip -%}
29
+ {%- if domain_clean != blank -%}
30
+ <link rel="preconnect" href="{{ domain_clean }}" crossorigin>
31
+ {%- endif -%}
32
+ {%- endfor -%}
33
+
34
+ <!-- [RkExternalAssets] Stylesheets CSS -->
35
+ {%- assign css_lines = css_assets_str | split: ',' -%}
36
+ {%- for css_line in css_lines -%}
37
+ {%- assign css_clean = css_line | strip -%}
38
+ {%- if css_clean == blank -%}{%- continue -%}{%- endif -%}
39
+
40
+ {%- assign css_data = css_clean | split: '|' -%}
41
+ {%- if css_data.size >= 2 -%}
42
+ {%- assign css_id = css_data[0] | strip -%}
43
+ {%- assign css_url = css_data[1] | strip -%}
44
+ <link rel="stylesheet" href="{{ css_url }}" id="rk-ext-{{ css_id }}">
45
+ {%- endif -%}
46
+ {%- endfor -%}
47
+ {%- endif -%}
48
+
49
+ {%- if location == 'body' -%}
50
+ <!-- [RkExternalAssets] Javascripts -->
51
+ {%- assign js_lines = js_assets_str | split: ',' -%}
52
+ {%- for js_line in js_lines -%}
53
+ {%- assign js_clean = js_line | strip -%}
54
+ {%- if js_clean == blank -%}{%- continue -%}{%- endif -%}
55
+
56
+ {%- assign js_data = js_clean | split: '|' -%}
57
+ {%- if js_data.size >= 2 -%}
58
+ {%- assign js_id = js_data[0] | strip -%}
59
+ {%- assign js_url = js_data[1] | strip -%}
60
+ {%- assign js_strategy = js_data[2] | strip | default: 'defer' -%}
61
+ {%- if js_strategy == 'async' -%}
62
+ <script src="{{ js_url }}" id="rk-ext-{{ js_id }}" async></script>
63
+ {%- else -%}
64
+ <script src="{{ js_url }}" id="rk-ext-{{ js_id }}" defer></script>
65
+ {%- endif -%}
66
+ {%- endif -%}
67
+ {%- endfor -%}
68
+ {%- endif -%}