feat(island,tools): form pieces for the profile step
- Atoms: Chip (toggle with aria-pressed), Checkbox, FieldError (alert line
under a group), LinkButton (a button that looks like a link; SupportLink now
uses it), RowButton (56px choice row for sheets), and a 96px Avatar size.
- Molecules: ChipGroup (named fieldset of chips with its error), FormSection
(titled form part with an optional marker and hint), AvatarField (photo
pick, change, remove, upload progress, failed state with retry).
- Dialog, Sheet and Modal take `onExited`, called once the dialog has left
the top layer. The page is inert until then, so focus moves there.
- tools/format: `time()` for a time of day in Tehran (`14:05`).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 18:32:43 +00:00
|
|
|
import { cva } from 'class-variance-authority';
|
|
|
|
|
|
feat(island): v6 compositions — list rows, page header, section title, pinned footer, result panel, stat tile, meter, search field, avatar stack, timeline, code input, key-value, analyst card; new chips, segmented, avatar sizes, toast placement, account menu items, post and prediction card names and close reason
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 13:38:43 +00:00
|
|
|
/**
|
|
|
|
|
* A pill you press to pick one of many, such as a market; a set sits in a wrapping row (DS Chips).
|
|
|
|
|
* Off, it is white with a `border-default` outline; on, filled brand. 15/600, 14 at `sm`.
|
|
|
|
|
*/
|
feat(island,tools): form pieces for the profile step
- Atoms: Chip (toggle with aria-pressed), Checkbox, FieldError (alert line
under a group), LinkButton (a button that looks like a link; SupportLink now
uses it), RowButton (56px choice row for sheets), and a 96px Avatar size.
- Molecules: ChipGroup (named fieldset of chips with its error), FormSection
(titled form part with an optional marker and hint), AvatarField (photo
pick, change, remove, upload progress, failed state with retry).
- Dialog, Sheet and Modal take `onExited`, called once the dialog has left
the top layer. The page is inert until then, so focus moves there.
- tools/format: `time()` for a time of day in Tehran (`14:05`).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 18:32:43 +00:00
|
|
|
export const chipVariants = cva(
|
feat(island): v6 compositions — list rows, page header, section title, pinned footer, result panel, stat tile, meter, search field, avatar stack, timeline, code input, key-value, analyst card; new chips, segmented, avatar sizes, toast placement, account menu items, post and prediction card names and close reason
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 13:38:43 +00:00
|
|
|
'rounded-full border px-4 font-semibold whitespace-nowrap transition-colors duration-120 ease-standard focus-visible:focus-ring actionable:cursor-pointer disabled:frozen',
|
feat(island,tools): form pieces for the profile step
- Atoms: Chip (toggle with aria-pressed), Checkbox, FieldError (alert line
under a group), LinkButton (a button that looks like a link; SupportLink now
uses it), RowButton (56px choice row for sheets), and a 96px Avatar size.
- Molecules: ChipGroup (named fieldset of chips with its error), FormSection
(titled form part with an optional marker and hint), AvatarField (photo
pick, change, remove, upload progress, failed state with retry).
- Dialog, Sheet and Modal take `onExited`, called once the dialog has left
the top layer. The page is inert until then, so focus moves there.
- tools/format: `time()` for a time of day in Tehran (`14:05`).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 18:32:43 +00:00
|
|
|
{
|
|
|
|
|
variants: {
|
|
|
|
|
selected: {
|
|
|
|
|
true: 'border-action-primary bg-action-primary text-text-on-action actionable:hover:bg-action-primary-hover',
|
|
|
|
|
false:
|
feat(island): v6 compositions — list rows, page header, section title, pinned footer, result panel, stat tile, meter, search field, avatar stack, timeline, code input, key-value, analyst card; new chips, segmented, avatar sizes, toast placement, account menu items, post and prediction card names and close reason
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 13:38:43 +00:00
|
|
|
'border-border-default bg-surface text-text-primary actionable:hover:border-text-secondary actionable:hover:bg-surface-hover',
|
feat(island,tools): form pieces for the profile step
- Atoms: Chip (toggle with aria-pressed), Checkbox, FieldError (alert line
under a group), LinkButton (a button that looks like a link; SupportLink now
uses it), RowButton (56px choice row for sheets), and a 96px Avatar size.
- Molecules: ChipGroup (named fieldset of chips with its error), FormSection
(titled form part with an optional marker and hint), AvatarField (photo
pick, change, remove, upload progress, failed state with retry).
- Dialog, Sheet and Modal take `onExited`, called once the dialog has left
the top layer. The page is inert until then, so focus moves there.
- tools/format: `time()` for a time of day in Tehran (`14:05`).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 18:32:43 +00:00
|
|
|
},
|
|
|
|
|
size: {
|
feat(island): v6 compositions — list rows, page header, section title, pinned footer, result panel, stat tile, meter, search field, avatar stack, timeline, code input, key-value, analyst card; new chips, segmented, avatar sizes, toast placement, account menu items, post and prediction card names and close reason
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 13:38:43 +00:00
|
|
|
sm: 'min-h-control-sm px-3.5 text-body-sm leading-6',
|
|
|
|
|
md: 'min-h-control-md text-[0.9375rem] leading-6',
|
feat(island,tools): form pieces for the profile step
- Atoms: Chip (toggle with aria-pressed), Checkbox, FieldError (alert line
under a group), LinkButton (a button that looks like a link; SupportLink now
uses it), RowButton (56px choice row for sheets), and a 96px Avatar size.
- Molecules: ChipGroup (named fieldset of chips with its error), FormSection
(titled form part with an optional marker and hint), AvatarField (photo
pick, change, remove, upload progress, failed state with retry).
- Dialog, Sheet and Modal take `onExited`, called once the dialog has left
the top layer. The page is inert until then, so focus moves there.
- tools/format: `time()` for a time of day in Tehran (`14:05`).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 18:32:43 +00:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
defaultVariants: { selected: false, size: 'md' },
|
|
|
|
|
},
|
|
|
|
|
);
|
feat(island): v6 compositions — list rows, page header, section title, pinned footer, result panel, stat tile, meter, search field, avatar stack, timeline, code input, key-value, analyst card; new chips, segmented, avatar sizes, toast placement, account menu items, post and prediction card names and close reason
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 13:38:43 +00:00
|
|
|
|
|
|
|
|
/** A set of chips: wrapping rows, or one row that scrolls sideways (DS `scroll`). */
|
|
|
|
|
export const chipRowVariants = cva('', {
|
|
|
|
|
variants: {
|
|
|
|
|
scroll: {
|
|
|
|
|
// The 4px padding keeps each chip's focus ring inside the scroller's clip.
|
|
|
|
|
true: '-m-1 overflow-x-auto p-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden',
|
|
|
|
|
false: '',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
defaultVariants: { scroll: false },
|
|
|
|
|
});
|