@want-foundation/allure-react 0.0.0-stage → 1.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.
Files changed (52) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +30 -2
  3. package/THIRD_PARTY_NOTICES.md +5 -0
  4. package/dist/animated-text.d.ts +6 -0
  5. package/dist/brand.d.ts +12 -0
  6. package/dist/carousel-scroll.d.ts +6 -0
  7. package/dist/combobox.d.ts +20 -0
  8. package/dist/comment-feed.d.ts +32 -0
  9. package/dist/contact-card.d.ts +15 -0
  10. package/dist/date-field.d.ts +28 -0
  11. package/dist/direction-provider.d.ts +5 -0
  12. package/dist/file-upload.d.ts +22 -0
  13. package/dist/glow.d.ts +5 -0
  14. package/dist/index.d.ts +44 -0
  15. package/dist/index.js +2167 -0
  16. package/dist/loader.d.ts +8 -0
  17. package/dist/media-card.d.ts +14 -0
  18. package/dist/pagination.d.ts +18 -0
  19. package/dist/shimmer.d.ts +7 -0
  20. package/dist/snackbar.d.ts +18 -0
  21. package/dist/theme-toggle.d.ts +8 -0
  22. package/dist/typography.d.ts +299 -0
  23. package/dist/ui/accordion.d.ts +7 -0
  24. package/dist/ui/alert.d.ts +9 -0
  25. package/dist/ui/badge.d.ts +9 -0
  26. package/dist/ui/breadcrumb.d.ts +11 -0
  27. package/dist/ui/button.d.ts +10 -0
  28. package/dist/ui/card.d.ts +9 -0
  29. package/dist/ui/checkbox.d.ts +3 -0
  30. package/dist/ui/dialog.d.ts +18 -0
  31. package/dist/ui/dropdown-menu.d.ts +8 -0
  32. package/dist/ui/field.d.ts +24 -0
  33. package/dist/ui/input.d.ts +3 -0
  34. package/dist/ui/label.d.ts +4 -0
  35. package/dist/ui/navigation-menu.d.ts +14 -0
  36. package/dist/ui/popover.d.ts +7 -0
  37. package/dist/ui/progress.d.ts +6 -0
  38. package/dist/ui/radio-group.d.ts +5 -0
  39. package/dist/ui/select.d.ts +15 -0
  40. package/dist/ui/separator.d.ts +4 -0
  41. package/dist/ui/sheet.d.ts +15 -0
  42. package/dist/ui/skeleton.d.ts +2 -0
  43. package/dist/ui/switch.d.ts +6 -0
  44. package/dist/ui/table.d.ts +9 -0
  45. package/dist/ui/tabs.d.ts +11 -0
  46. package/dist/ui/textarea.d.ts +3 -0
  47. package/dist/ui/toast.d.ts +9 -0
  48. package/dist/ui/tooltip.d.ts +6 -0
  49. package/dist/url-field.d.ts +22 -0
  50. package/dist/utils.d.ts +2 -0
  51. package/dist/window.d.ts +9 -0
  52. package/package.json +39 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Andrey Krasheninnikov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,31 @@
1
- # Temporary Holding Version
1
+ # @want-foundation/allure-react
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ React 19 components built on Radix. Install @want-foundation/allure at the same release version and import its stylesheet once. React and React DOM are peer dependencies.
4
+
5
+ Public exports include the UI primitives, BrandLogo, BrandLockup, MediaCard, ContactCard, ThemeToggle, CommentFeed, DateField, UrlField, OpenUrl and Window. Product data, labels, URLs and action callbacks belong to the consumer.
6
+
7
+ DateField uses controlled local date strings and consumer-provided locale and labels. UrlField validates its open link as HTTP(S). Window provides a page heading and content slots without application data.
8
+
9
+ See the repository README for usage, compatibility and release instructions.
10
+
11
+ CommentItem.createdAt accepts { dateTime, label }. Supply an ISO timestamp and a localized display label from the consumer. The component preserves that text during SSR and hydration.
12
+
13
+ Additional exports are Checkbox, DropdownMenu, Toast, Tooltip, Combobox, Popover, Table, Pagination, FileUpload and Progress. Menu, toast, tooltip, popover and table families expose their composition parts. Import the foundation stylesheet once for all component styles and motion.
14
+
15
+ Combobox accepts options with value, label and optional disabled, plus a controlled value and onValueChange. Supply label and emptyLabel. Typing filters options; arrows navigate enabled options, Enter selects, and Escape restores the current value. An optional name adds the selected value to native form data.
16
+
17
+ Pagination receives page, pageSize and totalItems. Its onChange(page, pageSize) callback reports navigation; changing page size resets the page to 1. Supply navigation, previous, next, pageSize, page(page) and results(from, to, total) labels. Empty results show page 1 with disabled navigation.
18
+
19
+ FileUpload receives files and onFilesChange, with optional accept, multiple, maxSize in bytes, maxFiles and disabled. Supply label and choose, drop, remove(name), invalidType(name), tooLarge(name, maxSize) and tooMany(maxFiles) labels. Invalid batches leave the current selection intact. Image previews release their object URLs when removed. Use the selected File objects for uploads in the consumer; the component does not submit a native file input or send network requests.
20
+
21
+ Progress requires a label and accepts value and max. A null value shows indeterminate progress. Table preserves native table semantics, caption and aria-busy; compose loading and empty rows with TableCell colSpan. ToastProvider and ToastViewport accept localized accessibility labels; ToastAction requires descriptive altText.
22
+
23
+ Typography exposes display, h1 through h6, lead, body, small, caption, label, overline, mono, code, code-block and quote variants. Its default HTML element follows the variant; as may override the element while keeping its visual style. tone and align use semantic colors and logical alignment. Prose styles native headings, paragraphs, lists, links, emphasis, quotes and code within a readable measure. Foundation tokens contain the responsive sizes, weights, leading and tracking. Sizes use rem and fluid viewport interpolation; locale fonts remain active.
24
+
25
+ Loader variants are spinner, dots, bars and orbit; sizes are sm, md and lg. Shimmer variants are block, text, avatar and card. Supply a localized label to each status component. Their paused prop stops repeated motion.
26
+
27
+ AnimatedText takes text and an optional fade, slide or blur effect. It animates a new value without timers or retained outgoing text. Set aria-live explicitly when the change needs an announcement.
28
+
29
+ Glow is a decorative, non-interactive background layer. Place it directly inside an element with className="glow-host"; the layer inherits the host radius. Use the normal style color or a text-color utility to change its hue. Two expanding waves run over a broad ambient halo, with a 3.6-second cycle and a 1.8-second offset. paused stops both waves. Expose a pause control for persistent decorative motion, and pause inactive surfaces. Reduced transparency preserves the waves. Reduced motion keeps a static glow; forced colors hide it.
30
+
31
+ Snackbar composes the existing Toast primitives. Supply variant (error, warning, info or success), a localized variantLabel, title and closeLabel; description and an action with label, altText and onClick are optional. Error messages remain until dismissed by default; other variants last 5 seconds. duration may override this. SnackbarProvider supplies the notification label; SnackbarViewport supplies the viewport label and supports placement through --snackbar-bottom. Pointer hover and keyboard focus pause timed messages. The surface follows the current theme, while the status icon plate uses the same accent in both themes. Desktop actions sit beside the content and move below it on narrow screens. The consumer owns open, onOpenChange and action effects. Importing the foundation stylesheet includes all visual styles and reduced-motion fallbacks. Use status-text tokens for inline colored text; status-foreground tokens are ink for the bright status surfaces.
@@ -0,0 +1,5 @@
1
+ # Third-party notices
2
+
3
+ UI component sources derive from Want Wallpapers under the MIT license. Copyright (c) 2026 Andrey Krasheninnikov. Radix and the shadcn component patterns retain their upstream licenses through their packages.
4
+
5
+ Manrope, Days One, Noto Sans JP and Noto Sans Arabic are distributed under their original font licenses. The foundation package includes the complete font license texts in dist/licenses. Imported fonts and logos keep their own notices; the repository MIT license does not replace those notices.
@@ -0,0 +1,6 @@
1
+ import type { ComponentProps } from 'react';
2
+ export type AnimatedTextProps = Omit<ComponentProps<'span'>, 'children'> & {
3
+ text: string;
4
+ effect?: 'fade' | 'slide' | 'blur';
5
+ };
6
+ export declare function AnimatedText({ text, effect, className, ...props }: AnimatedTextProps): import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import type { ComponentProps } from 'react';
2
+ export type BrandLogoProps = ComponentProps<'img'> & {
3
+ src: string;
4
+ alt: string;
5
+ };
6
+ export declare function BrandLogo({ className, width, height, ...props }: BrandLogoProps): import("react").JSX.Element;
7
+ export type BrandLockupProps = Omit<ComponentProps<'a'>, 'children'> & {
8
+ name: string;
9
+ logoSrc: string;
10
+ subtitle?: string;
11
+ };
12
+ export declare function BrandLockup({ name, logoSrc, subtitle, className, ...props }: BrandLockupProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ export declare function carouselScroll(element: HTMLElement): {
2
+ sign: number;
3
+ max: number;
4
+ offset: number;
5
+ };
6
+ export declare function scrollCarousel(element: HTMLElement, offset: number): void;
@@ -0,0 +1,20 @@
1
+ import { type ReactNode } from 'react';
2
+ export type ComboboxOption = {
3
+ value: string;
4
+ label: string;
5
+ disabled?: boolean;
6
+ };
7
+ export type ComboboxProps = {
8
+ label: ReactNode;
9
+ options: ComboboxOption[];
10
+ value: string;
11
+ onValueChange: (value: string) => void;
12
+ emptyLabel: string;
13
+ placeholder?: string;
14
+ id?: string;
15
+ name?: string;
16
+ disabled?: boolean;
17
+ required?: boolean;
18
+ className?: string;
19
+ };
20
+ export declare function Combobox({ label, options, value, onValueChange, emptyLabel, placeholder, id, name, disabled, required, className }: ComboboxProps): import("react").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { type ComponentType, type SVGProps } from 'react';
2
+ export type CommentAction = {
3
+ id: string;
4
+ label: string;
5
+ disabled?: boolean;
6
+ icon?: ComponentType<SVGProps<SVGSVGElement>>;
7
+ };
8
+ export type CommentItem = {
9
+ id: string;
10
+ author: string;
11
+ text: string;
12
+ own?: boolean;
13
+ createdAt?: {
14
+ dateTime: string;
15
+ label: string;
16
+ };
17
+ actions?: CommentAction[];
18
+ };
19
+ export type CommentFeedProps = {
20
+ comments: CommentItem[];
21
+ busy?: boolean;
22
+ labels: {
23
+ title: string;
24
+ empty: string;
25
+ previous: string;
26
+ next: string;
27
+ readMore: string;
28
+ collapse: string;
29
+ };
30
+ onAction: (commentId: string, actionId: string) => void;
31
+ };
32
+ export declare function CommentFeed({ comments, labels, busy, onAction }: CommentFeedProps): import("react").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import type { ComponentProps, ComponentType, SVGProps } from 'react';
2
+ export type ContactAction = {
3
+ title: string;
4
+ detail?: string;
5
+ href: string;
6
+ label?: string;
7
+ external?: boolean;
8
+ icon?: ComponentType<SVGProps<SVGSVGElement>>;
9
+ };
10
+ export type ContactCardProps = ComponentProps<'div'> & {
11
+ name: string;
12
+ subtitle?: string;
13
+ actions: ContactAction[];
14
+ };
15
+ export declare function ContactCard({ name, subtitle, actions, className, ...props }: ContactCardProps): import("react").JSX.Element;
@@ -0,0 +1,28 @@
1
+ export type DateFieldLabels = {
2
+ date: string;
3
+ datetime: string;
4
+ calendar: string;
5
+ year: string;
6
+ previousYear: string;
7
+ previousMonth: string;
8
+ nextMonth: string;
9
+ nextYear: string;
10
+ hours: string;
11
+ minutes: string;
12
+ today: string;
13
+ clear: string;
14
+ apply: string;
15
+ };
16
+ export type DateFieldProps = {
17
+ mode: 'date' | 'datetime';
18
+ value: string;
19
+ onChange: (value: string) => void;
20
+ onCommit?: (value: string) => void;
21
+ labels: DateFieldLabels;
22
+ locale: string;
23
+ today?: string;
24
+ ariaLabel?: string;
25
+ disabled?: boolean;
26
+ className?: string;
27
+ };
28
+ export declare function DateField({ mode, value, onChange, onCommit, labels, locale, today, ariaLabel, disabled, className }: DateFieldProps): import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { ComponentType, PropsWithChildren } from 'react';
2
+ export type DirectionProviderProps = PropsWithChildren<{
3
+ dir: 'ltr' | 'rtl';
4
+ }>;
5
+ export declare const DirectionProvider: ComponentType<DirectionProviderProps>;
@@ -0,0 +1,22 @@
1
+ import { type ReactNode } from 'react';
2
+ export type FileUploadProps = {
3
+ label: ReactNode;
4
+ files: File[];
5
+ onFilesChange: (files: File[]) => void;
6
+ labels: {
7
+ choose: string;
8
+ drop: string;
9
+ remove: (name: string) => string;
10
+ invalidType: (name: string) => string;
11
+ tooLarge: (name: string, maxSize: number) => string;
12
+ tooMany: (maxFiles: number) => string;
13
+ };
14
+ accept?: string;
15
+ multiple?: boolean;
16
+ maxSize?: number;
17
+ maxFiles?: number;
18
+ disabled?: boolean;
19
+ id?: string;
20
+ className?: string;
21
+ };
22
+ export declare function FileUpload({ label, files, onFilesChange, labels, accept, multiple, maxSize, maxFiles, disabled, id, className }: FileUploadProps): import("react").JSX.Element;
package/dist/glow.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ import type { ComponentProps } from 'react';
2
+ export type GlowProps = Omit<ComponentProps<'span'>, 'children'> & {
3
+ paused?: boolean;
4
+ };
5
+ export declare function Glow({ paused, className, ...props }: GlowProps): import("react").JSX.Element;
@@ -0,0 +1,44 @@
1
+ export * from './ui/accordion.js';
2
+ export * from './ui/alert.js';
3
+ export * from './ui/badge.js';
4
+ export * from './ui/breadcrumb.js';
5
+ export * from './ui/button.js';
6
+ export * from './ui/card.js';
7
+ export * from './ui/dialog.js';
8
+ export * from './ui/field.js';
9
+ export * from './ui/input.js';
10
+ export * from './ui/label.js';
11
+ export * from './ui/navigation-menu.js';
12
+ export * from './ui/radio-group.js';
13
+ export * from './ui/select.js';
14
+ export * from './ui/separator.js';
15
+ export * from './ui/sheet.js';
16
+ export * from './ui/skeleton.js';
17
+ export * from './ui/switch.js';
18
+ export * from './ui/tabs.js';
19
+ export * from './ui/textarea.js';
20
+ export * from './brand.js';
21
+ export * from './media-card.js';
22
+ export * from './contact-card.js';
23
+ export * from './theme-toggle.js';
24
+ export * from './comment-feed.js';
25
+ export * from './direction-provider.js';
26
+ export * from './date-field.js';
27
+ export * from './url-field.js';
28
+ export * from './window.js';
29
+ export * from './ui/checkbox.js';
30
+ export * from './ui/dropdown-menu.js';
31
+ export * from './ui/tooltip.js';
32
+ export * from './ui/popover.js';
33
+ export * from './ui/toast.js';
34
+ export * from './ui/progress.js';
35
+ export * from './ui/table.js';
36
+ export * from './combobox.js';
37
+ export * from './pagination.js';
38
+ export * from './file-upload.js';
39
+ export * from './typography.js';
40
+ export * from './loader.js';
41
+ export * from './shimmer.js';
42
+ export * from './animated-text.js';
43
+ export * from './glow.js';
44
+ export * from './snackbar.js';