{
  "$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{var $v_bars = ($p['bars'] ?? null)}\n{var $v_label = ($p['label'] ?? null)}\n{var $v_max = ($p['max'] ?? null)}\n{var $v_height = ($p['height'] ?? 160)}\n{var $v_top = og_max([1, og_coalesce([$v_max, og_max_by($v_bars, 'value')])])}\n{capture $c_6}\n  {capture $c_2}\n    {foreach og_l($v_bars) as $v_b}\n      {capture $c_1}\n        {=og_include('compose/Box.latte', ['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'])])])|noescape}\n      {/capture}\n      {=og_include('compose/Box.latte', ['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' => (string) $c_1])|noescape}\n    {/foreach}\n  {/capture}\n  {=og_include('compose/Box.latte', ['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' => (string) $c_2])|noescape}\n  {capture $c_5}\n    {foreach og_l($v_bars) as $v_b}\n      {capture $c_4}\n        {capture $c_3}\n          {=og_text(og_get($v_b, ['label']))}\n        {/capture}\n        {=og_include('compose/Text.latte', ['class' => 'absolute left-1/2 top-0 m-0 -translate-x-1/2 whitespace-nowrap text-xs font-medium text-muted-foreground', 'children' => (string) $c_3])|noescape}\n      {/capture}\n      {=og_include('compose/Box.latte', ['class' => 'relative h-4 min-w-0 flex-1', 'attrs' => og_attrs(['data-slot', 'bar']), 'children' => (string) $c_4])|noescape}\n    {/foreach}\n  {/capture}\n  {=og_include('compose/Box.latte', ['class' => 'mt-2 flex min-w-0 gap-2', 'attrs' => og_attrs(['aria-hidden', 'true']), 'children' => (string) $c_5])|noescape}\n{/capture}\n{=og_include('compose/Box.latte', ['class' => og_s(og_cnv(['min-w-0', ($p['className'] ?? '')])), 'attrs' => og_attrs(['data-slot', 'bar-chart']), 'children' => (string) $c_6])|noescape}\n",
      "path": "blocks/bar-chart.latte",
      "target": "blocks/bar-chart.latte"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "latte",
      "component"
    ]
  },
  "name": "bar-chart",
  "registryDependencies": [
    "box",
    "text",
    "utils"
  ],
  "runtime": "latte",
  "title": "Bar Chart",
  "type": "registry:component"
}
