Skip to content

Commit

Permalink
Initialize the squared component package
Browse files Browse the repository at this point in the history
squared will become a common React component library for Squareone
applications that build upon the design tokens from Rubin Style
Dictionary.
  • Loading branch information
jonathansick committed Aug 10, 2023
1 parent 69446f1 commit 9abbebb
Show file tree
Hide file tree
Showing 9 changed files with 281 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/kind-impalas-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lsst-sqre/squared': minor
---

This is the first release of the Squared React component library for Squareone.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Squareone is a monorepo for [Rubin Observatory](https://rubinobservatory.org) Da

- `@lsst-sqre/eslint-config` is a shared ESLint configuration for Squareone applications and packages.
- `@lsst-sqre/rubin-style-dictonary` is a design token package based on the [Rubin Observatory Visual Identity Manual](https://docushare.lsst.org/docushare/dsweb/Get/Document-37294/20210212%20Visual%20Identity%20Manual%20—V7.pdf), build with [style-dictionary](https://amzn.github.io/style-dictionary/).
- `@lsst-sqre/squared` is a React component library for Squareone's applications. Squared implements the Rubin Observatory Visual Identity Manual via design tokens from the Rubin Style Dictionary (`@lsst-sqre/rubin-style-dictionary`).
- `@lsst-sqre/tsconfig` is a shared TypeScript configuration for Squareone applications and packages.

## Technology stack
Expand Down
4 changes: 4 additions & 0 deletions packages/squared/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: ['@lsst-sqre/eslint-config'],
};
3 changes: 3 additions & 0 deletions packages/squared/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @lsst-sqre/squared

Squared in a React component library for Squareone's applications. Squared implements the Rubin Observatory Visual Identity Manual via design tokens from the Rubin Style Dictionary (`@lsst-sqre/rubin-style-dictionary`) and uses a base CSS stylesheet from `@lsst-sqre/global-css`.
37 changes: 37 additions & 0 deletions packages/squared/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "@lsst-sqre/squared",
"description": "A React component library for Squareone / Rubin Data Management.",
"version": "0.0.0",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"sideEffects": false,
"license": "MIT",
"files": [
"dist/**"
],
"scripts": {
"build": "tsup src/index.tsx --format esm,cjs --dts --external react",
"dev": "tsup src/index.tsx --format esm,cjs --watch --dts --external react",
"lint": "eslint \"src/**/*.ts*\"",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@lsst-sqre/rubin-style-dictionary": "workspace:*",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"styled-components": "^5.3.6"
},
"devDependencies": {
"@lsst-sqre/eslint-config": "workspace:*",
"@lsst-sqre/tsconfig": "workspace:*",
"@types/react": "^18.2.19",
"@types/react-dom": "^18.2.7",
"eslint": "^8.35.0",
"tsup": "^7.2.0",
"typescript": "^5.1.6"
}
}
11 changes: 11 additions & 0 deletions packages/squared/src/Button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';

export interface ButtonProps {
children: React.ReactNode;
}

export function Button(props: ButtonProps) {
return <button>{props.children}</button>;
}

Button.displayName = 'Button';
3 changes: 3 additions & 0 deletions packages/squared/src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import React from 'react';

export { Button, type ButtonProps } from './Button';
5 changes: 5 additions & 0 deletions packages/squared/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": "@lsst-sqre/tsconfig/react-library.json",
"include": ["."],
"exclude": ["dist", "build", "node_modules"]
}
Loading

0 comments on commit 9abbebb

Please sign in to comment.