@vjdesigns/vjdesigns-ui 3.8.4 → 3.9.1

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 (83) hide show
  1. package/CHANGELOG.md +239 -234
  2. package/README.md +872 -858
  3. package/dist/ai/llms-full.txt +669 -592
  4. package/dist/ai/llms.txt +2 -1
  5. package/dist/ai/registry.json +243 -36
  6. package/dist/components/primitives/Icon/AccessibilityIcon.cjs.js +1 -0
  7. package/dist/components/primitives/Icon/AccessibilityIcon.d.ts +130 -0
  8. package/dist/components/primitives/Icon/AccessibilityIcon.mjs +27 -0
  9. package/dist/components/primitives/Icon/Icon.module.css.cjs.js +1 -1
  10. package/dist/components/primitives/Icon/Icon.module.css.mjs +4 -3
  11. package/dist/components/primitives/Icon/accessibilityIconPaths.cjs.js +1 -0
  12. package/dist/components/primitives/Icon/accessibilityIconPaths.d.ts +103 -0
  13. package/dist/components/primitives/Icon/accessibilityIconPaths.mjs +224 -0
  14. package/dist/components/primitives/Icon/index.d.ts +2 -0
  15. package/dist/i18n/en.cjs.js +1 -1
  16. package/dist/i18n/en.mjs +22 -0
  17. package/dist/i18n/types.d.ts +43 -0
  18. package/dist/index.cjs.js +1 -1
  19. package/dist/index.mjs +111 -109
  20. package/dist/locales/ar.cjs.js +1 -1
  21. package/dist/locales/ar.mjs +22 -0
  22. package/dist/locales/bn.cjs.js +1 -1
  23. package/dist/locales/bn.mjs +22 -0
  24. package/dist/locales/cs.cjs.js +1 -1
  25. package/dist/locales/cs.mjs +22 -0
  26. package/dist/locales/da.cjs.js +1 -1
  27. package/dist/locales/da.mjs +22 -0
  28. package/dist/locales/de.cjs.js +1 -1
  29. package/dist/locales/de.mjs +22 -0
  30. package/dist/locales/el.cjs.js +1 -1
  31. package/dist/locales/el.mjs +22 -0
  32. package/dist/locales/es.cjs.js +1 -1
  33. package/dist/locales/es.mjs +22 -0
  34. package/dist/locales/fa.cjs.js +1 -1
  35. package/dist/locales/fa.mjs +22 -0
  36. package/dist/locales/fi.cjs.js +1 -1
  37. package/dist/locales/fi.mjs +22 -0
  38. package/dist/locales/fr.cjs.js +1 -1
  39. package/dist/locales/fr.mjs +22 -0
  40. package/dist/locales/he.cjs.js +1 -1
  41. package/dist/locales/he.mjs +22 -0
  42. package/dist/locales/hi.cjs.js +1 -1
  43. package/dist/locales/hi.mjs +22 -0
  44. package/dist/locales/hu.cjs.js +1 -1
  45. package/dist/locales/hu.mjs +22 -0
  46. package/dist/locales/id.cjs.js +1 -1
  47. package/dist/locales/id.mjs +22 -0
  48. package/dist/locales/it.cjs.js +1 -1
  49. package/dist/locales/it.mjs +22 -0
  50. package/dist/locales/ja.cjs.js +1 -1
  51. package/dist/locales/ja.mjs +22 -0
  52. package/dist/locales/ko.cjs.js +1 -1
  53. package/dist/locales/ko.mjs +22 -0
  54. package/dist/locales/nb.cjs.js +1 -1
  55. package/dist/locales/nb.mjs +22 -0
  56. package/dist/locales/nl.cjs.js +1 -1
  57. package/dist/locales/nl.mjs +22 -0
  58. package/dist/locales/pl.cjs.js +1 -1
  59. package/dist/locales/pl.mjs +22 -0
  60. package/dist/locales/pt-BR.cjs.js +1 -1
  61. package/dist/locales/pt-BR.mjs +22 -0
  62. package/dist/locales/ro.cjs.js +1 -1
  63. package/dist/locales/ro.mjs +22 -0
  64. package/dist/locales/ru.cjs.js +1 -1
  65. package/dist/locales/ru.mjs +22 -0
  66. package/dist/locales/sv.cjs.js +1 -1
  67. package/dist/locales/sv.mjs +22 -0
  68. package/dist/locales/th.cjs.js +1 -1
  69. package/dist/locales/th.mjs +22 -0
  70. package/dist/locales/tr.cjs.js +1 -1
  71. package/dist/locales/tr.mjs +22 -0
  72. package/dist/locales/uk.cjs.js +1 -1
  73. package/dist/locales/uk.mjs +22 -0
  74. package/dist/locales/ur.cjs.js +1 -1
  75. package/dist/locales/ur.mjs +22 -0
  76. package/dist/locales/vi.cjs.js +1 -1
  77. package/dist/locales/vi.mjs +22 -0
  78. package/dist/locales/zh-Hans.cjs.js +1 -1
  79. package/dist/locales/zh-Hans.mjs +22 -0
  80. package/dist/locales/zh-Hant.cjs.js +1 -1
  81. package/dist/locales/zh-Hant.mjs +22 -0
  82. package/dist/vjdesigns-ui.css +1 -1
  83. package/package.json +2 -2
package/dist/ai/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # @vjdesigns/vjdesigns-ui
2
2
 
3
- > Accessible React 19 component library: WCAG 2.2 AA verified (axe on every story, a contrast check on every color pair), 31 languages with right-to-left support, themeable with any brand color (auto-adjusted to stay accessible), tree-shakable, no runtime dependencies besides React.
3
+ > Accessible React 19 component library: built to WCAG 2.2 AA and tested on every release (axe on every story, a contrast check on every color pair), 32 languages with right-to-left support, themeable with any brand color (auto-adjusted to stay accessible), tree-shakable, no runtime dependencies besides React.
4
4
 
5
5
  - Install: `npm install @vjdesigns/vjdesigns-ui` (peer: react, react-dom 19).
6
6
  - Import the stylesheet once: `import "@vjdesigns/vjdesigns-ui/dist/vjdesigns-ui.css";`
@@ -145,6 +145,7 @@
145
145
 
146
146
  ## Primitives
147
147
 
148
+ - [AccessibilityIcon](llms-full.txt#accessibilityicon): Icons for accessibility features and services: wheelchair access, audio description and transcripts, hearing loops, sign language, display settings, and alternative input.
148
149
  - [Button](llms-full.txt#button): The library's primary action control.
149
150
  - [ButtonGroup](llms-full.txt#buttongroup): Groups related buttons (`role="group"`).
150
151
  - [CopyButton](llms-full.txt#copybutton): A button that copies text to the clipboard and confirms it: the icon turns into a check and the label into "Copied", and the result is announced to screen readers through a polite live region (a label change on a focused button isn't reliably read).
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vjdesigns/vjdesigns-ui",
3
- "version": "3.8.4",
4
- "summary": "Accessible React 19 component library: WCAG 2.2 AA verified (axe on every story, a contrast check on every color pair), 31 languages with right-to-left support, themeable with any brand color (auto-adjusted to stay accessible), tree-shakable, no runtime dependencies besides React.",
3
+ "version": "3.9.1",
4
+ "summary": "Accessible React 19 component library: built to WCAG 2.2 AA and tested on every release (axe on every story, a contrast check on every color pair), 32 languages with right-to-left support, themeable with any brand color (auto-adjusted to stay accessible), tree-shakable, no runtime dependencies besides React.",
5
5
  "install": "npm install @vjdesigns/vjdesigns-ui",
6
6
  "stylesheet": "@vjdesigns/vjdesigns-ui/dist/vjdesigns-ui.css",
7
7
  "essentials": [
@@ -17,27 +17,27 @@
17
17
  {
18
18
  "id": "setup",
19
19
  "title": "Installation",
20
- "markdown": "Install the package along with React and React DOM. The library requires **React 19**, which the components need in order to render:\n\n```bash\nnpm install @vjdesigns/vjdesigns-ui react react-dom\n```\n\nIf your project already uses React, you only need the first package:\n\n```bash\nnpm install @vjdesigns/vjdesigns-ui\n```\n\n### Browser support\n\nThe components support the current and previous major versions of evergreen browsers, with these minimums:\n\n| Browser | Minimum version |\n| --- | --- |\n| Chrome, Edge, and other Chromium browsers | 111 |\n| Firefox | 121 |\n| Safari (macOS and iOS) | 16.2 |\n\nThese are set by the CSS the components rely on: `color-mix()`, container queries, `:has()` (which draws some keyboard focus rings), and the `inert` attribute. Internet Explorer and legacy (non-Chromium) Edge aren't supported.\n\nA few newer features are used only where available, with a fallback elsewhere: `field-sizing` for auto-growing `Textarea` (measured in JavaScript otherwise), the `scrollend` event in `Carousel`, and `hidden=\"until-found\"` for find-in-page in `Accordion` and `Collapsible`.\n\n### Import the styles\n\nThe component styles and shared design tokens ship as a separate stylesheet. Import it **once** at your app's entry point, or the components will render unstyled.\n\n**React:** in `main.tsx` (or `App.tsx`)\n\n```ts\nimport \"@vjdesigns/vjdesigns-ui/dist/vjdesigns-ui.css\";\n```\n\n**Angular:** add it to the `styles` array in `angular.json`\n\n```json\n\"styles\": [\n \"node_modules/@vjdesigns/vjdesigns-ui/dist/vjdesigns-ui.css\",\n \"src/styles.css\"\n]\n```\n\n**Vue:** in `main.ts`\n\n```ts\nimport \"@vjdesigns/vjdesigns-ui/dist/vjdesigns-ui.css\";\n```"
20
+ "markdown": "Install the package along with React and React DOM. The library requires **React 19**, which the components need in order to render:\r\n\r\n```bash\r\nnpm install @vjdesigns/vjdesigns-ui react react-dom\r\n```\r\n\r\nIf your project already uses React, you only need the first package:\r\n\r\n```bash\r\nnpm install @vjdesigns/vjdesigns-ui\r\n```\r\n\r\n### Browser support\r\n\r\nThe components support the current and previous major versions of evergreen browsers, with these minimums:\r\n\r\n| Browser | Minimum version |\r\n| --- | --- |\r\n| Chrome, Edge, and other Chromium browsers | 111 |\r\n| Firefox | 121 |\r\n| Safari (macOS and iOS) | 16.2 |\r\n\r\nThese are set by the CSS the components rely on: `color-mix()`, container queries, `:has()` (which draws some keyboard focus rings), and the `inert` attribute. Internet Explorer and legacy (non-Chromium) Edge aren't supported.\r\n\r\nA few newer features are used only where available, with a fallback elsewhere: `field-sizing` for auto-growing `Textarea` (measured in JavaScript otherwise), the `scrollend` event in `Carousel`, and `hidden=\"until-found\"` for find-in-page in `Accordion` and `Collapsible`.\r\n\r\n### Import the styles\r\n\r\nThe component styles and shared design tokens ship as a separate stylesheet. Import it **once** at your app's entry point, or the components will render unstyled.\r\n\r\n**React:** in `main.tsx` (or `App.tsx`)\r\n\r\n```ts\r\nimport \"@vjdesigns/vjdesigns-ui/dist/vjdesigns-ui.css\";\r\n```\r\n\r\n**Angular:** add it to the `styles` array in `angular.json`\r\n\r\n```json\r\n\"styles\": [\r\n \"node_modules/@vjdesigns/vjdesigns-ui/dist/vjdesigns-ui.css\",\r\n \"src/styles.css\"\r\n]\r\n```\r\n\r\n**Vue:** in `main.ts`\r\n\r\n```ts\r\nimport \"@vjdesigns/vjdesigns-ui/dist/vjdesigns-ui.css\";\r\n```"
21
21
  },
22
22
  {
23
23
  "id": "usage",
24
24
  "title": "Usage",
25
- "markdown": "The components are built with React. You can use them directly in a React project. In Angular or Vue, you mount them inside a small wrapper component, as shown below.\n\n### React\n\n```tsx\nimport { useState } from \"react\";\nimport { Button, CheckBox } from \"@vjdesigns/vjdesigns-ui\";\n\nexport function SignupForm() {\n const [accepted, setAccepted] = useState(false);\n\n return (\n <form>\n <CheckBox\n label=\"Accept terms\"\n checked={accepted}\n onCheckedChange={setAccepted}\n />\n <Button\n variant=\"solid\"\n tone=\"primary\"\n size=\"md\"\n disabled={!accepted}\n onClick={() => console.log(\"Submitted\")}\n >\n Submit\n </Button>\n </form>\n );\n}\n```\n\n### Next.js (App Router) and React Server Components\n\nThe library works in Server Components. Interactive components (anything with state, effects, or context: `Button`, `DataGrid`, `Modal`, ...) are marked `\"use client\"`, so you can render them from a Server Component like any client component. Utilities (`cx`, `sortRows`, `createBrandPalette`, `getLocaleDirection`, ...) and the locale catalogs have no directive, so you can call or read them on the server too. Every component also renders on the server for the first paint.\n\nPut the providers in a small client file of your own, and render it from the root layout:\n\n```tsx\n// app/providers.tsx\n\"use client\";\nimport { LocaleProvider, ToastProvider } from \"@vjdesigns/vjdesigns-ui\";\nimport es from \"@vjdesigns/vjdesigns-ui/locales/es\";\nimport type { ReactNode } from \"react\";\n\nexport function Providers({ children }: { children: ReactNode }) {\n return (\n <LocaleProvider locale=\"es\" messages={es}>\n <ToastProvider>{children}</ToastProvider>\n </LocaleProvider>\n );\n}\n```\n\n```tsx\n// app/layout.tsx (a Server Component)\nimport \"@vjdesigns/vjdesigns-ui/dist/vjdesigns-ui.css\";\nimport { getLocaleDirection } from \"@vjdesigns/vjdesigns-ui\";\nimport { Providers } from \"./providers\";\n\nexport default function RootLayout({ children }: { children: React.ReactNode }) {\n return (\n <html lang=\"es\" dir={getLocaleDirection(\"es\")}>\n <body>\n <Providers>{children}</Providers>\n </body>\n </html>\n );\n}\n```\n\nTwo rules of Server Components to keep in mind:\n\n- **Functions can't be passed from a Server Component to a client one.** That includes event handlers (`onClick`), DataGrid columns with `cell` or `value` functions, and the locale catalogs themselves (their plural messages are functions, which is why `LocaleProvider` goes in the client providers file above). Render those components from your own `\"use client\"` file.\n- **Compound parts can't be reached with a dot from a Server Component** (`Tabs.List`, `Menu.Item`): Next.js reports \"You cannot dot into a client module\". Use them inside a `\"use client\"` file, or use the named exports where they exist (`CardHeader`, `CardBody`, `NavbarBrand`, ...).\n\n### Angular\n\nMake a standalone wrapper that renders the React component into its host element. The wrapper uses `createElement`, so you don't need to change your JSX or TSX settings.\n\n```ts\n// vj-button.component.ts\nimport {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n Output,\n ViewChild,\n} from \"@angular/core\";\nimport { createElement, type MouseEvent as ReactMouseEvent, type ReactElement } from \"react\";\nimport { createRoot, Root } from \"react-dom/client\";\nimport {\n Button,\n type ButtonProps,\n type ButtonVariant,\n type Size,\n type Tone,\n} from \"@vjdesigns/vjdesigns-ui\";\n\n// Button has overloaded types (for `href` and `as`). Narrowing it here lets createElement type-check.\nconst ReactButton = Button as (props: ButtonProps) => ReactElement;\n\n@Component({\n selector: \"vj-button\",\n standalone: true,\n template: `<span #host></span>`,\n})\nexport class VjButtonComponent implements AfterViewInit, OnChanges, OnDestroy {\n @ViewChild(\"host\", { static: true }) host!: ElementRef<HTMLElement>;\n\n @Input() label = \"\";\n @Input() variant: ButtonVariant = \"solid\";\n @Input() tone: Tone = \"primary\";\n @Input() size: Size = \"md\";\n @Input() disabled = false;\n @Output() clicked = new EventEmitter<MouseEvent>();\n\n private root?: Root;\n\n ngAfterViewInit() {\n this.root = createRoot(this.host.nativeElement);\n this.render();\n }\n\n ngOnChanges() {\n this.render();\n }\n\n ngOnDestroy() {\n this.root?.unmount();\n }\n\n private render() {\n this.root?.render(\n createElement(\n ReactButton,\n {\n variant: this.variant,\n tone: this.tone,\n size: this.size,\n disabled: this.disabled,\n onClick: (event: ReactMouseEvent) => this.clicked.emit(event.nativeEvent),\n },\n this.label // the button's text is passed as children\n )\n );\n }\n}\n```\n\nImport the wrapper wherever you need it:\n\n```ts\n// app.component.ts\nimport { Component } from \"@angular/core\";\nimport { VjButtonComponent } from \"./vj-button.component\";\n\n@Component({\n selector: \"app-root\",\n standalone: true,\n imports: [VjButtonComponent],\n template: `<vj-button label=\"Submit\" tone=\"primary\" (clicked)=\"onSubmit()\" />`,\n})\nexport class AppComponent {\n onSubmit() {\n console.log(\"Submitted\");\n }\n}\n```\n\n### Vue 3\n\nMake a wrapper component that mounts the React component when it loads and re-renders it whenever its props change.\n\n```vue\n<!-- VjButton.vue -->\n<script setup lang=\"ts\">\nimport { onBeforeUnmount, onMounted, ref, watch } from \"vue\";\nimport { createElement, type MouseEvent as ReactMouseEvent, type ReactElement } from \"react\";\nimport { createRoot, type Root } from \"react-dom/client\";\nimport {\n Button,\n type ButtonProps,\n type ButtonVariant,\n type Size,\n type Tone,\n} from \"@vjdesigns/vjdesigns-ui\";\n\n// Button has overloaded types (for `href` and `as`). Narrowing it here lets createElement type-check.\nconst ReactButton = Button as (props: ButtonProps) => ReactElement;\n\nconst props = withDefaults(\n defineProps<{\n label: string;\n variant?: ButtonVariant;\n tone?: Tone;\n size?: Size;\n disabled?: boolean;\n }>(),\n { variant: \"solid\", tone: \"primary\", size: \"md\", disabled: false }\n);\n\nconst emit = defineEmits<{ click: [event: MouseEvent] }>();\n\nconst host = ref<HTMLElement | null>(null);\nlet root: Root | undefined;\n\nfunction render() {\n root?.render(\n createElement(\n ReactButton,\n {\n variant: props.variant,\n tone: props.tone,\n size: props.size,\n disabled: props.disabled,\n onClick: (event: ReactMouseEvent) => emit(\"click\", event.nativeEvent),\n },\n props.label // the button's text is passed as children\n )\n );\n}\n\nonMounted(() => {\n root = createRoot(host.value!);\n render();\n});\n\nwatch(() => ({ ...props }), render);\n\nonBeforeUnmount(() => root?.unmount());\n</script>\n\n<template>\n <span ref=\"host\" />\n</template>\n```\n\nUse it like any other Vue component:\n\n```vue\n<script setup lang=\"ts\">\nimport VjButton from \"./VjButton.vue\";\n\nconst onSubmit = () => console.log(\"Submitted\");\n</script>\n\n<template>\n <VjButton label=\"Submit\" tone=\"primary\" @click=\"onSubmit\" />\n</template>\n```\n\n> **Tip:** Wrap `CheckBox` and any other component the same way. Pass its props into `createElement`, and send its callbacks back out as Angular outputs or Vue emits. For `CheckBox`, that means sending `onCheckedChange` back out."
25
+ "markdown": "The components are built with React. You can use them directly in a React project. In Angular or Vue, you mount them inside a small wrapper component, as shown below.\r\n\r\n### React\r\n\r\n```tsx\r\nimport { useState } from \"react\";\r\nimport { Button, CheckBox } from \"@vjdesigns/vjdesigns-ui\";\r\n\r\nexport function SignupForm() {\r\n const [accepted, setAccepted] = useState(false);\r\n\r\n return (\r\n <form>\r\n <CheckBox\r\n label=\"Accept terms\"\r\n checked={accepted}\r\n onCheckedChange={setAccepted}\r\n />\r\n <Button\r\n variant=\"solid\"\r\n tone=\"primary\"\r\n size=\"md\"\r\n disabled={!accepted}\r\n onClick={() => console.log(\"Submitted\")}\r\n >\r\n Submit\r\n </Button>\r\n </form>\r\n );\r\n}\r\n```\r\n\r\n### Next.js (App Router) and React Server Components\r\n\r\nThe library works in Server Components. Interactive components (anything with state, effects, or context: `Button`, `DataGrid`, `Modal`, ...) are marked `\"use client\"`, so you can render them from a Server Component like any client component. Utilities (`cx`, `sortRows`, `createBrandPalette`, `getLocaleDirection`, ...) and the locale catalogs have no directive, so you can call or read them on the server too. Every component also renders on the server for the first paint.\r\n\r\nPut the providers in a small client file of your own, and render it from the root layout:\r\n\r\n```tsx\r\n// app/providers.tsx\r\n\"use client\";\r\nimport { LocaleProvider, ToastProvider } from \"@vjdesigns/vjdesigns-ui\";\r\nimport es from \"@vjdesigns/vjdesigns-ui/locales/es\";\r\nimport type { ReactNode } from \"react\";\r\n\r\nexport function Providers({ children }: { children: ReactNode }) {\r\n return (\r\n <LocaleProvider locale=\"es\" messages={es}>\r\n <ToastProvider>{children}</ToastProvider>\r\n </LocaleProvider>\r\n );\r\n}\r\n```\r\n\r\n```tsx\r\n// app/layout.tsx (a Server Component)\r\nimport \"@vjdesigns/vjdesigns-ui/dist/vjdesigns-ui.css\";\r\nimport { getLocaleDirection } from \"@vjdesigns/vjdesigns-ui\";\r\nimport { Providers } from \"./providers\";\r\n\r\nexport default function RootLayout({ children }: { children: React.ReactNode }) {\r\n return (\r\n <html lang=\"es\" dir={getLocaleDirection(\"es\")}>\r\n <body>\r\n <Providers>{children}</Providers>\r\n </body>\r\n </html>\r\n );\r\n}\r\n```\r\n\r\nTwo rules of Server Components to keep in mind:\r\n\r\n- **Functions can't be passed from a Server Component to a client one.** That includes event handlers (`onClick`), DataGrid columns with `cell` or `value` functions, and the locale catalogs themselves (their plural messages are functions, which is why `LocaleProvider` goes in the client providers file above). Render those components from your own `\"use client\"` file.\r\n- **Compound parts can't be reached with a dot from a Server Component** (`Tabs.List`, `Menu.Item`): Next.js reports \"You cannot dot into a client module\". Use them inside a `\"use client\"` file, or use the named exports where they exist (`CardHeader`, `CardBody`, `NavbarBrand`, ...).\r\n\r\n### Angular\r\n\r\nMake a standalone wrapper that renders the React component into its host element. The wrapper uses `createElement`, so you don't need to change your JSX or TSX settings.\r\n\r\n```ts\r\n// vj-button.component.ts\r\nimport {\r\n AfterViewInit,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n Output,\r\n ViewChild,\r\n} from \"@angular/core\";\r\nimport { createElement, type MouseEvent as ReactMouseEvent, type ReactElement } from \"react\";\r\nimport { createRoot, Root } from \"react-dom/client\";\r\nimport {\r\n Button,\r\n type ButtonProps,\r\n type ButtonVariant,\r\n type Size,\r\n type Tone,\r\n} from \"@vjdesigns/vjdesigns-ui\";\r\n\r\n// Button has overloaded types (for `href` and `as`). Narrowing it here lets createElement type-check.\r\nconst ReactButton = Button as (props: ButtonProps) => ReactElement;\r\n\r\n@Component({\r\n selector: \"vj-button\",\r\n standalone: true,\r\n template: `<span #host></span>`,\r\n})\r\nexport class VjButtonComponent implements AfterViewInit, OnChanges, OnDestroy {\r\n @ViewChild(\"host\", { static: true }) host!: ElementRef<HTMLElement>;\r\n\r\n @Input() label = \"\";\r\n @Input() variant: ButtonVariant = \"solid\";\r\n @Input() tone: Tone = \"primary\";\r\n @Input() size: Size = \"md\";\r\n @Input() disabled = false;\r\n @Output() clicked = new EventEmitter<MouseEvent>();\r\n\r\n private root?: Root;\r\n\r\n ngAfterViewInit() {\r\n this.root = createRoot(this.host.nativeElement);\r\n this.render();\r\n }\r\n\r\n ngOnChanges() {\r\n this.render();\r\n }\r\n\r\n ngOnDestroy() {\r\n this.root?.unmount();\r\n }\r\n\r\n private render() {\r\n this.root?.render(\r\n createElement(\r\n ReactButton,\r\n {\r\n variant: this.variant,\r\n tone: this.tone,\r\n size: this.size,\r\n disabled: this.disabled,\r\n onClick: (event: ReactMouseEvent) => this.clicked.emit(event.nativeEvent),\r\n },\r\n this.label // the button's text is passed as children\r\n )\r\n );\r\n }\r\n}\r\n```\r\n\r\nImport the wrapper wherever you need it:\r\n\r\n```ts\r\n// app.component.ts\r\nimport { Component } from \"@angular/core\";\r\nimport { VjButtonComponent } from \"./vj-button.component\";\r\n\r\n@Component({\r\n selector: \"app-root\",\r\n standalone: true,\r\n imports: [VjButtonComponent],\r\n template: `<vj-button label=\"Submit\" tone=\"primary\" (clicked)=\"onSubmit()\" />`,\r\n})\r\nexport class AppComponent {\r\n onSubmit() {\r\n console.log(\"Submitted\");\r\n }\r\n}\r\n```\r\n\r\n### Vue 3\r\n\r\nMake a wrapper component that mounts the React component when it loads and re-renders it whenever its props change.\r\n\r\n```vue\r\n<!-- VjButton.vue -->\r\n<script setup lang=\"ts\">\r\nimport { onBeforeUnmount, onMounted, ref, watch } from \"vue\";\r\nimport { createElement, type MouseEvent as ReactMouseEvent, type ReactElement } from \"react\";\r\nimport { createRoot, type Root } from \"react-dom/client\";\r\nimport {\r\n Button,\r\n type ButtonProps,\r\n type ButtonVariant,\r\n type Size,\r\n type Tone,\r\n} from \"@vjdesigns/vjdesigns-ui\";\r\n\r\n// Button has overloaded types (for `href` and `as`). Narrowing it here lets createElement type-check.\r\nconst ReactButton = Button as (props: ButtonProps) => ReactElement;\r\n\r\nconst props = withDefaults(\r\n defineProps<{\r\n label: string;\r\n variant?: ButtonVariant;\r\n tone?: Tone;\r\n size?: Size;\r\n disabled?: boolean;\r\n }>(),\r\n { variant: \"solid\", tone: \"primary\", size: \"md\", disabled: false }\r\n);\r\n\r\nconst emit = defineEmits<{ click: [event: MouseEvent] }>();\r\n\r\nconst host = ref<HTMLElement | null>(null);\r\nlet root: Root | undefined;\r\n\r\nfunction render() {\r\n root?.render(\r\n createElement(\r\n ReactButton,\r\n {\r\n variant: props.variant,\r\n tone: props.tone,\r\n size: props.size,\r\n disabled: props.disabled,\r\n onClick: (event: ReactMouseEvent) => emit(\"click\", event.nativeEvent),\r\n },\r\n props.label // the button's text is passed as children\r\n )\r\n );\r\n}\r\n\r\nonMounted(() => {\r\n root = createRoot(host.value!);\r\n render();\r\n});\r\n\r\nwatch(() => ({ ...props }), render);\r\n\r\nonBeforeUnmount(() => root?.unmount());\r\n</script>\r\n\r\n<template>\r\n <span ref=\"host\" />\r\n</template>\r\n```\r\n\r\nUse it like any other Vue component:\r\n\r\n```vue\r\n<script setup lang=\"ts\">\r\nimport VjButton from \"./VjButton.vue\";\r\n\r\nconst onSubmit = () => console.log(\"Submitted\");\r\n</script>\r\n\r\n<template>\r\n <VjButton label=\"Submit\" tone=\"primary\" @click=\"onSubmit\" />\r\n</template>\r\n```\r\n\r\n> **Tip:** Wrap `CheckBox` and any other component the same way. Pass its props into `createElement`, and send its callbacks back out as Angular outputs or Vue emits. For `CheckBox`, that means sending `onCheckedChange` back out."
26
26
  },
27
27
  {
28
28
  "id": "theming",
29
29
  "title": "Theming",
30
- "markdown": "Wrap any part of your app in `Theme` to set the color mode, brand palette, and accent for everything inside it:\n\n```tsx\nimport { Theme, Button } from \"@vjdesigns/vjdesigns-ui\";\n\n<Theme mode=\"dark\" brand=\"purple\" fill>\n <Button>Dark, purple button</Button>\n</Theme>\n```\n\n| Prop | Type | Default | Description |\n| --- | --- | --- | --- |\n| `mode` | `\"light\" \\| \"dark\"` | inherited | Color mode for everything inside. |\n| `brand` | `\"black\" \\| \"blue\" \\| \"gold\" \\| \"green\" \\| \"purple\"`, a hex color, or `{ light, dark }` | inherited | Brand palette for buttons, links, focus rings and indicators. |\n| `accent` | `\"brand\" | \"lime\"`, a hex color, or `{ light, dark }` | inherited (the brand's own) | The bright highlight on badges, switches, progress bars, sliders, steppers, and active navigation. |\n| `fill` | `boolean` | `false` | Paints the theme's background and text color on the wrapper. |\n\nOutside React (or to theme the whole page), set the attributes on `<html>` instead:\n\n```html\n<html data-theme=\"dark\" data-brand=\"purple\" data-accent=\"lime\">\n```\n\n### Accent color\n\nThe accent is the energetic highlight: badges, switches, progress bars, sliders, steppers, and the active link in the Navbar. By default it follows the brand, as a bright shade of the brand's own color, so it always fits:\n\n| Brand | Default accent |\n| --- | --- |\n| `blue` (default) | sky blue `#76c7ff` |\n| `purple` | lavender `#c0b0ff` |\n| `gold` | amber `#f5ad5f` |\n| `green` | mint `#72d4ad` |\n| `black` | lime `#c8f031` (black has no hue to build on) |\n| a custom hex | generated from that color |\n\nTo choose a different one:\n\n```tsx\n<Theme accent=\"lime\">…</Theme> // the original bright yellow-green (\"volt\", its former name, still works)\n<Theme accent=\"#ff6b00\">…</Theme> // any color\n<Theme accent=\"brand\">…</Theme> // back to the brand's own, inside an area with another accent\n```\n\nAccents always carry dark text. A color too dark for that is lightened (same hue) just enough to meet WCAG AA, with a warning in development. An accent you set also holds inside nested brands. In CSS, `accentCss(\"name\", \"#ff6b00\")` generates a `[data-accent=\"name\"]` rule, like `brandCss` below.\n\n### Custom brand colors\n\nPass any hex color as `brand` and a full palette is generated for both modes:\n\n```tsx\n<Theme brand=\"#e11d48\">…</Theme>\n<Theme brand={{ light: \"#4338ca\", dark: \"#f472b6\" }}>…</Theme>\n```\n\nEvery generated palette meets WCAG 2.2 AA. A single color is used exactly as given in the mode where it has enough contrast (dark colors in light mode, light colors in dark mode), and the other mode gets a matching shade of the same hue. If a color doesn't have enough contrast (for example, a mid-tone that fails in both modes), its lightness is shifted just enough to pass, and a warning is logged in development.\n\nTo define a brand in CSS instead (for the whole page, applied before any JavaScript runs), generate a stylesheet rule with `brandCss`:\n\n```ts\nimport { brandCss } from \"@vjdesigns/vjdesigns-ui\";\n\nbrandCss(\"acme\", \"#e11d48\"); // '[data-brand=\"acme\"] { --brand-light-primary: … }'\n```\n\nAdd the rule to your stylesheet and use `<html data-brand=\"acme\">`. `createBrandPalette(color)` returns the generated colors as an object, if you need them directly.\n\n### Tailwind CSS\n\nA Tailwind CSS v4 preset turns the design tokens into utilities, so your own layouts match the components. Import it after Tailwind in your CSS, and keep importing the library's stylesheet as usual:\n\n```css\n@import \"tailwindcss\";\n@import \"@vjdesigns/vjdesigns-ui/tailwind.css\";\n```\n\n```tsx\n<section className=\"bg-surface text-text rounded-xl shadow-md p-6\">\n <h2 className=\"font-display text-2xl tracking-tight\">Season stats</h2>\n <p className=\"text-text-muted\">Updated after every game.</p>\n <span className=\"bg-accent text-on-accent rounded-control px-3\">New</span>\n</section>\n```\n\nEvery utility points at a token (`bg-primary` is `var(--color-primary)`), so Tailwind classes follow `Theme`, `data-theme`, `data-brand`, and `data-accent` exactly like the components, with no `dark:` variants needed.\n\n| Group | Utilities |\n| --- | --- |\n| Colors | `bg-`, `text-`, `border-`, `ring-`, … with `bg`, `surface` (`-raised`, `-sunken`, `-hover`, `-active`), `overlay`, `text` (`-muted`, `-disabled`, `-inverse`), `border` (`-strong`, `-input`), `focus-ring`, `link-visited`; and for `primary`, `accent`, `success`, `warning`, `danger`, `info`, `neutral`: the solid color, `-hover`, `-active`, `on-…` (text on the solid), `-subtle`, `-subtle-hover`, `-subtle-text`, `-border`. Opacity modifiers work (`bg-primary/50`). |\n| Charts | `bg-chart-1` to `bg-chart-8`, for fills only, in that order. Slots 3 to 5 are under 3:1 on white, so pair them with a legend, labels, or a data table. |\n| Type | `font-display` (headings, buttons, labels, numbers), `font-body`, `font-mono`; `text-xs` to `text-6xl` (plus `text-md`); `font-regular` to `font-black`; `leading-tight`, `-snug`, `-normal`, `-relaxed`; `tracking-tight`, `-normal`, `-wide`, `-caps` |\n| Shape | `rounded-control` (pill controls), `rounded-field` (text fields), `rounded-xs` to `rounded-2xl`, `rounded-pill` |\n| Depth | `shadow-xs` to `shadow-xl`, `blur-sm`, `blur-lg` |\n| Motion | `ease-spring` (enter and press), `ease-standard`, `ease-in`, `ease-out`; `duration-instant`, `-fast`, `-normal`, `-slow` (0ms under reduced motion) |\n| Sizes | `h-control-sm`, `-md`, `-lg` (and `w-`, `min-h-`, …), `size-target` (the 24px minimum pointer target), `max-w-xs` to `max-w-2xl` and `@xs:` to `@2xl:` container queries |\n| Layers | `z-sticky`, `z-overlay`, `z-modal`, `z-popover`, `z-dropdown`, `z-toast`, `z-tooltip` |\n| Dark mode | `dark:` follows `data-theme=\"dark\"`, not the OS setting. |\n\nTailwind's numeric spacing (`p-4` = 1rem) already matches the 4px token scale, and the breakpoints (`sm:` to `2xl:`) are the same as Tailwind's.\n\nSome Tailwind names change meaning with the preset: `rounded-*`, `shadow-*`, `blur-sm`/`-lg`, `ease-in`/`-out`, `font-mono`, `font-medium` to `font-black`, `leading-*`, and the `text-*` sizes take the library's values (for example, `rounded-md` is 12px and `font-black` is 800). So do the containers: `max-w-md` and `@md:` are 48rem, not Tailwind's 28rem. The library's stylesheet already gives some of these names its own values once it's loaded, even without the preset; the preset keeps the utilities and the container queries consistent.\n\nFor text contrast, use the pairs the components use: `text-text` or `text-text-muted` on `bg-bg`, `bg-surface`, and the other surfaces; `text-on-primary` on `bg-primary` (likewise `on-accent`, `on-success`, …); `text-primary-subtle-text` on `bg-primary-subtle` (likewise for each tone). These pairs meet WCAG 2.2 AA in both themes and every brand. Don't use accent or chart colors for text.\n\nThe preset doesn't change the components, and Tailwind's preflight (its CSS reset) doesn't override them, whichever stylesheet loads first."
30
+ "markdown": "Wrap any part of your app in `Theme` to set the color mode, brand palette, and accent for everything inside it:\r\n\r\n```tsx\r\nimport { Theme, Button } from \"@vjdesigns/vjdesigns-ui\";\r\n\r\n<Theme mode=\"dark\" brand=\"purple\" fill>\r\n <Button>Dark, purple button</Button>\r\n</Theme>\r\n```\r\n\r\n| Prop | Type | Default | Description |\r\n| --- | --- | --- | --- |\r\n| `mode` | `\"light\" \\| \"dark\"` | inherited | Color mode for everything inside. |\r\n| `brand` | `\"black\" \\| \"blue\" \\| \"gold\" \\| \"green\" \\| \"purple\"`, a hex color, or `{ light, dark }` | inherited | Brand palette for buttons, links, focus rings and indicators. |\r\n| `accent` | `\"brand\" | \"lime\"`, a hex color, or `{ light, dark }` | inherited (the brand's own) | The bright highlight on badges, switches, progress bars, sliders, steppers, and active navigation. |\r\n| `fill` | `boolean` | `false` | Paints the theme's background and text color on the wrapper. |\r\n\r\nOutside React (or to theme the whole page), set the attributes on `<html>` instead:\r\n\r\n```html\r\n<html data-theme=\"dark\" data-brand=\"purple\" data-accent=\"lime\">\r\n```\r\n\r\n### Accent color\r\n\r\nThe accent is the energetic highlight: badges, switches, progress bars, sliders, steppers, and the active link in the Navbar. By default it follows the brand, as a bright shade of the brand's own color, so it always fits:\r\n\r\n| Brand | Default accent |\r\n| --- | --- |\r\n| `blue` (default) | sky blue `#76c7ff` |\r\n| `purple` | lavender `#c0b0ff` |\r\n| `gold` | amber `#f5ad5f` |\r\n| `green` | mint `#72d4ad` |\r\n| `black` | lime `#c8f031` (black has no hue to build on) |\r\n| a custom hex | generated from that color |\r\n\r\nTo choose a different one:\r\n\r\n```tsx\r\n<Theme accent=\"lime\">…</Theme> // the original bright yellow-green (\"volt\", its former name, still works)\r\n<Theme accent=\"#ff6b00\">…</Theme> // any color\r\n<Theme accent=\"brand\">…</Theme> // back to the brand's own, inside an area with another accent\r\n```\r\n\r\nAccents always carry dark text. A color too dark for that is lightened (same hue) just enough to meet WCAG AA, with a warning in development. An accent you set also holds inside nested brands. In CSS, `accentCss(\"name\", \"#ff6b00\")` generates a `[data-accent=\"name\"]` rule, like `brandCss` below.\r\n\r\n### Custom brand colors\r\n\r\nPass any hex color as `brand` and a full palette is generated for both modes:\r\n\r\n```tsx\r\n<Theme brand=\"#e11d48\">…</Theme>\r\n<Theme brand={{ light: \"#4338ca\", dark: \"#f472b6\" }}>…</Theme>\r\n```\r\n\r\nEvery generated palette meets WCAG 2.2 AA. A single color is used exactly as given in the mode where it has enough contrast (dark colors in light mode, light colors in dark mode), and the other mode gets a matching shade of the same hue. If a color doesn't have enough contrast (for example, a mid-tone that fails in both modes), its lightness is shifted just enough to pass, and a warning is logged in development.\r\n\r\nTo define a brand in CSS instead (for the whole page, applied before any JavaScript runs), generate a stylesheet rule with `brandCss`:\r\n\r\n```ts\r\nimport { brandCss } from \"@vjdesigns/vjdesigns-ui\";\r\n\r\nbrandCss(\"acme\", \"#e11d48\"); // '[data-brand=\"acme\"] { --brand-light-primary: … }'\r\n```\r\n\r\nAdd the rule to your stylesheet and use `<html data-brand=\"acme\">`. `createBrandPalette(color)` returns the generated colors as an object, if you need them directly.\r\n\r\n### Tailwind CSS\r\n\r\nA Tailwind CSS v4 preset turns the design tokens into utilities, so your own layouts match the components. Import it after Tailwind in your CSS, and keep importing the library's stylesheet as usual:\r\n\r\n```css\r\n@import \"tailwindcss\";\r\n@import \"@vjdesigns/vjdesigns-ui/tailwind.css\";\r\n```\r\n\r\n```tsx\r\n<section className=\"bg-surface text-text rounded-xl shadow-md p-6\">\r\n <h2 className=\"font-display text-2xl tracking-tight\">Season stats</h2>\r\n <p className=\"text-text-muted\">Updated after every game.</p>\r\n <span className=\"bg-accent text-on-accent rounded-control px-3\">New</span>\r\n</section>\r\n```\r\n\r\nEvery utility points at a token (`bg-primary` is `var(--color-primary)`), so Tailwind classes follow `Theme`, `data-theme`, `data-brand`, and `data-accent` exactly like the components, with no `dark:` variants needed.\r\n\r\n| Group | Utilities |\r\n| --- | --- |\r\n| Colors | `bg-`, `text-`, `border-`, `ring-`, … with `bg`, `surface` (`-raised`, `-sunken`, `-hover`, `-active`), `overlay`, `text` (`-muted`, `-disabled`, `-inverse`), `border` (`-strong`, `-input`), `focus-ring`, `link-visited`; and for `primary`, `accent`, `success`, `warning`, `danger`, `info`, `neutral`: the solid color, `-hover`, `-active`, `on-…` (text on the solid), `-subtle`, `-subtle-hover`, `-subtle-text`, `-border`. Opacity modifiers work (`bg-primary/50`). |\r\n| Charts | `bg-chart-1` to `bg-chart-8`, for fills only, in that order. Slots 3 to 5 are under 3:1 on white, so pair them with a legend, labels, or a data table. |\r\n| Type | `font-display` (headings, buttons, labels, numbers), `font-body`, `font-mono`; `text-xs` to `text-6xl` (plus `text-md`); `font-regular` to `font-black`; `leading-tight`, `-snug`, `-normal`, `-relaxed`; `tracking-tight`, `-normal`, `-wide`, `-caps` |\r\n| Shape | `rounded-control` (pill controls), `rounded-field` (text fields), `rounded-xs` to `rounded-2xl`, `rounded-pill` |\r\n| Depth | `shadow-xs` to `shadow-xl`, `blur-sm`, `blur-lg` |\r\n| Motion | `ease-spring` (enter and press), `ease-standard`, `ease-in`, `ease-out`; `duration-instant`, `-fast`, `-normal`, `-slow` (0ms under reduced motion) |\r\n| Sizes | `h-control-sm`, `-md`, `-lg` (and `w-`, `min-h-`, …), `size-target` (the 24px minimum pointer target), `max-w-xs` to `max-w-2xl` and `@xs:` to `@2xl:` container queries |\r\n| Layers | `z-sticky`, `z-overlay`, `z-modal`, `z-popover`, `z-dropdown`, `z-toast`, `z-tooltip` |\r\n| Dark mode | `dark:` follows `data-theme=\"dark\"`, not the OS setting. |\r\n\r\nTailwind's numeric spacing (`p-4` = 1rem) already matches the 4px token scale, and the breakpoints (`sm:` to `2xl:`) are the same as Tailwind's.\r\n\r\nSome Tailwind names change meaning with the preset: `rounded-*`, `shadow-*`, `blur-sm`/`-lg`, `ease-in`/`-out`, `font-mono`, `font-medium` to `font-black`, `leading-*`, and the `text-*` sizes take the library's values (for example, `rounded-md` is 12px and `font-black` is 800). So do the containers: `max-w-md` and `@md:` are 48rem, not Tailwind's 28rem. The library's stylesheet already gives some of these names its own values once it's loaded, even without the preset; the preset keeps the utilities and the container queries consistent.\r\n\r\nFor text contrast, use the pairs the components use: `text-text` or `text-text-muted` on `bg-bg`, `bg-surface`, and the other surfaces; `text-on-primary` on `bg-primary` (likewise `on-accent`, `on-success`, …); `text-primary-subtle-text` on `bg-primary-subtle` (likewise for each tone). These pairs meet WCAG 2.2 AA in both themes and every brand. Don't use accent or chart colors for text.\r\n\r\nThe preset doesn't change the components, and Tailwind's preflight (its CSS reset) doesn't override them, whichever stylesheet loads first."
31
31
  },
32
32
  {
33
33
  "id": "languages",
34
34
  "title": "Languages",
35
- "markdown": "Components have built-in text: button names like \"Close\" and \"Next page\", screen-reader announcements like \"3 results available\", validation messages, and date formats. Wrap your app in `LocaleProvider` to show all of it in another language:\n\n```tsx\nimport { LocaleProvider } from \"@vjdesigns/vjdesigns-ui\";\nimport es from \"@vjdesigns/vjdesigns-ui/locales/es\";\n\n<LocaleProvider locale=\"es\" messages={es}>\n <App />\n</LocaleProvider>\n```\n\n`LocaleProvider` sets:\n\n- **Built-in text** for every component, from `messages`.\n- **Dates and numbers** in the locale's format (`23/10/2026`, `1.234,5`), and plurals that follow the language's rules.\n- **Writing direction**: Arabic, Hebrew, Persian, and Urdu get `dir=\"rtl\"`, and layouts and arrow keys mirror.\n- **`lang`** on its wrapper, so screen readers pronounce the text correctly. Popups (menus, dialogs, tooltips) keep the language of the area that opened them.\n\nEach locale is a separate import, so your app only downloads the languages it uses. Without a `LocaleProvider`, components use English text and the browser's date and number format.\n\nThis library only translates its own built-in text. Text your app passes in, like `<Button>Save</Button>`, is your app's content: translate it with your app's i18n library (react-i18next, FormatJS, and so on).\n\n### What gets translated\n\nThe language is never picked automatically from where the user lives or their browser settings. Your app chooses it by rendering a `LocaleProvider`. For example, with `<LocaleProvider locale=\"de\" messages={de}>`:\n\n| | Translated? |\n| --- | --- |\n| Text your app passes in, like `<Button>Save</Button>` | No: your app translates it |\n| Built-in names, like \"Close\", \"Next page\", \"Clear search\" | Yes: \"Schließen\", \"Nächste Seite\", \"Suche löschen\" |\n| Screen-reader announcements, like \"3 results available\" | Yes: \"3 Ergebnisse verfügbar\" |\n| Validation messages, empty states, file-upload prompts | Yes |\n| Dates and numbers | Yes: \"23.10.2026\", \"4,5\" |\n\nTo follow the user's browser language, pass it yourself: `locale={navigator.language}` together with the matching `messages` (see [Switching language at runtime](#switching-language-at-runtime)).\n\n### Bundled languages\n\n`ar` Arabic · `bn` Bengali · `cs` Czech · `da` Danish · `de` German · `el` Greek · `es` Spanish · `fa` Persian · `fi` Finnish · `fr` French · `he` Hebrew · `hi` Hindi · `hu` Hungarian · `id` Indonesian · `it` Italian · `ja` Japanese · `ko` Korean · `nb` Norwegian Bokmål · `nl` Dutch · `pl` Polish · `pt-BR` Portuguese (Brazil) · `ro` Romanian · `ru` Russian · `sv` Swedish · `th` Thai · `tr` Turkish · `uk` Ukrainian · `ur` Urdu · `vi` Vietnamese · `zh-Hans` Chinese (Simplified) · `zh-Hant` Chinese (Traditional), plus English (the default).\n\nThe translations are machine-generated and haven't been reviewed by native speakers yet. If you find a wrong or awkward phrase, override it (below) and report it so the bundled locale can be fixed. (Working on the library itself? See [Translating built-in text](#translating-built-in-text).)\n\n### Changing a few strings\n\nPass only the strings you want to change. Everything else falls back to the outer provider's language (English at the top):\n\n```tsx\n<LocaleProvider locale=\"en-GB\" messages={{ pagination: { next: \"Onwards\" } }}>\n```\n\nProviders nest, so an inner provider can switch the language for one part of the page. Per-component props such as `clearLabel` or `labels` still win over the provider.\n\n### Other languages\n\nFor a language that isn't bundled, write a complete messages object. TypeScript flags any missing string. Use English as the template:\n\n```ts\nimport { en, plural, type Messages } from \"@vjdesigns/vjdesigns-ui\";\n\nconst p = plural(\"sw\");\nexport const sw: Messages = {\n ...en,\n pagination: { ...en.pagination, next: \"Ukurasa unaofuata\", previous: \"Ukurasa uliopita\" },\n searchInput: {\n ...en.searchInput,\n results: (count) => p(count, { \"=0\": \"Hakuna matokeo\", one: \"Tokeo #\", other: \"Matokeo #\" }),\n },\n // ...\n};\n```\n\n`plural(locale)` picks the right plural form for any language (`#` is the formatted number).\n\n### Switching language at runtime\n\nList the languages your app offers as loaders, so each one is downloaded only when picked:\n\n```tsx\nimport { LocaleProvider, type Messages } from \"@vjdesigns/vjdesigns-ui\";\n\nconst loaders: Record<string, () => Promise<{ default: Messages }>> = {\n es: () => import(\"@vjdesigns/vjdesigns-ui/locales/es\"),\n fr: () => import(\"@vjdesigns/vjdesigns-ui/locales/fr\"),\n ar: () => import(\"@vjdesigns/vjdesigns-ui/locales/ar\"),\n};\n\nfunction App({ lang }: { lang: string }) {\n const [messages, setMessages] = useState<Messages>();\n useEffect(() => {\n const load = loaders[lang];\n if (load) load().then((mod) => setMessages(mod.default));\n else setMessages(undefined); // English\n }, [lang]);\n // Until a language loads, the previous one (or English) shows.\n return <LocaleProvider locale={lang} messages={messages}>…</LocaleProvider>;\n}\n```\n\nFor server rendering, also set `<html lang=\"…\" dir=\"…\">` on the page. `getLocaleDirection(locale)` returns `\"ltr\"` or `\"rtl\"`."
35
+ "markdown": "Components have built-in text: button names like \"Close\" and \"Next page\", screen-reader announcements like \"3 results available\", validation messages, and date formats. Wrap your app in `LocaleProvider` to show all of it in another language:\r\n\r\n```tsx\r\nimport { LocaleProvider } from \"@vjdesigns/vjdesigns-ui\";\r\nimport es from \"@vjdesigns/vjdesigns-ui/locales/es\";\r\n\r\n<LocaleProvider locale=\"es\" messages={es}>\r\n <App />\r\n</LocaleProvider>\r\n```\r\n\r\n`LocaleProvider` sets:\r\n\r\n- **Built-in text** for every component, from `messages`.\r\n- **Dates and numbers** in the locale's format (`23/10/2026`, `1.234,5`), and plurals that follow the language's rules.\r\n- **Writing direction**: Arabic, Hebrew, Persian, and Urdu get `dir=\"rtl\"`, and layouts and arrow keys mirror.\r\n- **`lang`** on its wrapper, so screen readers pronounce the text correctly. Popups (menus, dialogs, tooltips) keep the language of the area that opened them.\r\n\r\nEach locale is a separate import, so your app only downloads the languages it uses. Without a `LocaleProvider`, components use English text and the browser's date and number format.\r\n\r\nThis library only translates its own built-in text. Text your app passes in, like `<Button>Save</Button>`, is your app's content: translate it with your app's i18n library (react-i18next, FormatJS, and so on).\r\n\r\n### What gets translated\r\n\r\nThe language is never picked automatically from where the user lives or their browser settings. Your app chooses it by rendering a `LocaleProvider`. For example, with `<LocaleProvider locale=\"de\" messages={de}>`:\r\n\r\n| | Translated? |\r\n| --- | --- |\r\n| Text your app passes in, like `<Button>Save</Button>` | No: your app translates it |\r\n| Built-in names, like \"Close\", \"Next page\", \"Clear search\" | Yes: \"Schließen\", \"Nächste Seite\", \"Suche löschen\" |\r\n| Screen-reader announcements, like \"3 results available\" | Yes: \"3 Ergebnisse verfügbar\" |\r\n| Validation messages, empty states, file-upload prompts | Yes |\r\n| Dates and numbers | Yes: \"23.10.2026\", \"4,5\" |\r\n\r\nTo follow the user's browser language, pass it yourself: `locale={navigator.language}` together with the matching `messages` (see [Switching language at runtime](#switching-language-at-runtime)).\r\n\r\n### Bundled languages\r\n\r\n`ar` Arabic · `bn` Bengali · `cs` Czech · `da` Danish · `de` German · `el` Greek · `es` Spanish · `fa` Persian · `fi` Finnish · `fr` French · `he` Hebrew · `hi` Hindi · `hu` Hungarian · `id` Indonesian · `it` Italian · `ja` Japanese · `ko` Korean · `nb` Norwegian Bokmål · `nl` Dutch · `pl` Polish · `pt-BR` Portuguese (Brazil) · `ro` Romanian · `ru` Russian · `sv` Swedish · `th` Thai · `tr` Turkish · `uk` Ukrainian · `ur` Urdu · `vi` Vietnamese · `zh-Hans` Chinese (Simplified) · `zh-Hant` Chinese (Traditional), plus English (the default).\r\n\r\nThe translations are machine-generated and haven't been reviewed by native speakers yet. If you find a wrong or awkward phrase, override it (below) and report it so the bundled locale can be fixed. (Working on the library itself? See [Translating built-in text](#translating-built-in-text).)\r\n\r\n### Changing a few strings\r\n\r\nPass only the strings you want to change. Everything else falls back to the outer provider's language (English at the top):\r\n\r\n```tsx\r\n<LocaleProvider locale=\"en-GB\" messages={{ pagination: { next: \"Onwards\" } }}>\r\n```\r\n\r\nProviders nest, so an inner provider can switch the language for one part of the page. Per-component props such as `clearLabel` or `labels` still win over the provider.\r\n\r\n### Other languages\r\n\r\nFor a language that isn't bundled, write a complete messages object. TypeScript flags any missing string. Use English as the template:\r\n\r\n```ts\r\nimport { en, plural, type Messages } from \"@vjdesigns/vjdesigns-ui\";\r\n\r\nconst p = plural(\"sw\");\r\nexport const sw: Messages = {\r\n ...en,\r\n pagination: { ...en.pagination, next: \"Ukurasa unaofuata\", previous: \"Ukurasa uliopita\" },\r\n searchInput: {\r\n ...en.searchInput,\r\n results: (count) => p(count, { \"=0\": \"Hakuna matokeo\", one: \"Tokeo #\", other: \"Matokeo #\" }),\r\n },\r\n // ...\r\n};\r\n```\r\n\r\n`plural(locale)` picks the right plural form for any language (`#` is the formatted number).\r\n\r\n### Switching language at runtime\r\n\r\nList the languages your app offers as loaders, so each one is downloaded only when picked:\r\n\r\n```tsx\r\nimport { LocaleProvider, type Messages } from \"@vjdesigns/vjdesigns-ui\";\r\n\r\nconst loaders: Record<string, () => Promise<{ default: Messages }>> = {\r\n es: () => import(\"@vjdesigns/vjdesigns-ui/locales/es\"),\r\n fr: () => import(\"@vjdesigns/vjdesigns-ui/locales/fr\"),\r\n ar: () => import(\"@vjdesigns/vjdesigns-ui/locales/ar\"),\r\n};\r\n\r\nfunction App({ lang }: { lang: string }) {\r\n const [messages, setMessages] = useState<Messages>();\r\n useEffect(() => {\r\n const load = loaders[lang];\r\n if (load) load().then((mod) => setMessages(mod.default));\r\n else setMessages(undefined); // English\r\n }, [lang]);\r\n // Until a language loads, the previous one (or English) shows.\r\n return <LocaleProvider locale={lang} messages={messages}>…</LocaleProvider>;\r\n}\r\n```\r\n\r\nFor server rendering, also set `<html lang=\"…\" dir=\"…\">` on the page. `getLocaleDirection(locale)` returns `\"ltr\"` or `\"rtl\"`."
36
36
  },
37
37
  {
38
38
  "id": "validation",
39
39
  "title": "Form validation",
40
- "markdown": "> **Front-end validation is not security.** It helps people fill in a form correctly, but anyone can turn off JavaScript or send requests straight to your server. Always validate again on the server. The format checks below (`isEmail`, `isIP`, …) are plain functions you can reuse there.\n\n`useFormValidation` checks a form when it's submitted, using the browser's own rules on each input (`required`, `type=\"email\"`, `minLength`, `pattern`, `min` / `max`) plus any rules you add. Messages follow the current language.\n\n```tsx\nimport {\n useFormValidation, rules, ErrorSummary, Field, Input, PasswordInput, Button,\n} from \"@vjdesigns/vjdesigns-ui\";\n\nfunction SignUp() {\n const form = useFormValidation({\n rules: {\n confirm: rules.matches(\"password\", \"The passwords don't match.\"),\n serverIp: rules.ip(), // IPv4 or IPv6\n },\n // Runs only when everything is valid. Return the server's errors to show them on their fields.\n onValid: async (values) => {\n const response = await api.signUp(values);\n return response.errors; // e.g. { username: \"That username is taken.\" }\n },\n });\n\n return (\n <form {...form.formProps}>\n <ErrorSummary ref={form.summaryRef} errors={form.errorList} />\n <Field label=\"Email\" required error={form.errors.email}>\n <Input name=\"email\" type=\"email\" />\n </Field>\n <Field label=\"Password\" required error={form.errors.password}>\n <PasswordInput name=\"password\" minLength={12} />\n </Field>\n <Field label=\"Confirm password\" required error={form.errors.confirm}>\n <PasswordInput name=\"confirm\" />\n </Field>\n <Field label=\"Server IP\" error={form.errors.serverIp}>\n <Input name=\"serverIp\" />\n </Field>\n <Button type=\"submit\" loading={form.isSubmitting}>Create account</Button>\n </form>\n );\n}\n```\n\nHow it behaves:\n\n- **On submit**, every field is checked. If anything is wrong, the `ErrorSummary` at the top lists the problems and takes focus, so screen readers announce it. Each item links to its field. Without a summary, focus goes to the first invalid field.\n- **Errors are keyed by the field's `name`.** Pass `form.errors.<name>` to each `Field`'s `error`.\n- **After a failed submit**, an error disappears as soon as the field is fixed (while typing), and a field is fully re-checked when you leave it. It doesn't nag while you're still typing.\n- **Server errors** (returned from `onValid`, or set with `form.setErrors({...})`) show on their fields and stay until that field is edited.\n- **Emails** must have a real domain (`name@example.com`). The browser's own check also accepts `name@localhost`.\n\n### Rules and format checks\n\n| Rule | Checks |\n| --- | --- |\n| `rules.required()` | Not empty (for controls without a native `required`) |\n| `rules.email()` | An email address in the usual format, with a top-level domain |\n| `rules.ip()` / `rules.ip({ version: 4 })` / `rules.ip({ version: 6 })` | An IPv4 or IPv6 address |\n| `rules.minLength(n)` / `rules.maxLength(n)` | Length in characters |\n| `rules.pattern(/regex/, \"message\")` | The whole value matches |\n| `rules.matches(\"otherField\")` | Equals another field (confirm password) |\n| your own `(value, { values }) => message` | Anything else |\n\nEach rule takes an optional custom message. The checks behind them are exported for use anywhere, including your server:\n\n- `isEmail(value)`\n- `isIPv4(value)`: four numbers 0–255, no leading zeros\n- `isIPv6(value)`: including `::` shorthand and IPv4 tails like `::ffff:192.168.0.1`\n- `isIP(value, version?)`"
40
+ "markdown": "> **Front-end validation is not security.** It helps people fill in a form correctly, but anyone can turn off JavaScript or send requests straight to your server. Always validate again on the server. The format checks below (`isEmail`, `isIP`, …) are plain functions you can reuse there.\r\n\r\n`useFormValidation` checks a form when it's submitted, using the browser's own rules on each input (`required`, `type=\"email\"`, `minLength`, `pattern`, `min` / `max`) plus any rules you add. Messages follow the current language.\r\n\r\n```tsx\r\nimport {\r\n useFormValidation, rules, ErrorSummary, Field, Input, PasswordInput, Button,\r\n} from \"@vjdesigns/vjdesigns-ui\";\r\n\r\nfunction SignUp() {\r\n const form = useFormValidation({\r\n rules: {\r\n confirm: rules.matches(\"password\", \"The passwords don't match.\"),\r\n serverIp: rules.ip(), // IPv4 or IPv6\r\n },\r\n // Runs only when everything is valid. Return the server's errors to show them on their fields.\r\n onValid: async (values) => {\r\n const response = await api.signUp(values);\r\n return response.errors; // e.g. { username: \"That username is taken.\" }\r\n },\r\n });\r\n\r\n return (\r\n <form {...form.formProps}>\r\n <ErrorSummary ref={form.summaryRef} errors={form.errorList} />\r\n <Field label=\"Email\" required error={form.errors.email}>\r\n <Input name=\"email\" type=\"email\" />\r\n </Field>\r\n <Field label=\"Password\" required error={form.errors.password}>\r\n <PasswordInput name=\"password\" minLength={12} />\r\n </Field>\r\n <Field label=\"Confirm password\" required error={form.errors.confirm}>\r\n <PasswordInput name=\"confirm\" />\r\n </Field>\r\n <Field label=\"Server IP\" error={form.errors.serverIp}>\r\n <Input name=\"serverIp\" />\r\n </Field>\r\n <Button type=\"submit\" loading={form.isSubmitting}>Create account</Button>\r\n </form>\r\n );\r\n}\r\n```\r\n\r\nHow it behaves:\r\n\r\n- **On submit**, every field is checked. If anything is wrong, the `ErrorSummary` at the top lists the problems and takes focus, so screen readers announce it. Each item links to its field. Without a summary, focus goes to the first invalid field.\r\n- **Errors are keyed by the field's `name`.** Pass `form.errors.<name>` to each `Field`'s `error`.\r\n- **After a failed submit**, an error disappears as soon as the field is fixed (while typing), and a field is fully re-checked when you leave it. It doesn't nag while you're still typing.\r\n- **Server errors** (returned from `onValid`, or set with `form.setErrors({...})`) show on their fields and stay until that field is edited.\r\n- **Emails** must have a real domain (`name@example.com`). The browser's own check also accepts `name@localhost`.\r\n\r\n### Rules and format checks\r\n\r\n| Rule | Checks |\r\n| --- | --- |\r\n| `rules.required()` | Not empty (for controls without a native `required`) |\r\n| `rules.email()` | An email address in the usual format, with a top-level domain |\r\n| `rules.ip()` / `rules.ip({ version: 4 })` / `rules.ip({ version: 6 })` | An IPv4 or IPv6 address |\r\n| `rules.minLength(n)` / `rules.maxLength(n)` | Length in characters |\r\n| `rules.pattern(/regex/, \"message\")` | The whole value matches |\r\n| `rules.matches(\"otherField\")` | Equals another field (confirm password) |\r\n| your own `(value, { values }) => message` | Anything else |\r\n\r\nEach rule takes an optional custom message. The checks behind them are exported for use anywhere, including your server:\r\n\r\n- `isEmail(value)`\r\n- `isIPv4(value)`: four numbers 0–255, no leading zeros\r\n- `isIPv6(value)`: including `::` shorthand and IPv4 tails like `::ffff:192.168.0.1`\r\n- `isIP(value, version?)`"
41
41
  }
42
42
  ],
43
43
  "components": [
@@ -6855,22 +6855,18 @@
6855
6855
  }
6856
6856
  ],
6857
6857
  "subcomponents": [],
6858
- "storybook": "Forms/DatePicker",
6858
+ "storybook": "Forms/Calendar",
6859
6859
  "stories": [
6860
6860
  {
6861
6861
  "name": "Playground",
6862
6862
  "description": ""
6863
6863
  },
6864
6864
  {
6865
- "name": "Basic",
6866
- "description": ""
6867
- },
6868
- {
6869
- "name": "With Field",
6865
+ "name": "Single",
6870
6866
  "description": ""
6871
6867
  },
6872
6868
  {
6873
- "name": "Typed input + validation",
6869
+ "name": "Range",
6874
6870
  "description": ""
6875
6871
  },
6876
6872
  {
@@ -6878,15 +6874,15 @@
6878
6874
  "description": ""
6879
6875
  },
6880
6876
  {
6881
- "name": "Disabled",
6877
+ "name": "Disabled dates (weekends)",
6882
6878
  "description": ""
6883
6879
  },
6884
6880
  {
6885
- "name": "Read Only",
6881
+ "name": "Two Months",
6886
6882
  "description": ""
6887
6883
  },
6888
6884
  {
6889
- "name": "Clearable",
6885
+ "name": "Locales",
6890
6886
  "description": ""
6891
6887
  },
6892
6888
  {
@@ -6894,32 +6890,20 @@
6894
6890
  "description": ""
6895
6891
  },
6896
6892
  {
6897
- "name": "States",
6898
- "description": ""
6899
- },
6900
- {
6901
- "name": "Locales",
6902
- "description": ""
6903
- },
6904
- {
6905
- "name": "In Modal",
6893
+ "name": "Outside Days Hidden",
6906
6894
  "description": ""
6907
6895
  },
6908
6896
  {
6909
- "name": "Composition: schedule a game",
6897
+ "name": "Controlled",
6910
6898
  "description": ""
6911
6899
  },
6912
6900
  {
6913
- "name": "Open (popup)",
6901
+ "name": "Composition: tournament dates",
6914
6902
  "description": ""
6915
6903
  },
6916
6904
  {
6917
- "name": "Locales: format and parse round-trip",
6918
- "description": "The typed field always uses Gregorian years and ASCII digits, so what the\r\npicker writes can be read back in every locale (Thai Buddhist-era years,\r\nArabic-Indic digits, and the Bulgarian \"г.\" suffix included). Typed\r\nnative digits are accepted too."
6919
- },
6920
- {
6921
- "name": "Open from the field (Alt+ArrowDown)",
6922
- "description": "Alt+ArrowDown in the field opens the calendar; Escape returns focus to the field, not the calendar button."
6905
+ "name": "Selected date outside min",
6906
+ "description": "A selected date that has become unavailable (here, `min` is after it)\r\nkeeps on-primary text on the primary fill; the line-through marks it\r\nunavailable. (axe skips contrast on `aria-disabled` cells, so check this\r\none by eye in both themes.)"
6923
6907
  }
6924
6908
  ]
6925
6909
  },
@@ -8451,8 +8435,49 @@
8451
8435
  }
8452
8436
  ],
8453
8437
  "subcomponents": [],
8454
- "storybook": "Forms/DatePicker",
8455
- "stories": []
8438
+ "storybook": "Forms/DateRangePicker",
8439
+ "stories": [
8440
+ {
8441
+ "name": "Playground",
8442
+ "description": ""
8443
+ },
8444
+ {
8445
+ "name": "Basic",
8446
+ "description": "Pick a start and an end in the calendar: the range commits and the popup closes."
8447
+ },
8448
+ {
8449
+ "name": "Escape after one pick",
8450
+ "description": "Escape after picking only a start keeps the old range."
8451
+ },
8452
+ {
8453
+ "name": "With Field",
8454
+ "description": "Inside a Field: the group and both inputs take the Field's label, hint, and required state."
8455
+ },
8456
+ {
8457
+ "name": "Typed Input",
8458
+ "description": "Typed dates are parsed on blur; an end before the start is rejected with a message."
8459
+ },
8460
+ {
8461
+ "name": "Min, max, and unavailable days",
8462
+ "description": ""
8463
+ },
8464
+ {
8465
+ "name": "States",
8466
+ "description": ""
8467
+ },
8468
+ {
8469
+ "name": "Sizes",
8470
+ "description": ""
8471
+ },
8472
+ {
8473
+ "name": "Narrow",
8474
+ "description": "Narrow containers stack the two fields (reflow at 320px)."
8475
+ },
8476
+ {
8477
+ "name": "In AForm",
8478
+ "description": "Hidden inputs (`startName`, `endName`) submit ISO dates with the form."
8479
+ }
8480
+ ]
8456
8481
  },
8457
8482
  {
8458
8483
  "name": "DateTimePicker",
@@ -20457,6 +20482,106 @@
20457
20482
  }
20458
20483
  ]
20459
20484
  },
20485
+ {
20486
+ "name": "AccessibilityIcon",
20487
+ "category": "primitives",
20488
+ "folder": "Icon",
20489
+ "import": "import { AccessibilityIcon } from \"@vjdesigns/vjdesigns-ui\";",
20490
+ "description": "Icons for accessibility features and services: wheelchair access, audio\r\ndescription and transcripts, hearing loops, sign language, display\r\nsettings, and alternative input. (Captions are `Icon name=\"captions\"`.) Same props as `Icon`, plus `labeled`, which turns on a\r\nbuilt-in accessible name in every bundled language. Decorative by default.\r\n\r\nDrawn to stricter rules than the main set, all checked on every release:\r\nreadable at 16px, never mistakable for another icon at that size, inside a\r\nsafe area, and painted only with `currentColor` so tones, dark mode, and\r\nWindows High Contrast recolor them. Icons that show movement (wheelchair,\r\nramp, blind) mirror in right-to-left layouts. Use them at 16px (`sm`) or\r\nlarger.",
20491
+ "nativeElement": "svg",
20492
+ "props": [
20493
+ {
20494
+ "name": "size",
20495
+ "type": "IconSize",
20496
+ "required": false,
20497
+ "description": "Size: `xs` 12px, `sm` 16px, `md` 20px, `lg` 24px, `xl` 32px, `2xl` 48px, or a number of pixels."
20498
+ },
20499
+ {
20500
+ "name": "tone",
20501
+ "type": "IconTone",
20502
+ "required": false,
20503
+ "description": "Color. Defaults to `inherit` (`currentColor`)."
20504
+ },
20505
+ {
20506
+ "name": "strokeWidth",
20507
+ "type": "number",
20508
+ "required": false,
20509
+ "description": "Stroke width on the 24x24 grid. Applies to stroke-based icons."
20510
+ },
20511
+ {
20512
+ "name": "label",
20513
+ "type": "string",
20514
+ "required": false,
20515
+ "description": "Accessible name. When set, the icon is meaningful (`role=\"img\"` plus\r\n`aria-label`). When omitted, the icon is decorative and hidden from\r\nassistive technology (`aria-hidden=\"true\"`, `focusable=\"false\"`)."
20516
+ },
20517
+ {
20518
+ "name": "spin",
20519
+ "type": "boolean",
20520
+ "required": false,
20521
+ "description": "Rotates the icon continuously (for `loader`). Stops under reduced motion."
20522
+ },
20523
+ {
20524
+ "name": "labeled",
20525
+ "type": "boolean",
20526
+ "required": false,
20527
+ "description": "Give the icon its built-in accessible name, translated by `LocaleProvider`\r\n(for example \"Wheelchair accessible\"), so screen readers announce it as an\r\nimage. `label` wins when both are set. Leave both off when nearby text\r\nalready says the same thing: the icon is then decorative."
20528
+ },
20529
+ {
20530
+ "name": "name",
20531
+ "type": "AccessibilityIconName",
20532
+ "required": true,
20533
+ "description": "Accessibility icon to render."
20534
+ }
20535
+ ],
20536
+ "subcomponents": [],
20537
+ "storybook": "Primitives/AccessibilityIcon",
20538
+ "stories": [
20539
+ {
20540
+ "name": "Playground",
20541
+ "description": ""
20542
+ },
20543
+ {
20544
+ "name": "Gallery",
20545
+ "description": ""
20546
+ },
20547
+ {
20548
+ "name": "Decorative vs Labeled",
20549
+ "description": ""
20550
+ },
20551
+ {
20552
+ "name": "Sizes",
20553
+ "description": ""
20554
+ },
20555
+ {
20556
+ "name": "All at 16px",
20557
+ "description": ""
20558
+ },
20559
+ {
20560
+ "name": "Tones",
20561
+ "description": ""
20562
+ },
20563
+ {
20564
+ "name": "Right to left",
20565
+ "description": ""
20566
+ },
20567
+ {
20568
+ "name": "Translated",
20569
+ "description": ""
20570
+ },
20571
+ {
20572
+ "name": "Example: venue access information",
20573
+ "description": ""
20574
+ },
20575
+ {
20576
+ "name": "Example: video with access features",
20577
+ "description": ""
20578
+ },
20579
+ {
20580
+ "name": "Checks",
20581
+ "description": ""
20582
+ }
20583
+ ]
20584
+ },
20460
20585
  {
20461
20586
  "name": "Button",
20462
20587
  "category": "primitives",
@@ -21843,6 +21968,88 @@
21843
21968
  "CaptionsIcon",
21844
21969
  "PipIcon"
21845
21970
  ],
21971
+ "accessibilityIcons": [
21972
+ {
21973
+ "name": "UniversalAccessIcon",
21974
+ "description": "A person with open arms inside a circle, a widely used mark for accessibility in general: an accessibility menu, settings page, or statement. Built-in name: \"Accessibility\"."
21975
+ },
21976
+ {
21977
+ "name": "WheelchairIcon",
21978
+ "description": "A person in a wheelchair, leaning forward: a place, entrance, seat, or route that wheelchair users can use. Mirrors in right-to-left layouts. Built-in name: \"Wheelchair accessible\"."
21979
+ },
21980
+ {
21981
+ "name": "RampIcon",
21982
+ "description": "A ramp with an arrow: step-free access, an entrance or route without stairs. Mirrors in right-to-left layouts. Built-in name: \"Step-free access\"."
21983
+ },
21984
+ {
21985
+ "name": "ElevatorIcon",
21986
+ "description": "Lift doors with up and down arrows: an elevator or lift. Built-in name: \"Elevator\"."
21987
+ },
21988
+ {
21989
+ "name": "BlindIcon",
21990
+ "description": "A person walking with a long cane: services for blind and low-vision people, such as guided tours or tactile maps. Mirrors in right-to-left layouts. Built-in name: \"Blind or low vision\"."
21991
+ },
21992
+ {
21993
+ "name": "BrailleIcon",
21994
+ "description": "A braille cell with raised and flat dots: braille documents, labels, or signage. Built-in name: \"Braille\"."
21995
+ },
21996
+ {
21997
+ "name": "AudioDescriptionIcon",
21998
+ "description": "\"AD\" with a sound wave, the international mark for audio description: a narrated track describing what's on screen. Built-in name: \"Audio description\"."
21999
+ },
22000
+ {
22001
+ "name": "ScreenReaderIcon",
22002
+ "description": "A screen with text and sound waves: screen reader support, or content tested with screen readers. Built-in name: \"Screen reader\"."
22003
+ },
22004
+ {
22005
+ "name": "HearingLoopIcon",
22006
+ "description": "An ear with a \"T\": a hearing loop (induction loop) that hearing aids set to T can pick up. Built-in name: \"Hearing loop\"."
22007
+ },
22008
+ {
22009
+ "name": "DeafIcon",
22010
+ "description": "An ear with a line through it: services for Deaf and hard-of-hearing people. Built-in name: \"Deaf or hard of hearing\"."
22011
+ },
22012
+ {
22013
+ "name": "SignLanguageIcon",
22014
+ "description": "A signing hand with motion marks: sign language interpretation. Not tied to one sign language; say which (ASL, BSL, LSF, ...) in nearby text or `label`. Built-in name: \"Sign language\"."
22015
+ },
22016
+ {
22017
+ "name": "TranscriptIcon",
22018
+ "description": "A speech bubble with lines of text: a written transcript of audio or video. Built-in name: \"Transcript\"."
22019
+ },
22020
+ {
22021
+ "name": "EasyReadIcon",
22022
+ "description": "An open book: an easy-read version, written in plain language for people with learning or cognitive disabilities. Built-in name: \"Easy read\"."
22023
+ },
22024
+ {
22025
+ "name": "TextSizeIcon",
22026
+ "description": "A small and a large letter A: a text size setting. Built-in name: \"Text size\"."
22027
+ },
22028
+ {
22029
+ "name": "HighContrastIcon",
22030
+ "description": "A half-filled circle: a high-contrast setting or theme. Built-in name: \"High contrast\"."
22031
+ },
22032
+ {
22033
+ "name": "ColorFiltersIcon",
22034
+ "description": "Three overlapping circles: color filters or color-blindness settings. Built-in name: \"Color filters\"."
22035
+ },
22036
+ {
22037
+ "name": "ReducedMotionIcon",
22038
+ "description": "A wave settling into a flat line: a setting that reduces or turns off animation. Built-in name: \"Reduced motion\"."
22039
+ },
22040
+ {
22041
+ "name": "KeyboardIcon",
22042
+ "description": "A keyboard: full keyboard support, or keyboard shortcuts help. Built-in name: \"Keyboard accessible\"."
22043
+ },
22044
+ {
22045
+ "name": "VoiceControlIcon",
22046
+ "description": "A microphone: voice control or speech input. Built-in name: \"Voice control\"."
22047
+ },
22048
+ {
22049
+ "name": "SwitchAccessIcon",
22050
+ "description": "A large push button: switch access, for people who use one or two switches instead of a keyboard or pointer. Built-in name: \"Switch access\"."
22051
+ }
22052
+ ],
21846
22053
  "hooks": [
21847
22054
  {
21848
22055
  "name": "useResolvedElement",
@@ -0,0 +1 @@
1
+ "use client";const e=require("../../utilities/LocaleProvider/LocaleProvider.cjs.js"),t=require("../../../utils/cx.cjs.js"),n=require("./accessibilityIconPaths.cjs.js"),r=require("./IconSvg.cjs.js"),i=require("./Icon.module.css.cjs.js");let a=require("react/jsx-runtime");var o=({name:o,labeled:s=!1,label:c,className:l,...u})=>{let d=e.useMessages(),f=n.accessibilityIconMeta(o);return(0,a.jsx)(r.IconSvg,{"data-icon":o,label:c??(s?d.accessibilityIcons[f.message]:void 0),className:t.cx(f.mirror&&i.default.mirror,l),...u,children:n.accessibilityIconPaths[o]})};function s(e,t){let n=e=>(0,a.jsx)(o,{name:t,...e});return n.displayName=e,n}var c=s(`UniversalAccessIcon`,`universal-access`),l=s(`WheelchairIcon`,`wheelchair`),u=s(`RampIcon`,`ramp`),d=s(`ElevatorIcon`,`elevator`),f=s(`BlindIcon`,`blind`),p=s(`BrailleIcon`,`braille`),m=s(`AudioDescriptionIcon`,`audio-description`),h=s(`ScreenReaderIcon`,`screen-reader`),g=s(`HearingLoopIcon`,`hearing-loop`),_=s(`DeafIcon`,`deaf`),v=s(`SignLanguageIcon`,`sign-language`),y=s(`TranscriptIcon`,`transcript`),b=s(`EasyReadIcon`,`easy-read`),x=s(`TextSizeIcon`,`text-size`),S=s(`HighContrastIcon`,`high-contrast`),C=s(`ColorFiltersIcon`,`color-filters`),w=s(`ReducedMotionIcon`,`reduced-motion`),T=s(`KeyboardIcon`,`keyboard`),E=s(`VoiceControlIcon`,`voice-control`),D=s(`SwitchAccessIcon`,`switch-access`);exports.AccessibilityIcon=o,exports.AudioDescriptionIcon=m,exports.BlindIcon=f,exports.BrailleIcon=p,exports.ColorFiltersIcon=C,exports.DeafIcon=_,exports.EasyReadIcon=b,exports.ElevatorIcon=d,exports.HearingLoopIcon=g,exports.HighContrastIcon=S,exports.KeyboardIcon=T,exports.RampIcon=u,exports.ReducedMotionIcon=w,exports.ScreenReaderIcon=h,exports.SignLanguageIcon=v,exports.SwitchAccessIcon=D,exports.TextSizeIcon=x,exports.TranscriptIcon=y,exports.UniversalAccessIcon=c,exports.VoiceControlIcon=E,exports.WheelchairIcon=l;