@volvo-cars/ced-os-react-components
Advanced tools
Comparing version 0.3.0-alpha.11 to 0.3.0-alpha.12
@@ -245,7 +245,7 @@ var __create = Object.create; | ||
var import_prop_types8 = __toModule(require("prop-types")); | ||
function Paragraph({children, extend, ...props2}) { | ||
function Paragraph({children, extend, ...props}) { | ||
return /* @__PURE__ */ import_react7.default.createElement(import_vcc_ui6.Text, { | ||
as: "p", | ||
extend, | ||
...props2 | ||
extend: {wordBreak: "break-word", hyphens: "auto", ...extend}, | ||
...props | ||
}, children); | ||
@@ -261,6 +261,6 @@ } | ||
var import_prop_types9 = __toModule(require("prop-types")); | ||
function UnorderedList(props2) { | ||
function UnorderedList(props) { | ||
return /* @__PURE__ */ import_react8.default.createElement(ListRoot, { | ||
as: "ul", | ||
...props2 | ||
...props | ||
}); | ||
@@ -460,3 +460,3 @@ } | ||
var element = {1: "h1", 2: "h2", 3: "h3", 4: "h4"}; | ||
var props = { | ||
var textPropsByLevel = { | ||
1: {variant: "cook"}, | ||
@@ -467,8 +467,10 @@ 2: {variant: "ootah"}, | ||
}; | ||
function Title({level, children}) { | ||
function Title({level, children, extend, ...props}) { | ||
const getStyle = (level2) => { | ||
return {as: element[level2], ...props[level2]}; | ||
return {as: element[level2], ...textPropsByLevel[level2]}; | ||
}; | ||
return /* @__PURE__ */ import_react19.default.createElement(import_vcc_ui13.Text, { | ||
...getStyle(level) | ||
...getStyle(level), | ||
extend: {wordBreak: "break-word", hyphens: "auto", ...extend}, | ||
...props | ||
}, children); | ||
@@ -478,3 +480,4 @@ } | ||
children: import_prop_types18.default.node, | ||
level: import_prop_types18.default.number | ||
level: import_prop_types18.default.number, | ||
extend: import_prop_types18.default.object | ||
}; | ||
@@ -587,6 +590,6 @@ | ||
var import_prop_types23 = __toModule(require("prop-types")); | ||
function LiteralText({children, extend, ...props2}) { | ||
function LiteralText({children, extend, ...props}) { | ||
return /* @__PURE__ */ import_react24.default.createElement(InlineText, { | ||
extend, | ||
...props2 | ||
...props | ||
}, children); | ||
@@ -995,3 +998,3 @@ } | ||
paddingBottom, | ||
...props2 | ||
...props | ||
}) { | ||
@@ -1010,3 +1013,3 @@ return /* @__PURE__ */ import_react45.default.createElement(import_vcc_ui29.View, { | ||
extend: {margin: "auto", ...extend}, | ||
...props2 | ||
...props | ||
}, children, /* @__PURE__ */ import_react45.default.createElement(import_vcc_ui29.Spacer, { | ||
@@ -1233,6 +1236,6 @@ size: 2 | ||
}, {}); | ||
const props2 = {...config.props, ...dataAttrs}; | ||
const props = {...config.props, ...dataAttrs}; | ||
return { | ||
type, | ||
props: props2, | ||
props, | ||
children: config.children || data.children, | ||
@@ -1272,4 +1275,4 @@ value: config.value || data.value | ||
var RENDER_CONFIG = { | ||
article(props2) { | ||
return {type: Article, props: props2}; | ||
article(props) { | ||
return {type: Article, props}; | ||
}, | ||
@@ -1466,3 +1469,3 @@ slot: {type: Slot}, | ||
var render = createRenderer(RENDER_CONFIG); | ||
function JSONArticle({data, metaSlot, textVariables, ...props2}) { | ||
function JSONArticle({data, metaSlot, textVariables, ...props}) { | ||
if (!data) | ||
@@ -1479,3 +1482,3 @@ return null; | ||
type: "article", | ||
...props2, | ||
...props, | ||
children: [ | ||
@@ -1482,0 +1485,0 @@ { |
@@ -163,7 +163,7 @@ // src/support/atoms/InlineText/index.js | ||
import PropTypes8 from "prop-types"; | ||
function Paragraph({children, extend, ...props2}) { | ||
function Paragraph({children, extend, ...props}) { | ||
return /* @__PURE__ */ React7.createElement(Text3, { | ||
as: "p", | ||
extend, | ||
...props2 | ||
extend: {wordBreak: "break-word", hyphens: "auto", ...extend}, | ||
...props | ||
}, children); | ||
@@ -179,6 +179,6 @@ } | ||
import PropTypes9 from "prop-types"; | ||
function UnorderedList(props2) { | ||
function UnorderedList(props) { | ||
return /* @__PURE__ */ React8.createElement(ListRoot, { | ||
as: "ul", | ||
...props2 | ||
...props | ||
}); | ||
@@ -378,3 +378,3 @@ } | ||
var element = {1: "h1", 2: "h2", 3: "h3", 4: "h4"}; | ||
var props = { | ||
var textPropsByLevel = { | ||
1: {variant: "cook"}, | ||
@@ -385,8 +385,10 @@ 2: {variant: "ootah"}, | ||
}; | ||
function Title({level, children}) { | ||
function Title({level, children, extend, ...props}) { | ||
const getStyle = (level2) => { | ||
return {as: element[level2], ...props[level2]}; | ||
return {as: element[level2], ...textPropsByLevel[level2]}; | ||
}; | ||
return /* @__PURE__ */ React19.createElement(Text5, { | ||
...getStyle(level) | ||
...getStyle(level), | ||
extend: {wordBreak: "break-word", hyphens: "auto", ...extend}, | ||
...props | ||
}, children); | ||
@@ -396,3 +398,4 @@ } | ||
children: PropTypes18.node, | ||
level: PropTypes18.number | ||
level: PropTypes18.number, | ||
extend: PropTypes18.object | ||
}; | ||
@@ -505,6 +508,6 @@ | ||
import PropTypes23 from "prop-types"; | ||
function LiteralText({children, extend, ...props2}) { | ||
function LiteralText({children, extend, ...props}) { | ||
return /* @__PURE__ */ React24.createElement(InlineText, { | ||
extend, | ||
...props2 | ||
...props | ||
}, children); | ||
@@ -913,3 +916,3 @@ } | ||
paddingBottom, | ||
...props2 | ||
...props | ||
}) { | ||
@@ -928,3 +931,3 @@ return /* @__PURE__ */ React44.createElement(View6, { | ||
extend: {margin: "auto", ...extend}, | ||
...props2 | ||
...props | ||
}, children, /* @__PURE__ */ React44.createElement(Spacer3, { | ||
@@ -1151,6 +1154,6 @@ size: 2 | ||
}, {}); | ||
const props2 = {...config.props, ...dataAttrs}; | ||
const props = {...config.props, ...dataAttrs}; | ||
return { | ||
type, | ||
props: props2, | ||
props, | ||
children: config.children || data.children, | ||
@@ -1190,4 +1193,4 @@ value: config.value || data.value | ||
var RENDER_CONFIG = { | ||
article(props2) { | ||
return {type: Article, props: props2}; | ||
article(props) { | ||
return {type: Article, props}; | ||
}, | ||
@@ -1384,3 +1387,3 @@ slot: {type: Slot}, | ||
var render = createRenderer(RENDER_CONFIG); | ||
function JSONArticle({data, metaSlot, textVariables, ...props2}) { | ||
function JSONArticle({data, metaSlot, textVariables, ...props}) { | ||
if (!data) | ||
@@ -1397,3 +1400,3 @@ return null; | ||
type: "article", | ||
...props2, | ||
...props, | ||
children: [ | ||
@@ -1400,0 +1403,0 @@ { |
{ | ||
"name": "@volvo-cars/ced-os-react-components", | ||
"version": "0.3.0-alpha.11", | ||
"version": "0.3.0-alpha.12", | ||
"description": "Set of components for developing UIs in the onboarding and support apps", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
95357
2808
0