@nordcom/nordstar-system 0.0.49 → 0.0.50

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.
@@ -21,7 +21,7 @@ const NordstarProvider = ({ children, theme, ...props }) => {
21
21
  --color-accent-secondary-foreground: #fefefe;
22
22
 
23
23
  --color-background: ${colors?.background ?? "#000000"};
24
- --color-background-highlight: ${colors?.background ?? "#262626"};
24
+ --color-background-highlight: ${colors?.highlight ?? "#262626"};
25
25
  --color-foreground: ${colors?.foreground ?? "#fefefe"};
26
26
  --color-foreground-secondary: ${colors?.foregroundSecondary ?? "#828282"};
27
27
 
@@ -1 +1 @@
1
- {"version":3,"file":"nordstar-provider.js","sources":["../src/nordstar-provider.tsx"],"sourcesContent":["import './styling.scss';\n\nimport type { ReactNode } from 'react';\nimport styles from './nordstar-provider.module.scss';\n\nexport type NordstarTheme = {\n accents: {\n primary: string;\n secondary: string;\n };\n colors?: {\n background?: string;\n foreground?: string;\n foregroundSecondary?: string;\n highlight?: string;\n error?: string;\n };\n fonts?: {\n heading?: string;\n body?: string;\n code?: string;\n };\n sizes?: {\n text?: {\n body?: string;\n };\n };\n border?: {\n width?: number;\n radius?: string;\n };\n layout?: {\n page?: {\n width?: string;\n spacing?: string;\n };\n section?: {\n spacing?: string;\n padding?: string;\n };\n block?: {\n padding?: string;\n };\n };\n duration?: {\n short?: string;\n };\n};\n\nexport type NordstarProviderProps = {\n theme?: NordstarTheme;\n children?: ReactNode;\n};\n\n/**\n * `<NordstarProvider/>`, a component that should wrap the entire application.\n * @note When using Next.js make sure to to extract all providers into a client component used inside of your `RootLayout`.\n *\n * @param {object} props - `<NordstarProvider/>` props.\n * @param {ReactNode} props.children - The children of the `<NordstarProvider/>` component.\n * @param {NordstarTheme} [props.theme] - The theme to use for the application.\n * @returns {ReactNode} The `<NordstarProvider/>` component.\n */\nexport const NordstarProvider = ({ children, theme, ...props }: NordstarProviderProps) => {\n const { accents, colors, fonts, sizes, layout } = theme || {};\n\n const headingFont =\n fonts?.heading || fonts?.body ? `--font-heading: ${(fonts.heading || fonts.body)!.replaceAll(\"'\", '')};` : '';\n const bodyFont =\n fonts?.body || fonts?.heading ? `--font-body: ${(fonts.body || fonts.heading)!.replaceAll(\"'\", '')};` : '';\n\n const borderWidth = theme?.border?.width || 0.2;\n\n // TODO: Maybe create a utility function for this to better handle optional values (and to hide this away from view).\n const css = `\n :root {\n --color-accent-primary: ${accents?.primary};\n --color-accent-primary-foreground: #fefefe;\n --color-accent-secondary: ${accents?.secondary};\n --color-accent-secondary-foreground: #fefefe;\n\n --color-background: ${colors?.background ?? '#000000'};\n --color-background-highlight: ${colors?.background ?? '#262626'};\n --color-foreground: ${colors?.foreground ?? '#fefefe'};\n --color-foreground-secondary: ${colors?.foregroundSecondary ?? '#828282'};\n\n --color-error: ${colors?.error ?? '#ba3e3e'};\n\n ${headingFont}\n ${bodyFont}\n\n --size-text-body: ${sizes?.text?.body ?? '14px'};\n\n --border-width: ${borderWidth}rem;\n --border-width-small: ${borderWidth / 1.45}rem;\n --border-radius: ${theme?.border?.radius ?? '0.45rem'};\n --border-radius-half: calc(var(--border-radius) / 2);\n\n --layout-page-width: ${layout?.page?.width ?? '1200px'};\n --layout-page-spacing: ${layout?.page?.spacing ?? '1rem'};\n --layout-page-spacing-half: calc(var(--layout-page-spacing) / 2);\n\n --layout-section-spacing: ${layout?.section?.spacing ?? '1rem'};\n --layout-section-padding: ${layout?.section?.padding ?? '1.75rem'};\n\n --layout-block-padding: ${layout?.block?.padding ?? '1rem'};\n --layout-block-padding-double: calc(var(--layout-block-padding) * 2);\n --layout-block-padding-half: calc(var(--layout-block-padding) / 2);\n\n --duration-short: ${theme?.duration?.short ?? '0.25s'};\n }\n `;\n\n return (\n <>\n <style {...props}>{css}</style>\n <div id=\"nordstar\" role=\"document\" className={styles.container || ''}>\n {children}\n </div>\n </>\n );\n};\nNordstarProvider.displayName = 'Nordstar.Core.NordstarProvider';\n"],"names":[],"mappings":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AM,CAAA;AAAA;AAAA,4BAAA,EAE7B,WAAW,CAAA;AAAA,kCAAA,EACL,cAAc,IAAI,CAAA;AAAA,6BACvB,EAAA,KAAA,EAAO,MAAQ,EAAA,MAAA,IAAU,SAAS,CAAA;AAAA;AAAA;AAAA,iCAG9B,EAAA,MAAA,EAAQ,IAAM,EAAA,KAAA,IAAS,QAAQ,CAAA;AAAA,mCAC7B,EAAA,MAAA,EAAQ,IAAM,EAAA,OAAA,IAAW,MAAM,CAAA;AAAA;AAAA;AAAA,sCAG5B,EAAA,MAAA,EAAQ,OAAS,EAAA,OAAA,IAAW,MAAM,CAAA;AAAA,sCAClC,EAAA,MAAA,EAAQ,OAAS,EAAA,OAAA,IAAW,SAAS,CAAA;AAAA;AAAA,oCAEvC,EAAA,MAAA,EAAQ,KAAO,EAAA,OAAA,IAAW,MAAM,CAAA;AAAA;AAAA;AAAA;AAAA,8BAItC,EAAA,KAAA,EAAO,QAAU,EAAA,KAAA,IAAS,OAAO,CAAA;AAAA;AAAA,IAAA,CAAA,CAAA;AAI7D,EAAA,uBAEQ,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAC,GAAA,CAAA,OAAA,EAAA,EAAO,GAAG,KAAA,EAAQ,QAAI,EAAA,GAAA,EAAA,CAAA;AAAA,oBACvB,GAAA,CAAC,KAAI,EAAA,EAAA,EAAA,EAAG,UAAW,EAAA,IAAA,EAAK,YAAW,SAAW,EAAA,MAAA,CAAO,SAAa,IAAA,EAAA,EAC7D,QACL,EAAA,CAAA;AAAA,GACJ,EAAA,CAAA,CAAA;AAER,EAAA;AACA,gBAAA,CAAiB,WAAc,GAAA,gCAAA;;;;"}
1
+ {"version":3,"file":"nordstar-provider.js","sources":["../src/nordstar-provider.tsx"],"sourcesContent":["import './styling.scss';\n\nimport type { ReactNode } from 'react';\nimport styles from './nordstar-provider.module.scss';\n\nexport type NordstarTheme = {\n accents: {\n primary: string;\n secondary: string;\n };\n colors?: {\n background?: string;\n foreground?: string;\n foregroundSecondary?: string;\n highlight?: string;\n error?: string;\n };\n fonts?: {\n heading?: string;\n body?: string;\n code?: string;\n };\n sizes?: {\n text?: {\n body?: string;\n };\n };\n border?: {\n width?: number;\n radius?: string;\n };\n layout?: {\n page?: {\n width?: string;\n spacing?: string;\n };\n section?: {\n spacing?: string;\n padding?: string;\n };\n block?: {\n padding?: string;\n };\n };\n duration?: {\n short?: string;\n };\n};\n\nexport type NordstarProviderProps = {\n theme?: NordstarTheme;\n children?: ReactNode;\n};\n\n/**\n * `<NordstarProvider/>`, a component that should wrap the entire application.\n * @note When using Next.js make sure to to extract all providers into a client component used inside of your `RootLayout`.\n *\n * @param {object} props - `<NordstarProvider/>` props.\n * @param {ReactNode} props.children - The children of the `<NordstarProvider/>` component.\n * @param {NordstarTheme} [props.theme] - The theme to use for the application.\n * @returns {ReactNode} The `<NordstarProvider/>` component.\n */\nexport const NordstarProvider = ({ children, theme, ...props }: NordstarProviderProps) => {\n const { accents, colors, fonts, sizes, layout } = theme || {};\n\n const headingFont =\n fonts?.heading || fonts?.body ? `--font-heading: ${(fonts.heading || fonts.body)!.replaceAll(\"'\", '')};` : '';\n const bodyFont =\n fonts?.body || fonts?.heading ? `--font-body: ${(fonts.body || fonts.heading)!.replaceAll(\"'\", '')};` : '';\n\n const borderWidth = theme?.border?.width || 0.2;\n\n // TODO: Maybe create a utility function for this to better handle optional values (and to hide this away from view).\n const css = `\n :root {\n --color-accent-primary: ${accents?.primary};\n --color-accent-primary-foreground: #fefefe;\n --color-accent-secondary: ${accents?.secondary};\n --color-accent-secondary-foreground: #fefefe;\n\n --color-background: ${colors?.background ?? '#000000'};\n --color-background-highlight: ${colors?.highlight ?? '#262626'};\n --color-foreground: ${colors?.foreground ?? '#fefefe'};\n --color-foreground-secondary: ${colors?.foregroundSecondary ?? '#828282'};\n\n --color-error: ${colors?.error ?? '#ba3e3e'};\n\n ${headingFont}\n ${bodyFont}\n\n --size-text-body: ${sizes?.text?.body ?? '14px'};\n\n --border-width: ${borderWidth}rem;\n --border-width-small: ${borderWidth / 1.45}rem;\n --border-radius: ${theme?.border?.radius ?? '0.45rem'};\n --border-radius-half: calc(var(--border-radius) / 2);\n\n --layout-page-width: ${layout?.page?.width ?? '1200px'};\n --layout-page-spacing: ${layout?.page?.spacing ?? '1rem'};\n --layout-page-spacing-half: calc(var(--layout-page-spacing) / 2);\n\n --layout-section-spacing: ${layout?.section?.spacing ?? '1rem'};\n --layout-section-padding: ${layout?.section?.padding ?? '1.75rem'};\n\n --layout-block-padding: ${layout?.block?.padding ?? '1rem'};\n --layout-block-padding-double: calc(var(--layout-block-padding) * 2);\n --layout-block-padding-half: calc(var(--layout-block-padding) / 2);\n\n --duration-short: ${theme?.duration?.short ?? '0.25s'};\n }\n `;\n\n return (\n <>\n <style {...props}>{css}</style>\n <div id=\"nordstar\" role=\"document\" className={styles.container || ''}>\n {children}\n </div>\n </>\n );\n};\nNordstarProvider.displayName = 'Nordstar.Core.NordstarProvider';\n"],"names":[],"mappings":";;;;;;;;;AA+DO,MAAM,mBAAmB,CAAC,EAAE,UAAU,KAAO,EAAA,GAAG,OAAmC,KAAA;AACtF,EAAM,MAAA,EAAE,SAAS,MAAQ,EAAA,KAAA,EAAO,OAAO,MAAO,EAAA,GAAI,SAAS,EAAC,CAAA;AAE5D,EAAA,MAAM,WACF,GAAA,KAAA,EAAO,OAAW,IAAA,KAAA,EAAO,OAAO,CAAoB,gBAAA,EAAA,CAAA,KAAA,CAAM,OAAW,IAAA,KAAA,CAAM,IAAO,EAAA,UAAA,CAAW,GAAK,EAAA,EAAE,CAAC,CAAM,CAAA,CAAA,GAAA,EAAA,CAAA;AAC/G,EAAA,MAAM,QACF,GAAA,KAAA,EAAO,IAAQ,IAAA,KAAA,EAAO,UAAU,CAAiB,aAAA,EAAA,CAAA,KAAA,CAAM,IAAQ,IAAA,KAAA,CAAM,OAAU,EAAA,UAAA,CAAW,GAAK,EAAA,EAAE,CAAC,CAAM,CAAA,CAAA,GAAA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OAAO,CAAA;AAAA;AAAA,IAAA,CAAA,CAAA;AAI7D,EAAA,uBAEQ,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAC,GAAA,CAAA,OAAA,EAAA,EAAO,GAAG,KAAA,EAAQ,QAAI,EAAA,GAAA,EAAA,CAAA;AAAA,oBACvB,GAAA,CAAC,KAAI,EAAA,EAAA,EAAA,EAAG,UAAW,EAAA,IAAA,EAAK,YAAW,SAAW,EAAA,MAAA,CAAO,SAAa,IAAA,EAAA,EAC7D,QACL,EAAA,CAAA;AAAA,GACJ,EAAA,CAAA,CAAA;AAER,EAAA;AACA,gBAAA,CAAiB,WAAc,GAAA,gCAAA;;;;"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@nordcom/nordstar-system",
4
4
  "type": "module",
5
- "version": "0.0.49",
5
+ "version": "0.0.50",
6
6
  "description": "Utilities used by all of the Nordstar Components, shouldn't be used directly outside of the Nordstar library.",
7
7
  "prettier": "@nordcom/prettier",
8
8
  "files": [