@jobber/components 6.37.0 → 6.38.0
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/Cluster.d.ts +1 -0
- package/Cluster.js +17 -0
- package/Container.d.ts +1 -0
- package/Container.js +17 -0
- package/ContentBlock.d.ts +1 -0
- package/ContentBlock.js +17 -0
- package/Cover.d.ts +1 -0
- package/Cover.js +17 -0
- package/Frame.d.ts +1 -0
- package/Frame.js +17 -0
- package/ResponsiveSwitcher.d.ts +1 -0
- package/ResponsiveSwitcher.js +17 -0
- package/SideKick.d.ts +1 -0
- package/SideKick.js +17 -0
- package/Stack.d.ts +1 -0
- package/Stack.js +17 -0
- package/Tiles.d.ts +1 -0
- package/Tiles.js +17 -0
- package/dist/Cluster/Cluster.d.ts +2 -0
- package/dist/Cluster/index.cjs +10 -0
- package/dist/Cluster/index.d.ts +1 -0
- package/dist/Cluster/index.mjs +4 -0
- package/dist/Cluster/types.d.ts +47 -0
- package/dist/Cluster-cjs.js +14 -0
- package/dist/Cluster-es.js +12 -0
- package/dist/Container/Container.d.ts +5 -0
- package/dist/Container/index.cjs +9 -0
- package/dist/Container/index.d.ts +1 -0
- package/dist/Container/index.mjs +3 -0
- package/dist/Container/types.d.ts +22 -0
- package/dist/Container-cjs.js +18 -0
- package/dist/Container-es.js +16 -0
- package/dist/ContentBlock/ContentBlock.d.ts +2 -0
- package/dist/ContentBlock/index.cjs +16 -0
- package/dist/ContentBlock/index.d.ts +1 -0
- package/dist/ContentBlock/index.mjs +10 -0
- package/dist/ContentBlock/types.d.ts +37 -0
- package/dist/ContentBlock-cjs.js +31 -0
- package/dist/ContentBlock-es.js +29 -0
- package/dist/Cover/Cover.d.ts +5 -0
- package/dist/Cover/index.cjs +10 -0
- package/dist/Cover/index.d.ts +1 -0
- package/dist/Cover/index.mjs +4 -0
- package/dist/Cover/types.d.ts +34 -0
- package/dist/Cover-cjs.js +16 -0
- package/dist/Cover-es.js +14 -0
- package/dist/Frame/Frame.d.ts +2 -0
- package/dist/Frame/index.cjs +9 -0
- package/dist/Frame/index.d.ts +2 -0
- package/dist/Frame/index.mjs +3 -0
- package/dist/Frame/types.d.ts +24 -0
- package/dist/Frame-cjs.js +12 -0
- package/dist/Frame-es.js +10 -0
- package/dist/ResponsiveSwitcher/ResponsiveSwitcher.d.ts +2 -0
- package/dist/ResponsiveSwitcher/index.cjs +10 -0
- package/dist/ResponsiveSwitcher/index.d.ts +1 -0
- package/dist/ResponsiveSwitcher/index.mjs +4 -0
- package/dist/ResponsiveSwitcher/types.d.ts +26 -0
- package/dist/ResponsiveSwitcher-cjs.js +13 -0
- package/dist/ResponsiveSwitcher-es.js +11 -0
- package/dist/SideKick/SideKick.d.ts +2 -0
- package/dist/SideKick/index.cjs +10 -0
- package/dist/SideKick/index.d.ts +1 -0
- package/dist/SideKick/index.mjs +4 -0
- package/dist/SideKick/types.d.ts +35 -0
- package/dist/SideKick-cjs.js +17 -0
- package/dist/SideKick-es.js +15 -0
- package/dist/Stack/Stack.d.ts +2 -0
- package/dist/Stack/index.cjs +10 -0
- package/dist/Stack/index.d.ts +1 -0
- package/dist/Stack/index.mjs +4 -0
- package/dist/Stack/types.d.ts +32 -0
- package/dist/Stack-cjs.js +15 -0
- package/dist/Stack-es.js +13 -0
- package/dist/Tiles/Tiles.d.ts +2 -0
- package/dist/Tiles/index.cjs +10 -0
- package/dist/Tiles/index.d.ts +1 -0
- package/dist/Tiles/index.mjs +4 -0
- package/dist/Tiles/types.d.ts +26 -0
- package/dist/Tiles-cjs.js +13 -0
- package/dist/Tiles-es.js +11 -0
- package/dist/getMappedAtlantisSpaceToken-cjs.js +20 -0
- package/dist/getMappedAtlantisSpaceToken-es.js +17 -0
- package/dist/index.cjs +19 -0
- package/dist/index.d.mts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.mjs +10 -0
- package/dist/sharedHelpers/getMappedAtlantisSpaceToken.d.ts +3 -0
- package/dist/sharedHelpers/getMappedBreakpointWidth.d.ts +8 -0
- package/dist/sharedHelpers/types.d.ts +15 -0
- package/dist/styles.css +619 -0
- package/dist/utils/meta/meta.json +11 -0
- package/package.json +47 -2
package/Cluster.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist/Cluster";
|
package/Cluster.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var Cluster = require("./dist/Cluster");
|
|
8
|
+
|
|
9
|
+
Object.keys(Cluster).forEach(function(key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function get() {
|
|
14
|
+
return Cluster[key];
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
});
|
package/Container.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist/Container";
|
package/Container.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var Container = require("./dist/Container");
|
|
8
|
+
|
|
9
|
+
Object.keys(Container).forEach(function(key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function get() {
|
|
14
|
+
return Container[key];
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist/ContentBlock";
|
package/ContentBlock.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var ContentBlock = require("./dist/ContentBlock");
|
|
8
|
+
|
|
9
|
+
Object.keys(ContentBlock).forEach(function(key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function get() {
|
|
14
|
+
return ContentBlock[key];
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
});
|
package/Cover.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist/Cover";
|
package/Cover.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var Cover = require("./dist/Cover");
|
|
8
|
+
|
|
9
|
+
Object.keys(Cover).forEach(function(key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function get() {
|
|
14
|
+
return Cover[key];
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
});
|
package/Frame.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist/Frame";
|
package/Frame.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var Frame = require("./dist/Frame");
|
|
8
|
+
|
|
9
|
+
Object.keys(Frame).forEach(function(key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function get() {
|
|
14
|
+
return Frame[key];
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist/ResponsiveSwitcher";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var ResponsiveSwitcher = require("./dist/ResponsiveSwitcher");
|
|
8
|
+
|
|
9
|
+
Object.keys(ResponsiveSwitcher).forEach(function(key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function get() {
|
|
14
|
+
return ResponsiveSwitcher[key];
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
});
|
package/SideKick.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist/SideKick";
|
package/SideKick.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var SideKick = require("./dist/SideKick");
|
|
8
|
+
|
|
9
|
+
Object.keys(SideKick).forEach(function(key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function get() {
|
|
14
|
+
return SideKick[key];
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
});
|
package/Stack.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist/Stack";
|
package/Stack.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var Stack = require("./dist/Stack");
|
|
8
|
+
|
|
9
|
+
Object.keys(Stack).forEach(function(key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function get() {
|
|
14
|
+
return Stack[key];
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
});
|
package/Tiles.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist/Tiles";
|
package/Tiles.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var Tiles = require("./dist/Tiles");
|
|
8
|
+
|
|
9
|
+
Object.keys(Tiles).forEach(function(key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function get() {
|
|
14
|
+
return Tiles[key];
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Cluster";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { AtlantisBreakpoints } from "../sharedHelpers/getMappedBreakpointWidth";
|
|
2
|
+
import { type CommonAllowedElements, type CommonAtlantisProps, type GapSpacing } from "../sharedHelpers/types";
|
|
3
|
+
export interface ClusterProps extends CommonAtlantisProps {
|
|
4
|
+
readonly children: React.ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* The horizontal justification of the cluster elements.
|
|
7
|
+
*/
|
|
8
|
+
readonly justify?: "start" | "end" | "center" | "space-between" | "space-around";
|
|
9
|
+
/**
|
|
10
|
+
* The vertical alignment of the cluster elements.
|
|
11
|
+
*/
|
|
12
|
+
readonly align?: "start" | "end" | "center";
|
|
13
|
+
/**
|
|
14
|
+
* The amount of space between the cluster elements. Semantic tokens are available.
|
|
15
|
+
*/
|
|
16
|
+
readonly gap?: GapSpacing;
|
|
17
|
+
/**
|
|
18
|
+
* The breakpoint below which the cluster will collapse.
|
|
19
|
+
*/
|
|
20
|
+
readonly collapseBelow?: keyof typeof AtlantisBreakpoints;
|
|
21
|
+
/**
|
|
22
|
+
* Force the cluster to collapse. Use this when our breakpoints are not enough control.
|
|
23
|
+
*/
|
|
24
|
+
readonly collapsed?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Enabling this prevents the cluster from taking 100% of the width of the parent and instead flows with the content.
|
|
27
|
+
*/
|
|
28
|
+
autoWidth?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The HTML tag to render the cluster as.
|
|
31
|
+
*/
|
|
32
|
+
as?: CommonAllowedElements;
|
|
33
|
+
/** **Use at your own risk:** Custom class names for specific elements. This should only be used as a
|
|
34
|
+
* **last resort**. Using this may result in unexpected side effects.
|
|
35
|
+
* More information in the [Customizing components Guide](https://atlantis.getjobber.com/guides/customizing-components).
|
|
36
|
+
*/
|
|
37
|
+
readonly UNSAFE_className?: {
|
|
38
|
+
container?: string;
|
|
39
|
+
};
|
|
40
|
+
/** **Use at your own risk:** Custom style for specific elements. This should only be used as a
|
|
41
|
+
* **last resort**. Using this may result in unexpected side effects.
|
|
42
|
+
* More information in the [Customizing components Guide](https://atlantis.getjobber.com/guides/customizing-components).
|
|
43
|
+
*/
|
|
44
|
+
readonly UNSAFE_style?: {
|
|
45
|
+
container?: React.CSSProperties;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var classnames = require('classnames');
|
|
5
|
+
var getMappedAtlantisSpaceToken = require('./getMappedAtlantisSpaceToken-cjs.js');
|
|
6
|
+
|
|
7
|
+
var styles = {"cluster":"kub1yKbFFN0-","sm":"_5IaWqMXiMqQ-","md":"vCly-qsW6uQ-","lg":"lmABTs-G-FA-","xl":"NHrDIukxI-o-","collapsed":"hkpPPbA3sRk-","spinning":"SNypFd3rgV8-"};
|
|
8
|
+
|
|
9
|
+
function Cluster({ children, justify, align, gap, collapseBelow, collapsed, autoWidth = false, as: Tag = "div", dataAttributes, ariaAttributes, role, id, UNSAFE_className, UNSAFE_style, }) {
|
|
10
|
+
const spaceMapped = getMappedAtlantisSpaceToken.getMappedAtlantisSpaceToken(gap);
|
|
11
|
+
return (React.createElement(Tag, Object.assign({ role: role, id: id }, dataAttributes, ariaAttributes, { style: Object.assign({ "--public-cluster-justify": justify, "--public-cluster-align": align, "--public-cluster-space": spaceMapped, "--public-cluster-width": autoWidth ? "auto" : "100%" }, UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container), className: classnames(styles.cluster, collapseBelow && styles[collapseBelow], collapsed ? styles.collapsed : undefined, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.container) }), children));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
exports.Cluster = Cluster;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { g as getMappedAtlantisSpaceToken } from './getMappedAtlantisSpaceToken-es.js';
|
|
4
|
+
|
|
5
|
+
var styles = {"cluster":"kub1yKbFFN0-","sm":"_5IaWqMXiMqQ-","md":"vCly-qsW6uQ-","lg":"lmABTs-G-FA-","xl":"NHrDIukxI-o-","collapsed":"hkpPPbA3sRk-","spinning":"SNypFd3rgV8-"};
|
|
6
|
+
|
|
7
|
+
function Cluster({ children, justify, align, gap, collapseBelow, collapsed, autoWidth = false, as: Tag = "div", dataAttributes, ariaAttributes, role, id, UNSAFE_className, UNSAFE_style, }) {
|
|
8
|
+
const spaceMapped = getMappedAtlantisSpaceToken(gap);
|
|
9
|
+
return (React__default.createElement(Tag, Object.assign({ role: role, id: id }, dataAttributes, ariaAttributes, { style: Object.assign({ "--public-cluster-justify": justify, "--public-cluster-align": align, "--public-cluster-space": spaceMapped, "--public-cluster-width": autoWidth ? "auto" : "100%" }, UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container), className: classnames(styles.cluster, collapseBelow && styles[collapseBelow], collapsed ? styles.collapsed : undefined, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.container) }), children));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { Cluster as C };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ContainerApplyProps, ContainerProps } from "./types";
|
|
2
|
+
export declare const Container: {
|
|
3
|
+
({ children, name, className, as: Tag, autoWidth, dataAttributes, ariaAttributes, role, id, }: ContainerProps): JSX.Element;
|
|
4
|
+
Apply({ children, className, style, autoWidth, }: ContainerApplyProps): JSX.Element;
|
|
5
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Container";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { CommonAllowedElements, CommonAtlantisProps } from "../sharedHelpers/types";
|
|
3
|
+
export interface ContainerProps extends CommonAtlantisProps {
|
|
4
|
+
readonly children: ReactNode;
|
|
5
|
+
/** The name of the container. This allows you to name your container query, but it's not necessary. */
|
|
6
|
+
readonly name: string;
|
|
7
|
+
/** The class name for the container. This allows you to target the container with CSS. */
|
|
8
|
+
readonly className?: string;
|
|
9
|
+
/** Whether to allow the container to take the width of the content. Defaults to 100% */
|
|
10
|
+
readonly autoWidth?: boolean;
|
|
11
|
+
/** The HTML tag to render the container as. Defaults to `div`. */
|
|
12
|
+
as?: CommonAllowedElements;
|
|
13
|
+
}
|
|
14
|
+
export interface ContainerApplyProps {
|
|
15
|
+
readonly children: ReactNode;
|
|
16
|
+
/** The class name for the container. This allows you to target the container with CSS. */
|
|
17
|
+
readonly className?: string;
|
|
18
|
+
/** The style for the container */
|
|
19
|
+
readonly style?: React.CSSProperties;
|
|
20
|
+
/** Whether to allow the container to take the width of the content. Defaults to 100% */
|
|
21
|
+
readonly autoWidth?: boolean;
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var classnames = require('classnames');
|
|
5
|
+
|
|
6
|
+
var styles = {"container":"Aj6o8FcaKHc-","apply":"eIsVvlXoWhs-","spinning":"XRPRymOwkKg-"};
|
|
7
|
+
|
|
8
|
+
const Container = ({ children, name, className, as: Tag = "div", autoWidth = false, dataAttributes, ariaAttributes, role, id, }) => {
|
|
9
|
+
return (React.createElement(Tag, Object.assign({ role: role, id: id }, dataAttributes, ariaAttributes, { style: {
|
|
10
|
+
"--public-container-name": name,
|
|
11
|
+
"--public-container-width": autoWidth ? "auto" : "100%",
|
|
12
|
+
}, className: classnames(styles.container, className) }), children));
|
|
13
|
+
};
|
|
14
|
+
Container.Apply = function Apply({ children, className, style = {}, autoWidth = false, }) {
|
|
15
|
+
return (React.createElement("div", { style: Object.assign(Object.assign({}, style), { "--public-container-apply-width": autoWidth ? "auto" : "100%" }), className: classnames(className, styles.apply) }, children));
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.Container = Container;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
|
|
4
|
+
var styles = {"container":"Aj6o8FcaKHc-","apply":"eIsVvlXoWhs-","spinning":"XRPRymOwkKg-"};
|
|
5
|
+
|
|
6
|
+
const Container = ({ children, name, className, as: Tag = "div", autoWidth = false, dataAttributes, ariaAttributes, role, id, }) => {
|
|
7
|
+
return (React__default.createElement(Tag, Object.assign({ role: role, id: id }, dataAttributes, ariaAttributes, { style: {
|
|
8
|
+
"--public-container-name": name,
|
|
9
|
+
"--public-container-width": autoWidth ? "auto" : "100%",
|
|
10
|
+
}, className: classnames(styles.container, className) }), children));
|
|
11
|
+
};
|
|
12
|
+
Container.Apply = function Apply({ children, className, style = {}, autoWidth = false, }) {
|
|
13
|
+
return (React__default.createElement("div", { style: Object.assign(Object.assign({}, style), { "--public-container-apply-width": autoWidth ? "auto" : "100%" }), className: classnames(className, styles.apply) }, children));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { Container as C };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ContentBlock = require('../ContentBlock-cjs.js');
|
|
4
|
+
require('react');
|
|
5
|
+
require('classnames');
|
|
6
|
+
require('../useResizeObserver-cjs.js');
|
|
7
|
+
require('../_commonjsHelpers-cjs.js');
|
|
8
|
+
require('../throttle-cjs.js');
|
|
9
|
+
require('../debounce-cjs.js');
|
|
10
|
+
require('../isObjectLike-cjs.js');
|
|
11
|
+
require('../isSymbol-cjs.js');
|
|
12
|
+
require('../getMappedAtlantisSpaceToken-cjs.js');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
exports.ContentBlock = ContentBlock.ContentBlock;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ContentBlock";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { C as ContentBlock } from '../ContentBlock-es.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'classnames';
|
|
4
|
+
import '../useResizeObserver-es.js';
|
|
5
|
+
import '../_commonjsHelpers-es.js';
|
|
6
|
+
import '../throttle-es.js';
|
|
7
|
+
import '../debounce-es.js';
|
|
8
|
+
import '../isObjectLike-es.js';
|
|
9
|
+
import '../isSymbol-es.js';
|
|
10
|
+
import '../getMappedAtlantisSpaceToken-es.js';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { CommonAllowedElements, CommonAtlantisProps, GapSpacing } from "../sharedHelpers/types";
|
|
2
|
+
import { AtlantisBreakpoints } from "../sharedHelpers/getMappedBreakpointWidth";
|
|
3
|
+
export interface ContentBlockProps extends CommonAtlantisProps {
|
|
4
|
+
readonly children: React.ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* The justification of the content.
|
|
7
|
+
*/
|
|
8
|
+
readonly justify?: "left" | "center" | "right";
|
|
9
|
+
/**
|
|
10
|
+
* The maximum width of the centered content.
|
|
11
|
+
*/
|
|
12
|
+
readonly maxWidth?: keyof typeof AtlantisBreakpoints | (string & NonNullable<unknown>) | number;
|
|
13
|
+
/**
|
|
14
|
+
* Whether to also center the text.
|
|
15
|
+
*/
|
|
16
|
+
readonly andText?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The amount of space between the content and the edges of the container.
|
|
19
|
+
*/
|
|
20
|
+
readonly gutters?: GapSpacing;
|
|
21
|
+
/** The HTML tag to render the container as. Defaults to `div`. */
|
|
22
|
+
as?: CommonAllowedElements;
|
|
23
|
+
/** **Use at your own risk:** Custom class names for specific elements. This should only be used as a
|
|
24
|
+
* **last resort**. Using this may result in unexpected side effects.
|
|
25
|
+
* More information in the [Customizing components Guide](https://atlantis.getjobber.com/guides/customizing-components).
|
|
26
|
+
*/
|
|
27
|
+
readonly UNSAFE_className?: {
|
|
28
|
+
container?: string;
|
|
29
|
+
};
|
|
30
|
+
/** **Use at your own risk:** Custom style for specific elements. This should only be used as a
|
|
31
|
+
* **last resort**. Using this may result in unexpected side effects.
|
|
32
|
+
* More information in the [Customizing components Guide](https://atlantis.getjobber.com/guides/customizing-components).
|
|
33
|
+
*/
|
|
34
|
+
readonly UNSAFE_style?: {
|
|
35
|
+
container?: React.CSSProperties;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var classnames = require('classnames');
|
|
5
|
+
var useResizeObserver = require('./useResizeObserver-cjs.js');
|
|
6
|
+
var getMappedAtlantisSpaceToken = require('./getMappedAtlantisSpaceToken-cjs.js');
|
|
7
|
+
|
|
8
|
+
var styles = {"contentBlock":"rJamQZ6fRes-","left":"bqjXV8MRO-4-","right":"sCMxIxKkFe0-","center":"_2pIQVKvVL1I-","andText":"_6dF2no3aTxw-","gutters":"_8k8YLsatGag-","spinning":"sjMwRWFdKeo-"};
|
|
9
|
+
|
|
10
|
+
const AtlantisBreakpoints = {
|
|
11
|
+
xs: 0,
|
|
12
|
+
sm: 490,
|
|
13
|
+
md: 768,
|
|
14
|
+
lg: 1080,
|
|
15
|
+
xl: 1440,
|
|
16
|
+
};
|
|
17
|
+
const getMappedBreakpointWidth = (maxWidth) => {
|
|
18
|
+
if (typeof maxWidth === "number") {
|
|
19
|
+
return `${maxWidth}px`;
|
|
20
|
+
}
|
|
21
|
+
if (AtlantisBreakpoints[maxWidth]) {
|
|
22
|
+
return (AtlantisBreakpoints[maxWidth] + "px");
|
|
23
|
+
}
|
|
24
|
+
return maxWidth;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
function ContentBlock({ children, maxWidth = useResizeObserver.useResizeObserver.Breakpoints.smaller, andText, gutters, justify = "left", as: Tag = "div", dataAttributes, ariaAttributes, role, id, UNSAFE_className, UNSAFE_style, }) {
|
|
28
|
+
return (React.createElement(Tag, Object.assign({ role: role, id: id }, dataAttributes, ariaAttributes, { style: Object.assign({ "--content-block-max-width": getMappedBreakpointWidth(maxWidth), "--content-block-gutters": getMappedAtlantisSpaceToken.getMappedAtlantisSpaceToken(gutters) }, UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container), className: classnames(styles.contentBlock, andText && styles.andText, gutters && styles.gutters, justify === "left" && styles.left, justify === "right" && styles.right, justify === "center" && styles.center, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.container) }), children));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
exports.ContentBlock = ContentBlock;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { u as useResizeObserver } from './useResizeObserver-es.js';
|
|
4
|
+
import { g as getMappedAtlantisSpaceToken } from './getMappedAtlantisSpaceToken-es.js';
|
|
5
|
+
|
|
6
|
+
var styles = {"contentBlock":"rJamQZ6fRes-","left":"bqjXV8MRO-4-","right":"sCMxIxKkFe0-","center":"_2pIQVKvVL1I-","andText":"_6dF2no3aTxw-","gutters":"_8k8YLsatGag-","spinning":"sjMwRWFdKeo-"};
|
|
7
|
+
|
|
8
|
+
const AtlantisBreakpoints = {
|
|
9
|
+
xs: 0,
|
|
10
|
+
sm: 490,
|
|
11
|
+
md: 768,
|
|
12
|
+
lg: 1080,
|
|
13
|
+
xl: 1440,
|
|
14
|
+
};
|
|
15
|
+
const getMappedBreakpointWidth = (maxWidth) => {
|
|
16
|
+
if (typeof maxWidth === "number") {
|
|
17
|
+
return `${maxWidth}px`;
|
|
18
|
+
}
|
|
19
|
+
if (AtlantisBreakpoints[maxWidth]) {
|
|
20
|
+
return (AtlantisBreakpoints[maxWidth] + "px");
|
|
21
|
+
}
|
|
22
|
+
return maxWidth;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
function ContentBlock({ children, maxWidth = useResizeObserver.Breakpoints.smaller, andText, gutters, justify = "left", as: Tag = "div", dataAttributes, ariaAttributes, role, id, UNSAFE_className, UNSAFE_style, }) {
|
|
26
|
+
return (React__default.createElement(Tag, Object.assign({ role: role, id: id }, dataAttributes, ariaAttributes, { style: Object.assign({ "--content-block-max-width": getMappedBreakpointWidth(maxWidth), "--content-block-gutters": getMappedAtlantisSpaceToken(gutters) }, UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container), className: classnames(styles.contentBlock, andText && styles.andText, gutters && styles.gutters, justify === "left" && styles.left, justify === "right" && styles.right, justify === "center" && styles.center, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.container) }), children));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { ContentBlock as C };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CoverCenterContentProps, CoverProps } from "./types";
|
|
2
|
+
export declare function Cover({ children, minHeight, gap, as: Tag, dataAttributes, ariaAttributes, role, id, UNSAFE_className, UNSAFE_style, }: CoverProps): JSX.Element;
|
|
3
|
+
export declare namespace Cover {
|
|
4
|
+
var Center: ({ children, UNSAFE_className, UNSAFE_style, as: Tag, id, role, ariaAttributes, dataAttributes, }: CoverCenterContentProps) => JSX.Element;
|
|
5
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Cover";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type CommonAllowedElements, type CommonAtlantisProps, type GapSpacing } from "../sharedHelpers/types";
|
|
2
|
+
export interface CoverProps extends CommonAtlantisProps {
|
|
3
|
+
readonly children: React.ReactNode;
|
|
4
|
+
/** The minimum height of the element. Suggested to use `vh` units. */
|
|
5
|
+
readonly minHeight?: string;
|
|
6
|
+
/** The amount of space around the centered content */
|
|
7
|
+
readonly gap?: GapSpacing;
|
|
8
|
+
/** The HTML tag to render the container as. Defaults to `div`. */
|
|
9
|
+
as?: CommonAllowedElements;
|
|
10
|
+
/** **Use at your own risk:** Custom class names for specific elements. This should only be used as a
|
|
11
|
+
* **last resort**. Using this may result in unexpected side effects.
|
|
12
|
+
* More information in the [Customizing components Guide](https://atlantis.getjobber.com/guides/customizing-components).
|
|
13
|
+
*/
|
|
14
|
+
readonly UNSAFE_className?: {
|
|
15
|
+
container?: string;
|
|
16
|
+
};
|
|
17
|
+
/** **Use at your own risk:** Custom style for specific elements. This should only be used as a
|
|
18
|
+
* **last resort**. Using this may result in unexpected side effects.
|
|
19
|
+
* More information in the [Customizing components Guide](https://atlantis.getjobber.com/guides/customizing-components).
|
|
20
|
+
*/
|
|
21
|
+
readonly UNSAFE_style?: {
|
|
22
|
+
container?: React.CSSProperties;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface CoverCenterContentProps extends CommonAtlantisProps {
|
|
26
|
+
readonly children: React.ReactNode;
|
|
27
|
+
readonly UNSAFE_className?: {
|
|
28
|
+
centerContent?: string;
|
|
29
|
+
};
|
|
30
|
+
readonly UNSAFE_style?: {
|
|
31
|
+
centerContent?: React.CSSProperties;
|
|
32
|
+
};
|
|
33
|
+
readonly as?: CommonAllowedElements;
|
|
34
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var classnames = require('classnames');
|
|
5
|
+
var getMappedAtlantisSpaceToken = require('./getMappedAtlantisSpaceToken-cjs.js');
|
|
6
|
+
|
|
7
|
+
var styles = {"cover":"sGSmxHTsTfA-","centerContent":"_6S-jbOw7NEA-","spinning":"GG7BmJeHa9Q-"};
|
|
8
|
+
|
|
9
|
+
function Cover({ children, minHeight, gap, as: Tag = "div", dataAttributes, ariaAttributes, role, id, UNSAFE_className, UNSAFE_style, }) {
|
|
10
|
+
return (React.createElement(Tag, Object.assign({ role: role, id: id }, dataAttributes, ariaAttributes, { style: Object.assign({ "--public-cover-min-height": minHeight, "--public-cover-space": getMappedAtlantisSpaceToken.getMappedAtlantisSpaceToken(gap) }, UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container), className: classnames(styles.cover, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.container) }), children));
|
|
11
|
+
}
|
|
12
|
+
Cover.Center = function CenterContent({ children, UNSAFE_className, UNSAFE_style, as: Tag = "div", id, role, ariaAttributes, dataAttributes, }) {
|
|
13
|
+
return (React.createElement(Tag, Object.assign({ role: role, id: id }, dataAttributes, ariaAttributes, { className: classnames(styles.centerContent, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.centerContent), style: UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.centerContent }), children));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.Cover = Cover;
|
package/dist/Cover-es.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { g as getMappedAtlantisSpaceToken } from './getMappedAtlantisSpaceToken-es.js';
|
|
4
|
+
|
|
5
|
+
var styles = {"cover":"sGSmxHTsTfA-","centerContent":"_6S-jbOw7NEA-","spinning":"GG7BmJeHa9Q-"};
|
|
6
|
+
|
|
7
|
+
function Cover({ children, minHeight, gap, as: Tag = "div", dataAttributes, ariaAttributes, role, id, UNSAFE_className, UNSAFE_style, }) {
|
|
8
|
+
return (React__default.createElement(Tag, Object.assign({ role: role, id: id }, dataAttributes, ariaAttributes, { style: Object.assign({ "--public-cover-min-height": minHeight, "--public-cover-space": getMappedAtlantisSpaceToken(gap) }, UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container), className: classnames(styles.cover, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.container) }), children));
|
|
9
|
+
}
|
|
10
|
+
Cover.Center = function CenterContent({ children, UNSAFE_className, UNSAFE_style, as: Tag = "div", id, role, ariaAttributes, dataAttributes, }) {
|
|
11
|
+
return (React__default.createElement(Tag, Object.assign({ role: role, id: id }, dataAttributes, ariaAttributes, { className: classnames(styles.centerContent, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.centerContent), style: UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.centerContent }), children));
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { Cover as C };
|