- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
179 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
*.lockb binary diff=lockb | ||
* text=auto eol=lf | ||
*.lockb binary diff=lockb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged --allow-empty | ||
bunx lint-staged --allow-empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ | |
"Brandly", | ||
"compat", | ||
"Filiph", | ||
"lockb", | ||
"Nordcom", | ||
"nordstar", | ||
"postbuild", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
"description": "An opinionated component library for building human-centric user interfaces.", | ||
"private": true, | ||
"main": "index.js", | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
"node": ">=18 <=21" | ||
}, | ||
|
@@ -19,7 +18,7 @@ | |
], | ||
"scripts": { | ||
"prepare": "husky install", | ||
"dev": "concurrently -i --raw bun:dev:*", | ||
"dev": "concurrently -i bun:dev:*", | ||
"dev:docs": "turbo dev --filter=@nordcom/nordstar-docs", | ||
"dev:storybook": "turbo dev --filter=@nordcom/nordstar-storybook", | ||
"build": "turbo build", | ||
|
@@ -28,14 +27,14 @@ | |
"build:storybook": "turbo build --filter=@nordcom/nordstar-storybook", | ||
"typecheck": "turbo typecheck", | ||
"lint": "eslint **/*.{ts,tsx}", | ||
"fix:lint": "eslint **/*.{ts,tsx}", | ||
"fix": "concurrently -i bun:fix:*", | ||
"fix:lint": "eslint **/*.{ts,tsx} --fix", | ||
"prettier": "prettier **/src/**/*.* --write", | ||
"fix:prettier": "prettier **/src/**/*.* --fix", | ||
"fix": "concurrently -i --raw bun:fix:*", | ||
"test": "concurrently --raw bun:test:*", | ||
"fix:prettier": "prettier **/src/**/*.* --write", | ||
"test": "concurrently -i bun:test:*", | ||
"test:packages": "vitest run --coverage --passWithNoTests", | ||
"clean": "concurrently --raw bun:clean:*", | ||
"clean:repo": "rimraf -g dist coverage .turbo .next .tsbuildinfo", | ||
"clean": "concurrently -i bun:clean:*", | ||
"clean:repo": "rimraf -g dist coverage storybook-static .turbo .next .tsbuildinfo *.log", | ||
"clean:packages": "turbo clean --filter=!@nordcom/nordstar-docs --filter=!@nordcom/nordstar-storybook", | ||
"clean:docs": "turbo clean --filter=@nordcom/nordstar-docs", | ||
"clean:storybook": "turbo clean --filter=@nordcom/nordstar-storybook", | ||
|
@@ -77,14 +76,13 @@ | |
"@changesets/cli": "2.27.1", | ||
"@changesets/types": "6.0.0", | ||
"@nordcom/prettier": "0.1.1", | ||
"@storybook/react": "7.6.17", | ||
"@testing-library/dom": "9.3.4", | ||
"@testing-library/jest-dom": "6.4.2", | ||
"@testing-library/react": "14.2.1", | ||
"@testing-library/user-event": "14.5.2", | ||
"@types/node": "20.10.3", | ||
"@types/react": "18.2.66", | ||
"@types/node": "20.11.27", | ||
"@types/react-dom": "18.2.22", | ||
"@types/react": "18.2.66", | ||
"@typescript-eslint/eslint-plugin": "7.2.0", | ||
"@typescript-eslint/parser": "7.2.0", | ||
"@vitejs/plugin-react-swc": "3.6.0", | ||
|
@@ -112,7 +110,6 @@ | |
"react-dom": "18.2.0", | ||
"rimraf": "5.0.5", | ||
"sass": "1.72.0", | ||
"strip-ansi": "7.1.0", | ||
"turbo": "1.12.5", | ||
"typescript": "5.4.2", | ||
"vite": "5.1.6", | ||
|
@@ -122,6 +119,7 @@ | |
"vitest": "1.3.1" | ||
}, | ||
"overrides": { | ||
"@typescript-eslint/typescript-estree": "7.2.0" | ||
"@typescript-eslint/typescript-estree": "7.2.0", | ||
"esbuild": "0.20.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,41 @@ | ||
import type { Meta } from '@storybook/react'; | ||
import React from 'react'; | ||
import type { HeadingProps } from '../src'; | ||
import { Heading } from '../src'; | ||
import type { HeadingProps } from '@nordcom/nordstar-heading'; | ||
import { Heading } from '@nordcom/nordstar-heading'; | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
const story: Meta<typeof Heading> = { | ||
title: 'System/Typography/Heading', | ||
component: Heading, | ||
argTypes: { | ||
level: { | ||
options: ['h1', 'h2', 'h3', 'h4'], | ||
control: { type: 'radio' } | ||
control: { type: 'inline-radio' } | ||
} | ||
} | ||
}; | ||
|
||
const Template = (args: HeadingProps) => <Heading {...args}>A compelling page-title</Heading>; | ||
|
||
export const h1 = { | ||
render: Template, | ||
args: { | ||
level: 'h1' | ||
} | ||
}; | ||
|
||
export const h2 = { | ||
render: Template, | ||
args: { | ||
level: 'h2' | ||
} | ||
}; | ||
export default story; | ||
type Story = StoryObj<typeof Heading>; | ||
|
||
export const h3 = { | ||
render: Template, | ||
args: { | ||
level: 'h3' | ||
} | ||
}; | ||
const Template = (args: HeadingProps) => ( | ||
<> | ||
{[ | ||
<Heading key="h1" level="h1" {...args}> | ||
1. A bold expressive heading | ||
</Heading>, | ||
<Heading key="h2" level="h2" {...args}> | ||
2. Subheading used to provide context | ||
</Heading>, | ||
<Heading key="h3" level="h3" {...args}> | ||
3. Heading used for section headers | ||
</Heading>, | ||
<Heading key="h4" level="h4" {...args}> | ||
4. Heading used for subsection headers | ||
</Heading> | ||
]} | ||
</> | ||
); | ||
|
||
export const h4 = { | ||
export const Standard: Story = { | ||
render: Template, | ||
args: { | ||
level: 'h4' | ||
} | ||
args: {} | ||
}; | ||
|
||
export default story; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.