@nationaldesignstudio/react 0.0.8 → 0.0.9
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/dist/components/atoms/button/button.d.ts +1 -1
- package/dist/components/atoms/button/icon-button.d.ts +20 -0
- package/dist/components/organisms/navbar/navbar.d.ts +1 -0
- package/dist/index.js +4659 -1876
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/accordion/accordion.stories.tsx +1 -1
- package/src/components/atoms/button/button.stories.tsx +0 -9
- package/src/components/atoms/button/button.tsx +1 -1
- package/src/components/atoms/button/icon-button.stories.tsx +0 -9
- package/src/components/atoms/button/icon-button.tsx +35 -0
- package/src/components/atoms/pager-control/pager-control.stories.tsx +0 -3
- package/src/components/organisms/navbar/navbar.tsx +31 -79
- package/src/components/sections/banner/banner.tsx +3 -5
- package/src/components/sections/faq-section/faq-section.tsx +2 -1
- package/src/components/sections/hero/hero.tsx +1 -0
- package/src/components/sections/tout/tout.tsx +1 -0
- package/src/components/sections/two-column-section/two-column-section.tsx +8 -11
- package/src/stories/TokenShowcase.stories.tsx +3 -3
|
@@ -21,7 +21,7 @@ import * as React from "react";
|
|
|
21
21
|
* For icon-only buttons, use the IconButton component instead.
|
|
22
22
|
*/
|
|
23
23
|
declare const buttonVariants: (props?: ({
|
|
24
|
-
variant?: "charcoal" | "charcoalOutline" | "charcoalOutlineQuiet" | "ivory" | "ivoryOutline" | "ivoryOutlineQuiet" | "
|
|
24
|
+
variant?: "charcoal" | "charcoalOutline" | "charcoalOutlineQuiet" | "ivory" | "ivoryOutline" | "ivoryOutlineQuiet" | "gray" | null | undefined;
|
|
25
25
|
size?: "lg" | "default" | "sm" | null | undefined;
|
|
26
26
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
27
27
|
export type HTMLButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
@@ -3,6 +3,26 @@ import * as React from "react";
|
|
|
3
3
|
/**
|
|
4
4
|
* IconButton component based on Figma BaseKit / Interface / Icon Button
|
|
5
5
|
*
|
|
6
|
+
* **IMPORTANT: Accessibility Requirement**
|
|
7
|
+
* Icon-only buttons MUST have an accessible label. Provide one of:
|
|
8
|
+
* - `aria-label`: A text description of the button's action (recommended)
|
|
9
|
+
* - `aria-labelledby`: Reference to an element containing the label
|
|
10
|
+
* - `title`: Tooltip text (less preferred, but provides a label)
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* // Correct usage with aria-label
|
|
15
|
+
* <IconButton aria-label="Close menu">
|
|
16
|
+
* <CloseIcon />
|
|
17
|
+
* </IconButton>
|
|
18
|
+
*
|
|
19
|
+
* // Correct usage with aria-labelledby
|
|
20
|
+
* <IconButton aria-labelledby="close-label">
|
|
21
|
+
* <CloseIcon />
|
|
22
|
+
* </IconButton>
|
|
23
|
+
* <span id="close-label" className="sr-only">Close menu</span>
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
6
26
|
* Variants:
|
|
7
27
|
* - charcoal: Dark filled button (for light backgrounds)
|
|
8
28
|
* - charcoalOutline: Dark outlined button (for light backgrounds)
|
|
@@ -41,6 +41,7 @@ export interface NavbarMobileMenuProps extends React.HTMLAttributes<HTMLDivEleme
|
|
|
41
41
|
/**
|
|
42
42
|
* Mobile menu container that displays navigation links on mobile devices.
|
|
43
43
|
* Hidden on desktop (md and above). Should be used with NavbarMobileMenuButton.
|
|
44
|
+
* Built on Base UI Dialog for accessibility (focus trap, escape key, click-outside).
|
|
44
45
|
*/
|
|
45
46
|
declare const NavbarMobileMenu: React.ForwardRefExoticComponent<NavbarMobileMenuProps & React.RefAttributes<HTMLDivElement>>;
|
|
46
47
|
export interface NavbarMobileMenuButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|