@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.
Files changed (132) hide show
  1. package/dist/Tailwind.d.ts +1 -1
  2. package/dist/Tailwind.js +70 -24
  3. package/dist/client/hooks/breakpoint/BreakpointContainer.d.ts +1 -1
  4. package/dist/client/hooks/breakpoint/BreakpointContainer.js +3 -1
  5. package/dist/client/interaction/Carousel.d.ts +1 -1
  6. package/dist/client/interaction/Carousel.js +28 -30
  7. package/dist/client/interaction/index.d.ts +0 -6
  8. package/dist/client/interaction/index.js +0 -6
  9. package/dist/server/Page.d.ts +15 -0
  10. package/dist/server/Page.js +70 -0
  11. package/dist/server/blocks/Block.d.ts +4 -2
  12. package/dist/server/blocks/Block.js +10 -3
  13. package/dist/server/blocks/Editorial.d.ts +2 -2
  14. package/dist/server/blocks/Editorial.js +4 -4
  15. package/dist/server/blocks/Form.d.ts +2 -2
  16. package/dist/server/blocks/Form.js +3 -3
  17. package/dist/server/blocks/Message.js +2 -1
  18. package/dist/server/blocks/Projects.d.ts +29 -37
  19. package/dist/server/blocks/Projects.js +13 -84
  20. package/dist/server/blocks/RelatedPages.d.ts +58 -0
  21. package/dist/server/blocks/RelatedPages.js +99 -0
  22. package/dist/server/blocks/Stats.d.ts +19 -31
  23. package/dist/server/blocks/Stats.js +13 -57
  24. package/dist/server/blocks/Testimonial.d.ts +2 -2
  25. package/dist/server/blocks/Testimonial.js +17 -14
  26. package/dist/server/blocks/Testimonials.d.ts +35 -35
  27. package/dist/server/blocks/Testimonials.js +21 -66
  28. package/dist/server/blocks/index.d.ts +2 -0
  29. package/dist/server/blocks/index.js +2 -0
  30. package/dist/server/entities/previews/MessagePreview.d.ts +2 -2
  31. package/dist/server/entities/previews/MessagePreview.js +1 -1
  32. package/dist/server/fields/CallToActions.d.ts +12 -0
  33. package/dist/server/fields/CallToActions.js +27 -0
  34. package/dist/server/fields/Caption.js +3 -2
  35. package/dist/server/fields/Description.js +1 -1
  36. package/dist/server/fields/FreeFormContent.js +1 -1
  37. package/dist/server/fields/Headline.js +1 -1
  38. package/dist/server/fields/Quote.js +1 -1
  39. package/dist/server/fields/RichText.js +1 -0
  40. package/dist/server/fields/index.d.ts +1 -0
  41. package/dist/server/fields/index.js +1 -0
  42. package/dist/server/index.d.ts +2 -0
  43. package/dist/server/index.js +2 -0
  44. package/dist/server/layouts/BentoLayout.d.ts +289 -0
  45. package/dist/server/layouts/BentoLayout.js +25 -0
  46. package/dist/server/layouts/index.d.ts +1 -0
  47. package/dist/server/layouts/index.js +1 -0
  48. package/dist/server/panels/BlockPanel.js +1 -3
  49. package/dist/server/panels/ListPanel.d.ts +4 -4
  50. package/dist/server/panels/ListPanel.js +13 -2
  51. package/dist/server/panels/MessagePanel.d.ts +2 -6
  52. package/dist/server/panels/MessagePanel.js +2 -12
  53. package/dist/server/panels/TestimonialPanel.d.ts +44 -18
  54. package/dist/server/panels/TestimonialPanel.js +44 -19
  55. package/dist/server/panels/VisualPanel.d.ts +1 -1
  56. package/dist/server/panels/VisualPanel.js +0 -2
  57. package/dist/server/schema/Anchor.d.ts +1 -1
  58. package/dist/server/schema/Anchor.js +2 -2
  59. package/dist/server/schema/BlockConfig.js +1 -1
  60. package/dist/server/schema/ListPanelLayout.d.ts +6 -0
  61. package/dist/server/schema/ListPanelLayout.js +3 -0
  62. package/dist/server/utils/ReactUtils.d.ts +6 -0
  63. package/dist/server/utils/ReactUtils.js +25 -0
  64. package/dist/server/utils/index.d.ts +1 -0
  65. package/dist/{client/interaction/modal → server/utils}/index.js +1 -2
  66. package/dist/styles/Page.css +5 -0
  67. package/dist/styles/Section.css +52 -0
  68. package/dist/styles/blocks/Block-spacing.css +31 -38
  69. package/dist/styles/blocks/Block-theming.css +2 -4
  70. package/dist/styles/blocks/MediaLayout.css +16 -0
  71. package/dist/styles/blocks/Projects.css +0 -9
  72. package/dist/styles/blocks/RelatedPages.css +13 -0
  73. package/dist/styles/blocks/Stats.css +1 -30
  74. package/dist/styles/components/Carousel.css +128 -0
  75. package/dist/styles/components/_index.css +2 -1
  76. package/dist/styles/entities/Person.css +4 -4
  77. package/dist/styles/entities/Project.css +8 -2
  78. package/dist/styles/entities/UniqueSellingPoint.css +3 -3
  79. package/dist/styles/fields/Caption.css +2 -2
  80. package/dist/styles/fields/Description.css +2 -2
  81. package/dist/styles/fields/Icon.css +1 -1
  82. package/dist/styles/fields/Link.css +1 -1
  83. package/dist/styles/fields/Quote.css +2 -2
  84. package/dist/styles/fields/Title.css +1 -1
  85. package/dist/styles/index.css +2 -0
  86. package/dist/styles/layouts/BentoLayout.css +41 -0
  87. package/dist/styles/layouts/_index.css +1 -0
  88. package/dist/styles/panels/TestimonialPanel.css +4 -0
  89. package/package.json +2 -3
  90. package/dist/client/interaction/Popup.d.ts +0 -36
  91. package/dist/client/interaction/Popup.js +0 -244
  92. package/dist/client/interaction/Tooltip.d.ts +0 -16
  93. package/dist/client/interaction/Tooltip.js +0 -122
  94. package/dist/client/interaction/UILevel.d.ts +0 -1
  95. package/dist/client/interaction/UILevel.js +0 -2
  96. package/dist/client/interaction/backdrop/BackdropContainer.d.ts +0 -5
  97. package/dist/client/interaction/backdrop/BackdropContainer.js +0 -114
  98. package/dist/client/interaction/backdrop/BackdropContext.d.ts +0 -8
  99. package/dist/client/interaction/backdrop/BackdropContext.js +0 -6
  100. package/dist/client/interaction/backdrop/BackdropEvent.d.ts +0 -64
  101. package/dist/client/interaction/backdrop/BackdropEvent.js +0 -92
  102. package/dist/client/interaction/backdrop/index.d.ts +0 -4
  103. package/dist/client/interaction/backdrop/index.js +0 -20
  104. package/dist/client/interaction/backdrop/useBackdrop.d.ts +0 -13
  105. package/dist/client/interaction/backdrop/useBackdrop.js +0 -58
  106. package/dist/client/interaction/backdrop/useBackdropClick.d.ts +0 -2
  107. package/dist/client/interaction/backdrop/useBackdropClick.js +0 -21
  108. package/dist/client/interaction/backdrop/useBackdropVisible.d.ts +0 -1
  109. package/dist/client/interaction/backdrop/useBackdropVisible.js +0 -30
  110. package/dist/client/interaction/focus/FocusArea.d.ts +0 -10
  111. package/dist/client/interaction/focus/FocusArea.js +0 -38
  112. package/dist/client/interaction/focus/FocusContext.d.ts +0 -7
  113. package/dist/client/interaction/focus/FocusContext.js +0 -7
  114. package/dist/client/interaction/focus/FocusController.d.ts +0 -9
  115. package/dist/client/interaction/focus/FocusController.js +0 -40
  116. package/dist/client/interaction/focus/FocusService.d.ts +0 -20
  117. package/dist/client/interaction/focus/FocusService.js +0 -204
  118. package/dist/client/interaction/focus/LinkedList.d.ts +0 -18
  119. package/dist/client/interaction/focus/LinkedList.js +0 -122
  120. package/dist/client/interaction/focus/index.d.ts +0 -2
  121. package/dist/client/interaction/focus/index.js +0 -18
  122. package/dist/client/interaction/focus/useFocusService.d.ts +0 -2
  123. package/dist/client/interaction/focus/useFocusService.js +0 -14
  124. package/dist/client/interaction/modal/Modal.d.ts +0 -29
  125. package/dist/client/interaction/modal/Modal.js +0 -136
  126. package/dist/client/interaction/modal/ModalContainer.d.ts +0 -5
  127. package/dist/client/interaction/modal/ModalContainer.js +0 -104
  128. package/dist/client/interaction/modal/ModalContext.d.ts +0 -8
  129. package/dist/client/interaction/modal/ModalContext.js +0 -6
  130. package/dist/client/interaction/modal/ModalEvent.d.ts +0 -39
  131. package/dist/client/interaction/modal/ModalEvent.js +0 -53
  132. 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({ className, panel, layout = 'quoteAuthor', title, titleTag = 'span', quote, quoteTag = 'h2', author, authorTag = 'div', ctas = [], decorator }) {
15
- var _a, _b;
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.jsxs)("div", { className: "nd-BlockPanel-content nd-TestimonialPanel-content", children: [company && layout === 'companyQuoteAuthor' &&
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.cta = funnel_core_1.Schema.Field.link({ name: 'Call to Action' });
63
- Fields.ctas = funnel_core_1.Schema.Field.list({
64
- name: 'CTAs',
65
- description: 'Add your call-to-actions in the order you\'d like them to appear *(these are optional)*.',
66
- itemTypes: { cta: Fields.cta },
67
- min: 1,
68
- max: 2
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: Visual.Model;
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 = 'center' | 'top' | 'bottom' | 'left' | 'right';
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 funnel_core_1.BlockThemes.getClassName(theme !== null && theme !== void 0 ? theme : 'default');
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("./Modal"), exports);
18
- __exportStar(require("./ModalContainer"), exports);
17
+ __exportStar(require("./ReactUtils"), exports);
@@ -0,0 +1,5 @@
1
+ @layer components {
2
+
3
+ .nd-Page {
4
+ }
5
+ }
@@ -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: #000;
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 {
@@ -5,14 +5,5 @@
5
5
 
6
6
  /* base */
7
7
  .nd-Projects {
8
-
9
-
10
-
11
-
12
- }
13
-
14
- /* layout: masonry */
15
- .nd-Projects .nd-MasonryLayout {
16
- @apply container-p;
17
8
  }
18
9
  }
@@ -0,0 +1,13 @@
1
+ @layer components {
2
+
3
+ :root {
4
+ }
5
+
6
+ /* base */
7
+ .nd-RelatedPages {
8
+ }
9
+
10
+ /* visual aspect ratios */
11
+ .nd-RelatedPages .nd-ListPanel {
12
+ }
13
+ }
@@ -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
- /* classic layout */
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
+ }
@@ -1,3 +1,4 @@
1
1
  @import "./embed/_index.css";
2
+ @import "./Carousel.css";
2
3
  @import "./container.css";
3
- @import "./divider.css";
4
+ @import "./divider.css";