diff --git a/.specs/dialog.md b/.specs/dialog.md index 42f3d0f70..1149594a9 100644 --- a/.specs/dialog.md +++ b/.specs/dialog.md @@ -7,7 +7,7 @@ spec_version: 1 figma: url: https://www.figma.com/design/t97pXRs7xME3SJDs5iZ5RF/Webkit?node-id=482-935 node_id: 482:935 -checksum: 7a70c8dfef2ecfa9a1d9bfc42dfaeaafddf7aeed69c5f5a02d05816dcc608f8c +checksum: 1f438ae1419577fcce4f1c3fa9703c8f067a73d7c673cfc9129738c830a70ec2 created: 2026-05-22 last_updated: 2026-05-22 --- diff --git a/.specs/link.md b/.specs/link.md index 64f67c5c7..8e88b7d30 100644 --- a/.specs/link.md +++ b/.specs/link.md @@ -4,15 +4,18 @@ category: navigation structure: monolithic status: implemented spec_version: 1 -checksum: 1de51434b1fd172a6c0de7cd7f1c86f291a0a264bf66629d28438e926e753665 +checksum: 42815455514e846bb1b8f6825c1ab7a00e53d155ae890edd2ffd48898ed9aa0c created: 2026-05-22 -last_updated: 2026-05-26 +last_updated: 2026-06-01 +figma: + url: https://www.figma.com/design/t97pXRs7xME3SJDs5iZ5RF/Webkit?node-id=3548-578 + node_id: 3548:578 --- # Link — Component Spec ## Purpose -Helps users move between views or sections. Migrated from the existing implementation at `packages/webkit/src/components/navigation/link/`. +Helps users move between views or sections. Migrated from the existing implementation at `packages/webkit/src/components/navigation/link/`. Design source: [Webkit — Link](https://www.figma.com/design/t97pXRs7xME3SJDs5iZ5RF/Webkit?node-id=3548-578) (`Size` × `State` variants; hover/active handled in CSS). ## Props @@ -76,8 +79,7 @@ Helps users move between views or sections. Migrated from the existing implement ## Stories (Storybook) - Default -- Medium (size) -- Large (size) +- Sizes - Disabled ## Constraints — DO NOT diff --git a/.specs/mini-button.md b/.specs/mini-button.md new file mode 100644 index 000000000..a908144fb --- /dev/null +++ b/.specs/mini-button.md @@ -0,0 +1,133 @@ +--- +name: mini-button +category: actions +structure: monolithic +status: implemented +spec_version: 1 +figma: + url: https://www.figma.com/design/t97pXRs7xME3SJDs5iZ5RF/Webkit?node-id=3211-220 + node_id: 3211:220 +checksum: 0aece9c0160c2aeb9b5e2a6113130750eb8d9f3d5845f654478366b1785d718e +created: 2026-06-01 +last_updated: 2026-06-01 +--- + +# Mini Button — Component Spec + +## Purpose + +Compact text action with an optional trailing external-link icon and a ghost hover surface. Use for secondary CTAs in dense layouts (cards, tables, toolbars) where a full `Button` is too heavy. Differs from `navigation/link` by using default body text color and a brand-colored icon. + +## Usage + +```vue + + + +``` + +## Props + +| Prop | Type | Default | Required | JSDoc | +| ---------- | --------------------- | ----------------------- | -------- | ------------------------------------------------- | +| `label` | `string` | `'Learn More'` | no | Visible label rendered inside the control. | +| `size` | `'large' \| 'medium'` | `'large'` | no | Size token; affects height, gap, and typography. | +| `disabled` | `boolean` | `false` | no | Disables interaction and applies disabled tokens. | +| `showIcon` | `boolean` | `true` | no | When true, renders the trailing icon. | +| `icon` | `string` | `'pi pi-external-link'` | no | PrimeIcons class for the trailing icon. | +| `href` | `string` | `'#'` | no | Destination URL for the anchor. | +| `target` | `'_blank' \| '_self'` | `'_self'` | no | Link target when navigating. | + +## Events + +| Event | Payload | Notes | +| ------- | ------------ | ------------------------------------------------ | +| `click` | `MouseEvent` | Fires on activation; suppressed when `disabled`. | + +## Slots + +| _none_ | — | — | + +## States + +- Visual states: `default`, `hover`, `focus-visible`, `active`, `disabled` +- `data-disabled` mirrors the `disabled` prop +- `data-size` mirrors the `size` prop + +## Motion & Animations + +| Trigger | Animation / Transition | Token | Reduced-motion fallback | +| --------------------------- | --------------------------------------------------------------- | ------ | -------------------------------------- | +| hover / focus ghost surface | `transition-opacity duration-150 ease-out` | inline | `motion-reduce:transition-none` | +| hover / focus ghost overlay | `before:transition-opacity before:duration-150 before:ease-out` | inline | `motion-reduce:before:transition-none` | + +## Tokens + +| Region | Token (DESIGN.md) | +| -------------------- | ---------------------- | +| typography (large) | `.text-button-lg` | +| typography (medium) | `.text-button-md` | +| text | `var(--text-default)` | +| text (disabled) | `var(--text-disabled)` | +| icon | `var(--primary)` | +| ghost surface | `var(--bg-hover)` | +| ghost overlay | `var(--bg-mask)` | +| ghost active | `var(--bg-active)` | +| spacing.gap (large) | `var(--spacing-xs)` | +| spacing.gap (medium) | `var(--spacing-xxs)` | +| spacing.ghost inset | `var(--spacing-xs)` | +| shape | `var(--shape-button)` | +| ring | `var(--ring-color)` | +| ring offset surface | `var(--bg-canvas)` | + +## Theme gaps + +| Figma variable | Temporary primitive | Follow-up | +| --------------------- | -------------------------- | ----------------- | +| `gap/button-md` (6px) | `var(--spacing-xxs)` (4px) | `TODO: tokenizar` | + +## Accessibility (WCAG 2.1 AA) + +- Visible focus: `focus-visible:ring-2 focus-visible:ring-[var(--ring-color)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--bg-canvas)]` +- Keyboard map: `Tab` focuses; `Enter` activates. +- ARIA: `aria-disabled` and `tabindex="-1"` when disabled. +- Contrast ≥4.5:1 (text) / ≥3:1 (large + icons), including disabled state. +- `motion-reduce:transition-none` on animated states. +- Touch target ≥40×40 px at `size: 'large'`; medium is for dense layouts. + +## Stories (Storybook) + +- Default +- Sizes — composite story rendering every `size` value side-by-side. + +## Constraints — DO NOT + + + +- Do not add props beyond the Props table above. If you need a prop that is not listed, emit `BLOCKED: missing prop ` and stop — do not invent. +- Do not add events beyond the Events table above. Same rule for slots and sub-components. +- Do not invent imports. Every `@aziontech/webkit/*` path must exist in `packages/webkit/package.json#exports`. Every relative import must resolve to a real file. Every npm package must be installed. +- Do not use HEX/RGB/HSL colors, Tailwind palette names (e.g. `bg-blue-500`), raw typography classes (e.g. `text-sm`), `any`, `@ts-ignore`, or `class` inside `defineProps`. +- Do not install or import positioning/animation libraries (`@floating-ui/*`, `popper.js`, `tippy.js`, `gsap`, `framer-motion`, `motion`, `@vueuse/motion`, `@formkit/auto-animate`, drag-drop runtimes, scroll virtualization libs). Use CSS + Vue primitives (``, ``). See `.claude/rules/dependencies.md`. +- Do not improvise animations. Every `animate-*` / `transition-*` class must come from `packages/theme/src/tokens/semantic/animations.js`; every motion-bearing class pairs with `motion-reduce:*` on the same class string; no component-local `@keyframes`. +- Do not create class presets in JavaScript (`const kindClasses = {...}`, `const sharedClasses = [...]`, `const sizeClasses = {...}`, `const rootClasses = computed(...)`). Variants live on `data-*` attributes consumed by Tailwind `data-[attr=value]:`. All utilities live inline on the root element's `class` attribute. No `