Skip to content

Commit

Permalink
update fork again
Browse files Browse the repository at this point in the history
Signed-off-by: Antonette Caldwell <[email protected]>
  • Loading branch information
nebula-aac committed Aug 30, 2023
2 parents c7cc74b + 99f4cb6 commit 3e0750f
Show file tree
Hide file tree
Showing 57 changed files with 1,241 additions and 1,098 deletions.
8 changes: 0 additions & 8 deletions .changeset/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/config.json

This file was deleted.

51 changes: 32 additions & 19 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
name: Release
name: Publish NPM Package

on:
push:
branches:
- master
release:
types: [published]
workflow_dispatch:
inputs:
release-type:
required: true

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
Expand All @@ -20,20 +23,30 @@ jobs:
with:
node-version: 18

- name: Install Dependencies
run: yarn
- name: Install deps and build
run: |
yarn
yarn build-all
publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
- name: Setup Node.js 18.x
uses: actions/setup-node@v3
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
node-version: 18
registry-url: "https://registry.npmjs.org"
scope: "@layer5"

- name: Publish to npm
run: yarn publish --release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

#- name: Send a Slack notification if a publish happens
#if: steps.changesets.outputs.published == 'true'
# You can do something when a publish happens.
#run: my-slack-bot send-notification --message "A new version of ${GITHUB_REPOSITORY} was published!"
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
25 changes: 3 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
check:
golangci-lint run

check-clean-cache:
golangci-lint cache clean

protoc-setup:
wget -P meshes https://raw.githubusercontent.com/layer5io/meshery/master/meshes/meshops.proto

proto:
protoc -I meshes/ meshes/meshops.proto --go_out=plugins=grpc:./meshes/





site:
$(jekyll) serve --drafts --livereload

build:
$(jekyll) build --drafts
yarn run build-all

docker:
docker run --name site -d --rm -p 4000:4000 -v `pwd`:"/srv/jekyll" jekyll/jekyll:4.0.0 bash -c "bundle install; jekyll serve --drafts --livereload"
format:
yarn run format
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@ The Sistent Design System from Layer5 provides the open source building blocks t
### Packages

- Design System components in React.js
- npm package: `@layer5/sistent-components`
- npm package:

`@layer5/sistent-components`
`@layer5/sistent-svg`

### Brand

- Layer5 Brand Guide ([PDF](https://layer5.io/brand/brand-guide.pdf))
- [Layer5 Logos](https://layer5.io/company/brand) (more assets available in shared Community drive).

### How to get started

1. Install `[email protected]`
2. Use `yarn` to install dependencies

<div>&nbsp;</div>

## Join the Layer5 community!
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
"eslint --fix"
]
}
}
}
6 changes: 6 additions & 0 deletions packages/components/src/buttongroup.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
import { ButtonGroup as MuiButtonGroup, ButtonGroupProps } from '@mui/material';

export const ButtonGroup = (props: ButtonGroupProps) => {
return <MuiButtonGroup {...props} />;
};
6 changes: 6 additions & 0 deletions packages/components/src/card.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
import { Card as MuiCard, CardProps } from '@mui/material';

export const Card = (props: CardProps) => {
return <MuiCard {...props} />;
};
8 changes: 8 additions & 0 deletions packages/components/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ export { Tabs } from './tabs';
export { Toolbar } from './toolbar';
export { Tooltip } from './tooltip';
export { Typography } from './typography';
export { Card } from './card';
export { Menu } from './menu';
export { Table } from './table';
export { List } from './list';
export { TextField } from './textfield';
export { Switch } from './switch';
export { Select } from './select';
export { ButtonGroup } from './buttongroup';
6 changes: 6 additions & 0 deletions packages/components/src/list.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
import { List as MuiList, ListProps } from '@mui/material';

export const List = (props: ListProps) => {
return <MuiList {...props} />;
};
6 changes: 6 additions & 0 deletions packages/components/src/menu.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
import { Menu as MuiMenu, MenuProps } from '@mui/material';

export const Menu = (props: MenuProps) => {
return <MuiMenu {...props} />;
};
6 changes: 6 additions & 0 deletions packages/components/src/select.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
import { Select as MuiSelect, SelectProps } from '@mui/material';

export const Select = (props: SelectProps) => {
return <MuiSelect {...props} />;
};
6 changes: 6 additions & 0 deletions packages/components/src/switch.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
import { Switch as MuiSwitch, SwitchProps } from '@mui/material';

export const Switch = (props: SwitchProps) => {
return <MuiSwitch {...props} />;
};
6 changes: 6 additions & 0 deletions packages/components/src/table.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
import { Table as MuiTable, TableProps } from '@mui/material';

export const Table = (props: TableProps) => {
return <MuiTable {...props} />;
};
6 changes: 6 additions & 0 deletions packages/components/src/textfield.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
import { TextField as MuiTextField, TextFieldProps } from '@mui/material';

export const TextField = (props: TextFieldProps) => {
return <MuiTextField {...props} />;
};
12 changes: 12 additions & 0 deletions packages/svg/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80,
},
},
};
7 changes: 3 additions & 4 deletions packages/svg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
"test": "jest",
"coverage": "jest --coverage"
},
"jest": {
"preset": "ts-jest",
"testEnvironment": "jsdom"
},
"devDependencies": {
"@babel/preset-react": "^7.22.5",
"@swc/core": "^1.3.78",
Expand All @@ -36,5 +32,8 @@
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@testing-library/react": "^14.0.0"
}
}
15 changes: 15 additions & 0 deletions packages/svg/src/__testing__/AddIcon.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { render } from '@testing-library/react';
import { AddIcon } from '../icons';

describe('AddIcon', () => {
it('renders without errors', () => {
render(<AddIcon width={24} height={24} />);
});

it('applies width and height', () => {
const { getByTestId } = render(<AddIcon width={24} height={24} />);
const svgElement = getByTestId('add-icon-svg');
expect(svgElement.getAttribute('width')).toBe('24');
expect(svgElement.getAttribute('height')).toBe('24');
});
});
26 changes: 26 additions & 0 deletions packages/svg/src/icons/Add/AddIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { FC } from 'react';
import { IconProps } from '../types';
import { DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_FILL_NONE } from '../../constants/constants';

export const AddIcon: FC<IconProps> = ({
width = DEFAULT_WIDTH,
height = DEFAULT_HEIGHT,
fill = DEFAULT_FILL_NONE,
...props
}) => {
return (
<svg
width={width}
height={height}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
data-testid="add-icon-svg"
{...props}
>
<path d="M0 0h24v24H0z" fill={fill} />
<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
</svg>
);
};

export default AddIcon;
25 changes: 25 additions & 0 deletions packages/svg/src/icons/Add/AddIconCircleBordered.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { FC } from 'react';
import { IconProps } from '../types';
import { DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_FILL_NONE } from '../../constants/constants';

export const AddIconCircleBordered: FC<IconProps> = ({
width = DEFAULT_WIDTH,
height = DEFAULT_HEIGHT,
fill = DEFAULT_FILL_NONE,
...props
}) => {
return (
<svg
width={width}
height={height}
viewBox="0 0 48 48"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path d="M0 0h48v48h-48z" fill={fill} />
<path d="M26 14h-4v8h-8v4h8v8h4v-8h8v-4h-8v-8zm-2-10c-11.05 0-20 8.95-20 20s8.95 20 20 20 20-8.95 20-20-8.95-20-20-20zm0 36c-8.82 0-16-7.18-16-16s7.18-16 16-16 16 7.18 16 16-7.18 16-16 16z" />
</svg>
);
};

export default AddIconCircleBordered;
2 changes: 2 additions & 0 deletions packages/svg/src/icons/Add/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default as AddIcon } from './AddIcon';
export { default as AddIconCircleBordered } from './AddIconCircleBordered';
13 changes: 0 additions & 13 deletions packages/svg/src/icons/AddIcon.tsx

This file was deleted.

13 changes: 0 additions & 13 deletions packages/svg/src/icons/AddIconCircleBorder.tsx

This file was deleted.

30 changes: 0 additions & 30 deletions packages/svg/src/icons/ApplicationIcon.tsx

This file was deleted.

Loading

0 comments on commit 3e0750f

Please sign in to comment.