@qwickapps/react-framework 1.3.2 → 1.3.4
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/README.md +326 -0
- package/dist/components/AccessibilityProvider.d.ts +64 -0
- package/dist/components/AccessibilityProvider.d.ts.map +1 -0
- package/dist/components/Breadcrumbs.d.ts +39 -0
- package/dist/components/Breadcrumbs.d.ts.map +1 -0
- package/dist/components/ErrorBoundary.d.ts +39 -0
- package/dist/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/components/QwickApp.d.ts.map +1 -1
- package/dist/components/forms/FormBlock.d.ts +1 -1
- package/dist/components/forms/FormBlock.d.ts.map +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/input/SwitchInputField.d.ts +28 -0
- package/dist/components/input/SwitchInputField.d.ts.map +1 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input/index.d.ts.map +1 -1
- package/dist/components/layout/CollapsibleLayout/CollapsibleLayout.d.ts +34 -0
- package/dist/components/layout/CollapsibleLayout/CollapsibleLayout.d.ts.map +1 -0
- package/dist/components/layout/CollapsibleLayout/index.d.ts +9 -0
- package/dist/components/layout/CollapsibleLayout/index.d.ts.map +1 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout/index.d.ts.map +1 -1
- package/dist/index.bundled.css +12 -0
- package/dist/index.esm.js +1678 -25
- package/dist/index.js +1689 -21
- package/dist/schemas/CollapsibleLayoutSchema.d.ts +31 -0
- package/dist/schemas/CollapsibleLayoutSchema.d.ts.map +1 -0
- package/dist/schemas/SwitchInputFieldSchema.d.ts +18 -0
- package/dist/schemas/SwitchInputFieldSchema.d.ts.map +1 -0
- package/dist/types/CollapsibleLayout.d.ts +142 -0
- package/dist/types/CollapsibleLayout.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/AccessibilityProvider.tsx +466 -0
- package/src/components/Breadcrumbs.tsx +223 -0
- package/src/components/ErrorBoundary.tsx +216 -0
- package/src/components/QwickApp.tsx +17 -11
- package/src/components/__tests__/AccessibilityProvider.test.tsx +330 -0
- package/src/components/__tests__/Breadcrumbs.test.tsx +268 -0
- package/src/components/__tests__/ErrorBoundary.test.tsx +163 -0
- package/src/components/forms/FormBlock.tsx +2 -2
- package/src/components/index.ts +3 -0
- package/src/components/input/SwitchInputField.tsx +165 -0
- package/src/components/input/index.ts +2 -0
- package/src/components/layout/CollapsibleLayout/CollapsibleLayout.tsx +554 -0
- package/src/components/layout/CollapsibleLayout/__tests__/CollapsibleLayout.test.tsx +1469 -0
- package/src/components/layout/CollapsibleLayout/index.tsx +17 -0
- package/src/components/layout/index.ts +4 -1
- package/src/components/pages/FormPage.tsx +1 -1
- package/src/schemas/CollapsibleLayoutSchema.ts +276 -0
- package/src/schemas/SwitchInputFieldSchema.ts +99 -0
- package/src/stories/AccessibilityProvider.stories.tsx +284 -0
- package/src/stories/Breadcrumbs.stories.tsx +304 -0
- package/src/stories/CollapsibleLayout.stories.tsx +1566 -0
- package/src/stories/ErrorBoundary.stories.tsx +159 -0
- package/src/types/CollapsibleLayout.ts +231 -0
- package/src/types/index.ts +1 -0
- package/dist/schemas/Builders.d.ts +0 -7
- package/dist/schemas/Builders.d.ts.map +0 -1
- package/dist/schemas/types.d.ts +0 -7
- package/dist/schemas/types.d.ts.map +0 -1
- package/dist/types/DataBinding.d.ts +0 -7
- package/dist/types/DataBinding.d.ts.map +0 -1
- package/dist/types/DataProvider.d.ts +0 -7
- package/dist/types/DataProvider.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -4,6 +4,13 @@ A complete React framework for building modern, responsive applications with int
|
|
|
4
4
|
|
|
5
5
|
## What's New
|
|
6
6
|
|
|
7
|
+
### September 2, 2025 - Built-in Error Handling & Accessibility
|
|
8
|
+
- **Automatic Error Boundaries**: QwickApp now automatically wraps all content with ErrorBoundary for robust error handling
|
|
9
|
+
- **Built-in Accessibility**: AccessibilityProvider automatically included for WCAG 2.1 AA compliance
|
|
10
|
+
- **Generic Components**: Moved ErrorBoundary, AccessibilityProvider, and Breadcrumbs to framework level
|
|
11
|
+
- **Complete Test Coverage**: Added comprehensive unit tests and Storybook stories for all new components
|
|
12
|
+
- **Zero Configuration**: Error handling and accessibility features work out-of-the-box with QwickApp
|
|
13
|
+
|
|
7
14
|
### September 1, 2025 - Optional Dependencies & Performance
|
|
8
15
|
- **Optional Logging**: Made `@qwickapps/logging` an optional dependency with console fallback
|
|
9
16
|
- **Reduced Bundle Size**: Core framework no longer includes logging overhead by default
|
|
@@ -30,6 +37,7 @@ A complete React framework for building modern, responsive applications with int
|
|
|
30
37
|
- **Content Blocks**: Styled containers with variants (elevated, outlined, filled)
|
|
31
38
|
- **Feature Grids**: Showcase features with icons, titles, and actions
|
|
32
39
|
- **Section Containers**: Configurable spacing and background variants
|
|
40
|
+
- **CollapsibleLayout**: Advanced expandable/collapsible containers with state management
|
|
33
41
|
|
|
34
42
|
### 🎨 **Advanced Theming**
|
|
35
43
|
- **Theme Management**: Light, dark, and system theme support
|
|
@@ -46,6 +54,12 @@ A complete React framework for building modern, responsive applications with int
|
|
|
46
54
|
- **Markdown Component**: Convert Markdown to React components with syntax highlighting
|
|
47
55
|
- **Transform System**: Extensible HTML element transformation with fallback handling
|
|
48
56
|
|
|
57
|
+
### 🛡️ **Built-in Error Handling & Accessibility**
|
|
58
|
+
- **ErrorBoundary**: Automatic error catching with user-friendly fallback UI and retry functionality
|
|
59
|
+
- **AccessibilityProvider**: WCAG 2.1 AA compliance with system preference detection and ARIA announcements
|
|
60
|
+
- **Breadcrumbs**: Accessible navigation hierarchy with keyboard support and customization
|
|
61
|
+
- **Automatic Integration**: All features automatically enabled in QwickApp without configuration
|
|
62
|
+
|
|
49
63
|
### 🚀 **Developer Experience**
|
|
50
64
|
- **TypeScript First**: Full TypeScript support with comprehensive types
|
|
51
65
|
- **Storybook**: Interactive component documentation
|
|
@@ -288,6 +302,72 @@ import { Section, Content } from '@qwickapps/react-framework';
|
|
|
288
302
|
</Section>
|
|
289
303
|
```
|
|
290
304
|
|
|
305
|
+
### CollapsibleLayout
|
|
306
|
+
|
|
307
|
+
Create advanced expandable/collapsible sections with comprehensive features:
|
|
308
|
+
|
|
309
|
+
```tsx
|
|
310
|
+
import { CollapsibleLayout } from '@qwickapps/react-framework';
|
|
311
|
+
|
|
312
|
+
<CollapsibleLayout
|
|
313
|
+
title="User Settings"
|
|
314
|
+
subtitle="Configure your account preferences"
|
|
315
|
+
defaultCollapsed={false}
|
|
316
|
+
variant="outlined" // 'default' | 'outlined' | 'elevated' | 'filled'
|
|
317
|
+
triggerArea="header" // 'header' | 'button' | 'both'
|
|
318
|
+
animationStyle="slide" // 'fade' | 'slide' | 'scale'
|
|
319
|
+
persistState={true} // Remember state in localStorage
|
|
320
|
+
leadIcon={<SettingsIcon />}
|
|
321
|
+
headerActions={
|
|
322
|
+
<Button size="small">Edit</Button>
|
|
323
|
+
}
|
|
324
|
+
>
|
|
325
|
+
<Stack spacing={2}>
|
|
326
|
+
<TextField label="Display Name" />
|
|
327
|
+
<TextField label="Email" />
|
|
328
|
+
<Switch label="Email Notifications" />
|
|
329
|
+
</Stack>
|
|
330
|
+
</CollapsibleLayout>
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
**Key Features:**
|
|
334
|
+
- **Controlled & Uncontrolled State**: Use `collapsed` prop for controlled state or `defaultCollapsed` for uncontrolled
|
|
335
|
+
- **State Persistence**: `persistState` option saves collapsed state to localStorage
|
|
336
|
+
- **Multiple Animations**: Choose from fade, slide, or scale animations with customizable duration
|
|
337
|
+
- **Flexible Triggers**: Header click, button only, or both can trigger expand/collapse
|
|
338
|
+
- **Rich Content Support**: Supports React components, HTML strings, and mixed content
|
|
339
|
+
- **Accessibility Built-in**: ARIA attributes, keyboard navigation, and screen reader support
|
|
340
|
+
- **Visual Variants**: Material-UI inspired variants (outlined, elevated, filled)
|
|
341
|
+
- **CMS Integration**: Full data binding support for content management systems
|
|
342
|
+
|
|
343
|
+
**Advanced Usage:**
|
|
344
|
+
|
|
345
|
+
```tsx
|
|
346
|
+
// Controlled state with custom icons
|
|
347
|
+
const [isCollapsed, setIsCollapsed] = useState(false);
|
|
348
|
+
|
|
349
|
+
<CollapsibleLayout
|
|
350
|
+
title="Advanced Configuration"
|
|
351
|
+
collapsed={isCollapsed}
|
|
352
|
+
onToggle={setIsCollapsed}
|
|
353
|
+
collapsedIcon={<ExpandMoreIcon />}
|
|
354
|
+
expandedIcon={<ExpandLessIcon />}
|
|
355
|
+
collapsedView={
|
|
356
|
+
<Typography color="text.secondary">
|
|
357
|
+
Click to view configuration options...
|
|
358
|
+
</Typography>
|
|
359
|
+
}
|
|
360
|
+
footerView={
|
|
361
|
+
<Button size="small">Save Changes</Button>
|
|
362
|
+
}
|
|
363
|
+
>
|
|
364
|
+
{/* Complex form content */}
|
|
365
|
+
</CollapsibleLayout>
|
|
366
|
+
|
|
367
|
+
// Data binding with CMS
|
|
368
|
+
<CollapsibleLayout dataSource="settings.user-preferences" />
|
|
369
|
+
```
|
|
370
|
+
|
|
291
371
|
## CMS Content Components
|
|
292
372
|
|
|
293
373
|
Transform HTML strings and Markdown content into React components with intelligent element transformation and syntax highlighting.
|
|
@@ -633,6 +713,49 @@ interface TransformConfig {
|
|
|
633
713
|
}
|
|
634
714
|
```
|
|
635
715
|
|
|
716
|
+
### CollapsibleLayout Component
|
|
717
|
+
|
|
718
|
+
```tsx
|
|
719
|
+
interface CollapsibleLayoutProps extends WithBaseProps, WithDataBinding {
|
|
720
|
+
// State Management
|
|
721
|
+
collapsed?: boolean; // Controlled collapsed state
|
|
722
|
+
defaultCollapsed?: boolean; // Initial collapsed state (uncontrolled)
|
|
723
|
+
onToggle?: (collapsed: boolean) => void; // State change callback
|
|
724
|
+
persistState?: boolean; // Save state to localStorage
|
|
725
|
+
storageKey?: string; // Custom storage key
|
|
726
|
+
|
|
727
|
+
// Content
|
|
728
|
+
title?: string; // Header title
|
|
729
|
+
subtitle?: string; // Header subtitle
|
|
730
|
+
leadIcon?: ReactNode; // Icon before title
|
|
731
|
+
headerActions?: ReactNode; // Actions in header (buttons, etc.)
|
|
732
|
+
children?: ReactNode; // Main expandable content
|
|
733
|
+
collapsedView?: ReactNode; // Content shown when collapsed
|
|
734
|
+
footerView?: ReactNode; // Always-visible footer content
|
|
735
|
+
|
|
736
|
+
// Behavior
|
|
737
|
+
triggerArea?: 'header' | 'button' | 'both'; // Click trigger area
|
|
738
|
+
animationStyle?: 'fade' | 'slide' | 'scale'; // Animation type
|
|
739
|
+
animationDuration?: number; // Animation duration (ms)
|
|
740
|
+
disableAnimations?: boolean; // Disable all animations
|
|
741
|
+
|
|
742
|
+
// Styling
|
|
743
|
+
variant?: 'default' | 'outlined' | 'elevated' | 'filled';
|
|
744
|
+
headerSpacing?: 'compact' | 'comfortable' | 'spacious';
|
|
745
|
+
contentSpacing?: 'compact' | 'comfortable' | 'spacious';
|
|
746
|
+
showDivider?: boolean; // Show section dividers
|
|
747
|
+
|
|
748
|
+
// Icons
|
|
749
|
+
collapsedIcon?: ReactNode; // Custom collapsed state icon
|
|
750
|
+
expandedIcon?: ReactNode; // Custom expanded state icon
|
|
751
|
+
|
|
752
|
+
// Accessibility
|
|
753
|
+
toggleAriaLabel?: string; // ARIA label for toggle button
|
|
754
|
+
'aria-describedby'?: string; // Describedby reference
|
|
755
|
+
contentAriaProps?: object; // Additional ARIA props
|
|
756
|
+
}
|
|
757
|
+
```
|
|
758
|
+
|
|
636
759
|
## Advanced Usage
|
|
637
760
|
|
|
638
761
|
### Custom Layout Composition
|
|
@@ -686,6 +809,113 @@ function LandingPage() {
|
|
|
686
809
|
}
|
|
687
810
|
```
|
|
688
811
|
|
|
812
|
+
### Advanced CollapsibleLayout Patterns
|
|
813
|
+
|
|
814
|
+
```tsx
|
|
815
|
+
// Settings Dashboard with Multiple Sections
|
|
816
|
+
function SettingsDashboard() {
|
|
817
|
+
return (
|
|
818
|
+
<QwickApp appName="Settings">
|
|
819
|
+
<Stack spacing={2}>
|
|
820
|
+
<CollapsibleLayout
|
|
821
|
+
title="Account Settings"
|
|
822
|
+
subtitle="Profile and security preferences"
|
|
823
|
+
defaultCollapsed={false}
|
|
824
|
+
variant="outlined"
|
|
825
|
+
leadIcon={<PersonIcon />}
|
|
826
|
+
persistState={true}
|
|
827
|
+
storageKey="settings-account"
|
|
828
|
+
>
|
|
829
|
+
<Stack spacing={2}>
|
|
830
|
+
<TextField label="Display Name" />
|
|
831
|
+
<TextField label="Email Address" />
|
|
832
|
+
<Switch label="Two-Factor Authentication" />
|
|
833
|
+
</Stack>
|
|
834
|
+
</CollapsibleLayout>
|
|
835
|
+
|
|
836
|
+
<CollapsibleLayout
|
|
837
|
+
title="Privacy Settings"
|
|
838
|
+
subtitle="Data usage and visibility"
|
|
839
|
+
defaultCollapsed={true}
|
|
840
|
+
variant="outlined"
|
|
841
|
+
leadIcon={<PrivacyIcon />}
|
|
842
|
+
triggerArea="both"
|
|
843
|
+
animationStyle="fade"
|
|
844
|
+
>
|
|
845
|
+
<Stack spacing={2}>
|
|
846
|
+
<Switch label="Public Profile" />
|
|
847
|
+
<Switch label="Activity Tracking" />
|
|
848
|
+
<TextField
|
|
849
|
+
label="Data Retention"
|
|
850
|
+
select
|
|
851
|
+
defaultValue="1year"
|
|
852
|
+
/>
|
|
853
|
+
</Stack>
|
|
854
|
+
</CollapsibleLayout>
|
|
855
|
+
</Stack>
|
|
856
|
+
</QwickApp>
|
|
857
|
+
);
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
// FAQ Section with Collapsed Previews
|
|
861
|
+
function FAQSection() {
|
|
862
|
+
const faqs = [
|
|
863
|
+
{
|
|
864
|
+
question: "How do I integrate with my CMS?",
|
|
865
|
+
preview: "Integration involves data providers and configuration...",
|
|
866
|
+
answer: "Detailed integration steps with code examples..."
|
|
867
|
+
},
|
|
868
|
+
// ... more FAQs
|
|
869
|
+
];
|
|
870
|
+
|
|
871
|
+
return (
|
|
872
|
+
<Stack spacing={2}>
|
|
873
|
+
{faqs.map((faq, index) => (
|
|
874
|
+
<CollapsibleLayout
|
|
875
|
+
key={index}
|
|
876
|
+
title={faq.question}
|
|
877
|
+
defaultCollapsed={true}
|
|
878
|
+
variant="outlined"
|
|
879
|
+
collapsedView={
|
|
880
|
+
<Typography color="text.secondary" sx={{ fontStyle: 'italic' }}>
|
|
881
|
+
{faq.preview}
|
|
882
|
+
</Typography>
|
|
883
|
+
}
|
|
884
|
+
>
|
|
885
|
+
<Typography>{faq.answer}</Typography>
|
|
886
|
+
</CollapsibleLayout>
|
|
887
|
+
))}
|
|
888
|
+
</Stack>
|
|
889
|
+
);
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
// Complex Data Dashboard
|
|
893
|
+
function DataDashboard() {
|
|
894
|
+
return (
|
|
895
|
+
<CollapsibleLayout
|
|
896
|
+
title="Sales Analytics"
|
|
897
|
+
subtitle="Q4 2024 performance metrics"
|
|
898
|
+
variant="elevated"
|
|
899
|
+
headerActions={
|
|
900
|
+
<Stack direction="row" spacing={1}>
|
|
901
|
+
<Chip label="Live" color="success" size="small" />
|
|
902
|
+
<Button size="small">Export</Button>
|
|
903
|
+
</Stack>
|
|
904
|
+
}
|
|
905
|
+
leadIcon={<ChartIcon />}
|
|
906
|
+
footerView={
|
|
907
|
+
<Typography variant="caption" color="text.secondary">
|
|
908
|
+
Last updated: {new Date().toLocaleTimeString()}
|
|
909
|
+
</Typography>
|
|
910
|
+
}
|
|
911
|
+
>
|
|
912
|
+
{/* Complex dashboard content with charts, tables, etc. */}
|
|
913
|
+
<DashboardContent />
|
|
914
|
+
</CollapsibleLayout>
|
|
915
|
+
);
|
|
916
|
+
}
|
|
917
|
+
```
|
|
918
|
+
|
|
689
919
|
### Accessing App Context
|
|
690
920
|
|
|
691
921
|
```tsx
|
|
@@ -715,6 +945,9 @@ import type {
|
|
|
715
945
|
HeroBlockProps,
|
|
716
946
|
ColumnLayoutProps,
|
|
717
947
|
FeatureItem,
|
|
948
|
+
CollapsibleLayoutProps,
|
|
949
|
+
CollapsibleLayoutViewProps,
|
|
950
|
+
UseCollapsibleLayoutState,
|
|
718
951
|
} from '@qwickapps/react-framework';
|
|
719
952
|
```
|
|
720
953
|
|
|
@@ -797,6 +1030,99 @@ For complete documentation, see [@qwickapps/logging](../qwickapps-logging/README
|
|
|
797
1030
|
3. **Leverage the built-in performance monitoring** for theme changes
|
|
798
1031
|
4. **Consider lazy loading** for large component trees
|
|
799
1032
|
|
|
1033
|
+
## Built-in Error Handling & Accessibility
|
|
1034
|
+
|
|
1035
|
+
QwickApp automatically includes robust error handling and accessibility features without any configuration needed.
|
|
1036
|
+
|
|
1037
|
+
### ErrorBoundary
|
|
1038
|
+
|
|
1039
|
+
All QwickApp instances are automatically wrapped with an ErrorBoundary that:
|
|
1040
|
+
- Catches JavaScript errors anywhere in the component tree
|
|
1041
|
+
- Displays user-friendly fallback UI with retry functionality
|
|
1042
|
+
- Shows error details in development mode
|
|
1043
|
+
- Supports custom error handling callbacks
|
|
1044
|
+
|
|
1045
|
+
```tsx
|
|
1046
|
+
import { ErrorBoundary } from '@qwickapps/react-framework';
|
|
1047
|
+
|
|
1048
|
+
// For standalone usage outside QwickApp
|
|
1049
|
+
<ErrorBoundary onError={(error, errorInfo) => console.log(error)}>
|
|
1050
|
+
<MyComponent />
|
|
1051
|
+
</ErrorBoundary>
|
|
1052
|
+
|
|
1053
|
+
// Or use as Higher-Order Component
|
|
1054
|
+
const SafeComponent = withErrorBoundary(MyComponent, {
|
|
1055
|
+
fallback: <div>Custom error UI</div>
|
|
1056
|
+
});
|
|
1057
|
+
```
|
|
1058
|
+
|
|
1059
|
+
### AccessibilityProvider
|
|
1060
|
+
|
|
1061
|
+
All QwickApp instances automatically include accessibility features:
|
|
1062
|
+
- **System Preferences**: Detects high contrast, reduced motion preferences
|
|
1063
|
+
- **Keyboard Navigation**: Enhanced focus indicators for keyboard users
|
|
1064
|
+
- **Screen Reader Support**: ARIA live announcements
|
|
1065
|
+
- **Accessibility Auditing**: Development-time accessibility issue detection
|
|
1066
|
+
|
|
1067
|
+
```tsx
|
|
1068
|
+
import { useAccessibility } from '@qwickapps/react-framework';
|
|
1069
|
+
|
|
1070
|
+
function MyComponent() {
|
|
1071
|
+
const {
|
|
1072
|
+
highContrast,
|
|
1073
|
+
reducedMotion,
|
|
1074
|
+
isKeyboardUser,
|
|
1075
|
+
announce,
|
|
1076
|
+
runAudit
|
|
1077
|
+
} = useAccessibility();
|
|
1078
|
+
|
|
1079
|
+
return (
|
|
1080
|
+
<div>
|
|
1081
|
+
{highContrast && <p>High contrast mode enabled</p>}
|
|
1082
|
+
<button onClick={() => announce('Action completed', 'polite')}>
|
|
1083
|
+
Complete Action
|
|
1084
|
+
</button>
|
|
1085
|
+
</div>
|
|
1086
|
+
);
|
|
1087
|
+
}
|
|
1088
|
+
```
|
|
1089
|
+
|
|
1090
|
+
### Breadcrumbs
|
|
1091
|
+
|
|
1092
|
+
Generic breadcrumb navigation with full accessibility support:
|
|
1093
|
+
|
|
1094
|
+
```tsx
|
|
1095
|
+
import { Breadcrumbs, useBreadcrumbs } from '@qwickapps/react-framework';
|
|
1096
|
+
|
|
1097
|
+
const breadcrumbItems = [
|
|
1098
|
+
{ label: 'Home', href: '/', icon: <HomeIcon /> },
|
|
1099
|
+
{ label: 'Products', href: '/products' },
|
|
1100
|
+
{ label: 'Electronics', href: '/products/electronics', current: true },
|
|
1101
|
+
];
|
|
1102
|
+
|
|
1103
|
+
function Navigation() {
|
|
1104
|
+
const handleNavigate = (item, index) => {
|
|
1105
|
+
console.log('Navigate to:', item.label);
|
|
1106
|
+
};
|
|
1107
|
+
|
|
1108
|
+
return (
|
|
1109
|
+
<Breadcrumbs
|
|
1110
|
+
items={breadcrumbItems}
|
|
1111
|
+
onNavigate={handleNavigate}
|
|
1112
|
+
separator="→"
|
|
1113
|
+
maxItems={4}
|
|
1114
|
+
/>
|
|
1115
|
+
);
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
// Or use the hook for dynamic breadcrumbs
|
|
1119
|
+
function DynamicBreadcrumbs() {
|
|
1120
|
+
const { breadcrumbs, addBreadcrumb, setBreadcrumbs } = useBreadcrumbs();
|
|
1121
|
+
|
|
1122
|
+
return <Breadcrumbs items={breadcrumbs} />;
|
|
1123
|
+
}
|
|
1124
|
+
```
|
|
1125
|
+
|
|
800
1126
|
## License
|
|
801
1127
|
|
|
802
1128
|
This software is licensed under the **PolyForm Shield License 1.0.0**.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export interface AccessibilityState {
|
|
3
|
+
highContrast: boolean;
|
|
4
|
+
reducedMotion: boolean;
|
|
5
|
+
largeText: boolean;
|
|
6
|
+
focusVisible: boolean;
|
|
7
|
+
isKeyboardUser: boolean;
|
|
8
|
+
issues: AccessibilityIssue[];
|
|
9
|
+
lastAnnouncement: Announcement | null;
|
|
10
|
+
preferences: Record<string, any>;
|
|
11
|
+
}
|
|
12
|
+
export interface AccessibilityIssue {
|
|
13
|
+
type: string;
|
|
14
|
+
message: string;
|
|
15
|
+
level: 'error' | 'warning' | 'info';
|
|
16
|
+
element?: Element;
|
|
17
|
+
}
|
|
18
|
+
export interface Announcement {
|
|
19
|
+
message: string;
|
|
20
|
+
level: 'polite' | 'assertive';
|
|
21
|
+
timestamp: number;
|
|
22
|
+
}
|
|
23
|
+
export interface AccessibilityContextValue extends AccessibilityState {
|
|
24
|
+
setHighContrast: (enabled: boolean) => void;
|
|
25
|
+
setReducedMotion: (enabled: boolean) => void;
|
|
26
|
+
setLargeText: (enabled: boolean) => void;
|
|
27
|
+
setFocusVisible: (enabled: boolean) => void;
|
|
28
|
+
announce: (message: string, level?: 'polite' | 'assertive') => void;
|
|
29
|
+
announcePolite: (message: string) => void;
|
|
30
|
+
announceAssertive: (message: string) => void;
|
|
31
|
+
addIssue: (issue: AccessibilityIssue) => void;
|
|
32
|
+
clearIssues: () => void;
|
|
33
|
+
runAudit: () => void;
|
|
34
|
+
}
|
|
35
|
+
export interface AccessibilityProviderProps {
|
|
36
|
+
children: ReactNode;
|
|
37
|
+
enableAudit?: boolean;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Accessibility Provider Component
|
|
41
|
+
* Provides comprehensive accessibility context and utilities
|
|
42
|
+
*
|
|
43
|
+
* Features:
|
|
44
|
+
* - System preference detection (high contrast, reduced motion)
|
|
45
|
+
* - Keyboard navigation detection
|
|
46
|
+
* - ARIA live announcements
|
|
47
|
+
* - Focus management
|
|
48
|
+
* - Accessibility auditing
|
|
49
|
+
* - Settings persistence
|
|
50
|
+
*/
|
|
51
|
+
export declare const AccessibilityProvider: React.FC<AccessibilityProviderProps>;
|
|
52
|
+
/**
|
|
53
|
+
* Hook to access accessibility context
|
|
54
|
+
*/
|
|
55
|
+
export declare const useAccessibility: () => AccessibilityContextValue;
|
|
56
|
+
/**
|
|
57
|
+
* Higher-Order Component for accessibility enhancements
|
|
58
|
+
*/
|
|
59
|
+
export declare const withAccessibility: <P extends object>(WrappedComponent: React.ComponentType<P>) => {
|
|
60
|
+
(props: P): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
displayName: string;
|
|
62
|
+
};
|
|
63
|
+
export default AccessibilityProvider;
|
|
64
|
+
//# sourceMappingURL=AccessibilityProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccessibilityProvider.d.ts","sourceRoot":"","sources":["../../src/components/AccessibilityProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAoD,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3F,MAAM,WAAW,kBAAkB;IAClC,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACx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;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAoPtE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAO,yBAQnC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,MAAM,EACjD,kBAAkB,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;YAEO,CAAC;;CAchD,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BreadcrumbItem {
|
|
3
|
+
label: string;
|
|
4
|
+
href?: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
current?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface BreadcrumbsProps {
|
|
9
|
+
items: BreadcrumbItem[];
|
|
10
|
+
separator?: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
onNavigate?: (item: BreadcrumbItem, index: number) => void;
|
|
13
|
+
maxItems?: number;
|
|
14
|
+
showRoot?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Generic Breadcrumbs component for navigation hierarchy
|
|
18
|
+
*
|
|
19
|
+
* Features:
|
|
20
|
+
* - Accessible navigation with proper ARIA labels
|
|
21
|
+
* - Customizable separators and icons
|
|
22
|
+
* - Responsive design with item truncation
|
|
23
|
+
* - Support for custom navigation handlers
|
|
24
|
+
* - Keyboard navigation support
|
|
25
|
+
* - Screen reader friendly
|
|
26
|
+
*/
|
|
27
|
+
export declare const Breadcrumbs: React.FC<BreadcrumbsProps>;
|
|
28
|
+
/**
|
|
29
|
+
* Hook for managing breadcrumb state
|
|
30
|
+
*/
|
|
31
|
+
export declare const useBreadcrumbs: () => {
|
|
32
|
+
breadcrumbs: BreadcrumbItem[];
|
|
33
|
+
addBreadcrumb: (item: BreadcrumbItem) => void;
|
|
34
|
+
removeBreadcrumb: (index: number) => void;
|
|
35
|
+
setBreadcrumbs: (items: BreadcrumbItem[]) => void;
|
|
36
|
+
clearBreadcrumbs: () => void;
|
|
37
|
+
};
|
|
38
|
+
export default Breadcrumbs;
|
|
39
|
+
//# sourceMappingURL=Breadcrumbs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/components/Breadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,cAAc;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAChC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA+IlD,CAAC;AAmBF;;GAEG;AACH,eAAO,MAAM,cAAc;;0BAGqB,cAAc;8BAIV,MAAM;4BAID,cAAc,EAAE;;CAexE,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React, { Component, ErrorInfo, ReactNode } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
fallback?: ReactNode;
|
|
5
|
+
onError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
6
|
+
showErrorDetails?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface State {
|
|
9
|
+
hasError: boolean;
|
|
10
|
+
error: Error | null;
|
|
11
|
+
errorInfo: ErrorInfo | null;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Generic ErrorBoundary component for catching and handling React errors
|
|
15
|
+
*
|
|
16
|
+
* Features:
|
|
17
|
+
* - Catches JavaScript errors anywhere in child component tree
|
|
18
|
+
* - Displays fallback UI with retry functionality
|
|
19
|
+
* - Shows error details in development mode
|
|
20
|
+
* - Customizable error handling and fallback UI
|
|
21
|
+
* - Automatic error logging
|
|
22
|
+
*/
|
|
23
|
+
export declare class ErrorBoundary extends Component<Props, State> {
|
|
24
|
+
constructor(props: Props);
|
|
25
|
+
static getDerivedStateFromError(error: Error): State;
|
|
26
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
27
|
+
handleRetry: () => void;
|
|
28
|
+
handleRefresh: () => void;
|
|
29
|
+
render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Higher-order component that wraps a component with ErrorBoundary
|
|
33
|
+
*/
|
|
34
|
+
export declare function withErrorBoundary<P extends object>(WrappedComponent: React.ComponentType<P>, errorBoundaryProps?: Omit<Props, 'children'>): {
|
|
35
|
+
(props: P): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
38
|
+
export default ErrorBoundary;
|
|
39
|
+
//# sourceMappingURL=ErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/components/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG/D,UAAU,KAAK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,CAAC;AACvD,OAAO,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"QwickApp.d.ts","sourceRoot":"","sources":["../../src/components/QwickApp.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAiC,MAAM,OAAO,CAAC;AACtD,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAmB,KAAK,oBAAoB,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC7G,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,gBAAgB,CAAC;AAQxB,UAAU,sBAAuB,SAAQ,aAAa;IACpD,yDAAyD;IACzD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,2CAA2C;IAC3C,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,8CAA8C;IAC9C,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,0FAA0F;IAC1F,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC5B,+EAA+E;IAC/E,UAAU,CAAC,EAAE,sBAAsB,CAAC;CAErC;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA2FrD,CAAC;AAEF,eAAO,MAAM,WAAW,QAAO,oBAM9B,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormBlock.d.ts","sourceRoot":"","sources":["../../../src/components/forms/FormBlock.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAYH,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAI3D,KAAK,kBAAkB,GAAG,UAAU,CAAC,cAAc,CAAC,GAAG;IACrD;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAEtC;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"FormBlock.d.ts","sourceRoot":"","sources":["../../../src/components/forms/FormBlock.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAYH,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAI3D,KAAK,kBAAkB,GAAG,UAAU,CAAC,cAAc,CAAC,GAAG;IACrD;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAEtC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAAC;AAEF,MAAM,WAAW,cAAe,SAAQ,kBAAkB,EAAE,eAAe;CAAI;AAyK/E;;;GAGG;AACH,iBAAS,SAAS,CAAC,KAAK,EAAE,cAAc,kDAwDvC;AAKD,eAAe,SAAS,CAAC"}
|
|
@@ -19,6 +19,9 @@ export * from './Scaffold';
|
|
|
19
19
|
export * from './ResponsiveMenu';
|
|
20
20
|
export * from './QwickApp';
|
|
21
21
|
export * from './AccessibilityChecker';
|
|
22
|
+
export * from './ErrorBoundary';
|
|
23
|
+
export * from './AccessibilityProvider';
|
|
24
|
+
export * from './Breadcrumbs';
|
|
22
25
|
export { default as Logo } from './Logo';
|
|
23
26
|
export type { LogoProps } from './Logo';
|
|
24
27
|
export { default as QwickAppsLogo } from './QwickAppsLogo';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAG9B,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SwitchInputField - Switch toggle component with data binding support
|
|
3
|
+
*
|
|
4
|
+
* Provides a standardized switch field with:
|
|
5
|
+
* - Consistent Material-UI styling
|
|
6
|
+
* - Data binding capabilities
|
|
7
|
+
* - Label and helper text support
|
|
8
|
+
* - Focus and error handling
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
11
|
+
*/
|
|
12
|
+
import type { WithDataBinding, ModelProps } from '@qwickapps/schema';
|
|
13
|
+
import SwitchInputFieldModel from '../../schemas/SwitchInputFieldSchema';
|
|
14
|
+
type SwitchInputFieldViewProps = ModelProps<SwitchInputFieldModel> & {
|
|
15
|
+
/** Change handler */
|
|
16
|
+
onChange?: (checked: boolean) => void;
|
|
17
|
+
/** Focus handler */
|
|
18
|
+
onFocus?: () => void;
|
|
19
|
+
};
|
|
20
|
+
export interface SwitchInputFieldProps extends SwitchInputFieldViewProps, WithDataBinding {
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* SwitchInputField component with data binding support
|
|
24
|
+
* Supports both traditional props and dataSource-driven rendering
|
|
25
|
+
*/
|
|
26
|
+
declare function SwitchInputField(props: SwitchInputFieldProps): import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
export default SwitchInputField;
|
|
28
|
+
//# sourceMappingURL=SwitchInputField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwitchInputField.d.ts","sourceRoot":"","sources":["../../../src/components/input/SwitchInputField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAWH,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGrE,OAAO,qBAAqB,MAAM,sCAAsC,CAAC;AAEzE,KAAK,yBAAyB,GAAG,UAAU,CAAC,qBAAqB,CAAC,GAAG;IACnE,qBAAqB;IACrB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,MAAM,WAAW,qBAAsB,SAAQ,yBAAyB,EAAE,eAAe;CAAG;AA2D5F;;;GAGG;AACH,iBAAS,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,kDA+DrD;AAKD,eAAe,gBAAgB,CAAC"}
|
|
@@ -7,11 +7,13 @@
|
|
|
7
7
|
export { default as ChoiceInputField } from './ChoiceInputField';
|
|
8
8
|
export { default as HtmlInputField } from './HtmlInputField';
|
|
9
9
|
export { default as SelectInputField } from './SelectInputField';
|
|
10
|
+
export { default as SwitchInputField } from './SwitchInputField';
|
|
10
11
|
export { default as TextField } from './TextField';
|
|
11
12
|
export { default as TextInputField } from './TextInputField';
|
|
12
13
|
export type { ChoiceInputFieldProps } from './ChoiceInputField';
|
|
13
14
|
export type { HtmlInputFieldProps } from './HtmlInputField';
|
|
14
15
|
export type { SelectInputFieldProps, SelectOption } from './SelectInputField';
|
|
16
|
+
export type { SwitchInputFieldProps } from './SwitchInputField';
|
|
15
17
|
export type { TextFieldProps } from './TextField';
|
|
16
18
|
export type { TextInputFieldProps } from './TextInputField';
|
|
17
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/input/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM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M,oBAAoB,CAAC;AAChE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CollapsibleLayout Component - Advanced expandable/collapsible container
|
|
3
|
+
*
|
|
4
|
+
* Features:
|
|
5
|
+
* - Controlled and uncontrolled state management
|
|
6
|
+
* - Multiple animation styles (fade, slide, scale)
|
|
7
|
+
* - Customizable trigger areas (button, header, both)
|
|
8
|
+
* - localStorage persistence
|
|
9
|
+
* - Full accessibility support
|
|
10
|
+
* - Material-UI integration with themes
|
|
11
|
+
* - Multiple visual variants
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
14
|
+
*/
|
|
15
|
+
import { CollapsibleLayoutViewProps, CollapsibleLayoutProps, UseCollapsibleLayoutState } from '../../../types/CollapsibleLayout';
|
|
16
|
+
/**
|
|
17
|
+
* Custom hook for managing collapsible state - simplified approach
|
|
18
|
+
*/
|
|
19
|
+
declare function useCollapsibleState(controlled: boolean, collapsedProp?: boolean, defaultCollapsedProp?: boolean, onToggleProp?: (collapsed: boolean) => void, persistState?: boolean, storageKey?: string): UseCollapsibleLayoutState;
|
|
20
|
+
/**
|
|
21
|
+
* Core CollapsibleLayout View component
|
|
22
|
+
*/
|
|
23
|
+
declare function CollapsibleLayoutView({ collapsed: collapsedProp, defaultCollapsed, onToggle, title, subtitle, leadIcon, headerActions, collapsedView, children, footerView, triggerArea, animationStyle, persistState, storageKey, animationDuration, disableAnimations, collapsedIcon, expandedIcon, showDivider, variant, headerSpacing, contentSpacing, toggleAriaLabel, 'aria-describedby': ariaDescribedBy, contentAriaProps, containerClassName, headerClassName, contentClassName, footerClassName, ...restProps }: CollapsibleLayoutViewProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* Main CollapsibleLayout component with data binding support
|
|
26
|
+
*/
|
|
27
|
+
declare function CollapsibleLayout(props: CollapsibleLayoutProps): import("react/jsx-runtime").JSX.Element | null;
|
|
28
|
+
declare namespace CollapsibleLayout {
|
|
29
|
+
var defaultProps: Partial<CollapsibleLayoutProps>;
|
|
30
|
+
}
|
|
31
|
+
export default CollapsibleLayout;
|
|
32
|
+
export { CollapsibleLayout, CollapsibleLayoutView, useCollapsibleState };
|
|
33
|
+
export type { CollapsibleLayoutProps, CollapsibleLayoutViewProps, UseCollapsibleLayoutState };
|
|
34
|
+
//# sourceMappingURL=CollapsibleLayout.d.ts.map
|