Socket
Socket
Sign inDemoInstall

@nordcom/nordstar-system

Package Overview
Dependencies
Maintainers
1
Versions
710
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nordcom/nordstar-system - npm Package Compare versions

Comparing version 0.0.0-unstable-20231207152739 to 0.0.0-unstable-20231208094220

4

dist/nordstar-provider.d.ts

@@ -36,4 +36,4 @@ import type { ReactNode } from 'react';

export type NordstarProviderProps = {
theme?: NordstarTheme;
children: ReactNode;
theme?: NordstarTheme;
};

@@ -49,2 +49,2 @@ /**

*/
export declare const NordstarProvider: ({ children, theme }: NordstarProviderProps) => import("react").JSX.Element;
export declare const NordstarProvider: ({ children, theme, ...props }: NordstarProviderProps) => import("react/jsx-runtime").JSX.Element;
import './nordstar-provider.css';
import { jsx } from 'react/jsx-runtime';
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';

@@ -9,29 +9,36 @@ const container = "_container_147gv_1";

const NordstarProvider = ({ children, theme }) => {
const { accents, fonts, sizes, layout } = theme ?? {};
const style = {
// Colors.
"--color-accent-primary": accents?.primary,
"--color-accent-secondary": accents?.secondary,
// Fonts.
...fonts?.heading && { "--font-heading": fonts.heading },
...fonts?.body && {
"--font-body": fonts.body,
fontFamily: `var('--font-body')`
},
// Sizes.
"--size-text-body": sizes?.text?.body || "14px",
// Border.
"--border-width": theme?.border?.width || "0.18rem",
"--border-radius": theme?.border?.radius || "0.5rem",
// Layout.Page.
"--layout-page-width": layout?.page?.width || "1200px",
"--layout-page-spacing": layout?.page?.spacing || "1rem",
// Layout.Section.
"--layout-section-spacing": layout?.section?.spacing || "1rem",
"--layout-section-padding": layout?.section?.padding || "1.75rem",
// Layout.Block.
"--layout-block-padding": layout?.block?.padding || "1rem"
};
return /* @__PURE__ */ jsx("div", { id: "nordstar", role: "document", style, className: styles.container, children });
const NordstarProvider = ({ children, theme, ...props }) => {
const { accents, fonts, sizes, layout } = theme || {};
const headingFont = fonts?.heading || fonts?.body ? `--font-heading: ${(fonts.heading || fonts.body).replaceAll("'", "")};` : "";
const bodyFont = fonts?.body || fonts?.heading ? `--font-body: ${(fonts.body || fonts.heading).replaceAll("'", "")};` : "";
const css = `
:root {
--color-accent-primary: ${accents?.primary};
--color-accent-secondary: ${accents?.secondary};
--color-background: #000000;
--color-background-highlight: #262626;
--color-foreground: #fefefe;
--color-foreground-secondary: #828282;
${headingFont}
${bodyFont}
--size-text-body: ${sizes?.text?.body || "14px"};
--border-width: ${theme?.border?.width || "0.18rem"};
--border-radius: ${theme?.border?.radius || "0.5rem"};
--layout-page-width: ${layout?.page?.width || "1200px"};
--layout-page-spacing: ${layout?.page?.spacing || "1rem"};
--layout-section-spacing: ${layout?.section?.spacing || "1rem"};
--layout-section-padding: ${layout?.section?.padding || "1.75rem"};
--layout-block-padding: ${layout?.block?.padding || "1rem"};
}
`;
return /* @__PURE__ */ jsxs(Fragment, { children: [
/* @__PURE__ */ jsx("style", { ...props, children: css }),
/* @__PURE__ */ jsx("div", { id: "nordstar", role: "document", className: styles.container || "", children })
] });
};

@@ -38,0 +45,0 @@

@@ -5,3 +5,3 @@ {

"type": "module",
"version": "0.0.0-unstable-20231207152739",
"version": "0.0.0-unstable-20231208094220",
"description": "",

@@ -8,0 +8,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc