{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A row of vertical bars (sales by day, orders by week) with a caption under each bar. The chart is one image for assistive technology: `label` carries the summary, the bar values are in the captions and titles.",
  "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/parts/bar-chart.json\n    A row of vertical bars (sales by day, orders by week) with a caption under each bar. The chart is one image for assistive technology: `label` carries the summary, the bar values are in the captions and titles.\n    Props (p): bars, label, max, height, className. -#}\n{%- set v_bars = (p.bars ?? null) -%}\n{%- set v_label = (p.label ?? null) -%}\n{%- set v_max = (p.max ?? null) -%}\n{%- set v_height = (p.height ?? 160) -%}\n{%- set v_top = og_max([1, og_coalesce([v_max, og_max_by(v_bars, 'value')])]) -%}\n{%- set c_6 -%}\n  {%- set c_2 -%}\n    {%- for v_b in og_l(v_bars) %}\n      {%- set c_1 -%}\n        {{ include('compose/Box.html.twig', {'class': og_s(og_cnv(['w-full rounded', (og_t(og_get(v_b, ['muted'])) ? 'bg-muted-foreground' : 'bg-primary')])), 'attrs': og_attrs(['style', og_css(['height', og_max([2, og_round(og_mul(og_div(og_get(v_b, ['value']), v_top), 100))]), '%']), 'data-bar', og_get(v_b, ['id'])])}, with_context = false) }}\n      {%- endset -%}\n      {{ include('compose/Box.html.twig', {'class': 'flex h-full min-w-0 flex-1 items-end', 'attrs': og_attrs(['title', og_coalesce([og_get(v_b, ['title']), og_get(v_b, ['label'])]), 'data-slot', 'bar']), 'children': c_1}, with_context = false) }}\n    {%- endfor %}\n  {%- endset -%}\n  {{ include('compose/Box.html.twig', {'class': 'flex min-w-0 items-end gap-2', 'attrs': og_attrs(['role', 'img', 'aria-label', v_label, 'style', og_css(['height', v_height, 'px'])]), 'children': c_2}, with_context = false) }}\n  {%- set c_5 -%}\n    {%- for v_b in og_l(v_bars) %}\n      {%- set c_4 -%}\n        {%- set c_3 -%}\n          {{ og_text(og_get(v_b, ['label'])) }}\n        {%- endset -%}\n        {{ include('compose/Text.html.twig', {'class': 'absolute left-1/2 top-0 m-0 -translate-x-1/2 whitespace-nowrap text-xs font-medium text-muted-foreground', 'children': c_3}, with_context = false) }}\n      {%- endset -%}\n      {{ include('compose/Box.html.twig', {'class': 'relative h-4 min-w-0 flex-1', 'attrs': og_attrs(['data-slot', 'bar']), 'children': c_4}, with_context = false) }}\n    {%- endfor %}\n  {%- endset -%}\n  {{ include('compose/Box.html.twig', {'class': 'mt-2 flex min-w-0 gap-2', 'attrs': og_attrs(['aria-hidden', 'true']), 'children': c_5}, with_context = false) }}\n{%- endset -%}\n{{ include('compose/Box.html.twig', {'class': og_s(og_cnv(['min-w-0', (p.className ?? '')])), 'attrs': og_attrs(['data-slot', 'bar-chart']), 'children': c_6}, with_context = false) }}\n",
      "path": "blocks/bar-chart.html.twig",
      "target": "blocks/bar-chart.html.twig"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "twig",
      "component"
    ]
  },
  "name": "bar-chart",
  "registryDependencies": [
    "box",
    "text",
    "utils"
  ],
  "runtime": "twig",
  "title": "Bar Chart",
  "type": "registry:component"
}
