Skip to content

Commit

Permalink
Initial NJWDS commit with Button and Icon components
Browse files Browse the repository at this point in the history
  • Loading branch information
namanaman committed Dec 17, 2024
1 parent 1ee8ef4 commit ed12c05
Show file tree
Hide file tree
Showing 11 changed files with 4,002 additions and 276 deletions.
144 changes: 0 additions & 144 deletions docs/README-es.md

This file was deleted.

131 changes: 120 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,122 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lit Element Simple Starter Kit</title>
</head>
<body>
<my-element></my-element>
<script type="module" src="/src/my-element.ts"></script>
</body>
</html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>New Jersey Web Design System</title>
<!-- <link href="./dist/assets/button.css" rel="stylesheet" /> -->
<style>
*,
::after,
::before {
box-sizing: border-box;
}
</style>
</head>
<body style="padding: 12px; font-family: sans-serif">
<h1>NJWDS Lit Components</h1>
<h2>Button</h2>
<div style="margin-bottom: 12px; display: flex; align-items: center">
<nj-button variant="primary">Primary Light</nj-button>
<nj-button variant="secondary">Secondary Light</nj-button>
<nj-button variant="link">Link Light</nj-button>
</div>
<div style="margin-bottom: 12px; display: flex; align-items: center">
<nj-button variant="primary" icon-name="add" icon-position="leading"
>Primary Light</nj-button
>
<nj-button variant="primary" icon-name="add" icon-position="trailing"
>Primary Light</nj-button
>
<nj-button
variant="primary"
icon-name="add"
icon-position="icon-only"
icon-title="Add"
></nj-button>
<nj-button variant="link" icon-name="add" icon-position="trailing"
>Link Light</nj-button
>
<nj-button variant="link" icon-name="add" icon-position="leading"
>Link Light</nj-button
>
</div>
<div style="margin-bottom: 12px; display: flex; align-items: center">
<nj-button variant="secondary" icon-name="add" icon-position="leading"
>Secondary Light</nj-button
>
<nj-button variant="secondary" icon-name="add" icon-position="trailing"
>Secondary Light</nj-button
>
<nj-button
variant="secondary"
icon-name="add"
icon-position="icon-only"
icon-title="Add"
></nj-button>
</div>
<div
style="
margin-bottom: 12px;
background-color: black;
padding: 12px;
display: flex;
align-items: center;
"
>
<nj-button variant="primary" mode="dark">Primary Dark</nj-button>
<nj-button variant="secondary" mode="dark">Secondary Dark</nj-button>
<nj-button variant="link" mode="dark">Link Dark</nj-button>
</div>
<div
style="
margin-bottom: 12px;
background-color: black;
padding: 12px;
display: flex;
align-items: center;
"
>
<nj-button
variant="primary"
mode="dark"
icon-name="add"
icon-position="leading"
>Primary Dark</nj-button
>
<nj-button
variant="secondary"
mode="dark"
icon-name="add"
icon-position="trailing"
>Secondary Dark</nj-button
>
<nj-button
variant="secondary"
icon-name="add"
icon-position="icon-only"
icon-title="Add"
></nj-button>
</div>
<div style="margin-bottom: 12px; display: flex; align-items: center">
<nj-button variant="primary" mode="danger">Primary Danger</nj-button>
<nj-button variant="secondary" mode="danger">Secondary Danger</nj-button>
<nj-button variant="link" mode="danger">Link Danger</nj-button>
</div>

<h2>Icon</h2>
<div style="margin-bottom: 12px">
<nj-icon icon-name="info" size="scale" decorative="true"></nj-icon>
<nj-icon icon-name="info" size="3" decorative="true"></nj-icon>
<nj-icon icon-name="info" size="4" decorative="true"></nj-icon>
<nj-icon icon-name="info" size="5" decorative="true"></nj-icon>
</div>

<script
type="module"
src="./dist/components/nj-button/nj-button.mjs"
></script>
<script type="module" src="./dist/components/nj-icon/nj-icon.mjs"></script>
</body>
</html>
24 changes: 19 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,27 @@
"main": "index.js",
"license": "MIT",
"scripts": {
"dev": "vite"
"install": "yarn install",
"build": "vite build",
"prod": "vite preview",
"dev": "vite",
"test": "web-test-runner **/*.test.js --node-resolve"
},
"dependencies": {
"lit": "^2.0.0-rc.2"
"@newjersey/njwds": "^2.0.1",
"@open-wc/testing": "^4.0.0",
"chai": "^5.1.2",
"lit": "^3.2.0",
"mocha": "^10.8.2"
},
"devDependencies": {
"@types/node": "^15.12.1",
"vite": "^2.3.6"
}
"@types/node": "^22.7.4",
"@web/test-runner": "^0.19.0",
"jsdom": "^25.0.1",
"typescript": "^5.6.2",
"vite": "^5.4.8",
"vitest": "^2.1.4"
},
"repository": "https://github.com/litelement-dev/lit-simple-starter-kit.git",
"author": "Naman Agrawal <naman@innovation.nj.gov>"
}
1 change: 1 addition & 0 deletions public/assets/sprite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module "*.css?inline";
19 changes: 0 additions & 19 deletions src/my-element.ts

This file was deleted.

Loading

0 comments on commit ed12c05

Please sign in to comment.