@nascentdigital/funnel-ui 4.5.2 → 4.5.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/dist/Tailwind.d.ts +1 -1
- package/dist/Tailwind.js +70 -24
- package/dist/client/hooks/breakpoint/BreakpointContainer.d.ts +1 -1
- package/dist/client/hooks/breakpoint/BreakpointContainer.js +3 -1
- package/dist/client/interaction/Carousel.d.ts +1 -1
- package/dist/client/interaction/Carousel.js +28 -30
- package/dist/client/interaction/index.d.ts +0 -6
- package/dist/client/interaction/index.js +0 -6
- package/dist/server/Page.d.ts +15 -0
- package/dist/server/Page.js +70 -0
- package/dist/server/blocks/Block.d.ts +4 -2
- package/dist/server/blocks/Block.js +10 -3
- package/dist/server/blocks/Editorial.d.ts +2 -2
- package/dist/server/blocks/Editorial.js +4 -4
- package/dist/server/blocks/Form.d.ts +2 -2
- package/dist/server/blocks/Form.js +3 -3
- package/dist/server/blocks/Message.js +2 -1
- package/dist/server/blocks/Projects.d.ts +29 -37
- package/dist/server/blocks/Projects.js +13 -84
- package/dist/server/blocks/RelatedPages.d.ts +58 -0
- package/dist/server/blocks/RelatedPages.js +99 -0
- package/dist/server/blocks/Stats.d.ts +19 -31
- package/dist/server/blocks/Stats.js +13 -57
- package/dist/server/blocks/Testimonial.d.ts +2 -2
- package/dist/server/blocks/Testimonial.js +17 -14
- package/dist/server/blocks/Testimonials.d.ts +35 -35
- package/dist/server/blocks/Testimonials.js +21 -66
- package/dist/server/blocks/index.d.ts +2 -0
- package/dist/server/blocks/index.js +2 -0
- package/dist/server/entities/previews/MessagePreview.d.ts +2 -2
- package/dist/server/entities/previews/MessagePreview.js +1 -1
- package/dist/server/fields/CallToActions.d.ts +12 -0
- package/dist/server/fields/CallToActions.js +27 -0
- package/dist/server/fields/Caption.js +3 -2
- package/dist/server/fields/Description.js +1 -1
- package/dist/server/fields/FreeFormContent.js +1 -1
- package/dist/server/fields/Headline.js +1 -1
- package/dist/server/fields/Quote.js +1 -1
- package/dist/server/fields/RichText.js +1 -0
- package/dist/server/fields/index.d.ts +1 -0
- package/dist/server/fields/index.js +1 -0
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.js +2 -0
- package/dist/server/layouts/BentoLayout.d.ts +289 -0
- package/dist/server/layouts/BentoLayout.js +25 -0
- package/dist/server/layouts/index.d.ts +1 -0
- package/dist/server/layouts/index.js +1 -0
- package/dist/server/panels/BlockPanel.js +1 -3
- package/dist/server/panels/ListPanel.d.ts +4 -4
- package/dist/server/panels/ListPanel.js +13 -2
- package/dist/server/panels/MessagePanel.d.ts +2 -6
- package/dist/server/panels/MessagePanel.js +2 -12
- package/dist/server/panels/TestimonialPanel.d.ts +44 -18
- package/dist/server/panels/TestimonialPanel.js +44 -19
- package/dist/server/panels/VisualPanel.d.ts +1 -1
- package/dist/server/panels/VisualPanel.js +0 -2
- package/dist/server/schema/Anchor.d.ts +1 -1
- package/dist/server/schema/Anchor.js +2 -2
- package/dist/server/schema/BlockConfig.js +1 -1
- package/dist/server/schema/ListPanelLayout.d.ts +6 -0
- package/dist/server/schema/ListPanelLayout.js +3 -0
- package/dist/server/utils/ReactUtils.d.ts +6 -0
- package/dist/server/utils/ReactUtils.js +25 -0
- package/dist/server/utils/index.d.ts +1 -0
- package/dist/{client/interaction/modal → server/utils}/index.js +1 -2
- package/dist/styles/Page.css +5 -0
- package/dist/styles/Section.css +52 -0
- package/dist/styles/blocks/Block-spacing.css +31 -38
- package/dist/styles/blocks/Block-theming.css +2 -4
- package/dist/styles/blocks/MediaLayout.css +16 -0
- package/dist/styles/blocks/Projects.css +0 -9
- package/dist/styles/blocks/RelatedPages.css +13 -0
- package/dist/styles/blocks/Stats.css +1 -30
- package/dist/styles/components/Carousel.css +128 -0
- package/dist/styles/components/_index.css +2 -1
- package/dist/styles/entities/Person.css +4 -4
- package/dist/styles/entities/Project.css +8 -2
- package/dist/styles/entities/UniqueSellingPoint.css +3 -3
- package/dist/styles/fields/Caption.css +2 -2
- package/dist/styles/fields/Description.css +2 -2
- package/dist/styles/fields/Icon.css +1 -1
- package/dist/styles/fields/Link.css +1 -1
- package/dist/styles/fields/Quote.css +2 -2
- package/dist/styles/fields/Title.css +1 -1
- package/dist/styles/index.css +2 -0
- package/dist/styles/layouts/BentoLayout.css +41 -0
- package/dist/styles/layouts/_index.css +1 -0
- package/dist/styles/panels/TestimonialPanel.css +4 -0
- package/package.json +2 -3
- package/dist/client/interaction/Popup.d.ts +0 -36
- package/dist/client/interaction/Popup.js +0 -244
- package/dist/client/interaction/Tooltip.d.ts +0 -16
- package/dist/client/interaction/Tooltip.js +0 -122
- package/dist/client/interaction/UILevel.d.ts +0 -1
- package/dist/client/interaction/UILevel.js +0 -2
- package/dist/client/interaction/backdrop/BackdropContainer.d.ts +0 -5
- package/dist/client/interaction/backdrop/BackdropContainer.js +0 -114
- package/dist/client/interaction/backdrop/BackdropContext.d.ts +0 -8
- package/dist/client/interaction/backdrop/BackdropContext.js +0 -6
- package/dist/client/interaction/backdrop/BackdropEvent.d.ts +0 -64
- package/dist/client/interaction/backdrop/BackdropEvent.js +0 -92
- package/dist/client/interaction/backdrop/index.d.ts +0 -4
- package/dist/client/interaction/backdrop/index.js +0 -20
- package/dist/client/interaction/backdrop/useBackdrop.d.ts +0 -13
- package/dist/client/interaction/backdrop/useBackdrop.js +0 -58
- package/dist/client/interaction/backdrop/useBackdropClick.d.ts +0 -2
- package/dist/client/interaction/backdrop/useBackdropClick.js +0 -21
- package/dist/client/interaction/backdrop/useBackdropVisible.d.ts +0 -1
- package/dist/client/interaction/backdrop/useBackdropVisible.js +0 -30
- package/dist/client/interaction/focus/FocusArea.d.ts +0 -10
- package/dist/client/interaction/focus/FocusArea.js +0 -38
- package/dist/client/interaction/focus/FocusContext.d.ts +0 -7
- package/dist/client/interaction/focus/FocusContext.js +0 -7
- package/dist/client/interaction/focus/FocusController.d.ts +0 -9
- package/dist/client/interaction/focus/FocusController.js +0 -40
- package/dist/client/interaction/focus/FocusService.d.ts +0 -20
- package/dist/client/interaction/focus/FocusService.js +0 -204
- package/dist/client/interaction/focus/LinkedList.d.ts +0 -18
- package/dist/client/interaction/focus/LinkedList.js +0 -122
- package/dist/client/interaction/focus/index.d.ts +0 -2
- package/dist/client/interaction/focus/index.js +0 -18
- package/dist/client/interaction/focus/useFocusService.d.ts +0 -2
- package/dist/client/interaction/focus/useFocusService.js +0 -14
- package/dist/client/interaction/modal/Modal.d.ts +0 -29
- package/dist/client/interaction/modal/Modal.js +0 -136
- package/dist/client/interaction/modal/ModalContainer.d.ts +0 -5
- package/dist/client/interaction/modal/ModalContainer.js +0 -104
- package/dist/client/interaction/modal/ModalContext.d.ts +0 -8
- package/dist/client/interaction/modal/ModalContext.js +0 -6
- package/dist/client/interaction/modal/ModalEvent.d.ts +0 -39
- package/dist/client/interaction/modal/ModalEvent.js +0 -53
- package/dist/client/interaction/modal/index.d.ts +0 -2
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
@@ -11,10 +22,8 @@ const entities_1 = require("../entities");
|
|
|
11
22
|
const fields_1 = require("../fields");
|
|
12
23
|
const BlockPanel_1 = require("./BlockPanel");
|
|
13
24
|
// component
|
|
14
|
-
function TestimonialPanel(
|
|
15
|
-
var _a,
|
|
16
|
-
// extract company from author
|
|
17
|
-
const company = (_b = (_a = author.fields) === null || _a === void 0 ? void 0 : _a.company) === null || _b === void 0 ? void 0 : _b.value;
|
|
25
|
+
function TestimonialPanel(_a) {
|
|
26
|
+
var { className, panel } = _a, testimonialProps = __rest(_a, ["className", "panel"]);
|
|
18
27
|
// render
|
|
19
28
|
return ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(className, 'nd-TestimonialPanel',
|
|
20
29
|
// base layout
|
|
@@ -37,13 +46,7 @@ function TestimonialPanel({ className, panel, layout = 'quoteAuthor', title, tit
|
|
|
37
46
|
center: 'lg:nd-TestimonialPanel-textCenter',
|
|
38
47
|
right: 'lg:nd-TestimonialPanel-textEnd'
|
|
39
48
|
}
|
|
40
|
-
})), children: (0, jsx_runtime_1.
|
|
41
|
-
(0, jsx_runtime_1.jsx)(entities_1.Client, { as: "div", className: "nd-TestimonialPanel-company", client: company, displayFields: ['name', 'logo'] }), title &&
|
|
42
|
-
(0, jsx_runtime_1.jsx)(fields_1.Title, { className: "nd-TestimonialPanel-title", as: titleTag, title: title }), (0, jsx_runtime_1.jsx)(fields_1.Quote, { className: "nd-TestimonialPanel-quote", as: quoteTag, quote: quote }), (0, jsx_runtime_1.jsx)(entities_1.Person, { as: authorTag, className: "nd-TestimonialPanel-author", person: author, displayFields: layout === 'companyQuoteAuthor'
|
|
43
|
-
? entities_1.Person.DisplayFields.exclude('company')
|
|
44
|
-
: entities_1.Person.DisplayFields.Id.values }), ctas.length > 0 &&
|
|
45
|
-
(0, jsx_runtime_1.jsx)("div", { className: "nd-TestimonialPanel-ctas", children: ctas.map(cta => (0, jsx_runtime_1.jsx)(fields_1.Link, { className: "nd-TestimonialPanel-cta", link: cta.value }, cta.id)) }), decorator &&
|
|
46
|
-
(0, jsx_runtime_1.jsx)("div", { className: "nd-TestimonialPanel-decorator", children: decorator })] }) }));
|
|
49
|
+
})), children: (0, jsx_runtime_1.jsx)(TestimonialPanel.Testimonial, Object.assign({ className: "nd-BlockPanel-content nd-TestimonialPanel-content" }, testimonialProps)) }));
|
|
47
50
|
}
|
|
48
51
|
// extension
|
|
49
52
|
(function (TestimonialPanel) {
|
|
@@ -59,13 +62,35 @@ function TestimonialPanel({ className, panel, layout = 'quoteAuthor', title, tit
|
|
|
59
62
|
hint: 'Who said it?',
|
|
60
63
|
collections: [entities_1.Person.schema]
|
|
61
64
|
});
|
|
62
|
-
Fields.
|
|
63
|
-
Fields.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}).optional();
|
|
65
|
+
Fields.ctas = fields_1.CallToActions.schema.optional();
|
|
66
|
+
Fields.all = {
|
|
67
|
+
title: Fields.title,
|
|
68
|
+
quote: Fields.quote,
|
|
69
|
+
author: Fields.author,
|
|
70
|
+
ctas: Fields.ctas
|
|
71
|
+
};
|
|
70
72
|
})(Fields = TestimonialPanel.Fields || (TestimonialPanel.Fields = {}));
|
|
73
|
+
// component
|
|
74
|
+
function Testimonial({ className, layout, titleTag = 'span', title, quoteTag = 'h2', quote, authorTag = 'div', author, ctas = [], companyDisplayFields = ['logo'], decorator }) {
|
|
75
|
+
var _a, _b;
|
|
76
|
+
// extract company from author
|
|
77
|
+
const company = (_b = (_a = author === null || author === void 0 ? void 0 : author.fields) === null || _a === void 0 ? void 0 : _a.company) === null || _b === void 0 ? void 0 : _b.value;
|
|
78
|
+
// render
|
|
79
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(className, 'nd-Testimonial'), children: [!title && !quote && !author && ctas.length === 0 &&
|
|
80
|
+
(0, jsx_runtime_1.jsx)(Testimonial.Placeholder, {}), company && layout === 'companyQuoteAuthor' &&
|
|
81
|
+
(0, jsx_runtime_1.jsx)(entities_1.Client, { as: "div", className: "nd-TestimonialPanel-company", client: company, displayFields: companyDisplayFields }), title &&
|
|
82
|
+
(0, jsx_runtime_1.jsx)(fields_1.Title, { className: "nd-TestimonialPanel-title", as: titleTag, title: title }), (0, jsx_runtime_1.jsx)(fields_1.Quote, { className: "nd-TestimonialPanel-quote", as: quoteTag, quote: quote }), (0, jsx_runtime_1.jsx)(entities_1.Person, { as: authorTag, className: "nd-TestimonialPanel-author", person: author, displayFields: layout === 'companyQuoteAuthor'
|
|
83
|
+
? entities_1.Person.DisplayFields.exclude('company')
|
|
84
|
+
: entities_1.Person.DisplayFields.Id.values }), ctas.length > 0 &&
|
|
85
|
+
(0, jsx_runtime_1.jsx)(fields_1.CallToActions, { className: "nd-TestimonialPanel-ctas", ctas: ctas }), decorator &&
|
|
86
|
+
(0, jsx_runtime_1.jsx)("div", { className: "nd-TestimonialPanel-decorator", children: decorator })] }));
|
|
87
|
+
}
|
|
88
|
+
TestimonialPanel.Testimonial = Testimonial;
|
|
89
|
+
(function (Testimonial) {
|
|
90
|
+
// placeholder
|
|
91
|
+
function Placeholder() {
|
|
92
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "nd-Testimonial-placeholder", children: "No testimonial content" }));
|
|
93
|
+
}
|
|
94
|
+
Testimonial.Placeholder = Placeholder;
|
|
95
|
+
})(Testimonial = TestimonialPanel.Testimonial || (TestimonialPanel.Testimonial = {}));
|
|
71
96
|
})(TestimonialPanel || (exports.TestimonialPanel = TestimonialPanel = {}));
|
|
@@ -8,7 +8,7 @@ export declare namespace VisualPanel {
|
|
|
8
8
|
type Props = BlockPanel.Props & {
|
|
9
9
|
className?: string;
|
|
10
10
|
panel: BlockLayout.Visual;
|
|
11
|
-
visual
|
|
11
|
+
visual?: Visual.Model;
|
|
12
12
|
visualDecorator?: ReactNode;
|
|
13
13
|
visualLoading?: Visual.Loading;
|
|
14
14
|
aspect?: AspectRatio;
|
|
@@ -147,7 +147,6 @@ function VisualPanel({ className, panel, visual, visualDecorator, visualLoading,
|
|
|
147
147
|
if (aspect === matchedAspect) {
|
|
148
148
|
aspect = 'auto';
|
|
149
149
|
}
|
|
150
|
-
console.debug('[VisualPanel/getConfig] aspect calculation:', { width, height, sourceAspectRatio, matchedAspect });
|
|
151
150
|
// create schema (drop matched aspect if we need to)
|
|
152
151
|
const configSchema = {
|
|
153
152
|
[keys.aspect]: matchedAspect
|
|
@@ -163,7 +162,6 @@ function VisualPanel({ className, panel, visual, visualDecorator, visualLoading,
|
|
|
163
162
|
if (sourceAspectRatio && aspect !== 'auto') {
|
|
164
163
|
// coerce anchor
|
|
165
164
|
const targetAspectRatio = schema_1.AspectRatio.ratios[aspect];
|
|
166
|
-
console.debug('[VisualPanel/getConfig] aspect calculation:', { width, height, sourceAspectRatio, matchedAspect, targetAspectRatio });
|
|
167
165
|
let anchorSchema = schema_1.Anchor.schema.modify({ semantics: 'segmented' });
|
|
168
166
|
if (sourceAspectRatio < targetAspectRatio) {
|
|
169
167
|
anchorSchema = anchorSchema.keepOptions('center', 'top', 'bottom');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from '@nascentdigital/funnel-core';
|
|
2
|
-
export type Anchor = '
|
|
2
|
+
export type Anchor = 'top' | 'left' | 'center' | 'bottom' | 'right';
|
|
3
3
|
export declare namespace Anchor {
|
|
4
4
|
const options: Schema.EnumField.Options<Anchor>;
|
|
5
5
|
const schema: Schema.EnumField<Schema.EnumField.Options<Anchor>>;
|
|
@@ -7,10 +7,10 @@ var Anchor;
|
|
|
7
7
|
(function (Anchor) {
|
|
8
8
|
// schema
|
|
9
9
|
Anchor.options = {
|
|
10
|
-
center: { name: 'Center' },
|
|
11
10
|
top: { name: 'Top' },
|
|
12
|
-
bottom: { name: 'Bottom' },
|
|
13
11
|
left: { name: 'Left' },
|
|
12
|
+
center: { name: 'Center' },
|
|
13
|
+
bottom: { name: 'Bottom' },
|
|
14
14
|
right: { name: 'Right' }
|
|
15
15
|
};
|
|
16
16
|
Anchor.schema = funnel_core_1.Schema.Field.enumeration({
|
|
@@ -22,7 +22,7 @@ var BlockConfig;
|
|
|
22
22
|
});
|
|
23
23
|
// helpers
|
|
24
24
|
function getClassName(theme) {
|
|
25
|
-
return
|
|
25
|
+
return `nd-theme-${(theme !== null && theme !== void 0 ? theme : 'default')}`;
|
|
26
26
|
}
|
|
27
27
|
Theme.getClassName = getClassName;
|
|
28
28
|
})(Theme = BlockConfig.Theme || (BlockConfig.Theme = {}));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Schema } from '@nascentdigital/funnel-core';
|
|
2
2
|
import { ItemAlignment } from './ItemAlignment';
|
|
3
|
+
import type { Carousel } from '../../client';
|
|
3
4
|
export type ListPanelLayout = keyof ListPanelLayout.Configs;
|
|
4
5
|
export declare namespace ListPanelLayout {
|
|
5
6
|
const options: Schema.EnumField.Options<ListPanelLayout>;
|
|
@@ -11,6 +12,7 @@ export declare namespace ListPanelLayout {
|
|
|
11
12
|
type Card = {
|
|
12
13
|
itemSize: 'sm' | 'md';
|
|
13
14
|
};
|
|
15
|
+
type Carousel = Carousel.CommonProps;
|
|
14
16
|
type FlexWrap = {
|
|
15
17
|
allowSingleItemRows: boolean;
|
|
16
18
|
itemAlignment: ItemAlignment;
|
|
@@ -18,6 +20,7 @@ export declare namespace ListPanelLayout {
|
|
|
18
20
|
type Grid = {
|
|
19
21
|
columns: number;
|
|
20
22
|
};
|
|
23
|
+
type Masonry = {};
|
|
21
24
|
type Stack = {
|
|
22
25
|
direction: 'horizontal' | 'vertical';
|
|
23
26
|
itemDistribution: 'equal' | 'even' | 'none';
|
|
@@ -26,9 +29,12 @@ export declare namespace ListPanelLayout {
|
|
|
26
29
|
brick: Omit<Brick, 'flipped'>;
|
|
27
30
|
brickFlipped: Omit<Brick, 'flipped'>;
|
|
28
31
|
card: Card;
|
|
32
|
+
carousel: Carousel;
|
|
29
33
|
flexWrap: FlexWrap;
|
|
30
34
|
grid: Grid;
|
|
31
35
|
horizontalStack: Omit<Stack, 'direction'>;
|
|
36
|
+
masonry: Masonry;
|
|
32
37
|
verticalStack: Omit<Stack, 'direction'>;
|
|
38
|
+
bento: {};
|
|
33
39
|
};
|
|
34
40
|
}
|
|
@@ -9,10 +9,13 @@ var ListPanelLayout;
|
|
|
9
9
|
brick: { name: 'Brick' },
|
|
10
10
|
brickFlipped: { name: 'Brick flipped' },
|
|
11
11
|
card: { name: 'Card' },
|
|
12
|
+
carousel: { name: 'Carousel' },
|
|
12
13
|
flexWrap: { name: 'Flex wrap' },
|
|
13
14
|
horizontalStack: { name: 'Horizontal stack' },
|
|
15
|
+
masonry: { name: 'Masonry' },
|
|
14
16
|
verticalStack: { name: 'Vertical stack' },
|
|
15
17
|
grid: { name: 'Grid' },
|
|
18
|
+
bento: { name: 'Bento' }
|
|
16
19
|
};
|
|
17
20
|
ListPanelLayout.schema = funnel_core_1.Schema.Field.enumeration({
|
|
18
21
|
name: 'Layout',
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FragmentProps, ReactElement, ReactNode } from 'react';
|
|
2
|
+
export declare namespace ReactUtils {
|
|
3
|
+
function isFragment(node: ReactNode): node is ReactElement<FragmentProps>;
|
|
4
|
+
function flattenChildren<TNode extends ReactNode = ReactNode>(children: TNode): TNode[];
|
|
5
|
+
function flattenFragment<TNode extends ReactNode = ReactNode>(fragment: ReactElement<FragmentProps>): TNode[];
|
|
6
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReactUtils = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
// namespace
|
|
6
|
+
var ReactUtils;
|
|
7
|
+
(function (ReactUtils) {
|
|
8
|
+
function isFragment(node) {
|
|
9
|
+
return (0, react_1.isValidElement)(node)
|
|
10
|
+
&& node.type === react_1.Fragment;
|
|
11
|
+
}
|
|
12
|
+
ReactUtils.isFragment = isFragment;
|
|
13
|
+
function flattenChildren(children) {
|
|
14
|
+
// setup nodes
|
|
15
|
+
const nodes = [];
|
|
16
|
+
//
|
|
17
|
+
// return nodes
|
|
18
|
+
return nodes;
|
|
19
|
+
}
|
|
20
|
+
ReactUtils.flattenChildren = flattenChildren;
|
|
21
|
+
function flattenFragment(fragment) {
|
|
22
|
+
throw new Error();
|
|
23
|
+
}
|
|
24
|
+
ReactUtils.flattenFragment = flattenFragment;
|
|
25
|
+
})(ReactUtils || (exports.ReactUtils = ReactUtils = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ReactUtils';
|
|
@@ -14,5 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./ModalContainer"), exports);
|
|
17
|
+
__exportStar(require("./ReactUtils"), exports);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
|
|
3
|
+
/* root variables */
|
|
4
|
+
:root {
|
|
5
|
+
|
|
6
|
+
/* theming */
|
|
7
|
+
--nd-section-fg: #000;
|
|
8
|
+
--nd-section-bg: #FFF;
|
|
9
|
+
|
|
10
|
+
/* spacing */
|
|
11
|
+
--nd-section-pt: theme('spacing.l17');
|
|
12
|
+
--nd-section-pb: theme('spacing.l17');
|
|
13
|
+
--nd-section-gap-sm: theme('spacing.l13');
|
|
14
|
+
--nd-section-gap-md: theme('spacing.l15');
|
|
15
|
+
--nd-section-gap-lg: theme('spacing.l17');
|
|
16
|
+
|
|
17
|
+
@media screen(sm) {
|
|
18
|
+
--nd-section-pt: theme('spacing.l17');
|
|
19
|
+
--nd-section-pb: theme('spacing.l17');
|
|
20
|
+
--nd-section-gap-sm: theme('spacing.l13');
|
|
21
|
+
--nd-section-gap-md: theme('spacing.l15');
|
|
22
|
+
--nd-section-gap-lg: theme('spacing.l17');
|
|
23
|
+
}
|
|
24
|
+
@media screen(md) {
|
|
25
|
+
--nd-section-pt: theme('spacing.l18');
|
|
26
|
+
--nd-section-pb: theme('spacing.l18');
|
|
27
|
+
--nd-section-gap-sm: theme('spacing.l14');
|
|
28
|
+
--nd-section-gap-md: theme('spacing.l16');
|
|
29
|
+
--nd-section-gap-lg: theme('spacing.l18');
|
|
30
|
+
}
|
|
31
|
+
@media screen(lg) {
|
|
32
|
+
--nd-section-pt: theme('spacing.l18');
|
|
33
|
+
--nd-section-pb: theme('spacing.l18');
|
|
34
|
+
--nd-section-gap-sm: theme('spacing.l15');
|
|
35
|
+
--nd-section-gap-md: theme('spacing.l17');
|
|
36
|
+
--nd-section-gap-lg: theme('spacing.l18');
|
|
37
|
+
}
|
|
38
|
+
@media screen(xl) {
|
|
39
|
+
--nd-section-pt: theme('spacing.l18');
|
|
40
|
+
--nd-section-pb: theme('spacing.l18');
|
|
41
|
+
--nd-section-gap-sm: theme('spacing.l15');
|
|
42
|
+
--nd-section-gap-md: theme('spacing.l17');
|
|
43
|
+
--nd-section-gap-lg: theme('spacing.l18');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* theming */
|
|
48
|
+
.nd-Section {
|
|
49
|
+
@apply text-[--nd-section-fg];
|
|
50
|
+
background: var(--site-color-bg);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -1,43 +1,5 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
|
|
3
|
-
/* spacing: variables */
|
|
4
|
-
:root {
|
|
5
|
-
--nd-section-pt: theme('spacing.l17');
|
|
6
|
-
--nd-section-pb: theme('spacing.l17');
|
|
7
|
-
--nd-section-gap-sm: theme('spacing.l13');
|
|
8
|
-
--nd-section-gap-md: theme('spacing.l15');
|
|
9
|
-
--nd-section-gap-lg: theme('spacing.l17');
|
|
10
|
-
|
|
11
|
-
@media screen(sm) {
|
|
12
|
-
--nd-section-pt: theme('spacing.l17');
|
|
13
|
-
--nd-section-pb: theme('spacing.l17');
|
|
14
|
-
--nd-section-gap-sm: theme('spacing.l13');
|
|
15
|
-
--nd-section-gap-md: theme('spacing.l15');
|
|
16
|
-
--nd-section-gap-lg: theme('spacing.l17');
|
|
17
|
-
}
|
|
18
|
-
@media screen(md) {
|
|
19
|
-
--nd-section-pt: theme('spacing.l18');
|
|
20
|
-
--nd-section-pb: theme('spacing.l18');
|
|
21
|
-
--nd-section-gap-sm: theme('spacing.l14');
|
|
22
|
-
--nd-section-gap-md: theme('spacing.l16');
|
|
23
|
-
--nd-section-gap-lg: theme('spacing.l18');
|
|
24
|
-
}
|
|
25
|
-
@media screen(lg) {
|
|
26
|
-
--nd-section-pt: theme('spacing.l18');
|
|
27
|
-
--nd-section-pb: theme('spacing.l18');
|
|
28
|
-
--nd-section-gap-sm: theme('spacing.l15');
|
|
29
|
-
--nd-section-gap-md: theme('spacing.l17');
|
|
30
|
-
--nd-section-gap-lg: theme('spacing.l18');
|
|
31
|
-
}
|
|
32
|
-
@media screen(xl) {
|
|
33
|
-
--nd-section-pt: theme('spacing.l18');
|
|
34
|
-
--nd-section-pb: theme('spacing.l18');
|
|
35
|
-
--nd-section-gap-sm: theme('spacing.l15');
|
|
36
|
-
--nd-section-gap-md: theme('spacing.l17');
|
|
37
|
-
--nd-section-gap-lg: theme('spacing.l18');
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
3
|
/* spacing + gaps */
|
|
42
4
|
.nd-Block {
|
|
43
5
|
|
|
@@ -49,6 +11,18 @@
|
|
|
49
11
|
--nd-section-pb-value: var(--nd-section-pb);
|
|
50
12
|
--nd-section-gap-value: var(--nd-section-gap);
|
|
51
13
|
|
|
14
|
+
/* section padding */
|
|
15
|
+
&:first-child {
|
|
16
|
+
padding-top: var(--nd-section-pt-value);
|
|
17
|
+
}
|
|
18
|
+
&:last-child {
|
|
19
|
+
padding-bottom: var(--nd-section-pb-value);
|
|
20
|
+
}
|
|
21
|
+
/* inter-block gaps */
|
|
22
|
+
+ .nd-Block {
|
|
23
|
+
padding-top: var(--nd-section-gap-value);
|
|
24
|
+
}
|
|
25
|
+
|
|
52
26
|
/* tight gap */
|
|
53
27
|
&.nd-Block-spacing-sm + .nd-Block {
|
|
54
28
|
--nd-section-gap: var(--nd-section-gap-sm);
|
|
@@ -104,6 +78,21 @@
|
|
|
104
78
|
}
|
|
105
79
|
|
|
106
80
|
/* crawl-up */
|
|
81
|
+
.nd-Section:has(+ .nd-Section > .nd-Block.nd-Block-crawlUp:first-child) {
|
|
82
|
+
padding-bottom: var(--nd-section-pb);
|
|
83
|
+
|
|
84
|
+
+ .nd-Section > .nd-Block.nd-Block-crawlUp:first-child {
|
|
85
|
+
@apply py-0;
|
|
86
|
+
|
|
87
|
+
> * {
|
|
88
|
+
@apply -translate-y-[var(--nd-section-pb)];
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
+ .nd-Block {
|
|
92
|
+
@apply pt-0;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
107
96
|
.nd-Block:has(+ .nd-Block.nd-Block-crawlUp):not(:first-child) {
|
|
108
97
|
--nd-section-pb-value: calc(2 * var(--nd-section-pb));
|
|
109
98
|
|
|
@@ -113,6 +102,10 @@
|
|
|
113
102
|
> * {
|
|
114
103
|
@apply -translate-y-[var(--nd-section-pb)];
|
|
115
104
|
}
|
|
105
|
+
|
|
106
|
+
+ .nd-Block {
|
|
107
|
+
@apply pt-0;
|
|
108
|
+
}
|
|
116
109
|
}
|
|
117
110
|
}
|
|
118
111
|
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
/* theming: variables */
|
|
4
4
|
:root {
|
|
5
|
-
--nd-block-fg:
|
|
6
|
-
--nd-block-bg: #FFF;
|
|
5
|
+
--nd-block-fg: currentColor;
|
|
7
6
|
}
|
|
8
7
|
|
|
9
8
|
/* theming */
|
|
10
9
|
.nd-Block {
|
|
11
|
-
color: var(--nd-block-fg);
|
|
12
|
-
background-color: var(--nd-block-bg);
|
|
10
|
+
color: var(--nd-block-fg, currentColor);
|
|
13
11
|
}
|
|
14
12
|
}
|
|
@@ -45,6 +45,22 @@
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/* puzzle */
|
|
49
|
+
.nd-PuzzleLayout {
|
|
50
|
+
> * {
|
|
51
|
+
&:nth-child(3n + 1):has(> .nd-Visual) {
|
|
52
|
+
@apply @panel-md:w-8/12;
|
|
53
|
+
@apply @panel-md:aspect-video;
|
|
54
|
+
}
|
|
55
|
+
&:nth-child(3n + 2):has(> .nd-Visual) {
|
|
56
|
+
@apply @panel-md:aspect-square;
|
|
57
|
+
}
|
|
58
|
+
&:nth-child(3n + 3):has(> .nd-Visual) {
|
|
59
|
+
@apply @panel-md:aspect-camera;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
48
64
|
/* vertical stack */
|
|
49
65
|
.nd-StackLayout.nd-StackLayout-direction-vertical {
|
|
50
66
|
.nd-MediaLayout-itemWrap {
|
|
@@ -1,38 +1,9 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
|
-
--nd-stats-content-gap: theme('spacing.l8');
|
|
5
|
-
--nd-stats-copy-gap: theme('spacing.l8');
|
|
6
|
-
--nd-stats-stats-gap: theme('spacing.l8');
|
|
7
|
-
--nd-stats-stats-gap-x: var(--nd-stats-stats-gap);
|
|
8
|
-
--nd-stats-stats-gap-y: var(--nd-stats-stats-gap);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.nd-Stats-content {
|
|
12
|
-
@apply container-p;
|
|
13
|
-
@apply flex flex-col gap-[var(--nd-stats-content-gap)];
|
|
14
|
-
}
|
|
15
4
|
|
|
16
|
-
.nd-Stats-copy {
|
|
17
|
-
@apply flex flex-col gap-[var(--nd-stats-copy-gap)];
|
|
18
5
|
}
|
|
19
6
|
|
|
20
|
-
|
|
21
|
-
.nd-Stats-layout-classic {
|
|
22
|
-
.nd-Stats-stats {
|
|
23
|
-
display: grid;
|
|
24
|
-
column-gap: var(--nd-stats-stats-gap-x);
|
|
25
|
-
row-gap: var(--nd-stats-stats-gap-y);
|
|
26
|
-
grid-template-columns: 1fr;
|
|
27
|
-
overflow-wrap: break-word;
|
|
28
|
-
|
|
29
|
-
@media screen(md) {
|
|
30
|
-
grid-template-columns: repeat(var(--columns, 2), minmax(0, 1fr));
|
|
31
|
-
|
|
32
|
-
&[data-stats-count="3"],
|
|
33
|
-
&[data-stats-count="5"],
|
|
34
|
-
&[data-stats-count="6"] {--columns: 3}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
7
|
+
.nd-Stats {
|
|
37
8
|
}
|
|
38
9
|
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--nd-carousel-prev-content: "Prev";
|
|
5
|
+
--nd-carousel-next-content: "Next";
|
|
6
|
+
--nd-carousel-controls-gap: 0px;
|
|
7
|
+
--nd-carousel-controls-btn: unset;
|
|
8
|
+
--nd-carousel-controls-btn-bg: unset;
|
|
9
|
+
--nd-carousel-controls-btn-padding: unset;
|
|
10
|
+
--nd-carousel-controls-btn-rounding: unset;
|
|
11
|
+
--nd-carousel-controls-margin: unset;
|
|
12
|
+
--nd-carousel-controls-btn-icon-size: unset;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* empty */
|
|
16
|
+
.nd-Carousel-empty {
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* single-item */
|
|
20
|
+
.nd-Carousel-single {
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* base */
|
|
24
|
+
.nd-Carousel-root {
|
|
25
|
+
|
|
26
|
+
/* pager */
|
|
27
|
+
.nd-Carousel-pager {
|
|
28
|
+
@apply relative whitespace-nowrap;
|
|
29
|
+
|
|
30
|
+
/* clipping enabled */
|
|
31
|
+
@apply overflow-hidden;
|
|
32
|
+
/*&:not([class*="nd-Carousel-disableClipping"]) {*/
|
|
33
|
+
/* @apply overflow-hidden;*/
|
|
34
|
+
/*}*/
|
|
35
|
+
|
|
36
|
+
/* clipping disabled */
|
|
37
|
+
/*&.nd-Carousel-disableClipping {*/
|
|
38
|
+
/* @apply overflow-visible;*/
|
|
39
|
+
/*}*/
|
|
40
|
+
/*&.nd-Carousel-disableClipping-left {*/
|
|
41
|
+
/* clip-path: polygon(-100% -100%, 100% -100%, 100% 100%, -100% 100%);*/
|
|
42
|
+
/*}*/
|
|
43
|
+
/*&.nd-Carousel-disableClipping-right {*/
|
|
44
|
+
/* clip-path: polygon(0 -100%, 200% -100%, 200% 100%, 0% 100%);*/
|
|
45
|
+
/*}*/
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* pages container (drag + translate) */
|
|
49
|
+
.nd-Carousel-pages {
|
|
50
|
+
@apply absolute inset-y-0 w-full flex;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* pages accessibility container (not for interaction) */
|
|
54
|
+
.nd-Carousel-pagesAlt {
|
|
55
|
+
@apply flex invisible;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* page */
|
|
59
|
+
.nd-Carousel-page {
|
|
60
|
+
@apply inline-block w-full shrink-0 pointer-events-none;
|
|
61
|
+
|
|
62
|
+
&.nd-Carousel-pageActive {
|
|
63
|
+
@apply pointer-events-auto;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* controls */
|
|
68
|
+
.nd-Carousel-controls {
|
|
69
|
+
margin: var(--nd-carousel-controls-margin);
|
|
70
|
+
@apply flex items-center gap-[var(--nd-carousel-controls-gap)];
|
|
71
|
+
|
|
72
|
+
/* prev */
|
|
73
|
+
.nd-Carousel-prev::after {
|
|
74
|
+
@apply block content-empty;
|
|
75
|
+
mask: var(--nd-carousel-prev-content);
|
|
76
|
+
background-color: var(--nd-carousel-controls-btn);
|
|
77
|
+
width: var(--nd-carousel-controls-btn-icon-size);
|
|
78
|
+
height: var(--nd-carousel-controls-btn-icon-size);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* next */
|
|
82
|
+
.nd-Carousel-next::after {
|
|
83
|
+
@apply block content-empty;
|
|
84
|
+
mask: var(--nd-carousel-next-content);
|
|
85
|
+
background-color: var(--nd-carousel-controls-btn);
|
|
86
|
+
width: var(--nd-carousel-controls-btn-icon-size);
|
|
87
|
+
height: var(--nd-carousel-controls-btn-icon-size);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.nd-Carousel-prev,
|
|
91
|
+
.nd-Carousel-next {
|
|
92
|
+
color: var(--nd-carousel-controls-btn);
|
|
93
|
+
background-color: var(--nd-carousel-controls-btn-bg);
|
|
94
|
+
padding: var(--nd-carousel-controls-btn-padding);
|
|
95
|
+
border-radius: var(--nd-carousel-controls-btn-rounding);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* play/pause */
|
|
99
|
+
.nd-Carousel-play {
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* indicators */
|
|
104
|
+
.nd-Carousel-indicators {
|
|
105
|
+
@apply flex gap-l4 items-center;
|
|
106
|
+
|
|
107
|
+
.nd-Carousel-indicator {
|
|
108
|
+
@apply block;
|
|
109
|
+
|
|
110
|
+
.nd-Carousel-indicatorBtn {
|
|
111
|
+
@apply block w-16 h-16 rounded-full overflow-hidden text-transparent interpolate;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&.nd-Carousel-indicatorActive {
|
|
115
|
+
.nd-Carousel-indicatorBtn {
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* utility classes */
|
|
123
|
+
.nd-Carousel-disableClipping {
|
|
124
|
+
.nd-Carousel-pager {
|
|
125
|
+
@apply overflow-visible;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|