@sudobility/components 4.0.32 → 4.0.33
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/index.esm.js +1868 -1813
- package/dist/index.umd.js +11 -11
- package/dist/layout/Footer/Footer.d.ts.map +1 -1
- package/dist/layout/Layout/ContentContainer.d.ts +40 -0
- package/dist/layout/Layout/ContentContainer.d.ts.map +1 -0
- package/dist/layout/Layout/LayoutContext.d.ts +48 -0
- package/dist/layout/Layout/LayoutContext.d.ts.map +1 -0
- package/dist/layout/Layout/index.d.ts +47 -0
- package/dist/layout/Layout/index.d.ts.map +1 -0
- package/dist/layout/Topbar/Topbar.d.ts.map +1 -1
- package/dist/layout/index.d.ts +1 -0
- package/dist/layout/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../src/layout/Footer/Footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../src/layout/Footer/Footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIzC,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,SAAS,CAAC;AAE/C,MAAM,WAAW,WAAW;IAC1B,qEAAqE;IACrE,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,oDAAoD;IACpD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAwBxC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { LayoutMode } from './LayoutContext';
|
|
3
|
+
export interface ContentContainerProps {
|
|
4
|
+
/** Content to render */
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** Override the layout mode from context */
|
|
7
|
+
mode?: LayoutMode;
|
|
8
|
+
/** Additional CSS classes */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** HTML element to render as */
|
|
11
|
+
as?: 'div' | 'main' | 'section' | 'article';
|
|
12
|
+
/** Whether to include padding (default: true) */
|
|
13
|
+
withPadding?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* ContentContainer - Applies consistent width constraints based on layout context
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* // Uses layout mode from context
|
|
21
|
+
* <LayoutProvider mode="standard">
|
|
22
|
+
* <ContentContainer>
|
|
23
|
+
* <h1>Page Title</h1>
|
|
24
|
+
* <p>Content here...</p>
|
|
25
|
+
* </ContentContainer>
|
|
26
|
+
* </LayoutProvider>
|
|
27
|
+
*
|
|
28
|
+
* // Override mode locally
|
|
29
|
+
* <ContentContainer mode="wide">
|
|
30
|
+
* <Dashboard />
|
|
31
|
+
* </ContentContainer>
|
|
32
|
+
*
|
|
33
|
+
* // As main element
|
|
34
|
+
* <ContentContainer as="main" className="py-8">
|
|
35
|
+
* <PageContent />
|
|
36
|
+
* </ContentContainer>
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare const ContentContainer: React.FC<ContentContainerProps>;
|
|
40
|
+
//# sourceMappingURL=ContentContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentContainer.d.ts","sourceRoot":"","sources":["../../../src/layout/Layout/ContentContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAa,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAExD,MAAM,WAAW,qBAAqB;IACpC,wBAAwB;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,4CAA4C;IAC5C,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;IAC5C,iDAAiD;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAmB5D,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
export type LayoutMode = 'standard' | 'wide' | 'full';
|
|
3
|
+
export interface LayoutContextValue {
|
|
4
|
+
/** Current layout mode */
|
|
5
|
+
mode: LayoutMode;
|
|
6
|
+
/** CSS classes for the container */
|
|
7
|
+
containerClass: string;
|
|
8
|
+
/** CSS classes for just the max-width (without padding) */
|
|
9
|
+
maxWidthClass: string;
|
|
10
|
+
/** CSS classes for just the padding */
|
|
11
|
+
paddingClass: string;
|
|
12
|
+
}
|
|
13
|
+
declare const LayoutContext: React.Context<LayoutContextValue | undefined>;
|
|
14
|
+
export interface LayoutProviderProps {
|
|
15
|
+
/** Layout mode - controls max-width of content */
|
|
16
|
+
mode?: LayoutMode;
|
|
17
|
+
/** Children to render */
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* LayoutProvider - Provides consistent layout width settings to child components
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* // Standard width for landing pages
|
|
26
|
+
* <LayoutProvider mode="standard">
|
|
27
|
+
* <Topbar />
|
|
28
|
+
* <main>...</main>
|
|
29
|
+
* <Footer />
|
|
30
|
+
* </LayoutProvider>
|
|
31
|
+
*
|
|
32
|
+
* // Full width for app pages
|
|
33
|
+
* <LayoutProvider mode="full">
|
|
34
|
+
* <Topbar />
|
|
35
|
+
* <main>...</main>
|
|
36
|
+
* <Footer />
|
|
37
|
+
* </LayoutProvider>
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare const LayoutProvider: React.FC<LayoutProviderProps>;
|
|
41
|
+
/**
|
|
42
|
+
* useLayout - Hook to access layout context
|
|
43
|
+
*
|
|
44
|
+
* Returns default 'standard' values if used outside LayoutProvider
|
|
45
|
+
*/
|
|
46
|
+
export declare const useLayout: () => LayoutContextValue;
|
|
47
|
+
export { LayoutContext };
|
|
48
|
+
//# sourceMappingURL=LayoutContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LayoutContext.d.ts","sourceRoot":"","sources":["../../../src/layout/Layout/LayoutContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpE,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtD,MAAM,WAAW,kBAAkB;IACjC,0BAA0B;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,oCAAoC;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,2DAA2D;IAC3D,aAAa,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,YAAY,EAAE,MAAM,CAAC;CACtB;AAgBD,QAAA,MAAM,aAAa,+CAA2D,CAAC;AAE/E,MAAM,WAAW,mBAAmB;IAClC,kDAAkD;IAClD,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,yBAAyB;IACzB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAcxD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,QAAO,kBAc5B,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Layout Context - Unified width control for page layouts
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```tsx
|
|
6
|
+
* import {
|
|
7
|
+
* LayoutProvider,
|
|
8
|
+
* ContentContainer,
|
|
9
|
+
* useLayout,
|
|
10
|
+
* } from '@sudobility/components';
|
|
11
|
+
*
|
|
12
|
+
* // Wrap your app or page
|
|
13
|
+
* function App() {
|
|
14
|
+
* return (
|
|
15
|
+
* <LayoutProvider mode="standard">
|
|
16
|
+
* <Topbar />
|
|
17
|
+
* <ContentContainer as="main">
|
|
18
|
+
* <PageContent />
|
|
19
|
+
* </ContentContainer>
|
|
20
|
+
* <Footer />
|
|
21
|
+
* </LayoutProvider>
|
|
22
|
+
* );
|
|
23
|
+
* }
|
|
24
|
+
*
|
|
25
|
+
* // For full-width pages like Mail
|
|
26
|
+
* function MailApp() {
|
|
27
|
+
* return (
|
|
28
|
+
* <LayoutProvider mode="full">
|
|
29
|
+
* <Topbar />
|
|
30
|
+
* <ContentContainer as="main">
|
|
31
|
+
* <MailContent />
|
|
32
|
+
* </ContentContainer>
|
|
33
|
+
* <Footer />
|
|
34
|
+
* </LayoutProvider>
|
|
35
|
+
* );
|
|
36
|
+
* }
|
|
37
|
+
*
|
|
38
|
+
* // Access layout in custom components
|
|
39
|
+
* function MyComponent() {
|
|
40
|
+
* const { containerClass, mode } = useLayout();
|
|
41
|
+
* return <div className={containerClass}>...</div>;
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export { LayoutProvider, useLayout, LayoutContext, type LayoutProviderProps, type LayoutContextValue, type LayoutMode, } from './LayoutContext';
|
|
46
|
+
export { ContentContainer, type ContentContainerProps, } from './ContentContainer';
|
|
47
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/Layout/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,EACL,cAAc,EACd,SAAS,EACT,aAAa,EACb,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,UAAU,GAChB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Topbar.d.ts","sourceRoot":"","sources":["../../../src/layout/Topbar/Topbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAkB,aAAa,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"Topbar.d.ts","sourceRoot":"","sources":["../../../src/layout/Topbar/Topbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAkB,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhE,MAAM,WAAW,WAAW;IAC1B,0CAA0C;IAC1C,QAAQ,EAAE,SAAS,CAAC;IACpB,mCAAmC;IACnC,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,iEAAiE;IACjE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC5B,uEAAuE;IACvE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,oBAAoB;IACpB,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IACxC,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAuBD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAqDxC,CAAC;AAEF,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/layout/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { StandardPageLayout } from './StandardPageLayout';
|
|
5
5
|
export { PageHeader } from './PageHeader';
|
|
6
|
+
export { LayoutProvider, useLayout, LayoutContext, type LayoutProviderProps, type LayoutContextValue, type LayoutMode, ContentContainer, type ContentContainerProps, } from './Layout';
|
|
6
7
|
export { Footer, type FooterProps, type FooterVariant, FooterGrid, FooterBrand, type FooterBrandProps, FooterLinkSection, type FooterLinkSectionProps, FooterLink, type FooterLinkProps, FooterBottom, FooterCompact, FooterCompactLeft, FooterCompactRight, FooterVersion, type FooterVersionProps, FooterCopyright, type FooterCopyrightProps, } from './Footer';
|
|
7
8
|
export { MasterDetailLayout, type MasterDetailLayoutProps, MasterListItem, type MasterListItemProps, } from './MasterDetailLayout';
|
|
8
9
|
export { Topbar, type TopbarProps, type TopbarVariant, TopbarProvider, useTopbar, TopbarContext, type TopbarProviderProps, TopbarLeft, TopbarCenter, TopbarRight, TopbarMobileContent, TopbarDivider, TopbarLogo, type TopbarLogoProps, TopbarMenuToggle, type TopbarMenuToggleProps, TopbarNav, TopbarMobileNav, type TopbarNavProps, type TopbarNavItem, type TopbarMobileNavProps, TopbarNavigation, type TopbarNavigationProps, TopbarActions, TopbarIconButton, TopbarSearch, type TopbarActionsProps, type TopbarIconButtonProps, type TopbarSearchProps, } from './Topbar';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/layout/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,UAAU,EACV,WAAW,EACX,KAAK,gBAAgB,EACrB,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,UAAU,EACV,KAAK,eAAe,EACpB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,KAAK,kBAAkB,EACvB,eAAe,EACf,KAAK,oBAAoB,GAC1B,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,cAAc,EACd,KAAK,mBAAmB,GACzB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,cAAc,EACd,SAAS,EACT,aAAa,EACb,KAAK,mBAAmB,EACxB,UAAU,EACV,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,KAAK,eAAe,EACpB,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,SAAS,EACT,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,GACvB,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/layout/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EACL,cAAc,EACd,SAAS,EACT,aAAa,EACb,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,UAAU,EACV,WAAW,EACX,KAAK,gBAAgB,EACrB,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,UAAU,EACV,KAAK,eAAe,EACpB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,KAAK,kBAAkB,EACvB,eAAe,EACf,KAAK,oBAAoB,GAC1B,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,cAAc,EACd,KAAK,mBAAmB,GACzB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,cAAc,EACd,SAAS,EACT,aAAa,EACb,KAAK,mBAAmB,EACxB,UAAU,EACV,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,KAAK,eAAe,EACpB,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,SAAS,EACT,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,GACvB,MAAM,UAAU,CAAC"}
|