{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "One plan as a card.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n\nexport type Plan = {\n  id: string;\n  name: string;\n  tagline: string;\n  price: number;\n  currency: string;\n  seats: number;\n  storage: number;\n  highlighted: boolean;\n  status?: string;\n  features: string[];\n  yearly: number;\n};\n\nexport type PricingCardLabels = {\n  popular: string;\n  perMonth: string;\n  seats: string;\n  storage: string;\n  cta: string;\n  free: string;\n  perYear: string;\n  empty: string;\n};\n",
      "path": "blocks/pricing-card.types.ts",
      "target": "blocks/pricing-card.types.ts"
    },
    {
      "content": "<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->\n<!--\n  A plan as a card: name, tagline, price per month, the features, a call to action and an optional slot for more\n  actions. Text comes in through `labels`; the plan is data.\n-->\n<script lang=\"ts\">\nimport type { Plan, PricingCardLabels } from \"./pricing-card.types\";\n\nexport type PricingCardProps = {\n  plan: Plan;\n  labels: PricingCardLabels;\n  current?: boolean;\n  emphasis?: \"auto\" | \"off\";\n  density?: \"default\" | \"compact\";\n  billing?: \"monthly\" | \"annual\";\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport Badge from \"../compose/Badge.vue\";\nimport Block from \"../compose/Block.vue\";\nimport Box from \"../compose/Box.vue\";\nimport Button from \"../compose/Button.vue\";\nimport CardContent from \"../compose/CardContent.vue\";\nimport CardDescription from \"../compose/CardDescription.vue\";\nimport CardFooter from \"../compose/CardFooter.vue\";\nimport CardHeader from \"../compose/CardHeader.vue\";\nimport CardTitle from \"../compose/CardTitle.vue\";\nimport Group from \"../compose/Group.vue\";\nimport List from \"../compose/List.vue\";\nimport ListItem from \"../compose/ListItem.vue\";\nimport Text from \"../compose/Text.vue\";\nimport Title from \"../compose/Title.vue\";\nimport { cn, fmtMoney, tpl } from \"../utils\";\n\nconst {\n  plan,\n  labels,\n  current,\n  emphasis = \"auto\",\n  density = \"default\",\n  billing = \"monthly\",\n} = defineProps<PricingCardProps>();\nconst emit = defineEmits<{ select: [id: string] }>();\ndefineSlots<{ footer?(props: { plan: Plan }): unknown }>();\nconst stand = computed(() => plan.highlighted && ((emphasis as string) === \"auto\"));\nconst yearlyOn = computed(() => ((billing as string) === \"annual\") && (plan.yearly > 0));\nconst amount = computed(() => yearlyOn.value ? plan.yearly : plan.price);\n</script>\n\n<template>\n  <Block\n    tag=\"article\"\n    :class=\"cn(\n      'flex flex-col gap-8 bg-card p-6 text-card-foreground inset-ring inset-ring-border rounded',\n      'flex h-full flex-col'\n    )\"\n    data-slot=\"card\"\n    :data-highlighted=\"(stand ? 'true' : 'false')\"\n    :data-current=\"(current ? 'true' : 'false')\"\n  >\n    <CardHeader class=\"flex flex-col gap-2\">\n      <Box class=\"flex min-h-6 items-center\" data-slot=\"badge-slot\">\n        <Badge v-if=\"stand\" variant=\"default\" size=\"default\">\n          {{ labels.popular }}\n        </Badge>\n      </Box>\n      <CardTitle :as=\"3\">\n        {{ plan.name }}\n      </CardTitle>\n      <CardDescription>\n        {{ plan.tagline }}\n      </CardDescription>\n    </CardHeader>\n    <CardContent :class=\"cn('flex flex-1 flex-col', (((density as string) === 'compact') ? 'gap-2' : 'gap-4'))\">\n      <Group gap=\"2\" align=\"baseline\">\n        <Title :as=\"2\" size=\"4xl\" weight=\"bold\">\n          <template v-if=\"(amount === 0)\">\n            {{ labels.free }}\n          </template>\n          <template v-else>\n            {{ fmtMoney(amount, plan.currency) }}\n          </template>\n        </Title>\n        <Text v-if=\"(amount > 0)\" size=\"sm\" class=\"text-muted-foreground\">\n          {{ (yearlyOn ? labels.perYear : labels.perMonth) }}\n        </Text>\n      </Group>\n      <Text size=\"sm\" weight=\"medium\">\n        {{ tpl(labels.seats, plan.seats) }}\n      </Text>\n      <Text size=\"sm\" class=\"text-muted-foreground\">\n        {{ tpl(labels.storage, plan.storage) }}\n      </Text>\n      <List tag=\"ul\" class=\"flex flex-col gap-2 text-sm\">\n        <ListItem v-for=\"feature in plan.features\" :key=\"feature\" class=\"flex gap-2\" data-slot=\"features-row\">\n          {{ feature }}\n        </ListItem>\n      </List>\n    </CardContent>\n    <CardFooter class=\"flex flex-wrap items-center gap-2\">\n      <Button :variant=\"(stand ? 'default' : 'outline')\" size=\"default\" @click=\"() => emit('select', plan.id)\">\n        {{ labels.cta }}\n      </Button>\n      <slot name=\"footer\" :plan=\"plan\" />\n    </CardFooter>\n  </Block>\n</template>\n",
      "path": "blocks/pricing-card.vue",
      "target": "blocks/pricing-card.vue"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "pricing",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "pricing-card",
  "registryDependencies": [
    "badge",
    "block",
    "box",
    "button",
    "card-content",
    "card-description",
    "card-footer",
    "card-header",
    "card-title",
    "group",
    "list",
    "list-item",
    "text",
    "title",
    "utils"
  ],
  "runtime": "vue",
  "title": "Pricing Card",
  "type": "registry:block"
}
