Files
zeekayandGitHub 806fc0f0df decouple @hanzogui, standardize on 'pkgs/', etc (#228)
* refactor: decouple @hanzo/ui from hanzogui

  Make @hanzo/ui shadcn-only — no hanzogui/Tamagui coupling.

  - remove primitives/bases (gui/admin/svelte/vue) re-exports
  - drop @hanzogui peerDependencies + peerDependenciesMeta entries
  - add check-no-hanzogui guard, wired into build
  - fix latent NodeJS.Timeout types to keep the build green

* refactor: remove duplicate @hanzo/brand from the monorepo

  @hanzo/brand is owned by the standalone hanzoai/brand (the npm-canonical
  source); this monorepo's copy was unused and had drifted.

  - delete pkg/brand
  - add check-no-brand-pkg guard (wired into `check`) so it can't reappear

* refactor(ui): stop importing from the app; use own cn util

  pkg/ui pulled `cn` from @/lib/utils (../../app) — an inverted dependency on
  the consuming app. Point the animation components at pkg/ui's own cn and
  drop the @/app, @/registry, @/lib tsconfig path aliases.

* fix(ui): type errors; stop tracking the root lockfile

  - ModelCard: lucide-react dropped the Github icon → use Code
  - drawer: annotate DrawerTrigger/DrawerClose (radix type portability)
  - untrack root pnpm-lock.yaml; CI → --no-frozen-lockfile

* release: bump @hanzo/ui to 5.7.0

* refactor: rename pkg/ → pkgs/, merge packages/ into it

  standardize on 'pkgs/': move pkg/* and packages/* into pkgs/.
  Update workspace globs, CI, scripts, and config references accordingly.
2026-06-19 15:30:30 -10:00

49 lines
1.3 KiB
TypeScript

'use client'
import React from 'react'
import { observer } from 'mobx-react-lite'
import { type LucideProps } from 'lucide-react'
import { cn } from '@hanzo/ui/util'
import type { LineItem } from '../../types'
// Generalize this.
const BagIcon: React.FC<LucideProps> = (props: LucideProps) => (
<svg fill="currentColor" viewBox='0 0 20 23' {...props}>
<path fillRule="evenodd" d="M5 5a5 5 0 0 1 10 0v1h-2V5a3 3 0 1 0-6 0v1H5V5Zm0 1v4h2V6h6v4h2V6h3.5a1 1 0 0 1 1 1v15a1 1 0 0 1-1 1h-17a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1H5Z" clipRule="evenodd"/>
</svg>
)
const QuantityIndicator: React.FC<{
item: LineItem
clx?: string
iconClx?: string
digitClx?: string
}> = observer(({
item,
clx='',
iconClx='',
digitClx=''
}) => {
if (!item.isInCart) {
return <div />
}
return (
<div className={cn('relative aspect-square flex items-center justify-center', clx)} >
<div className={cn(
'z-above-content flex flex-col justify-center items-center',
'absolute left-0 right-0 top-0 bottom-0',
digitClx
)}>
<div className='h-[1px] w-full' />
<div style={{color: 'black' /* tailwind bug */}}>{item.quantity}</div>
</div>
<BagIcon className={cn('relative -top-[12%] h-full ', iconClx, )} aria-hidden="true" />
</div>
)
}) // -top-[3px]
export default QuantityIndicator