@juspay/blend-design-system 0.0.29-beta → 0.0.29
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/assets/main.css +1 -1
- package/dist/components/Accordion/AccordionItem.d.ts +3 -2
- package/dist/components/Accordion/accessibility/AccordionAccessibility.d.ts +5 -0
- package/dist/components/Accordion/accessibility/AccordionAccessibilityReport.d.ts +2 -0
- package/dist/components/Accordion/accessibility/index.d.ts +2 -0
- package/dist/components/Alert/accessibility/AlertAccessibility.d.ts +5 -0
- package/dist/components/Alert/accessibility/AlertAccessibilityReport.d.ts +44 -0
- package/dist/components/Alert/accessibility/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.d.ts +4 -0
- package/dist/components/Avatar/accessibility/AvatarAccessibility.d.ts +5 -0
- package/dist/components/Avatar/accessibility/AvatarAccessibilityReport.d.ts +2 -0
- package/dist/components/Avatar/accessibility/index.d.ts +2 -0
- package/dist/components/Avatar/avatarUtils.d.ts +1 -1
- package/dist/components/Avatar/types.d.ts +5 -0
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +6 -3
- package/dist/components/AvatarGroup/accessibility/AvatarGroupAccessibility.d.ts +5 -0
- package/dist/components/AvatarGroup/accessibility/AvatarGroupAccessibilityReport.d.ts +2 -0
- package/dist/components/AvatarGroup/accessibility/index.d.ts +2 -0
- package/dist/components/AvatarGroup/avatarGroupUtils.d.ts +4 -16
- package/dist/components/AvatarGroup/types.d.ts +5 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +3 -2
- package/dist/components/Breadcrumb/BreadcrumbSkeleton.d.ts +8 -0
- package/dist/components/Breadcrumb/accessibility/BreadcrumbAccessibility.d.ts +5 -0
- package/dist/components/Breadcrumb/accessibility/BreadcrumbAccessibilityReport.d.ts +44 -0
- package/dist/components/Breadcrumb/accessibility/index.d.ts +3 -0
- package/dist/components/Breadcrumb/types.d.ts +6 -0
- package/dist/components/Button/accessibility/ButtonAccessibility.d.ts +5 -0
- package/dist/components/Button/accessibility/ButtonAccessibilityReport.d.ts +44 -0
- package/dist/components/Button/accessibility/index.d.ts +4 -0
- package/dist/components/Card/CardSkeleton.d.ts +8 -0
- package/dist/components/Charts/ChartsSkeleton.d.ts +7 -0
- package/dist/components/Charts/types.d.ts +6 -0
- package/dist/components/Checkbox/Checkbox.d.ts +0 -1
- package/dist/components/Checkbox/accessibility/CheckboxAccessibility.d.ts +5 -0
- package/dist/components/Checkbox/accessibility/CheckboxAccessibilityReport.d.ts +44 -0
- package/dist/components/Checkbox/accessibility/index.d.ts +3 -0
- package/dist/components/Checkbox/checkboxUtils.d.ts +10 -0
- package/dist/components/Checkbox/index.d.ts +1 -1
- package/dist/components/Checkbox/types.d.ts +1 -0
- package/dist/components/Inputs/DropdownInput/accessibility/DropdownInputAccessibility.d.ts +5 -0
- package/dist/components/Inputs/DropdownInput/accessibility/DropdownInputAccessibilityReport.d.ts +2 -0
- package/dist/components/Inputs/MultiValueInput/MultiValueInput.d.ts +1 -1
- package/dist/components/Inputs/MultiValueInput/accessibility/MultiValueInputAccessibility.d.ts +5 -0
- package/dist/components/Inputs/MultiValueInput/accessibility/MultiValueInputAccessibilityReport.d.ts +2 -0
- package/dist/components/Inputs/NumberInput/accessibility/NumberInputAccessibility.d.ts +5 -0
- package/dist/components/Inputs/NumberInput/accessibility/NumberInputAccessibilityReport.d.ts +2 -0
- package/dist/components/Inputs/OTPInput/OTPInput.d.ts +1 -1
- package/dist/components/Inputs/OTPInput/accessibility/OTPInputAccessibility.d.ts +5 -0
- package/dist/components/Inputs/OTPInput/accessibility/OTPInputAccessibilityReport.d.ts +2 -0
- package/dist/components/Inputs/SearchInput/accessibility/SearchInputAccessibility.d.ts +5 -0
- package/dist/components/Inputs/SearchInput/accessibility/SearchInputAccessibilityReport.d.ts +2 -0
- package/dist/components/Inputs/TextArea/TextArea.d.ts +1 -1
- package/dist/components/Inputs/TextArea/accessibility/TextAreaAccessibility.d.ts +5 -0
- package/dist/components/Inputs/TextArea/accessibility/TextAreaAccessibilityReport.d.ts +2 -0
- package/dist/components/Inputs/TextInput/TextInput.d.ts +1 -1
- package/dist/components/Inputs/TextInput/accessibility/TextInputAccessibility.d.ts +5 -0
- package/dist/components/Inputs/TextInput/accessibility/TextInputAccessibilityReport.d.ts +2 -0
- package/dist/components/Inputs/UnitInput/accessibility/UnitInputAccessibility.d.ts +5 -0
- package/dist/components/Inputs/UnitInput/accessibility/UnitInputAccessibilityReport.d.ts +2 -0
- package/dist/components/Inputs/utils/InputFooter/InputFooter.d.ts +5 -1
- package/dist/components/Inputs/utils/InputLabels/InputLabels.d.ts +4 -1
- package/dist/components/KeyValuePair/KeyValuePair.d.ts +2 -1
- package/dist/components/KeyValuePair/accessibility/KeyValuePairAccessibility.d.ts +5 -0
- package/dist/components/KeyValuePair/accessibility/KeyValuePairAccessibilityReport.d.ts +2 -0
- package/dist/components/KeyValuePair/accessibility/index.d.ts +2 -0
- package/dist/components/Menu/MenuSkeleton.d.ts +7 -0
- package/dist/components/Menu/accessibility/MenuAccessibility.d.ts +5 -0
- package/dist/components/Menu/accessibility/MenuAccessibilityReport.d.ts +2 -0
- package/dist/components/Menu/accessibility/index.d.ts +2 -0
- package/dist/components/Menu/types.d.ts +6 -5
- package/dist/components/Modal/ModalSkeleton.d.ts +25 -0
- package/dist/components/Modal/accessibility/ModalAccessibility.d.ts +5 -0
- package/dist/components/Modal/accessibility/ModalAccessibilityReport.d.ts +2 -0
- package/dist/components/Modal/types.d.ts +12 -0
- package/dist/components/MultiSelect/MultiSelectMenu.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelectSkeleton.d.ts +7 -0
- package/dist/components/MultiSelect/MultiSelectTrigger.d.ts +1 -1
- package/dist/components/MultiSelect/accessibility/MultiSelectAccessibility.d.ts +5 -0
- package/dist/components/MultiSelect/accessibility/MultiSelectAccessibilityReport.d.ts +44 -0
- package/dist/components/MultiSelect/accessibility/index.d.ts +2 -0
- package/dist/components/MultiSelect/types.d.ts +8 -10
- package/dist/components/Popover/Popover.d.ts +1 -1
- package/dist/components/Popover/PopoverFooter.d.ts +5 -1
- package/dist/components/Popover/PopoverHeader.d.ts +7 -1
- package/dist/components/Popover/PopoverSkeleton.d.ts +21 -0
- package/dist/components/Popover/accessibility/PopoverAccessibility.d.ts +5 -0
- package/dist/components/Popover/accessibility/PopoverAccessibilityReport.d.ts +2 -0
- package/dist/components/Popover/types.d.ts +13 -0
- package/dist/components/Radio/Radio.d.ts +1 -1
- package/dist/components/Radio/StyledRadio.d.ts +2 -0
- package/dist/components/Radio/accessibility/RadioAccessibility.d.ts +5 -0
- package/dist/components/Radio/accessibility/RadioAccessibilityReport.d.ts +44 -0
- package/dist/components/Radio/accessibility/index.d.ts +2 -0
- package/dist/components/Radio/types.d.ts +3 -1
- package/dist/components/SingleSelect/SingleSelect.d.ts +1 -1
- package/dist/components/SingleSelect/SingleSelectMenu.d.ts +3 -7
- package/dist/components/SingleSelect/SingleSelectSkeleton.d.ts +7 -0
- package/dist/components/SingleSelect/SingleSelectTrigger.d.ts +1 -1
- package/dist/components/SingleSelect/accessibility/SingleSelectAccessibility.d.ts +5 -0
- package/dist/components/SingleSelect/accessibility/SingleSelectAccessibilityReport.d.ts +44 -0
- package/dist/components/SingleSelect/accessibility/index.d.ts +2 -0
- package/dist/components/SingleSelect/types.d.ts +6 -5
- package/dist/components/SingleSelect/utils.d.ts +80 -0
- package/dist/components/Skeleton/Skeleton.d.ts +4 -0
- package/dist/components/Skeleton/SkeletonCompound.d.ts +8 -0
- package/dist/components/Skeleton/types.d.ts +4 -0
- package/dist/components/Snackbar/accessibility/SnackbarAccessibility.d.ts +5 -0
- package/dist/components/Snackbar/accessibility/SnackbarAccessibilityReport.d.ts +2 -0
- package/dist/components/Snackbar/accessibility/index.d.ts +2 -0
- package/dist/components/StatCard/StatCardSkeleton.d.ts +7 -0
- package/dist/components/StatCard/types.d.ts +3 -2
- package/dist/components/Switch/StyledSwitch.d.ts +3 -0
- package/dist/components/Switch/Switch.d.ts +3 -4
- package/dist/components/Switch/accessibility/SwitchAccessibility.d.ts +5 -0
- package/dist/components/Switch/accessibility/SwitchAccessibilityReport.d.ts +44 -0
- package/dist/components/Switch/accessibility/index.d.ts +3 -0
- package/dist/components/Switch/utils.d.ts +10 -0
- package/dist/components/Tabs/Tabs.d.ts +2 -0
- package/dist/components/Tabs/TabsList.d.ts +1 -0
- package/dist/components/Tabs/TabsTrigger.d.ts +5 -4
- package/dist/components/Tabs/accessibility/TabsAccessibility.d.ts +5 -0
- package/dist/components/Tabs/accessibility/TabsAccessibilityReport.d.ts +2 -0
- package/dist/components/Tabs/accessibility/index.d.ts +2 -0
- package/dist/components/Tabs/types.d.ts +5 -0
- package/dist/components/Tabs/utils.d.ts +4 -2
- package/dist/components/Tags/accessibility/TagAccessibility.d.ts +5 -0
- package/dist/components/Tags/accessibility/TagAccessibilityReport.d.ts +2 -0
- package/dist/components/Tags/tag.tokens.d.ts +1 -1
- package/dist/components/Text/Text.d.ts +2 -2
- package/dist/components/Tooltip/accessibility/TooltipAccessibility.d.ts +5 -0
- package/dist/components/Tooltip/accessibility/TooltipAccessibilityReport.d.ts +2 -0
- package/dist/components/shared/accessibility/AccessibilityDashboard.d.ts +11 -0
- package/dist/components/shared/accessibility/LightHouse-components/ButtonLightHouse.d.ts +2 -0
- package/dist/components/shared/accessibility/LightHouse-components/DropdownInputLightHouse.d.ts +2 -0
- package/dist/components/shared/accessibility/LightHouse-components/ModalLightHouse.d.ts +2 -0
- package/dist/components/shared/accessibility/LightHouse-components/MultiValueInputLightHouse.d.ts +2 -0
- package/dist/components/shared/accessibility/LightHouse-components/NumberInputLightHouse.d.ts +2 -0
- package/dist/components/shared/accessibility/LightHouse-components/OTPInputLightHouse.d.ts +2 -0
- package/dist/components/shared/accessibility/LightHouse-components/PopoverLightHouse.d.ts +2 -0
- package/dist/components/shared/accessibility/LightHouse-components/SearchInputLightHouse.d.ts +2 -0
- package/dist/components/shared/accessibility/LightHouse-components/TagLightHouse.d.ts +2 -0
- package/dist/components/shared/accessibility/LightHouse-components/TextAreaLightHouse.d.ts +2 -0
- package/dist/components/shared/accessibility/LightHouse-components/TextInputLightHouse.d.ts +2 -0
- package/dist/components/shared/accessibility/LightHouse-components/TooltipLightHouse.d.ts +2 -0
- package/dist/components/shared/accessibility/LightHouse-components/UnitInputLightHouse.d.ts +2 -0
- package/dist/components/shared/accessibility/index.d.ts +8 -0
- package/dist/components/shared/accessibility/reportGenerator.d.ts +24 -0
- package/dist/components/shared/accessibility/storybookParser.d.ts +25 -0
- package/dist/components/shared/accessibility/testResultsParser.d.ts +22 -0
- package/dist/context/ThemeContext.d.ts +1 -3
- package/dist/context/ThemeProvider.d.ts +1 -4
- package/dist/context/index.d.ts +2 -1
- package/dist/context/initComponentTokens.d.ts +1 -1
- package/dist/context/theme.enum.d.ts +4 -0
- package/dist/context/useComponentToken.d.ts +1 -2
- package/dist/main.d.ts +0 -1
- package/dist/main.js +36536 -40697
- package/package.json +9 -8
- package/dist/components/WorkflowCanvas/WorkflowCanvas.d.ts +0 -19
- package/dist/components/WorkflowCanvas/WorkflowControls.d.ts +0 -3
- package/dist/components/WorkflowCanvas/components/NodeContent.d.ts +0 -15
- package/dist/components/WorkflowCanvas/constants.d.ts +0 -42
- package/dist/components/WorkflowCanvas/edges/DefaultEdge.d.ts +0 -3
- package/dist/components/WorkflowCanvas/index.d.ts +0 -12
- package/dist/components/WorkflowCanvas/nodes/DefaultNode.d.ts +0 -3
- package/dist/components/WorkflowCanvas/nodes/InputNode.d.ts +0 -3
- package/dist/components/WorkflowCanvas/nodes/OutputNode.d.ts +0 -3
- package/dist/components/WorkflowCanvas/types.d.ts +0 -79
- package/dist/components/WorkflowCanvas/utils.d.ts +0 -13
- package/dist/components/WorkflowCanvas/workflow.tokens.d.ts +0 -100
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for SingleSelect component accessibility
|
|
3
|
+
* WCAG 4.1.2 (Name, Role, Value), 3.3.2 (Labels or Instructions), 4.1.3 (Status Messages)
|
|
4
|
+
*/
|
|
5
|
+
export type AriaAttributes = {
|
|
6
|
+
'aria-describedby'?: string;
|
|
7
|
+
'aria-label'?: string;
|
|
8
|
+
'aria-labelledby'?: string;
|
|
9
|
+
'aria-invalid'?: boolean;
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
export type ExtractedAriaProps = {
|
|
13
|
+
'aria-describedby'?: string;
|
|
14
|
+
'aria-label'?: string;
|
|
15
|
+
'aria-labelledby'?: string;
|
|
16
|
+
restProps: Record<string, unknown>;
|
|
17
|
+
};
|
|
18
|
+
export type AccessibilitySetupOptions = {
|
|
19
|
+
name?: string;
|
|
20
|
+
generatedId: string;
|
|
21
|
+
label?: string;
|
|
22
|
+
hintText?: string;
|
|
23
|
+
error?: boolean;
|
|
24
|
+
errorMessage?: string;
|
|
25
|
+
rest?: Record<string, unknown>;
|
|
26
|
+
prefix?: string;
|
|
27
|
+
needsMenuId?: boolean;
|
|
28
|
+
};
|
|
29
|
+
export type AccessibilitySetupResult = {
|
|
30
|
+
uniqueName: string;
|
|
31
|
+
labelId?: string;
|
|
32
|
+
hintTextId?: string;
|
|
33
|
+
errorMessageId?: string;
|
|
34
|
+
menuId?: string;
|
|
35
|
+
ariaAttributes: AriaAttributes;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Generates unique IDs for accessibility attributes
|
|
39
|
+
* WCAG 4.1.2 (Name, Role, Value)
|
|
40
|
+
*/
|
|
41
|
+
export declare const generateAccessibilityIds: (uniqueName: string, options: {
|
|
42
|
+
hasLabel?: boolean;
|
|
43
|
+
hasHintText?: boolean;
|
|
44
|
+
hasErrorMessage?: boolean;
|
|
45
|
+
needsMenuId?: boolean;
|
|
46
|
+
}) => {
|
|
47
|
+
labelId?: string;
|
|
48
|
+
hintTextId?: string;
|
|
49
|
+
errorMessageId?: string;
|
|
50
|
+
menuId?: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Extracts ARIA attributes from rest props
|
|
54
|
+
* WCAG 4.1.2 (Name, Role, Value)
|
|
55
|
+
*/
|
|
56
|
+
export declare const extractAriaProps: (rest: Record<string, unknown> | undefined) => ExtractedAriaProps;
|
|
57
|
+
/**
|
|
58
|
+
* Merges aria-describedby IDs from multiple sources
|
|
59
|
+
* WCAG 3.3.2 (Labels or Instructions) & 4.1.3 (Status Messages)
|
|
60
|
+
*/
|
|
61
|
+
export declare const mergeAriaDescribedBy: (...ids: (string | undefined)[]) => string | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Builds ARIA attributes object for SingleSelect components
|
|
64
|
+
* Note: Radix UI handles aria-expanded and aria-controls automatically
|
|
65
|
+
* We only add form-specific attributes: aria-labelledby, aria-describedby, aria-invalid
|
|
66
|
+
* WCAG 4.1.2 (Name, Role, Value)
|
|
67
|
+
*/
|
|
68
|
+
export declare const buildAriaAttributes: (options: {
|
|
69
|
+
error?: boolean;
|
|
70
|
+
ariaLabelledBy?: string;
|
|
71
|
+
ariaDescribedBy?: string;
|
|
72
|
+
ariaLabel?: string;
|
|
73
|
+
restProps?: Record<string, unknown>;
|
|
74
|
+
}) => AriaAttributes;
|
|
75
|
+
/**
|
|
76
|
+
* Complete accessibility setup for SingleSelect components
|
|
77
|
+
* Handles ID generation, ARIA attribute extraction, and attribute building
|
|
78
|
+
* WCAG 4.1.2 (Name, Role, Value), 3.3.2 (Labels or Instructions), 4.1.3 (Status Messages)
|
|
79
|
+
*/
|
|
80
|
+
export declare const setupAccessibility: (options: AccessibilitySetupOptions) => AccessibilitySetupResult;
|
|
@@ -3,6 +3,10 @@ declare const Skeleton: import('react').ForwardRefExoticComponent<import('./type
|
|
|
3
3
|
animate?: boolean;
|
|
4
4
|
width?: string | number;
|
|
5
5
|
height?: string | number;
|
|
6
|
+
maxHeight?: string | number;
|
|
7
|
+
minHeight?: string | number;
|
|
8
|
+
maxWidth?: string | number;
|
|
9
|
+
minWidth?: string | number;
|
|
6
10
|
shape?: import('./skeleton.tokens').SkeletonShape;
|
|
7
11
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
8
12
|
export default Skeleton;
|
|
@@ -16,6 +16,10 @@ declare const SkeletonCompound: import('react').ForwardRefExoticComponent<import
|
|
|
16
16
|
animate?: boolean;
|
|
17
17
|
width?: string | number;
|
|
18
18
|
height?: string | number;
|
|
19
|
+
maxHeight?: string | number;
|
|
20
|
+
minHeight?: string | number;
|
|
21
|
+
maxWidth?: string | number;
|
|
22
|
+
minWidth?: string | number;
|
|
19
23
|
shape?: import('./skeleton.tokens').SkeletonShape;
|
|
20
24
|
} & import('react').RefAttributes<HTMLDivElement>> & {
|
|
21
25
|
/**
|
|
@@ -40,6 +44,10 @@ declare const SkeletonCompound: import('react').ForwardRefExoticComponent<import
|
|
|
40
44
|
animate?: boolean;
|
|
41
45
|
width?: string | number;
|
|
42
46
|
height?: string | number;
|
|
47
|
+
maxHeight?: string | number;
|
|
48
|
+
minHeight?: string | number;
|
|
49
|
+
maxWidth?: string | number;
|
|
50
|
+
minWidth?: string | number;
|
|
43
51
|
shape?: import('./skeleton.tokens').SkeletonShape;
|
|
44
52
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
45
53
|
Circle: import('react').ForwardRefExoticComponent<Omit<SkeletonProps, "shape"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -12,6 +12,10 @@ export type SkeletonProps = BaseSkeletonProps & Omit<BlockProps, 'children'> & {
|
|
|
12
12
|
animate?: boolean;
|
|
13
13
|
width?: string | number;
|
|
14
14
|
height?: string | number;
|
|
15
|
+
maxHeight?: string | number;
|
|
16
|
+
minHeight?: string | number;
|
|
17
|
+
maxWidth?: string | number;
|
|
18
|
+
minWidth?: string | number;
|
|
15
19
|
shape?: SkeletonShape;
|
|
16
20
|
};
|
|
17
21
|
export type SkeletonAvatarProps = BaseSkeletonProps & Omit<BlockProps, 'children'> & {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StatCardSkeletonProps } from './types';
|
|
2
|
+
declare const StatCardSkeleton: ({ skeleton, maxWidth, minWidth, }: {
|
|
3
|
+
skeleton: StatCardSkeletonProps;
|
|
4
|
+
maxWidth: string | number;
|
|
5
|
+
minWidth: string | number;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default StatCardSkeleton;
|
|
@@ -5,8 +5,9 @@ import { SkeletonVariant } from '../Skeleton';
|
|
|
5
5
|
export type StatCardSkeletonProps = {
|
|
6
6
|
variant: SkeletonVariant;
|
|
7
7
|
show: boolean;
|
|
8
|
-
height?: string;
|
|
9
|
-
|
|
8
|
+
height?: string | number;
|
|
9
|
+
maxWidth?: string | number;
|
|
10
|
+
minWidth?: string | number;
|
|
10
11
|
};
|
|
11
12
|
export declare enum StatCardVariant {
|
|
12
13
|
LINE = "line",
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { SwitchSize } from './types';
|
|
2
|
+
import { SwitchTokensType } from './switch.token';
|
|
2
3
|
export declare const StyledSwitchRoot: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
3
4
|
size: SwitchSize;
|
|
4
5
|
$isDisabled: boolean;
|
|
5
6
|
$isChecked: boolean;
|
|
6
7
|
$error?: boolean;
|
|
8
|
+
$tokens: SwitchTokensType;
|
|
7
9
|
}>> & string;
|
|
8
10
|
export declare const StyledSwitchThumb: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
9
11
|
size: SwitchSize;
|
|
10
12
|
$isChecked: boolean;
|
|
13
|
+
$tokens: SwitchTokensType;
|
|
11
14
|
}>> & string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { SwitchProps } from './types';
|
|
2
|
-
export declare const Switch:
|
|
3
|
-
|
|
4
|
-
displayName: string;
|
|
5
|
-
};
|
|
3
|
+
export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export default Switch;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Switch Component Accessibility Report Data
|
|
3
|
+
* WCAG 2.1 Level AA Compliance Analysis
|
|
4
|
+
*
|
|
5
|
+
* Note: Items marked with "unsure" require manual verification
|
|
6
|
+
* Color contrast ratios verified using actual color values from theme tokens
|
|
7
|
+
*/
|
|
8
|
+
export type WCAGSuccessCriterion = {
|
|
9
|
+
id: string;
|
|
10
|
+
level: 'A' | 'AA' | 'AAA';
|
|
11
|
+
title: string;
|
|
12
|
+
status: 'compliant' | 'non-compliant' | 'unsure' | 'not-applicable';
|
|
13
|
+
description: string;
|
|
14
|
+
implementation: string;
|
|
15
|
+
testResults?: string;
|
|
16
|
+
notes?: string;
|
|
17
|
+
};
|
|
18
|
+
export type AccessibilityReport = {
|
|
19
|
+
componentName: string;
|
|
20
|
+
wcagVersion: string;
|
|
21
|
+
reportDate: string;
|
|
22
|
+
conformanceLevel: string;
|
|
23
|
+
overallStatus: 'compliant' | 'non-compliant' | 'partial' | 'unsure';
|
|
24
|
+
summary: string;
|
|
25
|
+
criteria: WCAGSuccessCriterion[];
|
|
26
|
+
strengths: string[];
|
|
27
|
+
recommendations: string[];
|
|
28
|
+
wcagVersions: {
|
|
29
|
+
'2.0': string[];
|
|
30
|
+
'2.1': string[];
|
|
31
|
+
'2.2': string[];
|
|
32
|
+
};
|
|
33
|
+
testMethodology: {
|
|
34
|
+
automated: string[];
|
|
35
|
+
manual: string[];
|
|
36
|
+
verificationTools: string[];
|
|
37
|
+
wcagLevels: {
|
|
38
|
+
A: string[];
|
|
39
|
+
AA: string[];
|
|
40
|
+
AAA: string[];
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export declare const switchAccessibilityReport: AccessibilityReport;
|
|
@@ -55,3 +55,13 @@ export declare const isSwitchElement: (child: React.ReactElement, SwitchComponen
|
|
|
55
55
|
* Creates a group change handler for switch groups
|
|
56
56
|
*/
|
|
57
57
|
export declare const createSwitchGroupChangeHandler: (values: string[], isControlled: boolean, setInternalValues?: React.Dispatch<React.SetStateAction<string[]>>, onChange?: (values: string[]) => void) => (checked: boolean, childValue: string) => void;
|
|
58
|
+
/**
|
|
59
|
+
* Gets the subtext ID for aria-describedby connection
|
|
60
|
+
* WCAG 3.3.2 (Labels or Instructions) & 4.1.2 (Name, Role, Value)
|
|
61
|
+
*/
|
|
62
|
+
export declare const getSubtextId: (uniqueId: string, hasSubtext: boolean) => string | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Merges aria-describedby values, combining custom and subtext IDs
|
|
65
|
+
* WCAG 4.1.2 (Name, Role, Value)
|
|
66
|
+
*/
|
|
67
|
+
export declare const mergeAriaDescribedBy: (subtextId: string | undefined, customAriaDescribedBy: string | undefined) => string | undefined;
|
|
@@ -2,6 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
declare const Tabs: React.ForwardRefExoticComponent<Omit<import('@radix-ui/react-tabs').TabsProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
3
3
|
variant?: import('./types').TabsVariant;
|
|
4
4
|
size?: import('./types').TabsSize;
|
|
5
|
+
expanded?: boolean;
|
|
6
|
+
fitContent?: boolean;
|
|
5
7
|
items?: import('./types').TabItem[];
|
|
6
8
|
onTabClose?: (value: string) => void;
|
|
7
9
|
onTabAdd?: () => void;
|
|
@@ -6,6 +6,7 @@ declare const TabsList: React.ForwardRefExoticComponent<Omit<import('@radix-ui/r
|
|
|
6
6
|
expanded?: boolean;
|
|
7
7
|
fitContent?: boolean;
|
|
8
8
|
items?: import('./types').TabItem[];
|
|
9
|
+
originalItems?: import('./types').TabItem[];
|
|
9
10
|
onTabClose?: (value: string) => void;
|
|
10
11
|
onTabAdd?: () => void;
|
|
11
12
|
showDropdown?: boolean;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { TabsVariant, TabsSize } from './types';
|
|
2
|
-
declare const TabsTrigger:
|
|
3
|
+
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<import('@radix-ui/react-tabs').TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
3
4
|
value: string;
|
|
4
5
|
variant?: TabsVariant;
|
|
5
6
|
size?: TabsSize;
|
|
6
|
-
leftSlot?:
|
|
7
|
-
rightSlot?:
|
|
7
|
+
leftSlot?: React.ReactNode;
|
|
8
|
+
rightSlot?: React.ReactNode;
|
|
8
9
|
children: string | number;
|
|
9
10
|
closable?: boolean;
|
|
10
11
|
onClose?: () => void;
|
|
@@ -14,5 +15,5 @@ declare const TabsTrigger: import('react').ForwardRefExoticComponent<Omit<import
|
|
|
14
15
|
tabsGroupId?: string;
|
|
15
16
|
showSkeleton?: boolean;
|
|
16
17
|
skeletonVariant?: import('../Skeleton').SkeletonVariant;
|
|
17
|
-
} &
|
|
18
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
18
19
|
export default TabsTrigger;
|
|
@@ -20,10 +20,14 @@ export type TabItem = {
|
|
|
20
20
|
disable?: boolean;
|
|
21
21
|
showSkeleton?: boolean;
|
|
22
22
|
skeletonVariant?: SkeletonVariant;
|
|
23
|
+
leftSlot?: ReactNode;
|
|
24
|
+
rightSlot?: ReactNode;
|
|
23
25
|
};
|
|
24
26
|
export type TabsProps = ComponentPropsWithoutRef<typeof TabsPrimitive.Root> & {
|
|
25
27
|
variant?: TabsVariant;
|
|
26
28
|
size?: TabsSize;
|
|
29
|
+
expanded?: boolean;
|
|
30
|
+
fitContent?: boolean;
|
|
27
31
|
items?: TabItem[];
|
|
28
32
|
onTabClose?: (value: string) => void;
|
|
29
33
|
onTabAdd?: () => void;
|
|
@@ -42,6 +46,7 @@ export type TabsListProps = ComponentPropsWithoutRef<typeof TabsPrimitive.List>
|
|
|
42
46
|
expanded?: boolean;
|
|
43
47
|
fitContent?: boolean;
|
|
44
48
|
items?: TabItem[];
|
|
49
|
+
originalItems?: TabItem[];
|
|
45
50
|
onTabClose?: (value: string) => void;
|
|
46
51
|
onTabAdd?: () => void;
|
|
47
52
|
showDropdown?: boolean;
|
|
@@ -35,8 +35,10 @@ export declare const prepareDropdownItems: (tabs: TabItem[], originalItems?: Tab
|
|
|
35
35
|
}[];
|
|
36
36
|
}[];
|
|
37
37
|
/**
|
|
38
|
-
* Returns tabs for display
|
|
39
|
-
*
|
|
38
|
+
* Returns tabs for display based on isDefault flag and maxDisplayTabs limit.
|
|
39
|
+
* - Default tabs (isDefault: true) are shown in the list
|
|
40
|
+
* - Non-default tabs are shown in dropdown
|
|
41
|
+
* - If maxDisplayTabs is set and there are more default tabs, only maxDisplayTabs are shown in list
|
|
40
42
|
*/
|
|
41
43
|
export declare const getDisplayTabs: (tabs: TabItem[], maxDisplayTabs?: number, activeTab?: string) => TabItem[];
|
|
42
44
|
/**
|
|
@@ -2,7 +2,7 @@ import { CSSObject } from 'styled-components';
|
|
|
2
2
|
import { TagColor, TagShape, TagSize, TagVariant } from './types';
|
|
3
3
|
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
4
4
|
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
5
|
-
import { Theme } from '../../context/
|
|
5
|
+
import { Theme } from '../../context/theme.enum';
|
|
6
6
|
/**
|
|
7
7
|
* Tag Tokens following the pattern: [target].CSSProp.[size].[variant].[subType]
|
|
8
8
|
*
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { default as React, JSX } from 'react';
|
|
2
2
|
import { PrimitiveTextProps } from '../Primitives/PrimitiveText/PrimitiveText';
|
|
3
3
|
export type SemanticTagType = keyof Pick<JSX.IntrinsicElements, 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'span' | 'code' | 'q' | 'small' | 'label'>;
|
|
4
|
-
export type TextProps = PrimitiveTextProps & {
|
|
4
|
+
export type TextProps = PrimitiveTextProps & Omit<React.HTMLAttributes<HTMLElement>, 'color'> & {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
variant?: VariantType;
|
|
7
7
|
as?: SemanticTagType;
|
|
8
8
|
style?: React.CSSProperties;
|
|
9
9
|
};
|
|
10
10
|
export type VariantType = 'body.xs' | 'body.sm' | 'body.md' | 'body.lg' | 'display.sm' | 'display.md' | 'display.lg' | 'display.xl' | 'heading.sm' | 'heading.md' | 'heading.lg' | 'heading.xl' | 'heading.2xl' | 'code.sm' | 'code.md' | 'code.lg';
|
|
11
|
-
declare const Text: ({ children, variant, as, color, fontWeight, fontSize, truncate, style, ...rest }: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const Text: ({ id, role, children, variant, as, color, fontWeight, fontSize, truncate, style, ...rest }: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export default Text;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type ComponentAccessibilitySection = {
|
|
2
|
+
name: string;
|
|
3
|
+
displayName: string;
|
|
4
|
+
component: React.ComponentType<Record<string, never>>;
|
|
5
|
+
};
|
|
6
|
+
export type AccessibilityDashboardProps = {
|
|
7
|
+
className?: string;
|
|
8
|
+
defaultComponent?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const AccessibilityDashboard: import('react').ForwardRefExoticComponent<AccessibilityDashboardProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export default AccessibilityDashboard;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as AccessibilityDashboard } from './AccessibilityDashboard';
|
|
2
|
+
export type { AccessibilityDashboardProps } from './AccessibilityDashboard';
|
|
3
|
+
export { generateAccessibilityReport, downloadReport, getMimeType, getFileExtension, } from './reportGenerator';
|
|
4
|
+
export type { ReportFormat } from './reportGenerator';
|
|
5
|
+
export { parseTestFile, getTestCoverageSummary } from './testResultsParser';
|
|
6
|
+
export type { TestCoverageInfo } from './testResultsParser';
|
|
7
|
+
export { parseStorybookFile, getStorybookSummary } from './storybookParser';
|
|
8
|
+
export type { StorybookAccessibilityInfo } from './storybookParser';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AccessibilityReport } from '../../Button/accessibility/ButtonAccessibilityReport';
|
|
2
|
+
export type ReportFormat = 'json' | 'markdown' | 'html' | 'pdf';
|
|
3
|
+
type ReportGenerationOptions = {
|
|
4
|
+
format: ReportFormat;
|
|
5
|
+
includeTestResults?: boolean;
|
|
6
|
+
includeRecommendations?: boolean;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Generate accessibility report in specified format
|
|
10
|
+
*/
|
|
11
|
+
export declare function generateAccessibilityReport(report: AccessibilityReport, options?: ReportGenerationOptions): string;
|
|
12
|
+
/**
|
|
13
|
+
* Download report as file
|
|
14
|
+
*/
|
|
15
|
+
export declare function downloadReport(content: string, filename: string, mimeType: string): void;
|
|
16
|
+
/**
|
|
17
|
+
* Get MIME type for report format
|
|
18
|
+
*/
|
|
19
|
+
export declare function getMimeType(format: ReportFormat): string;
|
|
20
|
+
/**
|
|
21
|
+
* Get file extension for report format
|
|
22
|
+
*/
|
|
23
|
+
export declare function getFileExtension(format: ReportFormat): string;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storybook Parser
|
|
3
|
+
* Parses Storybook files to extract accessibility information
|
|
4
|
+
*/
|
|
5
|
+
export interface StorybookAccessibilityInfo {
|
|
6
|
+
totalStories: number;
|
|
7
|
+
accessibilityStories: string[];
|
|
8
|
+
a11yConfig: {
|
|
9
|
+
rules: string[];
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
};
|
|
12
|
+
wcagVersion?: string;
|
|
13
|
+
accessibilityNotes?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Parse Storybook file to extract accessibility information
|
|
17
|
+
*/
|
|
18
|
+
export declare function parseStorybookFile(storybookFileContent: string): StorybookAccessibilityInfo;
|
|
19
|
+
/**
|
|
20
|
+
* Get Storybook accessibility summary
|
|
21
|
+
*/
|
|
22
|
+
export declare function getStorybookSummary(storybookInfo: StorybookAccessibilityInfo): {
|
|
23
|
+
summary: string;
|
|
24
|
+
details: string[];
|
|
25
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test Results Parser
|
|
3
|
+
* Parses accessibility test files to extract test coverage information
|
|
4
|
+
*/
|
|
5
|
+
export interface TestCoverageInfo {
|
|
6
|
+
totalTests: number;
|
|
7
|
+
testCategories: string[];
|
|
8
|
+
testDescriptions: string[];
|
|
9
|
+
wcagCriteriaTested: string[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Parse test file to extract coverage information
|
|
13
|
+
* This is a simplified parser - in a real implementation, you might use AST parsing
|
|
14
|
+
*/
|
|
15
|
+
export declare function parseTestFile(testFileContent: string): TestCoverageInfo;
|
|
16
|
+
/**
|
|
17
|
+
* Get test coverage summary for display
|
|
18
|
+
*/
|
|
19
|
+
export declare function getTestCoverageSummary(testInfo: TestCoverageInfo): {
|
|
20
|
+
summary: string;
|
|
21
|
+
details: string[];
|
|
22
|
+
};
|
|
@@ -42,8 +42,7 @@ import { ResponsiveSkeletonTokens } from '../components/Skeleton/skeleton.tokens
|
|
|
42
42
|
import { BREAKPOINTS } from '../breakpoints/breakPoints';
|
|
43
43
|
import { ResponsiveMobileNavigationTokens } from '../components/Sidebar/SidebarMobile/mobile.tokens';
|
|
44
44
|
import { ResponsiveStepperTokens } from '../components/Stepper/stepper.tokens';
|
|
45
|
-
import {
|
|
46
|
-
import { Theme } from './ThemeProvider';
|
|
45
|
+
import { Theme } from './theme.enum';
|
|
47
46
|
export type ComponentTokenType = {
|
|
48
47
|
TAGS?: ResponsiveTagTokens;
|
|
49
48
|
SEARCH_INPUT?: ResponsiveSearchInputTokens;
|
|
@@ -87,7 +86,6 @@ export type ComponentTokenType = {
|
|
|
87
86
|
MOBILE_NAVIGATION?: ResponsiveMobileNavigationTokens;
|
|
88
87
|
UPLOAD?: ResponsiveUploadTokens;
|
|
89
88
|
CODE_BLOCK?: ResponsiveCodeBlockTokens;
|
|
90
|
-
WORKFLOW_CANVAS?: ResponsiveWorkflowTokens;
|
|
91
89
|
};
|
|
92
90
|
type ThemeContextType = {
|
|
93
91
|
foundationTokens: ThemeType;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { BreakpointType } from '../breakpoints/breakPoints';
|
|
2
2
|
import { ThemeType } from '../tokens';
|
|
3
3
|
import { ComponentTokenType } from './ThemeContext';
|
|
4
|
-
|
|
5
|
-
LIGHT = "light",
|
|
6
|
-
DARK = "dark"
|
|
7
|
-
}
|
|
4
|
+
import { Theme } from './theme.enum';
|
|
8
5
|
type ThemeProviderProps = {
|
|
9
6
|
foundationTokens?: ThemeType;
|
|
10
7
|
componentTokens?: ComponentTokenType;
|
package/dist/context/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { default as ThemeProvider
|
|
1
|
+
export { default as ThemeProvider } from './ThemeProvider';
|
|
2
|
+
export { Theme } from './theme.enum';
|
|
2
3
|
export { useTheme } from './ThemeContext';
|
|
3
4
|
export type { ComponentTokenType } from './ThemeContext';
|
|
4
5
|
export type { ThemeType } from '../tokens';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ThemeType } from '../tokens';
|
|
2
2
|
import { ComponentTokenType } from './ThemeContext';
|
|
3
|
-
import { Theme } from './
|
|
3
|
+
import { Theme } from './theme.enum';
|
|
4
4
|
declare const initTokens: (componentTokens: ComponentTokenType, foundationTokens: ThemeType, theme?: Theme | string) => Required<ComponentTokenType>;
|
|
5
5
|
export default initTokens;
|