@nascentdigital/funnel-ui 4.5.7 → 4.6.1

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 (99) hide show
  1. package/dist/client/fields/LazyVideo.js +2 -2
  2. package/dist/client/hooks/index.d.ts +1 -0
  3. package/dist/client/hooks/index.js +1 -0
  4. package/dist/client/hooks/useTrackedValue.d.ts +2 -0
  5. package/dist/client/hooks/useTrackedValue.js +23 -0
  6. package/dist/client/interaction/Carousel.d.ts +1 -1
  7. package/dist/client/interaction/Carousel.js +17 -1
  8. package/dist/server/HTMLContainer.d.ts +289 -0
  9. package/dist/server/HTMLContainer.js +20 -0
  10. package/dist/server/Page.js +1 -1
  11. package/dist/server/blocks/Block.d.ts +17 -8
  12. package/dist/server/blocks/Block.js +21 -24
  13. package/dist/server/blocks/MediaLayout.d.ts +4 -4
  14. package/dist/server/blocks/MediaLayout.js +20 -23
  15. package/dist/server/blocks/Message.d.ts +1 -1
  16. package/dist/server/blocks/RelatedPages.d.ts +3 -3
  17. package/dist/server/blocks/RelatedPages.js +2 -4
  18. package/dist/server/blocks/index.d.ts +0 -9
  19. package/dist/server/blocks/index.js +0 -9
  20. package/dist/server/fields/Visual.js +7 -3
  21. package/dist/server/index.d.ts +1 -1
  22. package/dist/server/index.js +1 -1
  23. package/dist/server/panels/BlockPanel.js +4 -3
  24. package/dist/server/panels/ListPanel.d.ts +1 -1
  25. package/dist/server/panels/ListPanel.js +1 -1
  26. package/dist/server/panels/index.d.ts +0 -1
  27. package/dist/server/panels/index.js +0 -1
  28. package/dist/server/schema/index.d.ts +0 -1
  29. package/dist/server/schema/index.js +0 -1
  30. package/dist/styles/blocks/_index.css +1 -9
  31. package/dist/styles/components/Carousel.css +1 -0
  32. package/dist/styles/entities/_index.css +1 -5
  33. package/dist/styles/fields/Visual.css +20 -14
  34. package/dist/styles/layouts/Layout.css +8 -0
  35. package/dist/styles/layouts/MasonryLayout.css +2 -10
  36. package/dist/styles/layouts/_index.css +1 -0
  37. package/dist/styles/panels/VisualPanel.css +18 -19
  38. package/dist/styles/panels/_index.css +0 -1
  39. package/package.json +2 -2
  40. package/dist/server/blocks/Clients.d.ts +0 -25
  41. package/dist/server/blocks/Clients.js +0 -38
  42. package/dist/server/blocks/Outcome.d.ts +0 -25
  43. package/dist/server/blocks/Outcome.js +0 -35
  44. package/dist/server/blocks/OutcomeDetail.d.ts +0 -306
  45. package/dist/server/blocks/OutcomeDetail.js +0 -63
  46. package/dist/server/blocks/Projects.d.ts +0 -35
  47. package/dist/server/blocks/Projects.js +0 -38
  48. package/dist/server/blocks/Stat.d.ts +0 -325
  49. package/dist/server/blocks/Stat.js +0 -107
  50. package/dist/server/blocks/Stats.d.ts +0 -24
  51. package/dist/server/blocks/Stats.js +0 -35
  52. package/dist/server/blocks/Testimonial.d.ts +0 -95
  53. package/dist/server/blocks/Testimonial.js +0 -103
  54. package/dist/server/blocks/Testimonials.d.ts +0 -41
  55. package/dist/server/blocks/Testimonials.js +0 -45
  56. package/dist/server/blocks/ValueProp.d.ts +0 -25
  57. package/dist/server/blocks/ValueProp.js +0 -39
  58. package/dist/server/blocks/summary/Statement.d.ts +0 -304
  59. package/dist/server/blocks/summary/Statement.js +0 -52
  60. package/dist/server/blocks/summary/Summary.d.ts +0 -19
  61. package/dist/server/blocks/summary/Summary.js +0 -34
  62. package/dist/server/blocks/summary/index.d.ts +0 -1
  63. package/dist/server/blocks/summary/index.js +0 -17
  64. package/dist/server/entities/Client.d.ts +0 -327
  65. package/dist/server/entities/Client.js +0 -118
  66. package/dist/server/entities/ClientBadge.d.ts +0 -293
  67. package/dist/server/entities/ClientBadge.js +0 -37
  68. package/dist/server/entities/Person.d.ts +0 -339
  69. package/dist/server/entities/Person.js +0 -148
  70. package/dist/server/entities/Project.d.ts +0 -329
  71. package/dist/server/entities/Project.js +0 -112
  72. package/dist/server/entities/UniqueSellingPoint.d.ts +0 -327
  73. package/dist/server/entities/UniqueSellingPoint.js +0 -119
  74. package/dist/server/entities/index.d.ts +0 -6
  75. package/dist/server/entities/index.js +0 -22
  76. package/dist/server/entities/previews/MessagePreview.d.ts +0 -299
  77. package/dist/server/entities/previews/MessagePreview.js +0 -41
  78. package/dist/server/entities/previews/PagePreview.d.ts +0 -10
  79. package/dist/server/entities/previews/PagePreview.js +0 -42
  80. package/dist/server/entities/previews/index.d.ts +0 -2
  81. package/dist/server/entities/previews/index.js +0 -18
  82. package/dist/server/panels/TestimonialPanel.d.ts +0 -73
  83. package/dist/server/panels/TestimonialPanel.js +0 -96
  84. package/dist/server/schema/CollectionSchema.d.ts +0 -4
  85. package/dist/server/schema/CollectionSchema.js +0 -15
  86. package/dist/styles/blocks/Clients.css +0 -9
  87. package/dist/styles/blocks/Outcome.css +0 -46
  88. package/dist/styles/blocks/Projects.css +0 -9
  89. package/dist/styles/blocks/RelatedPages.css +0 -13
  90. package/dist/styles/blocks/Stat.css +0 -45
  91. package/dist/styles/blocks/Stats.css +0 -9
  92. package/dist/styles/blocks/Summary.css +0 -15
  93. package/dist/styles/blocks/Testimonial.css +0 -6
  94. package/dist/styles/blocks/ValueProp.css +0 -9
  95. package/dist/styles/entities/ClientBadge.css +0 -14
  96. package/dist/styles/entities/Person.css +0 -76
  97. package/dist/styles/entities/Project.css +0 -50
  98. package/dist/styles/entities/UniqueSellingPoint.css +0 -54
  99. package/dist/styles/panels/TestimonialPanel.css +0 -68
@@ -20,9 +20,13 @@ const panels_1 = require("../panels");
20
20
  const Block_1 = require("./Block");
21
21
  // block
22
22
  function MediaLayout(_a) {
23
- var { EmbeddedVideoElement = refs_1.EmbeddedVideo, listPanelProps } = _a, props = __rest(_a, ["EmbeddedVideoElement", "listPanelProps"]);
23
+ var { EmbeddedVideoElement = refs_1.EmbeddedVideo } = _a, props = __rest(_a, ["EmbeddedVideoElement"]);
24
24
  // render
25
- return ((0, jsx_runtime_1.jsx)(MediaLayout.Component, Object.assign({ listPanelProps: Object.assign(Object.assign({}, listPanelProps), { itemProps: { EmbeddedVideoElement } }) }, props)));
25
+ return ((0, jsx_runtime_1.jsx)(MediaLayout.Component, Object.assign({}, props, { children: ({ item }) => (0, jsx_runtime_1.jsx)("div", { className: "nd-MediaLayout-itemWrap", children: funnel_core_1.Schema.EmbeddedVideoField.Value.filter(item.value)
26
+ ?
27
+ (0, jsx_runtime_1.jsx)(EmbeddedVideoElement, { className: "nd-MediaLayout-item", video: item.value })
28
+ :
29
+ (0, jsx_runtime_1.jsx)(fields_1.Visual, { className: "nd-MediaLayout-item", visual: item.value }) }) })));
26
30
  }
27
31
  // extension
28
32
  (function (MediaLayout) {
@@ -34,26 +38,19 @@ function MediaLayout(_a) {
34
38
  version: 1,
35
39
  className: 'nd-MediaLayout',
36
40
  message: true,
37
- list: {
38
- schema: funnel_core_1.Schema.Field.list({
39
- name: 'Assets',
40
- description: 'Add one or more assets and then configure the layout.',
41
- itemTypes: {
42
- visual: panels_1.VisualPanel.Fields.visual.unwrap(),
43
- embedded: funnel_core_1.Schema.Field.embeddedVideo({
44
- name: 'Embedded Video',
45
- description: 'A remote streaming video (e.g. YouTube)',
46
- allowMuting: true
47
- })
48
- },
49
- min: 1,
50
- max: 20
51
- }),
52
- itemRenderer: (item, { EmbeddedVideoElement }) => ((0, jsx_runtime_1.jsx)("div", { className: "nd-MediaLayout-itemWrap", children: funnel_core_1.Schema.EmbeddedVideoField.Value.filter(item.value)
53
- ?
54
- (0, jsx_runtime_1.jsx)(EmbeddedVideoElement, { className: "nd-MediaLayout-item", video: item.value })
55
- :
56
- (0, jsx_runtime_1.jsx)(fields_1.Visual, { className: "nd-MediaLayout-item", visual: item.value }) }))
57
- }
41
+ list: funnel_core_1.Schema.Field.list({
42
+ name: 'Assets',
43
+ description: 'Add one or more assets and then configure the layout.',
44
+ itemTypes: {
45
+ visual: panels_1.VisualPanel.Fields.visual.unwrap(),
46
+ embedded: funnel_core_1.Schema.Field.embeddedVideo({
47
+ name: 'Embedded Video',
48
+ description: 'A remote streaming video (e.g. YouTube)',
49
+ allowMuting: true
50
+ })
51
+ },
52
+ min: 1,
53
+ max: 20
54
+ })
58
55
  }), MediaLayout.Component = _a.Component, MediaLayout.schema = _a.schema;
59
56
  })(MediaLayout || (exports.MediaLayout = MediaLayout = {}));
@@ -9,7 +9,7 @@ export declare namespace Message {
9
9
  const schema: Schema.EnumField<Schema.EnumField.Options<Variant>>;
10
10
  function getClassName(variant?: Variant): string;
11
11
  }
12
- const Component: import("react").FunctionComponent<Block.Create.Result.Component<"_nd-message", true, true, undefined, {
12
+ const Component: import("react").FunctionComponent<Block.Create.Result.ComponentProps<"_nd-message", true, true, undefined, {
13
13
  variant: Schema.EnumField<Schema.EnumField.Options<Variant>>;
14
14
  }, any>>, schema: Block.Create.Result.Schema<"_nd-message", true, true, undefined, {
15
15
  variant: Schema.EnumField<Schema.EnumField.Options<Variant>>;
@@ -32,13 +32,13 @@ export declare namespace RelatedPages {
32
32
  layout: import("..").PanelLayout.Schema;
33
33
  } & {
34
34
  slotVariation: import("..").SlotVariation.Schema;
35
- } & Record<"messageTextAlign", Schema.EnumField<Schema.EnumField.Options<import("..").TextAlignment>>> & Record<"messageWidth", Schema.EnumField<Schema.EnumField.Options<import("..").ItemSize>>> & Record<"messageHorizontalAlign", Schema.EnumField<Schema.EnumField.Options<import("..").ItemAlignment>>> & Record<"messageVerticalAlign", Schema.EnumField<Schema.EnumField.Options<import("..").ItemAlignment>>> & Record<`${any}Width`, Schema.EnumField<Schema.EnumField.Options<import("..").ItemSize>>> & Record<`${any}HorizontalAlign`, Schema.EnumField<Schema.EnumField.Options<import("..").ItemAlignment>>> & Record<`${any}VerticalAlign`, Schema.EnumField<Schema.EnumField.Options<import("..").ItemAlignment>>> & Schema.Block.Config) | ({
35
+ } & Record<"messageTextAlign", Schema.EnumField<Schema.EnumField.Options<import("..").TextAlignment>>> & Record<"messageWidth", Schema.EnumField<Schema.EnumField.Options<import("..").ItemSize>>> & Record<"messageHorizontalAlign", Schema.EnumField<Schema.EnumField.Options<import("..").ItemAlignment>>> & Record<"messageVerticalAlign", Schema.EnumField<Schema.EnumField.Options<import("..").ItemAlignment>>> & Record<`${any}Layout`, Schema.EnumField<Schema.EnumField.Options<keyof import("..").ListPanelLayout.Configs>>> & Record<`${any}Width`, Schema.EnumField<Schema.EnumField.Options<import("..").ItemSize>>> & Record<`${any}HorizontalAlign`, Schema.EnumField<Schema.EnumField.Options<import("..").ItemAlignment>>> & Record<`${any}VerticalAlign`, Schema.EnumField<Schema.EnumField.Options<import("..").ItemAlignment>>> & Schema.Block.Config) | ({
36
36
  readonly theme: Schema.EnumField<Readonly<import("@nascentdigital/funnel-core").BlockThemes.Options>>;
37
37
  } & {
38
38
  layout: import("..").PanelLayout.Schema;
39
39
  } & {
40
40
  slotVariation: import("..").SlotVariation.Schema;
41
- } & Record<"messageTextAlign", Schema.EnumField<Schema.EnumField.Options<import("..").TextAlignment>>> & Record<"messageWidth", Schema.EnumField<Schema.EnumField.Options<import("..").ItemSize>>> & Record<"messageHorizontalAlign", Schema.EnumField<Schema.EnumField.Options<import("..").ItemAlignment>>> & Record<"messageVerticalAlign", Schema.EnumField<Schema.EnumField.Options<import("..").ItemAlignment>>> & Record<`${any}Width`, Schema.EnumField<Schema.EnumField.Options<import("..").ItemSize>>> & Record<`${any}HorizontalAlign`, Schema.EnumField<Schema.EnumField.Options<import("..").ItemAlignment>>> & Record<`${any}VerticalAlign`, Schema.EnumField<Schema.EnumField.Options<import("..").ItemAlignment>>> & {
41
+ } & Record<"messageTextAlign", Schema.EnumField<Schema.EnumField.Options<import("..").TextAlignment>>> & Record<"messageWidth", Schema.EnumField<Schema.EnumField.Options<import("..").ItemSize>>> & Record<"messageHorizontalAlign", Schema.EnumField<Schema.EnumField.Options<import("..").ItemAlignment>>> & Record<"messageVerticalAlign", Schema.EnumField<Schema.EnumField.Options<import("..").ItemAlignment>>> & Record<`${any}Layout`, Schema.EnumField<Schema.EnumField.Options<keyof import("..").ListPanelLayout.Configs>>> & Record<`${any}Width`, Schema.EnumField<Schema.EnumField.Options<import("..").ItemSize>>> & Record<`${any}HorizontalAlign`, Schema.EnumField<Schema.EnumField.Options<import("..").ItemAlignment>>> & Record<`${any}VerticalAlign`, Schema.EnumField<Schema.EnumField.Options<import("..").ItemAlignment>>> & {
42
42
  contentAlign: import("..").ItemAlignment.Vertical.Schema;
43
43
  } & Schema.Block.Config)>;
44
44
  namespace schema {
@@ -49,7 +49,7 @@ export declare namespace RelatedPages {
49
49
  }
50
50
  type Props<TPage extends Schema.Page> = HTMLBlockElement<'div'> & {
51
51
  model: Model;
52
- children?: Transform<Schema.Page.LinkedData.AsPreview<TPage>, ReactNode>;
52
+ children: Transform<Schema.Page.LinkedData.AsPreview<TPage>, ReactNode>;
53
53
  titleTag?: Title.Tag;
54
54
  headlineTag?: Headline.Tag;
55
55
  captionTag?: Caption.Tag;
@@ -18,12 +18,11 @@ exports.RelatedPages = RelatedPages;
18
18
  const jsx_runtime_1 = require("react/jsx-runtime");
19
19
  const funnel_core_1 = require("@nascentdigital/funnel-core");
20
20
  const classnames_1 = __importDefault(require("classnames"));
21
- const entities_1 = require("../entities");
22
21
  const panels_1 = require("../panels");
23
22
  const Block_1 = require("./Block");
24
23
  // component
25
24
  function RelatedPages(_a) {
26
- var _b, _c, _d, _e, _f;
25
+ var _b, _c, _d, _e;
27
26
  var { className, model, children, titleTag = 'span', headlineTag = 'h2', captionTag = 'div' } = _a, props = __rest(_a, ["className", "model", "children", "titleTag", "headlineTag", "captionTag"]);
28
27
  // don't render if missing model
29
28
  if (!model) {
@@ -39,7 +38,6 @@ function RelatedPages(_a) {
39
38
  const caption = captionRaw === null || captionRaw === void 0 ? void 0 : captionRaw.value;
40
39
  const ctas = ctasRaw === null || ctasRaw === void 0 ? void 0 : ctasRaw.value;
41
40
  const pages = (_e = (_d = listRaw === null || listRaw === void 0 ? void 0 : listRaw.value) === null || _d === void 0 ? void 0 : _d.pages) !== null && _e !== void 0 ? _e : [];
42
- const schema = (_f = listRaw === null || listRaw === void 0 ? void 0 : listRaw.value.__schema) !== null && _f !== void 0 ? _f : {};
43
41
  // panel layout
44
42
  const layout = panels_1.BlockPanel.getLayout({
45
43
  args: { fields, config },
@@ -53,7 +51,7 @@ function RelatedPages(_a) {
53
51
  return ((0, jsx_runtime_1.jsx)(panels_1.MessagePanel, { panel: panel, title: title, headline: headline, caption: caption, ctas: ctas }));
54
52
  case 'list': {
55
53
  const listPanelConfig = config;
56
- return ((0, jsx_runtime_1.jsx)(panels_1.ListPanel, { panel: panel, items: pages, layout: ((_a = funnel_core_1.Schema.EnumField.Value.fromData(listPanelConfig.listLayout)) !== null && _a !== void 0 ? _a : 'card'), children: page => { var _a; return (_a = children === null || children === void 0 ? void 0 : children(page)) !== null && _a !== void 0 ? _a : (0, jsx_runtime_1.jsx)(entities_1.PagePreview, { page: page }); } }));
54
+ return ((0, jsx_runtime_1.jsx)(panels_1.ListPanel, { panel: panel, items: pages, layout: ((_a = funnel_core_1.Schema.EnumField.Value.fromData(listPanelConfig.listLayout)) !== null && _a !== void 0 ? _a : 'card'), children: page => children(page) }));
57
55
  }
58
56
  }
59
57
  };
@@ -1,16 +1,7 @@
1
1
  export * from './Block';
2
- export * from './Clients';
3
2
  export * from './Editorial';
4
3
  export * from './Form';
5
4
  export * from './FormMessage';
6
5
  export * from './MediaLayout';
7
6
  export * from './Message';
8
- export * from './Outcome';
9
- export * from './Projects';
10
7
  export * from './RelatedPages';
11
- export * from './Stat';
12
- export * from './Stats';
13
- export * from './Testimonial';
14
- export * from './Testimonials';
15
- export * from './ValueProp';
16
- export * from './summary';
@@ -15,18 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Block"), exports);
18
- __exportStar(require("./Clients"), exports);
19
18
  __exportStar(require("./Editorial"), exports);
20
19
  __exportStar(require("./Form"), exports);
21
20
  __exportStar(require("./FormMessage"), exports);
22
21
  __exportStar(require("./MediaLayout"), exports);
23
22
  __exportStar(require("./Message"), exports);
24
- __exportStar(require("./Outcome"), exports);
25
- __exportStar(require("./Projects"), exports);
26
23
  __exportStar(require("./RelatedPages"), exports);
27
- __exportStar(require("./Stat"), exports);
28
- __exportStar(require("./Stats"), exports);
29
- __exportStar(require("./Testimonial"), exports);
30
- __exportStar(require("./Testimonials"), exports);
31
- __exportStar(require("./ValueProp"), exports);
32
- __exportStar(require("./summary"), exports);
@@ -34,15 +34,19 @@ function Visual(_a) {
34
34
  // or render image
35
35
  else if (funnel_core_1.Schema.AssetField.LinkedValue.Image.filter(visual)) {
36
36
  const { url, description = '', metadata: { crop = 'center', dimensions } = {} } = visual !== null && visual !== void 0 ? visual : {};
37
- return ((0, jsx_runtime_1.jsx)(image_1.default, Object.assign({}, props, { className: (0, classnames_1.default)(className, 'nd-Visual nd-Visual-image'), src: url, alt: description !== null && description !== void 0 ? description : '', width: dimensions === null || dimensions === void 0 ? void 0 : dimensions.width, height: dimensions === null || dimensions === void 0 ? void 0 : dimensions.height, loading: loading, draggable: false })));
37
+ const { width, height } = dimensions !== null && dimensions !== void 0 ? dimensions : {};
38
+ return ((0, jsx_runtime_1.jsx)(image_1.default, Object.assign({}, props, { className: (0, classnames_1.default)(className, 'nd-Visual nd-Visual-image'), src: url, alt: description !== null && description !== void 0 ? description : '', width: dimensions === null || dimensions === void 0 ? void 0 : dimensions.width, height: dimensions === null || dimensions === void 0 ? void 0 : dimensions.height, loading: loading, draggable: false, style: {
39
+ '--_nd-visual-native-width': width ? `${width}` : '1',
40
+ '--_nd-visual-native-height': height ? `${height}` : '1'
41
+ } })));
38
42
  }
39
43
  // or render lazy
40
44
  else if (loading === 'eager') {
41
45
  const { type, url, metadata: { crop = 'center', dimensions } = {} } = visual !== null && visual !== void 0 ? visual : {};
42
46
  const { width, height } = dimensions !== null && dimensions !== void 0 ? dimensions : {};
43
47
  return ((0, jsx_runtime_1.jsx)("video", Object.assign({}, props, { className: (0, classnames_1.default)(className, 'nd-Visual nd-Visual-video'), autoPlay: true, muted: true, loop: true, playsInline: true, style: {
44
- '--nd-visual-width': width ? `${width}` : '1',
45
- '--nd-visual-height': height ? `${height}` : '1'
48
+ '--_nd-visual-native-width': width ? `${width}` : '1',
49
+ '--_nd-visual-native-height': height ? `${height}` : '1'
46
50
  }, children: (0, jsx_runtime_1.jsx)("source", { src: url, type: type }) })));
47
51
  }
48
52
  // or render image
@@ -1,11 +1,11 @@
1
1
  export * from './atomic';
2
2
  export * from './blocks';
3
3
  export * from './data';
4
- export * from './entities';
5
4
  export * from './fields';
6
5
  export * from './panels';
7
6
  export * from './schema';
8
7
  export * from './sections';
9
8
  export * from './transitions';
10
9
  export * from './utils';
10
+ export * from './HTMLContainer';
11
11
  export * from './Page';
@@ -17,11 +17,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./atomic"), exports);
18
18
  __exportStar(require("./blocks"), exports);
19
19
  __exportStar(require("./data"), exports);
20
- __exportStar(require("./entities"), exports);
21
20
  __exportStar(require("./fields"), exports);
22
21
  __exportStar(require("./panels"), exports);
23
22
  __exportStar(require("./schema"), exports);
24
23
  __exportStar(require("./sections"), exports);
25
24
  __exportStar(require("./transitions"), exports);
26
25
  __exportStar(require("./utils"), exports);
26
+ __exportStar(require("./HTMLContainer"), exports);
27
27
  __exportStar(require("./Page"), exports);
@@ -338,7 +338,7 @@ var BlockPanel;
338
338
  }
339
339
  BlockPanel.getConfigSchema = getConfigSchema;
340
340
  function getConfig({ args, messageFieldKeys, messageKey, visualKey, listKey }) {
341
- var _a, _b, _c, _d;
341
+ var _a, _b, _c, _d, _e, _f, _g, _h;
342
342
  // throw if there are not enough panels
343
343
  const panelCount = [messageKey, visualKey, listKey].filter(funnel_core_1.Value.isDefined).length;
344
344
  if (panelCount === 0) {
@@ -435,9 +435,10 @@ var BlockPanel;
435
435
  delete updatedConfigSchema.layout;
436
436
  }
437
437
  // create default config
438
- const defaultConfig = Object.assign(Object.assign(Object.assign(Object.assign({ theme: funnel_core_1.Schema.EnumField.Value.toData('default'), contentAlign: funnel_core_1.Schema.EnumField.Value.toData('start') }, messageConfig === null || messageConfig === void 0 ? void 0 : messageConfig.defaultConfig), visualConfig === null || visualConfig === void 0 ? void 0 : visualConfig.defaultConfig), listConfig === null || listConfig === void 0 ? void 0 : listConfig.defaultConfig), { layout: layoutSchema.defaultOption, slotVariation: slotVariationSchema.defaultOption });
438
+ const defaultConfig = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, config), { theme: funnel_core_1.Schema.EnumField.Value.toData('default'), contentAlign: funnel_core_1.Schema.EnumField.Value.toData('start') }), messageConfig === null || messageConfig === void 0 ? void 0 : messageConfig.defaultConfig), visualConfig === null || visualConfig === void 0 ? void 0 : visualConfig.defaultConfig), listConfig === null || listConfig === void 0 ? void 0 : listConfig.defaultConfig), { layout: funnel_core_1.Schema.EnumField.Value.toData((_e = layoutSchema.defaultOption) !== null && _e !== void 0 ? _e : 'solo'), slotVariation: funnel_core_1.Schema.EnumField.Value.toData((_f = slotVariationSchema.defaultOption) !== null && _f !== void 0 ? _f : 'v1') });
439
+ const contentAlign = ((_h = (_g = config.contentAlign) === null || _g === void 0 ? void 0 : _g.value) !== null && _h !== void 0 ? _h : 'start');
439
440
  // create new config
440
- const updatedConfig = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, config), messageConfig === null || messageConfig === void 0 ? void 0 : messageConfig.config), visualConfig === null || visualConfig === void 0 ? void 0 : visualConfig.config), listConfig === null || listConfig === void 0 ? void 0 : listConfig.config), { layout: funnel_core_1.Schema.EnumField.Value.toData(layout), slotVariation: funnel_core_1.Schema.EnumField.Value.toData(slotVariation) });
441
+ const updatedConfig = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, config), messageConfig === null || messageConfig === void 0 ? void 0 : messageConfig.config), visualConfig === null || visualConfig === void 0 ? void 0 : visualConfig.config), listConfig === null || listConfig === void 0 ? void 0 : listConfig.config), { layout: funnel_core_1.Schema.EnumField.Value.toData(layout), slotVariation: funnel_core_1.Schema.EnumField.Value.toData(slotVariation), contentAlign: funnel_core_1.Schema.EnumField.Value.toData(contentAlign) });
441
442
  // return config
442
443
  return {
443
444
  updatedConfigSchema: updatedConfigSchema,
@@ -24,7 +24,7 @@ export declare namespace ListPanel {
24
24
  verticalAlign: Key.VerticalAlign<TPrefix>;
25
25
  };
26
26
  function getKeys<TPrefix extends string>(prefix: TPrefix): Keys<TPrefix>;
27
- type Entries<TPrefix extends string> = Record<Key.Width<TPrefix>, ItemSize.Schema> & Record<Key.HorizontalAlign<TPrefix>, ItemAlignment.Horizontal.Schema> & Record<Key.VerticalAlign<TPrefix>, ItemAlignment.Vertical.Schema>;
27
+ type Entries<TPrefix extends string> = Record<Key.Layout<TPrefix>, ListPanelLayout.Schema> & Record<Key.Width<TPrefix>, ItemSize.Schema> & Record<Key.HorizontalAlign<TPrefix>, ItemAlignment.Horizontal.Schema> & Record<Key.VerticalAlign<TPrefix>, ItemAlignment.Vertical.Schema>;
28
28
  }
29
29
  type Item = {
30
30
  id: string;
@@ -107,7 +107,7 @@ function ListPanel({ as = 'ul', className, panel, layout, items, layoutConfigs =
107
107
  // resolve values
108
108
  const defaultLayout = 'card';
109
109
  const layout = (_b = (_a = config[keys.layout]) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : defaultLayout;
110
- const defaultWidth = 'md';
110
+ const defaultWidth = 'full';
111
111
  let width = (_d = (_c = config[keys.width]) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : defaultWidth;
112
112
  const defaultHorizontalAlign = 'start';
113
113
  const horizontalAlign = (_f = (_e = config[keys.horizontalAlign]) === null || _e === void 0 ? void 0 : _e.value) !== null && _f !== void 0 ? _f : defaultHorizontalAlign;
@@ -1,5 +1,4 @@
1
1
  export * from './BlockPanel';
2
2
  export * from './ListPanel';
3
3
  export * from './MessagePanel';
4
- export * from './TestimonialPanel';
5
4
  export * from './VisualPanel';
@@ -17,5 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./BlockPanel"), exports);
18
18
  __exportStar(require("./ListPanel"), exports);
19
19
  __exportStar(require("./MessagePanel"), exports);
20
- __exportStar(require("./TestimonialPanel"), exports);
21
20
  __exportStar(require("./VisualPanel"), exports);
@@ -1,7 +1,6 @@
1
1
  export * from './Anchor';
2
2
  export * from './AspectRatio';
3
3
  export * from './BlockConfig';
4
- export * from './CollectionSchema';
5
4
  export * from './ItemAlignment';
6
5
  export * from './ItemPosition';
7
6
  export * from './ItemSize';
@@ -17,7 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Anchor"), exports);
18
18
  __exportStar(require("./AspectRatio"), exports);
19
19
  __exportStar(require("./BlockConfig"), exports);
20
- __exportStar(require("./CollectionSchema"), exports);
21
20
  __exportStar(require("./ItemAlignment"), exports);
22
21
  __exportStar(require("./ItemPosition"), exports);
23
22
  __exportStar(require("./ItemSize"), exports);
@@ -1,15 +1,7 @@
1
1
  @import "./Block-layout.css";
2
2
  @import "./Block-spacing.css";
3
3
  @import "./Block-theming.css";
4
- @import "./Clients.css";
5
4
  @import "./Editorial.css";
6
5
  @import "./Form.css";
7
6
  @import "./MediaLayout.css";
8
- @import "./Message.css";
9
- @import "./Outcome.css";
10
- @import "./Projects.css";
11
- @import "./Stat.css";
12
- @import "./Stats.css";
13
- @import "./Summary.css";
14
- @import "./Testimonial.css";
15
- @import "./ValueProp.css";
7
+ @import "./Message.css";
@@ -1,6 +1,7 @@
1
1
  @layer components {
2
2
 
3
3
  :root {
4
+ --nd-carousel-gap: theme('spacing.l8');
4
5
  --nd-carousel-prev-content: "Prev";
5
6
  --nd-carousel-next-content: "Next";
6
7
  --nd-carousel-controls-gap: 0px;
@@ -1,5 +1 @@
1
- @import "./Client.css";
2
- @import "./ClientBadge.css";
3
- @import "./Person.css";
4
- @import "./Project.css";
5
- @import "./UniqueSellingPoint.css";
1
+ @import "./Client.css";
@@ -3,25 +3,31 @@
3
3
  :root {
4
4
  --nd-visual-width: unset;
5
5
  --nd-visual-height: unset;
6
+ --nd-visual-max-width: unset;
7
+ --nd-visual-max-height: unset;
6
8
  --nd-visual-anchor: center;
9
+ --nd-visual-aspect: unset;
10
+ --nd-visual-object-fit: unset;
7
11
  }
8
- .nd-Visual-image {
9
- @apply object-cover;
10
- object-position: var(--nd-visual-anchor);
11
12
 
12
- img {
13
- @apply object-cover;
13
+ .nd-Visual-image,
14
+ .nd-Visual-video
15
+ {
16
+ aspect-ratio: var(--nd-visual-aspect, var(--_nd-visual-native-width) / var(--_nd-visual-native-height));
17
+ max-width: var(--nd-visual-max-width, 100%);
18
+ max-height: var(--nd-visual-max-height, 100%);
19
+ width: var(--nd-visual-width, calc(var(--_nd-visual-native-width) * 1px));
20
+ height: var(--nd-visual-height, calc(var(--_nd-visual-native-height) * 1px));
21
+
22
+ img, video {
23
+ @apply size-full;
24
+ object-fit: var(--nd-visual-object-fit, cover);
14
25
  object-position: var(--nd-visual-anchor);
15
26
  }
16
27
  }
17
- .nd-Visual-video {
18
- @apply object-cover;
19
- aspect-ratio: var(--nd-visual-width) / var(--nd-visual-height);
20
- object-position: var(--nd-visual-anchor);
21
28
 
22
- video {
23
- @apply object-cover;
24
- object-position: var(--nd-visual-anchor);
25
- }
29
+ img.nd-Visual-image {
30
+ object-fit: var(--nd-visual-object-fit, cover);
31
+ object-position: var(--nd-visual-anchor);
26
32
  }
27
- }
33
+ }
@@ -0,0 +1,8 @@
1
+ @layer components {
2
+
3
+ :root {
4
+ --nd-layout-gap: theme('spacing.l8');
5
+ --nd-layout-gap-x: var(--nd-layout-gap);
6
+ --nd-layout-gap-y: var(--nd-layout-gap);
7
+ }
8
+ }
@@ -2,16 +2,8 @@
2
2
 
3
3
  /* variables */
4
4
  :root {
5
- --nd-masonry-gap-x: theme('spacing.l8');
6
- --nd-masonry-gap-y: theme('spacing.l8');
7
- @media screen(md) {
8
- --nd-masonry-gap-x: theme('spacing.l8');
9
- --nd-masonry-gap-y-gap-x: theme('spacing.l8');
10
- }
11
- @media screen(lg) {
12
- --nd-masonry-gap-x: theme('spacing.l10');
13
- --nd-masonry-gap-y: theme('spacing.l10');
14
- }
5
+ --nd-masonry-gap-x: var(--nd-layout-gap-x);
6
+ --nd-masonry-gap-y: var(--nd-layout-gap-y);
15
7
  }
16
8
 
17
9
  /* base */
@@ -1,3 +1,4 @@
1
+ @import "./Layout.css";
1
2
  @import "./BentoLayout.css";
2
3
  @import "./CardLayout.css";
3
4
  @import "./BrickLayout.css";
@@ -5,38 +5,37 @@
5
5
  }
6
6
 
7
7
  /* base */
8
- .nd-VisualPanel {
9
-
10
- &:not(.nd-VisualPanel-aspect-auto) {
11
-
12
- > .nd-VisualPanel-content {
13
- @apply w-full h-full;
14
- }
15
-
16
- img, video {
17
- @apply w-full h-full object-cover;
18
- }
19
- }
20
- }
8
+ .nd-VisualPanel {}
21
9
 
22
10
  /* aspect ratios */
23
11
  .nd-VisualPanel-aspect-auto {
24
- @apply aspect-auto;
12
+ --nd-visual-aspect: theme(aspectRatio.auto);
13
+ --nd-visual-height: auto;
25
14
  }
26
15
  .nd-VisualPanel-aspect-square {
27
- @apply aspect-square;
16
+ --nd-visual-aspect: theme(aspectRatio.square);
17
+ --nd-visual-width: 100%;
18
+ --nd-visual-height: 100%;
28
19
  }
29
20
  .nd-VisualPanel-aspect-phone {
30
- @apply aspect-phone;
21
+ --nd-visual-aspect: theme(aspectRatio.phone);
22
+ --nd-visual-width: 100%;
23
+ --nd-visual-height: 100%;
31
24
  }
32
25
  .nd-VisualPanel-aspect-tv {
33
- @apply aspect-tv;
26
+ --nd-visual-aspect: theme(aspectRatio.tv);
27
+ --nd-visual-height: 100%;
28
+ --nd-visual-width: 100%;
34
29
  }
35
30
  .nd-VisualPanel-aspect-widescreen {
36
- @apply aspect-widescreen;
31
+ --nd-visual-aspect: theme(aspectRatio.widescreen);
32
+ --nd-visual-height: 100%;
33
+ --nd-visual-width: 100%;
37
34
  }
38
35
  .nd-VisualPanel-aspect-cinema {
39
- @apply aspect-cinema;
36
+ --nd-visual-aspect: theme(aspectRatio.cinema);
37
+ --nd-visual-height: 100%;
38
+ --nd-visual-width: 100%;
40
39
  }
41
40
 
42
41
  /* anchor */
@@ -1,4 +1,3 @@
1
1
  @import "./ListPanel.css";
2
2
  @import "./MessagePanel.css";
3
- @import "./TestimonialPanel.css";
4
3
  @import "./VisualPanel.css";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nascentdigital/funnel-ui",
3
3
  "description": "UI components for funnel",
4
- "version": "4.5.7",
4
+ "version": "4.6.1",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
7
7
  "access": "restricted"
@@ -69,5 +69,5 @@
69
69
  "react-dom": "^19",
70
70
  "ts-jest": "^29.3.2"
71
71
  },
72
- "gitHead": "aa14b53e99044a968b850c4f426e40d312a9306a"
72
+ "gitHead": "4a1d18f6f87148196b5e820c0ada8f2a8111b9f6"
73
73
  }
@@ -1,25 +0,0 @@
1
- import { Schema } from '@nascentdigital/funnel-core';
2
- import { ComponentProps } from 'react';
3
- import { Client } from '../entities';
4
- import { Block } from './Block';
5
- export declare function Clients(props: ComponentProps<typeof Clients.Component>): import("react/jsx-runtime").JSX.Element;
6
- export declare namespace Clients {
7
- const Component: import("react").FunctionComponent<Block.Create.Result.Component<"_nd-clients", true, undefined, Schema.ListField<{
8
- item: Schema.CollectionField<Schema.Collection<{
9
- division: Schema.Optional<Schema.TextField>;
10
- location: Schema.Optional<Schema.TextField>;
11
- logo: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Visual>>;
12
- badge: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Image>>;
13
- badgeText: Schema.Optional<Schema.TextField>;
14
- }>>;
15
- }>, Schema.Block.Config, Client.Props.Configuration>>, schema: Block.Create.Result.Schema<"_nd-clients", true, undefined, Schema.ListField<{
16
- item: Schema.CollectionField<Schema.Collection<{
17
- division: Schema.Optional<Schema.TextField>;
18
- location: Schema.Optional<Schema.TextField>;
19
- logo: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Visual>>;
20
- badge: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Image>>;
21
- badgeText: Schema.Optional<Schema.TextField>;
22
- }>>;
23
- }>, Schema.Block.Config>;
24
- type Model = Schema.Block.LinkedData<typeof schema>;
25
- }
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Clients = Clients;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const funnel_core_1 = require("@nascentdigital/funnel-core");
6
- const entities_1 = require("../entities");
7
- const Block_1 = require("./Block");
8
- // component
9
- function Clients(props) {
10
- return (0, jsx_runtime_1.jsx)(Clients.Component, Object.assign({}, props));
11
- }
12
- // extension
13
- (function (Clients) {
14
- var _a;
15
- // factory
16
- _a = Block_1.Block.create({
17
- id: '_nd-clients',
18
- name: 'Clients',
19
- version: 1,
20
- className: 'nd-Clients',
21
- message: true,
22
- list: {
23
- schema: funnel_core_1.Schema.Field.list({
24
- name: 'Clients',
25
- description: 'Client brands will be displayed in the order you present them.',
26
- itemTypes: {
27
- item: funnel_core_1.Schema.Field.collection({
28
- name: 'Client',
29
- collections: [entities_1.Client.schema]
30
- })
31
- },
32
- min: 3,
33
- max: 20
34
- }),
35
- itemRenderer: (item, itemProps) => ((0, jsx_runtime_1.jsx)(entities_1.Client, Object.assign({ as: "li", className: "nd-Clients-client", client: item.value }, itemProps)))
36
- }
37
- }), Clients.Component = _a.Component, Clients.schema = _a.schema;
38
- })(Clients || (exports.Clients = Clients = {}));
@@ -1,25 +0,0 @@
1
- import { Schema } from '@nascentdigital/funnel-core';
2
- import { ComponentProps } from 'react';
3
- import { Block } from './Block';
4
- import { OutcomeDetail } from './OutcomeDetail';
5
- export declare function Outcome(props: ComponentProps<typeof Outcome.Component>): import("react/jsx-runtime").JSX.Element;
6
- export declare namespace Outcome {
7
- const Component: import("react").FunctionComponent<Block.Create.Result.Component<"_nd-outcome", true, true, Schema.ListField<{
8
- detail: Schema.ObjectField<{
9
- title: Schema.Optional<Schema.TextField>;
10
- headline: Schema.RichTextField;
11
- caption: Schema.RichTextField;
12
- icon: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Visual>>;
13
- link: Schema.Optional<Schema.LinkField>;
14
- }>;
15
- }>, Schema.Block.Config, OutcomeDetail.Props.Configuration>>, schema: Block.Create.Result.Schema<"_nd-outcome", true, true, Schema.ListField<{
16
- detail: Schema.ObjectField<{
17
- title: Schema.Optional<Schema.TextField>;
18
- headline: Schema.RichTextField;
19
- caption: Schema.RichTextField;
20
- icon: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Visual>>;
21
- link: Schema.Optional<Schema.LinkField>;
22
- }>;
23
- }>, Schema.Block.Config>;
24
- type Model = Schema.Block.LinkedData<typeof schema>;
25
- }
@@ -1,35 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Outcome = Outcome;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const funnel_core_1 = require("@nascentdigital/funnel-core");
6
- const Block_1 = require("./Block");
7
- const OutcomeDetail_1 = require("./OutcomeDetail");
8
- // component
9
- function Outcome(props) {
10
- return (0, jsx_runtime_1.jsx)(Outcome.Component, Object.assign({}, props));
11
- }
12
- // extension
13
- (function (Outcome) {
14
- var _a;
15
- // factory
16
- _a = Block_1.Block.create({
17
- id: '_nd-outcome',
18
- name: 'Outcome',
19
- version: 1,
20
- className: 'nd-Outcome',
21
- message: true,
22
- visual: true,
23
- list: {
24
- schema: funnel_core_1.Schema.Field.list({
25
- name: 'Outcome Details',
26
- itemTypes: {
27
- detail: OutcomeDetail_1.OutcomeDetail.schema
28
- },
29
- min: 1,
30
- max: 3
31
- }),
32
- itemRenderer: (item, itemProps) => ((0, jsx_runtime_1.jsx)(OutcomeDetail_1.OutcomeDetail, Object.assign({ as: "li", className: "nd-Outcome-detail", detail: item }, itemProps)))
33
- }
34
- }), Outcome.Component = _a.Component, Outcome.schema = _a.schema;
35
- })(Outcome || (exports.Outcome = Outcome = {}));