@volvo-cars/ced-os-react-components
Advanced tools
Comparing version 1.0.0-alpha.7 to 1.0.0-alpha.8
@@ -40,3 +40,3 @@ // src/utils/classNames.ts | ||
var ConfigProvider = ({ config, ...props }) => { | ||
const direction = config.direction || isRtlLocale(config.locale) ? "rtl" : "ltr"; | ||
const direction = (config == null ? void 0 : config.direction) || isRtlLocale(config == null ? void 0 : config.locale) ? "rtl" : "ltr"; | ||
return /* @__PURE__ */ jsx3(ConfigContext.Provider, { | ||
@@ -955,4 +955,4 @@ value: { ...config, direction }, | ||
className: classNames(root32, className4), | ||
dir: direction, | ||
...props, | ||
dir: direction, | ||
children: [ | ||
@@ -1304,5 +1304,3 @@ titleComponent ? React20.cloneElement(titleComponent, { level: 1 }) : null, | ||
var RENDER_CONFIG = { | ||
article(props) { | ||
return { type: Article, props }; | ||
}, | ||
article: { type: Article }, | ||
slot: { type: Slot }, | ||
@@ -1613,4 +1611,11 @@ description: { type: Lead }, | ||
// src/support/organisms/JSONArticle/index.tsx | ||
import { jsx as jsx54 } from "react/jsx-runtime"; | ||
var render = createRenderer(RENDER_CONFIG); | ||
function JSONArticle({ data, metaSlot, ...dataProps }) { | ||
function JSONArticle({ | ||
theme = "volvo", | ||
config, | ||
data, | ||
metaSlot, | ||
...dataProps | ||
}) { | ||
if (!data) | ||
@@ -1628,3 +1633,9 @@ return null; | ||
} | ||
return article; | ||
return /* @__PURE__ */ jsx54(ConfigProvider, { | ||
config, | ||
children: /* @__PURE__ */ jsx54(ThemeProvider, { | ||
theme, | ||
children: article | ||
}) | ||
}); | ||
} | ||
@@ -1631,0 +1642,0 @@ export { |
@@ -95,5 +95,4 @@ /// <reference types="react" /> | ||
export declare const RENDER_CONFIG: { | ||
article(props: JSONNode): { | ||
article: { | ||
type: typeof Article; | ||
props: JSONNode; | ||
}; | ||
@@ -100,0 +99,0 @@ slot: { |
/// <reference types="react" /> | ||
import { JSONArticleData, JSONNode } from '../../../render/types'; | ||
interface JSONArticleProps { | ||
theme?: string; | ||
config?: any; | ||
data?: JSONNode | JSONArticleData; | ||
metaSlot?: JSX.Element; | ||
} | ||
declare function JSONArticle({ data, metaSlot, ...dataProps }: JSONArticleProps): any; | ||
declare function JSONArticle({ theme, config, data, metaSlot, ...dataProps }: JSONArticleProps): JSX.Element; | ||
export { JSONArticle }; |
{ | ||
"name": "@volvo-cars/ced-os-react-components", | ||
"version": "1.0.0-alpha.7", | ||
"version": "1.0.0-alpha.8", | ||
"description": "Set of components for developing UIs in the onboarding and support apps", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
1275826
29922