From b9aa109870085a5b53681bee4a0cb5afe0ea0d8f Mon Sep 17 00:00:00 2001 From: Vivek Date: Mon, 3 Aug 2026 12:55:32 +0530 Subject: [PATCH 1/7] chore(website): drop the dead components/ui copies components/ui/ is meant to stay empty here, left free for `webjs ui add` to own exactly as it is in a scaffolded app, with the gallery's preview copies living in the generated modules/ui/components/ mirror instead. Eleven byte-identical copies of that mirror were committed into it by accident and sat unimported ever since. Gitignore the directory rather than only emptying it, since .gitignore already covers the other two generated paths and missing this one is what let the copies land in the first place. --- website/.gitignore | 7 + website/components/ui/accordion.ts | 79 -------- website/components/ui/aspect-ratio.ts | 24 --- website/components/ui/breadcrumb.ts | 50 ----- website/components/ui/card.ts | 90 --------- website/components/ui/collapsible.ts | 62 ------ website/components/ui/kbd.ts | 27 --- website/components/ui/label.ts | 25 --- website/components/ui/popover.ts | 268 -------------------------- website/components/ui/progress.ts | 53 ----- website/components/ui/skeleton.ts | 23 --- website/components/ui/table.ts | 65 ------- 12 files changed, 7 insertions(+), 766 deletions(-) delete mode 100644 website/components/ui/accordion.ts delete mode 100644 website/components/ui/aspect-ratio.ts delete mode 100644 website/components/ui/breadcrumb.ts delete mode 100644 website/components/ui/card.ts delete mode 100644 website/components/ui/collapsible.ts delete mode 100644 website/components/ui/kbd.ts delete mode 100644 website/components/ui/label.ts delete mode 100644 website/components/ui/popover.ts delete mode 100644 website/components/ui/progress.ts delete mode 100644 website/components/ui/skeleton.ts delete mode 100644 website/components/ui/table.ts diff --git a/website/.gitignore b/website/.gitignore index 139c68baa..c22b30b61 100644 --- a/website/.gitignore +++ b/website/.gitignore @@ -7,3 +7,10 @@ /modules/ui/components/ /lib/utils/cn.ts /lib/utils/dom.ts + +# components/ui/ belongs to `webjs ui add`, exactly as it does in a scaffolded +# app, so this site keeps it empty and tracks nothing there. It is ignored +# rather than merely left alone because it has already been committed by +# accident once: eleven byte-identical copies of the generated mirror above +# landed here and sat unimported until they were noticed. +/components/ui/ diff --git a/website/components/ui/accordion.ts b/website/components/ui/accordion.ts deleted file mode 100644 index 968bc1ea4..000000000 --- a/website/components/ui/accordion.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Accordion: vertical collapsible list built on native
/. - * - * Tier-1 (no custom element). Exclusive open behaviour (Radix's - * `type="single"`) comes from giving every
the same - * `name="..."` attribute. Independent open (`type="multiple"`) is the - * default when `name` is omitted. Both modes give `collapsible` for - * free: clicking the open closes it. - * - * shadcn parity: - *
wrapping - *
items - * → same, omit `name` - *
- * - *
- * - * Initial state: add `open` on the
that should render expanded - * on first paint. Programmatic toggling: `el.open = true | false`. - * - * `
` is the platform's exclusive-accordion primitive: - * Chrome 120+, Safari 17.2+, Firefox 130+. Migrated from the prior - * custom element set. - * - * Design tokens used: --border, --ring, --foreground. - * - * @example - * ```html - *
- *
- * - * Is it accessible? - * - * - *
Yes, it uses a native disclosure widget.
- *
- *
- * - * Is it styled? - * - * - *
Yes, with the shadcn design tokens.
- *
- *
- * ``` - */ - -/** Root wrapper. Holds the column-of-items rhythm; no display: rules. */ -export const accordionClass = (): string => 'w-full'; - -/** - * Item: each
. The `group` utility lets the trigger's chevron - * rotate on open via `group-open:rotate-180`. `last:border-b-0` cleans - * the trailing edge. - */ -export const accordionItemClass = (): string => 'group border-b last:border-b-0'; - -/** - * Trigger: applied to . Hides the native disclosure triangle so - * authors can compose their own chevron icon (typical pattern: trailing - * lucide chevron with `group-open:rotate-180`). - * - * `disabled: true` returns the visual disabled state (greyed out, - * not-allowed cursor, no pointer events). For true keyboard prevention - *, the native disabled-disclosure-widget gap, add the standard - * `inert` attribute to the
element. shadcn's React `disabled` - * prop combines both; native HTML has no `disabled` on
. - */ -export const accordionTriggerClass = (opts: { disabled?: boolean } = {}): string => { - const base = 'flex w-full cursor-pointer list-none items-center justify-between gap-4 py-4 text-left text-sm font-medium outline-none transition-all hover:underline focus-visible:ring-2 focus-visible:ring-ring/50 marker:hidden [&::-webkit-details-marker]:hidden'; - if (opts.disabled) return `${base} pointer-events-none cursor-not-allowed opacity-50`; - return base; -}; - -/** - * Content:
hides this entirely when not [open], so all we add - * is the typography rhythm matching shadcn (bottom padding, small text). - */ -export const accordionContentClass = (): string => 'pb-4 text-sm'; diff --git a/website/components/ui/aspect-ratio.ts b/website/components/ui/aspect-ratio.ts deleted file mode 100644 index 122f80d4c..000000000 --- a/website/components/ui/aspect-ratio.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * AspectRatio: preserve a width:height ratio for its child. Tier-1 - * class helper over the modern CSS `aspect-ratio` property (Baseline - * 2022). No JS, no custom element. - * - * shadcn parity: - * AspectRatio (Radix primitive) → aspectRatioClass() + inline `aspect-ratio` style - * - * Design tokens used: none (layout only). - * - * @example - * ```html - *
- * Team offsite - *
- * - * - *
- * Team offsite - *
- * ``` - */ - -export const aspectRatioClass = (): string => 'relative w-full'; diff --git a/website/components/ui/breadcrumb.ts b/website/components/ui/breadcrumb.ts deleted file mode 100644 index 3f5dc4422..000000000 --- a/website/components/ui/breadcrumb.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Breadcrumb: semantic nav with breadcrumb list. Tier-1 class helpers; - * compose with native `