-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: refactor connect ui into web components with stencil
- Loading branch information
Showing
125 changed files
with
1,786 additions
and
1,121 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
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Publish NPM Betas | ||
on: | ||
push: | ||
branches-ignore: | ||
- master | ||
|
||
jobs: | ||
publish_npm_betas: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set Node Version | ||
uses: actions/setup-node@v1.4.2 | ||
with: | ||
node-version: 12.16.1 | ||
- name: Restore lerna cache | ||
id: lerna-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
node_modules | ||
*/*/node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install monorepo deps | ||
run: yarn --frozen-lockfile | ||
if: steps.lerna-cache.outputs.cache-hit != 'true' | ||
- name: Setup .npmrc | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc | ||
- name: Get git branch | ||
id: git-branch | ||
run: echo "::set-output name=branch::$(git rev-parse --abbrev-ref HEAD)" | ||
- name: Get git commit | ||
id: git-commit | ||
run: echo "::set-output name=sha::$(git rev-parse --short HEAD)" | ||
- name: print preid | ||
env: | ||
BRANCH: ${{ steps.git-branch.outputs.branch }} | ||
SHA: ${{ steps.git-commit.outputs.sha }} | ||
run: echo $BRANCH.$SHA | ||
- name: Setup git | ||
run: | | ||
git config --local user.email "action@github.com" | ||
git config --local user.name "GitHub Action" | ||
- name: Publish to NPM | ||
env: | ||
BRANCH: ${{ steps.git-branch.outputs.branch }} | ||
SHA: ${{ steps.git-commit.outputs.sha }} | ||
run: yarn lerna publish prepatch --preid alpha.$SHA --dist-tag $BRANCH --yes --no-push |
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,2 +1,3 @@ | ||
node_modules/ | ||
*.d.ts | ||
*.d.ts | ||
dist/ |
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,6 +1,6 @@ | ||
{ | ||
"packages": [ | ||
"packages/**" | ||
"packages/*" | ||
], | ||
"version": "independent", | ||
"npmClient": "yarn", | ||
|
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 was deleted.
Oops, something went wrong.
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,14 +1,40 @@ | ||
import React from 'react'; | ||
import { BoxProps } from '@blockstack/ui'; | ||
import { Link as ConnectLink } from '@blockstack/connect'; | ||
import { Text, Box, BoxProps } from '@blockstack/ui'; | ||
|
||
interface LinkProps extends BoxProps { | ||
_hover?: BoxProps; | ||
onClick: () => void; | ||
} | ||
|
||
export const Link: React.FC<LinkProps> = ({ children, fontSize = '14px', ...rest }) => ( | ||
<ConnectLink fontSize={fontSize} {...rest}> | ||
export const buildEnterKeyEvent = (onClick: () => void) => { | ||
return (event: React.KeyboardEvent) => { | ||
if (event.key === 'Enter' && onClick) { | ||
onClick(); | ||
} | ||
}; | ||
}; | ||
|
||
export const Link: React.FC<LinkProps> = ({ | ||
_hover = {}, | ||
children, | ||
fontSize = '12px', | ||
textStyle = 'caption.medium', | ||
onClick, | ||
...rest | ||
}) => ( | ||
<Box {...rest} onKeyPress={buildEnterKeyEvent(onClick)} onClick={onClick} tabIndex={0}> | ||
<Text | ||
_hover={{ textDecoration: 'underline', cursor: 'pointer', ..._hover }} | ||
fontSize={fontSize} | ||
textStyle={textStyle} | ||
> | ||
{children} | ||
</Text> | ||
</Box> | ||
); | ||
|
||
export const MediumLink: React.FC<LinkProps> = ({ children, fontSize = '14px', ...rest }) => ( | ||
<Link fontSize={fontSize} {...rest}> | ||
{children} | ||
</ConnectLink> | ||
</Link> | ||
); |
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
4 changes: 2 additions & 2 deletions
4
...nnect/src/react/components/powered-by.tsx → .../app/src/components/screen/powered-by.tsx
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
2 changes: 1 addition & 1 deletion
2
...eact/components/screen/screen-actions.tsx → .../src/components/screen/screen-actions.tsx
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,5 +1,5 @@ | ||
import React from 'react'; | ||
import { Flex, FlexProps } from '@blockstack/ui'; | ||
import { PX } from '../../common'; | ||
import { PX } from './spacing'; | ||
|
||
export const ScreenActions = (props: FlexProps) => <Flex px={PX} {...props} />; |
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
2 changes: 1 addition & 1 deletion
2
...react/components/screen/screen-footer.tsx → ...p/src/components/screen/screen-footer.tsx
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.