@newskit-render/shared-components 4.74.1-8143e958.0 → 4.74.1-8fe0a49c.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ContentListView/ContentListView.js +13 -1
- package/dist/cjs/ContentListView/ContentListView.js.map +1 -1
- package/dist/cjs/ContentListView/types.d.ts +2 -1
- package/dist/cjs/ContentListView/types.js.map +1 -1
- package/dist/esm/ContentListView/ContentListView.js +14 -2
- package/dist/esm/ContentListView/ContentListView.js.map +1 -1
- package/dist/esm/ContentListView/types.d.ts +2 -1
- package/dist/esm/ContentListView/types.js.map +1 -1
- package/package.json +3 -3
|
@@ -3,6 +3,17 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
3
3
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
4
|
return cooked;
|
|
5
5
|
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
6
17
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
18
|
if (k2 === undefined) k2 = k;
|
|
8
19
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -34,7 +45,7 @@ var Introduction_1 = require("../Introduction");
|
|
|
34
45
|
var defaults_1 = require("./defaults");
|
|
35
46
|
var StyledBlock = (0, newskit_1.styled)(newskit_1.Block)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n overflow: hidden;\n"], ["\n overflow: hidden;\n"])));
|
|
36
47
|
var ContentListViewComponent = function (_a) {
|
|
37
|
-
var children = _a.children, introductionProps = _a.introductionProps, ariaLabel = _a.ariaLabel, marginBlockEnd = _a.marginBlockEnd, stylePreset = _a.stylePreset, _b = _a.showDividerByBreakpoint, showDividerByBreakpoint = _b === void 0 ? false : _b;
|
|
48
|
+
var children = _a.children, introductionProps = _a.introductionProps, message = _a.message, ariaLabel = _a.ariaLabel, marginBlockEnd = _a.marginBlockEnd, stylePreset = _a.stylePreset, _b = _a.showDividerByBreakpoint, showDividerByBreakpoint = _b === void 0 ? false : _b;
|
|
38
49
|
var bp = (0, newskit_1.useBreakpointKey)();
|
|
39
50
|
var _c = (0, react_1.useState)(true), showDivider = _c[0], setShowDivider = _c[1];
|
|
40
51
|
(0, react_1.useEffect)(function () {
|
|
@@ -44,6 +55,7 @@ var ContentListViewComponent = function (_a) {
|
|
|
44
55
|
return (react_1.default.createElement(newskit_1.Grid, { xsColumnGutter: 'space000', xsRowGutter: 'space000', xsMargin: 'space000' },
|
|
45
56
|
introductionProps && (react_1.default.createElement(newskit_1.Cell, { xs: 12, "data-testid": "ContentListIntroduction" },
|
|
46
57
|
react_1.default.createElement(Introduction_1.Introduction, { title: introductionProps.title, titleOverrides: introductionProps.extendTitleOverrides, description: introductionProps.description, descriptionOverrides: introductionProps.extendDescriptionOverrides, id: introductionProps.id }))),
|
|
58
|
+
message && react_1.default.createElement(newskit_1.InlineMessage, __assign({}, message)),
|
|
47
59
|
children && (react_1.default.createElement(newskit_1.Cell, { xs: 12, "data-testid": "ContentListItems" },
|
|
48
60
|
react_1.default.createElement(StyledBlock, { marginBlockEnd: marginBlockEnd !== null && marginBlockEnd !== void 0 ? marginBlockEnd : {
|
|
49
61
|
xs: 'space050',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentListView.js","sourceRoot":"","sources":["../../../src/ContentListView/ContentListView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentListView.js","sourceRoot":"","sources":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,CACG,CACR;QACA,OAAO,IAAI,8BAAC,uBAAa,eAAK,OAAO,EAAI;QACzC,QAAQ,IAAI,CACX,8BAAC,cAAI,IAAC,EAAE,EAAE,EAAE,iBAAc,kBAAkB;YAC1C,8BAAC,WAAW,IACV,cAAc,EACZ,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI;oBAChB,EAAE,EAAE,UAAU;oBACd,EAAE,EAAE,UAAU;oBACd,EAAE,EAAE,UAAU;iBACf,EAEH,WAAW,EAAE,WAAW,iBACZ,cAAc;gBAE1B,8BAAC,wBAAc,IACb,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,SAAS,KAAI,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,KAAK,CAAA,IAE/C,QAAQ,CACM,CACL,CACT,CACR,CACI,CACR,CAAA;AACH,CAAC,CAAA;AA1DY,QAAA,wBAAwB,4BA0DpC;AAEY,QAAA,eAAe,GAAG,IAAA,0BAAgB,EAC7C,gCAAwB,EACxB,0BAAe,EACf,iBAAiB,CAClB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MQ, TriggerType, NewsKitIcon, Flow, StackDistribution, StructuredListProps, NewsKitIconProps, TextBlockProps } from 'newskit';
|
|
1
|
+
import { MQ, TriggerType, NewsKitIcon, Flow, StackDistribution, StructuredListProps, NewsKitIconProps, TextBlockProps, InlineMessageProps } from 'newskit';
|
|
2
2
|
import { LogicalProps } from 'newskit/cjs/utils/logical-properties';
|
|
3
3
|
import { DescriptionOverrides, IntroductionProps, TitleOverrides } from '../Introduction/types';
|
|
4
4
|
import { EventContext } from 'Link';
|
|
@@ -122,6 +122,7 @@ export interface ContentListViewProps {
|
|
|
122
122
|
marginBlockEnd?: MQ<string>;
|
|
123
123
|
stylePreset?: MQ<string>;
|
|
124
124
|
showDividerByBreakpoint?: boolean;
|
|
125
|
+
message?: InlineMessageProps;
|
|
125
126
|
}
|
|
126
127
|
export interface ListItemProps {
|
|
127
128
|
'aria-label'?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/ContentListView/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/ContentListView/types.ts"],"names":[],"mappings":";;;AAkIA,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,4CAAuB,CAAA;IACvB,4CAAuB,CAAA;IACvB,4CAAuB,CAAA;AACzB,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B"}
|
|
@@ -2,13 +2,24 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
2
2
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
3
|
return cooked;
|
|
4
4
|
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
5
16
|
import React, { useEffect, useState } from 'react';
|
|
6
|
-
import { Block, Cell, Grid, StructuredList, styled, useBreakpointKey, withDefaultProps, } from 'newskit';
|
|
17
|
+
import { Block, Cell, Grid, StructuredList, styled, useBreakpointKey, withDefaultProps, InlineMessage, } from 'newskit';
|
|
7
18
|
import { Introduction } from '../Introduction';
|
|
8
19
|
import { contentListView } from './defaults';
|
|
9
20
|
var StyledBlock = styled(Block)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n overflow: hidden;\n"], ["\n overflow: hidden;\n"])));
|
|
10
21
|
export var ContentListViewComponent = function (_a) {
|
|
11
|
-
var children = _a.children, introductionProps = _a.introductionProps, ariaLabel = _a.ariaLabel, marginBlockEnd = _a.marginBlockEnd, stylePreset = _a.stylePreset, _b = _a.showDividerByBreakpoint, showDividerByBreakpoint = _b === void 0 ? false : _b;
|
|
22
|
+
var children = _a.children, introductionProps = _a.introductionProps, message = _a.message, ariaLabel = _a.ariaLabel, marginBlockEnd = _a.marginBlockEnd, stylePreset = _a.stylePreset, _b = _a.showDividerByBreakpoint, showDividerByBreakpoint = _b === void 0 ? false : _b;
|
|
12
23
|
var bp = useBreakpointKey();
|
|
13
24
|
var _c = useState(true), showDivider = _c[0], setShowDivider = _c[1];
|
|
14
25
|
useEffect(function () {
|
|
@@ -18,6 +29,7 @@ export var ContentListViewComponent = function (_a) {
|
|
|
18
29
|
return (React.createElement(Grid, { xsColumnGutter: 'space000', xsRowGutter: 'space000', xsMargin: 'space000' },
|
|
19
30
|
introductionProps && (React.createElement(Cell, { xs: 12, "data-testid": "ContentListIntroduction" },
|
|
20
31
|
React.createElement(Introduction, { title: introductionProps.title, titleOverrides: introductionProps.extendTitleOverrides, description: introductionProps.description, descriptionOverrides: introductionProps.extendDescriptionOverrides, id: introductionProps.id }))),
|
|
32
|
+
message && React.createElement(InlineMessage, __assign({}, message)),
|
|
21
33
|
children && (React.createElement(Cell, { xs: 12, "data-testid": "ContentListItems" },
|
|
22
34
|
React.createElement(StyledBlock, { marginBlockEnd: marginBlockEnd !== null && marginBlockEnd !== void 0 ? marginBlockEnd : {
|
|
23
35
|
xs: 'space050',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentListView.js","sourceRoot":"","sources":["../../../src/ContentListView/ContentListView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentListView.js","sourceRoot":"","sources":["../../../src/ContentListView/ContentListView.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAElD,OAAO,EACL,KAAK,E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AClE,EAAE,EAAE,iBAAiB,CAAC,EAAE,GACxB,CACG,CACR;QACA,OAAO,IAAI,oBAAC,aAAa,eAAK,OAAO,EAAI;QACzC,QAAQ,IAAI,CACX,oBAAC,IAAI,IAAC,EAAE,EAAE,EAAE,iBAAc,kBAAkB;YAC1C,oBAAC,WAAW,IACV,cAAc,EACZ,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI;oBAChB,EAAE,EAAE,UAAU;oBACd,EAAE,EAAE,UAAU;oBACd,EAAE,EAAE,UAAU;iBACf,EAEH,WAAW,EAAE,WAAW,iBACZ,cAAc;gBAE1B,oBAAC,cAAc,IACb,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,SAAS,KAAI,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,KAAK,CAAA,IAE/C,QAAQ,CACM,CACL,CACT,CACR,CACI,CACR,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,IAAM,eAAe,GAAG,gBAAgB,CAC7C,wBAAwB,EACxB,eAAe,EACf,iBAAiB,CAClB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MQ, TriggerType, NewsKitIcon, Flow, StackDistribution, StructuredListProps, NewsKitIconProps, TextBlockProps } from 'newskit';
|
|
1
|
+
import { MQ, TriggerType, NewsKitIcon, Flow, StackDistribution, StructuredListProps, NewsKitIconProps, TextBlockProps, InlineMessageProps } from 'newskit';
|
|
2
2
|
import { LogicalProps } from 'newskit/cjs/utils/logical-properties';
|
|
3
3
|
import { DescriptionOverrides, IntroductionProps, TitleOverrides } from '../Introduction/types';
|
|
4
4
|
import { EventContext } from 'Link';
|
|
@@ -122,6 +122,7 @@ export interface ContentListViewProps {
|
|
|
122
122
|
marginBlockEnd?: MQ<string>;
|
|
123
123
|
stylePreset?: MQ<string>;
|
|
124
124
|
showDividerByBreakpoint?: boolean;
|
|
125
|
+
message?: InlineMessageProps;
|
|
125
126
|
}
|
|
126
127
|
export interface ListItemProps {
|
|
127
128
|
'aria-label'?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/ContentListView/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/ContentListView/types.ts"],"names":[],"mappings":"AAkIA,MAAM,CAAN,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,4CAAuB,CAAA;IACvB,4CAAuB,CAAA;IACvB,4CAAuB,CAAA;AACzB,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,QAI5B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newskit-render/shared-components",
|
|
3
|
-
"version": "4.74.1-
|
|
3
|
+
"version": "4.74.1-8fe0a49c.0+8fe0a49c",
|
|
4
4
|
"description": "Newskit Render Shared Components",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@babel/polyfill": "7.12.1",
|
|
50
50
|
"@babel/register": "7.18.9",
|
|
51
51
|
"@emotion/jest": "11.10.5",
|
|
52
|
-
"@newskit-render/validation": "^1.26.1-
|
|
52
|
+
"@newskit-render/validation": "^1.26.1-8fe0a49c.0+8fe0a49c",
|
|
53
53
|
"@storybook/addon-actions": "6.5.16",
|
|
54
54
|
"@storybook/react": "6.5.16",
|
|
55
55
|
"@testing-library/jest-dom": "6.1.3",
|
|
@@ -108,5 +108,5 @@
|
|
|
108
108
|
"@types/react-dom": "18.0.10",
|
|
109
109
|
"newskit/react-hook-form": "7.20.2"
|
|
110
110
|
},
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "8fe0a49c5084b010c3266510f7c0c22e5f5c69ea"
|
|
112
112
|
}
|