@still-void/ui 2.0.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/README.md +41 -7
- package/dist/react/client/index.cjs +279 -174
- package/dist/react/client/index.cjs.map +1 -1
- package/dist/react/client/index.d.cts +62 -8
- package/dist/react/client/index.d.ts +62 -8
- package/dist/react/client/index.js +284 -174
- package/dist/react/client/index.js.map +1 -1
- package/dist/react/index.cjs +363 -93
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +133 -3
- package/dist/react/index.d.ts +133 -3
- package/dist/react/index.js +359 -92
- package/dist/react/index.js.map +1 -1
- package/dist/shadcn-overrides.css +98 -0
- package/dist/style.css +811 -0
- package/dist/tailwind.css +72 -0
- package/dist/theme.css +33 -11
- package/package.json +13 -3
package/dist/react/index.d.ts
CHANGED
|
@@ -301,12 +301,19 @@ interface ThemeScriptProps {
|
|
|
301
301
|
declare function ThemeScript({ storageKey, nonce }?: ThemeScriptProps): React.JSX.Element;
|
|
302
302
|
|
|
303
303
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
304
|
-
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
|
|
304
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "accent";
|
|
305
305
|
size?: "default" | "sm" | "lg" | "icon";
|
|
306
306
|
}
|
|
307
307
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
308
308
|
|
|
309
|
-
|
|
309
|
+
type CardElement = "div" | "section" | "article" | "li" | "aside";
|
|
310
|
+
interface CardProps extends React.HTMLAttributes<HTMLElement> {
|
|
311
|
+
/** Tag to render. Defaults to `div`. Ignored when `asChild` is also passed (AD-006). */
|
|
312
|
+
as?: CardElement;
|
|
313
|
+
/** Merge sv-card's class, ref and props onto a single child instead of rendering a wrapper. Wins over `as` when both are given (AD-006). */
|
|
314
|
+
asChild?: boolean;
|
|
315
|
+
}
|
|
316
|
+
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLElement>>;
|
|
310
317
|
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
311
318
|
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
312
319
|
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -322,10 +329,99 @@ interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
322
329
|
}
|
|
323
330
|
declare function Badge({ className, variant, ...props }: BadgeProps): React.JSX.Element;
|
|
324
331
|
|
|
332
|
+
/**
|
|
333
|
+
* The curated set behind `Icon` (AD-013).
|
|
334
|
+
*
|
|
335
|
+
* One grade — 24/outline — is the whole family, because size comes from CSS
|
|
336
|
+
* (`.sv-icon`) and mixing grades would mix stroke weights at the same rendered
|
|
337
|
+
* size. Each glyph is a NAMED import from the grade subpath: a namespace import
|
|
338
|
+
* or the package root barrel would pull all ~1200 heroicons into the consumer's
|
|
339
|
+
* bundle instead of the one or two they use.
|
|
340
|
+
*
|
|
341
|
+
* The names are the design system's, not heroicons': `alert-triangle` reads the
|
|
342
|
+
* same whatever library draws it, which is what keeps a future swap of source
|
|
343
|
+
* out of the public API.
|
|
344
|
+
*/
|
|
345
|
+
type IconName = 'x' | 'check' | 'chevron-down' | 'chevron-up' | 'chevron-right' | 'chevron-left' | 'info' | 'alert-triangle' | 'alert-circle' | 'check-circle' | 'copy' | 'sun' | 'moon' | 'search' | 'menu';
|
|
346
|
+
|
|
347
|
+
interface IconProps extends Omit<React.SVGProps<SVGSVGElement>, 'ref'> {
|
|
348
|
+
name: IconName;
|
|
349
|
+
/** `md` is the default and carries no modifier — the base class is the size. */
|
|
350
|
+
size?: 'sm' | 'md' | 'lg';
|
|
351
|
+
/** Present: the icon is announced. Absent: it stays decorative. */
|
|
352
|
+
label?: string;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* The design system's icon (ICON-01..06).
|
|
356
|
+
*
|
|
357
|
+
* Server-safe by construction: no hook, no context, no client boundary —
|
|
358
|
+
* heroicons is a plain forwardRef <svg> and this adds only class names, so
|
|
359
|
+
* `Icon` renders inside a Next.js Server Component (AD-002, AD-013).
|
|
360
|
+
*
|
|
361
|
+
* Size is deliberately NOT a prop on the svg: heroicons emits no width/height
|
|
362
|
+
* attribute, so `.sv-icon` is the only thing sizing it, and a consumer cannot
|
|
363
|
+
* pull an icon off the token scale by passing a pixel value.
|
|
364
|
+
*/
|
|
365
|
+
declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
|
|
366
|
+
|
|
325
367
|
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
326
368
|
}
|
|
327
369
|
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
328
370
|
|
|
371
|
+
interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
372
|
+
}
|
|
373
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
374
|
+
|
|
375
|
+
interface NativeSelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
|
|
376
|
+
}
|
|
377
|
+
declare const NativeSelect: React.ForwardRefExoticComponent<NativeSelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
378
|
+
|
|
379
|
+
interface FileInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
380
|
+
}
|
|
381
|
+
declare const FileInput: React.ForwardRefExoticComponent<FileInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
382
|
+
|
|
383
|
+
interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
384
|
+
}
|
|
385
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
386
|
+
|
|
387
|
+
interface RadioGroupItemProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
388
|
+
children?: React.ReactNode;
|
|
389
|
+
}
|
|
390
|
+
declare const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLInputElement>>;
|
|
391
|
+
interface RadioGroupProps extends Omit<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, "name"> {
|
|
392
|
+
legend?: React.ReactNode;
|
|
393
|
+
legendHidden?: boolean;
|
|
394
|
+
orientation?: "vertical" | "horizontal";
|
|
395
|
+
name?: string;
|
|
396
|
+
}
|
|
397
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLFieldSetElement>>;
|
|
398
|
+
|
|
399
|
+
interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {
|
|
400
|
+
containerClassName?: string;
|
|
401
|
+
}
|
|
402
|
+
declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<HTMLTableElement>>;
|
|
403
|
+
interface TableHeaderProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
404
|
+
}
|
|
405
|
+
declare const TableHeader: React.ForwardRefExoticComponent<TableHeaderProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
406
|
+
interface TableBodyProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
407
|
+
}
|
|
408
|
+
declare const TableBody: React.ForwardRefExoticComponent<TableBodyProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
409
|
+
interface TableFooterProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
410
|
+
}
|
|
411
|
+
declare const TableFooter: React.ForwardRefExoticComponent<TableFooterProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
412
|
+
interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
413
|
+
}
|
|
414
|
+
declare const TableRow: React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLTableRowElement>>;
|
|
415
|
+
interface TableHeadProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
|
|
416
|
+
}
|
|
417
|
+
declare const TableHead: React.ForwardRefExoticComponent<TableHeadProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
418
|
+
interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
|
|
419
|
+
}
|
|
420
|
+
declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
421
|
+
interface TableCaptionProps extends React.HTMLAttributes<HTMLTableCaptionElement> {
|
|
422
|
+
}
|
|
423
|
+
declare const TableCaption: React.ForwardRefExoticComponent<TableCaptionProps & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
424
|
+
|
|
329
425
|
/**
|
|
330
426
|
* Still Void typography tokens.
|
|
331
427
|
* Families are fixed by the spec: Sora (display), Manrope (body), JetBrains Mono (code).
|
|
@@ -504,4 +600,38 @@ interface SkeletonOptions {
|
|
|
504
600
|
declare function skeletonLine(options?: SkeletonOptions): string;
|
|
505
601
|
declare function cardSkeleton(): string;
|
|
506
602
|
|
|
507
|
-
|
|
603
|
+
/**
|
|
604
|
+
* Field recipe: the single source of truth for the form-field frame shared by
|
|
605
|
+
* Input, Textarea, NativeSelect and FileInput. Pure function — Server
|
|
606
|
+
* Component safe, and exported so consumers composing their own markup style
|
|
607
|
+
* a field the same way the components do instead of mirroring the CSS by hand.
|
|
608
|
+
*/
|
|
609
|
+
type FieldVariant = 'input' | 'textarea' | 'select' | 'file';
|
|
610
|
+
interface FieldOptions {
|
|
611
|
+
variant?: FieldVariant;
|
|
612
|
+
}
|
|
613
|
+
declare function field(options?: FieldOptions): string;
|
|
614
|
+
declare const fieldClasses: {
|
|
615
|
+
readonly choice: "sv-choice";
|
|
616
|
+
readonly srOnly: "sv-sr-only";
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* Table recipes: the class map behind the Table component family, exported so
|
|
621
|
+
* a consumer composing a raw <table> gets the same tokenized decoration
|
|
622
|
+
* instead of re-deriving borders, header band and caption by hand. Pure —
|
|
623
|
+
* Server Component safe.
|
|
624
|
+
*/
|
|
625
|
+
declare function table(): string;
|
|
626
|
+
declare const tableClasses: {
|
|
627
|
+
readonly container: "sv-table-container";
|
|
628
|
+
readonly head: "sv-table__head";
|
|
629
|
+
readonly body: "sv-table__body";
|
|
630
|
+
readonly foot: "sv-table__foot";
|
|
631
|
+
readonly row: "sv-table__row";
|
|
632
|
+
readonly th: "sv-table__th";
|
|
633
|
+
readonly td: "sv-table__td";
|
|
634
|
+
readonly caption: "sv-table__caption";
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
export { type AccentName, Alert, AlertDescription, AlertTitle, ArticleHeader, type ArticleHeaderProps, Badge, type BadgeProps, Button, type ButtonProps, Callout, type CalloutKind, type CalloutProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardSkeleton, CardTitle, type CategoryName, CategoryPill, type CategoryPillOptions, type CategoryPillProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, type ColorScheme, DEFAULT_ACCENT, DEFAULT_MODE, type Duration, type Easing, FeaturedPostCard, type FeaturedPostCardProps, type FieldOptions, type FieldVariant, FileInput, type FileInputProps, type FontFamily, type FontSize, type FontWeight, Footer, type FooterProps, Header, type HeaderOptions, type HeaderProps, Hero, type HeroProps, Icon, type IconName, type IconProps, Input, type InputProps, Layout, type LayoutOptions, type LayoutProps, Lead, type LeadProps, Logo, type LogoProps, NativeSelect, type NativeSelectProps, type NavItem, PostCard, type PostCardOptions, type PostCardProps, PostGrid, type PostGridProps, type PostSummary, Prose, type ProseProps, READING_PROGRESS_VAR, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type Radius, type SemanticName, Sidebar, type SidebarProps, SidebarSection, type SidebarSectionProps, Skeleton, type SkeletonOptions, type SkeletonProps, type SpacingStep, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Textarea, type TextareaProps, type ThemeMode, ThemeScript, type ThemeScriptProps, type TocItem, type TocLinkOptions, type ZIndexStep, accentNames, accents, accentsInk, articleHeader, articleHeaderClasses, callout, calloutClasses, calloutLabels, cardSkeleton, categoryPill, categoryPillClasses, codeBlock, codeBlockClasses, colors, cx, defaultCategoryColors, durations, easings, featuredPostCard, featuredPostCardClasses, field, fieldClasses, fontFamilies, fontSizes, fontWeights, footer, footerClasses, header, headerClasses, hero, heroClasses, layout, letterSpacings, lineHeights, logo, logoClasses, postCard, postCardClasses, postGrid, prose, proseClasses, radii, readingProgress, readingProgressClasses, resolveAccentColor, resolveCategoryColor, semantic, semanticInk, sidebar, sidebarClasses, skeletonLine, spacing, table, tableClasses, tableOfContents, themeModes, tocLink, zIndex };
|