{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Year tabs over the panel of the chosen year, or the heading beside a picture with arrows and one dot per step. Choosing a step is an event.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "{#- Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n    Source: packages/compose-gen/specs/organisms/story-tabs.json\n    A story in steps (years or slides). Axes: layout (years: a row of year tabs over the panel of the active year with its badge, step, title, text and tag; carousel: the heading beside a picture with previous and next arrows and one dot per step), tone. Choosing a step emits `select`.\n    Props (p): id, title, lead, badge, steps, empty, active, labels, layout, tone, image, imageAlt, landmarkLabel. -#}\n{%- set v_id = og_def(p['id'], none) -%}\n{%- set v_title = og_def(p['title'], none) -%}\n{%- set v_lead = og_def(p['lead'], '') -%}\n{%- set v_badge = og_def(p['badge'], '') -%}\n{%- set v_steps = og_def(p['steps'], none) -%}\n{%- set v_empty = og_def(p['empty'], '') -%}\n{%- set v_active = og_def(p['active'], none) -%}\n{%- set v_labels = og_def(p['labels'], none) -%}\n{%- set v_layout = og_def(p['layout'], 'years') -%}\n{%- set v_tone = og_def(p['tone'], 'default') -%}\n{%- set v_image = og_def(p['image'], none) -%}\n{%- set v_imageAlt = og_def(p['imageAlt'], none) -%}\n{%- set v_landmarkLabel = og_def(p['landmarkLabel'], none) -%}\n{%- if og_t(og_eq(og_len(v_steps), 0)) %}\n  {%- set c_1 -%}\n    {{ og_include('blocks/empty-state.html.j2', {'p': {'icon': 'milestone', 'title': v_empty}}) }}\n  {%- endset -%}\n  {{ og_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'heading': {'badge': v_badge}, 'tone': v_tone, 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_1)}) }}\n{%- elif og_t(og_eq(v_layout, 'years')) %}\n  {%- set c_6 -%}\n    {%- set c_5 -%}\n      {%- for v_s in og_l(v_steps) %}\n        {%- set c_4 -%}\n          {%- set c_2 -%}\n            {{ og_text(og_get(v_s, ['date'])) }}\n          {%- endset -%}\n          {{ og_include('compose/inline.html.j2', {'p': {'Class': 'text-sm font-semibold'}, 'children': c_2}) }}\n          {%- set c_3 -%}\n            {{ og_text(og_get(v_s, ['tag'])) }}\n          {%- endset -%}\n          {{ og_include('compose/inline.html.j2', {'p': {'Class': 'text-xs'}, 'children': c_3}) }}\n        {%- endset -%}\n        {{ og_include('compose/button.html.j2', {'p': {'Variant': og_s(('default' if og_t(og_eq(og_get(v_s, ['id']), v_active)) else 'outline')), 'Size': 'lg', 'Type': 'button', 'Class': 'h-auto flex-col items-start gap-0 py-2 text-start', 'Attrs': og_attrs(['data-active', ('true' if og_t(og_eq(og_get(v_s, ['id']), v_active)) else 'false')])}, 'children': c_4}) }}\n      {%- endfor %}\n    {%- endset -%}\n    {{ og_include('compose/box.html.j2', {'p': {'Class': 'grid grid-cols-2 gap-2 sm:grid-cols-4', 'Attrs': og_attrs(['data-slot', 'story-tabs'])}, 'children': c_5}) }}\n    {%- for v_s in og_l(v_steps) %}\n      {%- set v_i = loop.index0 -%}\n      {%- if og_t(og_eq(og_get(v_s, ['id']), v_active)) %}\n        {{ og_include('blocks/story-panel.html.j2', {'p': {'s': v_s, 'index': v_i, 'total': og_len(v_steps), 'labels': v_labels}}) }}\n      {%- endif %}\n    {%- endfor %}\n  {%- endset -%}\n  {{ og_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'heading': {'badge': v_badge}, 'tone': v_tone, 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_6)}) }}\n{%- else %}\n  {%- set f_7 -%}\n    {%- set c_11 -%}\n      {{ og_include('blocks/media-frame.html.j2', {'p': {'alt': (v_imageAlt if og_t(v_imageAlt) else v_title), 'src': v_image, 'ratio': '4/3'}}) }}\n      {%- set c_10 -%}\n        {%- set c_8 -%}\n          {{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': 'chevron-left', 'Size': 16}}) }}\n        {%- endset -%}\n        {{ og_include('compose/button.html.j2', {'p': {'Variant': 'outline', 'Size': 'sm', 'Layout': 'icon', 'Type': 'button', 'AriaLabel': og_s(og_get(v_labels, ['previous']))}, 'children': c_8}) }}\n        {{ og_include('blocks/story-dots.html.j2', {'p': {'steps': v_steps, 'active': v_active}}) }}\n        {%- set c_9 -%}\n          {{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': 'chevron-right', 'Size': 16}}) }}\n        {%- endset -%}\n        {{ og_include('compose/button.html.j2', {'p': {'Variant': 'outline', 'Size': 'sm', 'Layout': 'icon', 'Type': 'button', 'AriaLabel': og_s(og_get(v_labels, ['next']))}, 'children': c_9}) }}\n      {%- endset -%}\n      {{ og_include('compose/group.html.j2', {'p': {'Gap': '4', 'Align': 'center', 'Justify': 'between'}, 'children': c_10}) }}\n    {%- endset -%}\n    {{ og_include('compose/stack.html.j2', {'p': {'Gap': '4', 'Align': 'stretch'}, 'children': c_11}) }}\n  {%- endset -%}\n  {{ og_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'heading': {'badge': v_badge}, 'tone': v_tone, 'layout': 'split', 'media': {'show': true}, 'landmarkLabel': v_landmarkLabel, 'aside': og_markup(f_7)}}) }}\n{%- endif %}\n",
      "path": "blocks/story-tabs.html.j2",
      "target": "blocks/story-tabs.html.j2"
    }
  ],
  "meta": {
    "category": "content",
    "group": "story",
    "kind": "block",
    "tags": [
      "jinja2",
      "block"
    ]
  },
  "name": "story-tabs",
  "registryDependencies": [
    "box",
    "button",
    "empty-state",
    "group",
    "inline",
    "lucide-icon",
    "media-frame",
    "section-frame",
    "stack",
    "story-dots",
    "story-panel",
    "utils"
  ],
  "runtime": "jinja2",
  "title": "Story Tabs",
  "type": "registry:block"
}
