@qwickapps/react-framework 1.3.3 → 1.3.5
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 +227 -0
- package/dist/components/blocks/Content.d.ts.map +1 -1
- package/dist/components/blocks/ProductCard.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/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/contexts/ThemeContext.d.ts.map +1 -1
- package/dist/index.esm.js +963 -105
- package/dist/index.js +967 -101
- 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/blocks/Content.tsx +25 -77
- package/src/components/blocks/ProductCard.tsx +50 -51
- package/src/components/forms/FormBlock.tsx +2 -2
- 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/contexts/ThemeContext.tsx +1 -2
- package/src/schemas/CollapsibleLayoutSchema.ts +276 -0
- package/src/schemas/SwitchInputFieldSchema.ts +99 -0
- package/src/stories/CollapsibleLayout.stories.tsx +1566 -0
- package/src/types/CollapsibleLayout.ts +231 -0
- package/src/types/index.ts +1 -0
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 4, 2025 - Stability & Inline Wrapper Guard
|
|
8
|
+
|
|
9
|
+
- **ProductCard Stability Fix**: Removed inline wrapper React components that caused subtree remounts and potential focus/state loss; replaced with stable JSX fragments.
|
|
10
|
+
- **Preventive Lint Rule**: Repo now enforces a custom `no-inline-component-wrapper` ESLint rule (scoped rollout) to block reintroduction of the remount pattern.
|
|
11
|
+
- **Internal Refactor Only**: No public API changes; safe patch update.
|
|
12
|
+
|
|
13
|
+
|
|
7
14
|
### September 2, 2025 - Built-in Error Handling & Accessibility
|
|
8
15
|
- **Automatic Error Boundaries**: QwickApp now automatically wraps all content with ErrorBoundary for robust error handling
|
|
9
16
|
- **Built-in Accessibility**: AccessibilityProvider automatically included for WCAG 2.1 AA compliance
|
|
@@ -37,6 +44,7 @@ A complete React framework for building modern, responsive applications with int
|
|
|
37
44
|
- **Content Blocks**: Styled containers with variants (elevated, outlined, filled)
|
|
38
45
|
- **Feature Grids**: Showcase features with icons, titles, and actions
|
|
39
46
|
- **Section Containers**: Configurable spacing and background variants
|
|
47
|
+
- **CollapsibleLayout**: Advanced expandable/collapsible containers with state management
|
|
40
48
|
|
|
41
49
|
### 🎨 **Advanced Theming**
|
|
42
50
|
- **Theme Management**: Light, dark, and system theme support
|
|
@@ -301,6 +309,72 @@ import { Section, Content } from '@qwickapps/react-framework';
|
|
|
301
309
|
</Section>
|
|
302
310
|
```
|
|
303
311
|
|
|
312
|
+
### CollapsibleLayout
|
|
313
|
+
|
|
314
|
+
Create advanced expandable/collapsible sections with comprehensive features:
|
|
315
|
+
|
|
316
|
+
```tsx
|
|
317
|
+
import { CollapsibleLayout } from '@qwickapps/react-framework';
|
|
318
|
+
|
|
319
|
+
<CollapsibleLayout
|
|
320
|
+
title="User Settings"
|
|
321
|
+
subtitle="Configure your account preferences"
|
|
322
|
+
defaultCollapsed={false}
|
|
323
|
+
variant="outlined" // 'default' | 'outlined' | 'elevated' | 'filled'
|
|
324
|
+
triggerArea="header" // 'header' | 'button' | 'both'
|
|
325
|
+
animationStyle="slide" // 'fade' | 'slide' | 'scale'
|
|
326
|
+
persistState={true} // Remember state in localStorage
|
|
327
|
+
leadIcon={<SettingsIcon />}
|
|
328
|
+
headerActions={
|
|
329
|
+
<Button size="small">Edit</Button>
|
|
330
|
+
}
|
|
331
|
+
>
|
|
332
|
+
<Stack spacing={2}>
|
|
333
|
+
<TextField label="Display Name" />
|
|
334
|
+
<TextField label="Email" />
|
|
335
|
+
<Switch label="Email Notifications" />
|
|
336
|
+
</Stack>
|
|
337
|
+
</CollapsibleLayout>
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
**Key Features:**
|
|
341
|
+
- **Controlled & Uncontrolled State**: Use `collapsed` prop for controlled state or `defaultCollapsed` for uncontrolled
|
|
342
|
+
- **State Persistence**: `persistState` option saves collapsed state to localStorage
|
|
343
|
+
- **Multiple Animations**: Choose from fade, slide, or scale animations with customizable duration
|
|
344
|
+
- **Flexible Triggers**: Header click, button only, or both can trigger expand/collapse
|
|
345
|
+
- **Rich Content Support**: Supports React components, HTML strings, and mixed content
|
|
346
|
+
- **Accessibility Built-in**: ARIA attributes, keyboard navigation, and screen reader support
|
|
347
|
+
- **Visual Variants**: Material-UI inspired variants (outlined, elevated, filled)
|
|
348
|
+
- **CMS Integration**: Full data binding support for content management systems
|
|
349
|
+
|
|
350
|
+
**Advanced Usage:**
|
|
351
|
+
|
|
352
|
+
```tsx
|
|
353
|
+
// Controlled state with custom icons
|
|
354
|
+
const [isCollapsed, setIsCollapsed] = useState(false);
|
|
355
|
+
|
|
356
|
+
<CollapsibleLayout
|
|
357
|
+
title="Advanced Configuration"
|
|
358
|
+
collapsed={isCollapsed}
|
|
359
|
+
onToggle={setIsCollapsed}
|
|
360
|
+
collapsedIcon={<ExpandMoreIcon />}
|
|
361
|
+
expandedIcon={<ExpandLessIcon />}
|
|
362
|
+
collapsedView={
|
|
363
|
+
<Typography color="text.secondary">
|
|
364
|
+
Click to view configuration options...
|
|
365
|
+
</Typography>
|
|
366
|
+
}
|
|
367
|
+
footerView={
|
|
368
|
+
<Button size="small">Save Changes</Button>
|
|
369
|
+
}
|
|
370
|
+
>
|
|
371
|
+
{/* Complex form content */}
|
|
372
|
+
</CollapsibleLayout>
|
|
373
|
+
|
|
374
|
+
// Data binding with CMS
|
|
375
|
+
<CollapsibleLayout dataSource="settings.user-preferences" />
|
|
376
|
+
```
|
|
377
|
+
|
|
304
378
|
## CMS Content Components
|
|
305
379
|
|
|
306
380
|
Transform HTML strings and Markdown content into React components with intelligent element transformation and syntax highlighting.
|
|
@@ -646,6 +720,49 @@ interface TransformConfig {
|
|
|
646
720
|
}
|
|
647
721
|
```
|
|
648
722
|
|
|
723
|
+
### CollapsibleLayout Component
|
|
724
|
+
|
|
725
|
+
```tsx
|
|
726
|
+
interface CollapsibleLayoutProps extends WithBaseProps, WithDataBinding {
|
|
727
|
+
// State Management
|
|
728
|
+
collapsed?: boolean; // Controlled collapsed state
|
|
729
|
+
defaultCollapsed?: boolean; // Initial collapsed state (uncontrolled)
|
|
730
|
+
onToggle?: (collapsed: boolean) => void; // State change callback
|
|
731
|
+
persistState?: boolean; // Save state to localStorage
|
|
732
|
+
storageKey?: string; // Custom storage key
|
|
733
|
+
|
|
734
|
+
// Content
|
|
735
|
+
title?: string; // Header title
|
|
736
|
+
subtitle?: string; // Header subtitle
|
|
737
|
+
leadIcon?: ReactNode; // Icon before title
|
|
738
|
+
headerActions?: ReactNode; // Actions in header (buttons, etc.)
|
|
739
|
+
children?: ReactNode; // Main expandable content
|
|
740
|
+
collapsedView?: ReactNode; // Content shown when collapsed
|
|
741
|
+
footerView?: ReactNode; // Always-visible footer content
|
|
742
|
+
|
|
743
|
+
// Behavior
|
|
744
|
+
triggerArea?: 'header' | 'button' | 'both'; // Click trigger area
|
|
745
|
+
animationStyle?: 'fade' | 'slide' | 'scale'; // Animation type
|
|
746
|
+
animationDuration?: number; // Animation duration (ms)
|
|
747
|
+
disableAnimations?: boolean; // Disable all animations
|
|
748
|
+
|
|
749
|
+
// Styling
|
|
750
|
+
variant?: 'default' | 'outlined' | 'elevated' | 'filled';
|
|
751
|
+
headerSpacing?: 'compact' | 'comfortable' | 'spacious';
|
|
752
|
+
contentSpacing?: 'compact' | 'comfortable' | 'spacious';
|
|
753
|
+
showDivider?: boolean; // Show section dividers
|
|
754
|
+
|
|
755
|
+
// Icons
|
|
756
|
+
collapsedIcon?: ReactNode; // Custom collapsed state icon
|
|
757
|
+
expandedIcon?: ReactNode; // Custom expanded state icon
|
|
758
|
+
|
|
759
|
+
// Accessibility
|
|
760
|
+
toggleAriaLabel?: string; // ARIA label for toggle button
|
|
761
|
+
'aria-describedby'?: string; // Describedby reference
|
|
762
|
+
contentAriaProps?: object; // Additional ARIA props
|
|
763
|
+
}
|
|
764
|
+
```
|
|
765
|
+
|
|
649
766
|
## Advanced Usage
|
|
650
767
|
|
|
651
768
|
### Custom Layout Composition
|
|
@@ -699,6 +816,113 @@ function LandingPage() {
|
|
|
699
816
|
}
|
|
700
817
|
```
|
|
701
818
|
|
|
819
|
+
### Advanced CollapsibleLayout Patterns
|
|
820
|
+
|
|
821
|
+
```tsx
|
|
822
|
+
// Settings Dashboard with Multiple Sections
|
|
823
|
+
function SettingsDashboard() {
|
|
824
|
+
return (
|
|
825
|
+
<QwickApp appName="Settings">
|
|
826
|
+
<Stack spacing={2}>
|
|
827
|
+
<CollapsibleLayout
|
|
828
|
+
title="Account Settings"
|
|
829
|
+
subtitle="Profile and security preferences"
|
|
830
|
+
defaultCollapsed={false}
|
|
831
|
+
variant="outlined"
|
|
832
|
+
leadIcon={<PersonIcon />}
|
|
833
|
+
persistState={true}
|
|
834
|
+
storageKey="settings-account"
|
|
835
|
+
>
|
|
836
|
+
<Stack spacing={2}>
|
|
837
|
+
<TextField label="Display Name" />
|
|
838
|
+
<TextField label="Email Address" />
|
|
839
|
+
<Switch label="Two-Factor Authentication" />
|
|
840
|
+
</Stack>
|
|
841
|
+
</CollapsibleLayout>
|
|
842
|
+
|
|
843
|
+
<CollapsibleLayout
|
|
844
|
+
title="Privacy Settings"
|
|
845
|
+
subtitle="Data usage and visibility"
|
|
846
|
+
defaultCollapsed={true}
|
|
847
|
+
variant="outlined"
|
|
848
|
+
leadIcon={<PrivacyIcon />}
|
|
849
|
+
triggerArea="both"
|
|
850
|
+
animationStyle="fade"
|
|
851
|
+
>
|
|
852
|
+
<Stack spacing={2}>
|
|
853
|
+
<Switch label="Public Profile" />
|
|
854
|
+
<Switch label="Activity Tracking" />
|
|
855
|
+
<TextField
|
|
856
|
+
label="Data Retention"
|
|
857
|
+
select
|
|
858
|
+
defaultValue="1year"
|
|
859
|
+
/>
|
|
860
|
+
</Stack>
|
|
861
|
+
</CollapsibleLayout>
|
|
862
|
+
</Stack>
|
|
863
|
+
</QwickApp>
|
|
864
|
+
);
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
// FAQ Section with Collapsed Previews
|
|
868
|
+
function FAQSection() {
|
|
869
|
+
const faqs = [
|
|
870
|
+
{
|
|
871
|
+
question: "How do I integrate with my CMS?",
|
|
872
|
+
preview: "Integration involves data providers and configuration...",
|
|
873
|
+
answer: "Detailed integration steps with code examples..."
|
|
874
|
+
},
|
|
875
|
+
// ... more FAQs
|
|
876
|
+
];
|
|
877
|
+
|
|
878
|
+
return (
|
|
879
|
+
<Stack spacing={2}>
|
|
880
|
+
{faqs.map((faq, index) => (
|
|
881
|
+
<CollapsibleLayout
|
|
882
|
+
key={index}
|
|
883
|
+
title={faq.question}
|
|
884
|
+
defaultCollapsed={true}
|
|
885
|
+
variant="outlined"
|
|
886
|
+
collapsedView={
|
|
887
|
+
<Typography color="text.secondary" sx={{ fontStyle: 'italic' }}>
|
|
888
|
+
{faq.preview}
|
|
889
|
+
</Typography>
|
|
890
|
+
}
|
|
891
|
+
>
|
|
892
|
+
<Typography>{faq.answer}</Typography>
|
|
893
|
+
</CollapsibleLayout>
|
|
894
|
+
))}
|
|
895
|
+
</Stack>
|
|
896
|
+
);
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
// Complex Data Dashboard
|
|
900
|
+
function DataDashboard() {
|
|
901
|
+
return (
|
|
902
|
+
<CollapsibleLayout
|
|
903
|
+
title="Sales Analytics"
|
|
904
|
+
subtitle="Q4 2024 performance metrics"
|
|
905
|
+
variant="elevated"
|
|
906
|
+
headerActions={
|
|
907
|
+
<Stack direction="row" spacing={1}>
|
|
908
|
+
<Chip label="Live" color="success" size="small" />
|
|
909
|
+
<Button size="small">Export</Button>
|
|
910
|
+
</Stack>
|
|
911
|
+
}
|
|
912
|
+
leadIcon={<ChartIcon />}
|
|
913
|
+
footerView={
|
|
914
|
+
<Typography variant="caption" color="text.secondary">
|
|
915
|
+
Last updated: {new Date().toLocaleTimeString()}
|
|
916
|
+
</Typography>
|
|
917
|
+
}
|
|
918
|
+
>
|
|
919
|
+
{/* Complex dashboard content with charts, tables, etc. */}
|
|
920
|
+
<DashboardContent />
|
|
921
|
+
</CollapsibleLayout>
|
|
922
|
+
);
|
|
923
|
+
}
|
|
924
|
+
```
|
|
925
|
+
|
|
702
926
|
### Accessing App Context
|
|
703
927
|
|
|
704
928
|
```tsx
|
|
@@ -728,6 +952,9 @@ import type {
|
|
|
728
952
|
HeroBlockProps,
|
|
729
953
|
ColumnLayoutProps,
|
|
730
954
|
FeatureItem,
|
|
955
|
+
CollapsibleLayoutProps,
|
|
956
|
+
CollapsibleLayoutViewProps,
|
|
957
|
+
UseCollapsibleLayoutState,
|
|
731
958
|
} from '@qwickapps/react-framework';
|
|
732
959
|
```
|
|
733
960
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/Content.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGhE,OAAO,YAAY,MAAM,6BAA6B,CAAC;AAMvD,KAAK,gBAAgB,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;AAEjD,MAAM,WAAW,YAAa,SAAQ,gBAAgB,EAAE,eAAe;CAAG;
|
|
1
|
+
{"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/Content.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGhE,OAAO,YAAY,MAAM,6BAA6B,CAAC;AAMvD,KAAK,gBAAgB,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;AAEjD,MAAM,WAAW,YAAa,SAAQ,gBAAgB,EAAE,eAAe;CAAG;AAwI1E,iBAAS,OAAO,CAAC,KAAK,EAAE,YAAY,kDA6CnC;AAED,eAAe,OAAO,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCard.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/ProductCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AASH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAoD,aAAa,EAAE,MAAM,aAAa,CAAC;AAI9F,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX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AAC,KAAK,EAAE,gBAAgB,kDAmE3C;AAED,eAAe,WAAW,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,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"}
|
|
@@ -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,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAA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@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollapsibleLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/CollapsibleLayout/CollapsibleLayout.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAwBH,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,yBAAyB,EAI1B,MAAM,kCAAkC,CAAC;AAG1C;;GAEG;AACH,iBAAS,mBAAmB,CAC1B,UAAU,EAAE,OAAO,EACnB,aAAa,CAAC,EAAE,OAAO,EACvB,oBAAoB,CAAC,EAAE,OAAO,EAC9B,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,EAC3C,YAAY,CAAC,EAAE,OAAO,EACtB,UAAU,CAAC,EAAE,MAAM,GAClB,yBAAyB,CA4D3B;AAED;;GAEG;AACH,iBAAS,qBAAqB,CAAC,EAE7B,SAAS,EAAE,aAAa,EACxB,gBAAwB,EACxB,QAAQ,EAGR,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,aAAa,EACb,QAAQ,EACR,UAAU,EAGV,WAAoB,EACpB,cAAwB,EACxB,YAAoB,EACpB,UAAU,EACV,iBAAuB,EACvB,iBAAyB,EAGzB,aAAa,EACb,YAAY,EAGZ,WAAkB,EAClB,OAAmB,EACnB,aAA6B,EAC7B,cAA8B,EAG9B,eAA6C,EAC7C,kBAAkB,EAAE,eAAe,EACnC,gBAAqB,EAGrB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,eAAe,EAEf,GAAG,SAAS,EACb,EAAE,0BAA0B,2CAuU5B;AAED;;GAEG;AACH,iBAAS,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,kDA+CvD;kBA/CQ,iBAAiB;;;AAoD1B,eAAe,iBAAiB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,CAAC;AACzE,YAAY,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CollapsibleLayout Component Exports
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
|
+
*/
|
|
6
|
+
export { default } from './CollapsibleLayout';
|
|
7
|
+
export { CollapsibleLayout, CollapsibleLayoutView, useCollapsibleState, } from './CollapsibleLayout';
|
|
8
|
+
export type { CollapsibleLayoutProps, CollapsibleLayoutViewProps, UseCollapsibleLayoutState, } from './CollapsibleLayout';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/CollapsibleLayout/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC"}
|
|
@@ -9,4 +9,6 @@ export { GridLayout } from './GridLayout';
|
|
|
9
9
|
export type { GridLayoutProps } from './GridLayout';
|
|
10
10
|
export { GridCell } from './GridCell';
|
|
11
11
|
export type { GridCellProps } from './GridCell';
|
|
12
|
+
export { CollapsibleLayout, CollapsibleLayoutView, useCollapsibleState } from './CollapsibleLayout';
|
|
13
|
+
export type { CollapsibleLayoutProps, CollapsibleLayoutViewProps, UseCollapsibleLayoutState } from './CollapsibleLayout';
|
|
12
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/layout/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/layout/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACpG,YAAY,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../src/contexts/ThemeContext.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,EAAkD,SAAS,EAAE,MAAM,OAAO,CAAC;AACzF,OAAO,EAAe,KAAK,EAAqC,MAAM,sBAAsB,CAAC;AAW7F,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AACpD,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,MAAM,CAAC;AAE/C,MA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