Skip to content

Commit

Permalink
Merge pull request buttercup#263 from buttercup/upgrade-buttercup-ui
Browse files Browse the repository at this point in the history
Upgrade buttercup-ui to @buttercup/ui
  • Loading branch information
sallar authored May 24, 2017
2 parents dcd6994 + b788cc5 commit 3506bbf
Show file tree
Hide file tree
Showing 15 changed files with 56 additions and 67 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"homepage": "https://buttercup.pw",
"dependencies": {},
"devDependencies": {
"@buttercup/ui": "^0.6.0",
"@types/electron": "^1.4.29",
"@types/node": "^6.0.45",
"@types/react": "^0.14.41",
Expand All @@ -121,7 +122,6 @@
"babel-register": "^6.18.0",
"babili-webpack-plugin": "^0.0.8",
"buttercup-importer": "^0.8.0",
"buttercup-ui": "^0.5.1",
"buttercup-web": "~0.25.2",
"classnames": "^2.2.5",
"concurrently": "^2.1.0",
Expand Down
23 changes: 3 additions & 20 deletions src/renderer/components/archive/copyable.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,11 @@ import { Flex } from 'styled-flexbox';
import CopyIcon from 'react-icons/lib/go/clippy';
import EyeIcon from 'react-icons/lib/fa/eye';
import EyeSlashIcon from 'react-icons/lib/fa/eye-slash';
import { Button, ButtonRow } from 'buttercup-ui';
import { Button, ButtonRow, ColoredDigits } from '@buttercup/ui';
import { showContextMenu } from '../../system/menu';
import { copyToClipboard } from '../../system/utils';

const PasswordBase = ({ className, password, concealed, ...props }) => {
const splitted = password.split(/(\d+)/g);
return (
<span className={className} {...props} >
{concealed ? '●'.repeat(10) : splitted.map(
(chunk, i) => <span key={i} className={/^\d+$/.test(chunk) ? 'num' : 'str'}>{chunk}</span>
)}
</span>
);
};

PasswordBase.propTypes = {
className: PropTypes.string,
password: PropTypes.string,
concealed: PropTypes.bool
};

const Password = styled(PasswordBase)`
const Password = styled(ColoredDigits)`
font-family: Anonymous;
font-size: 14px;
font-weight: bold;
Expand Down Expand Up @@ -105,7 +88,7 @@ class Copyable extends Component {
}

renderPassword(content) {
return (<Password role="content" password={content} concealed={this.state.concealed} />);
return (<Password role="content" value={content} concealed={this.state.concealed} />);
}

render() {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/archive/entries.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component, PropTypes } from 'react';
import PlusIcon from 'react-icons/lib/md/add';
import cx from 'classnames';
import { Button } from 'buttercup-ui';
import { Button } from '@buttercup/ui';
import { isOSX } from '../../system/utils';
import { showContextMenu, createMenuFromGroups, createCopyMenu } from '../../system/menu';
import Column from '../column';
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/archive/entry-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Component, PropTypes } from 'react';
import { Field, FieldArray } from 'redux-form';
import PlusIcon from 'react-icons/lib/md/add';
import RemoveIcon from 'react-icons/lib/fa/trash-o';
import { Button } from 'buttercup-ui';
import { Button } from '@buttercup/ui';
import styles from '../../styles/entry-form';
import Input from './entry-input';

Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/archive/entry-input.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component, PropTypes } from 'react';
import cx from 'classnames';
import { Generator, Meter } from 'buttercup-ui';
import { Generator, Meter } from '@buttercup/ui';
import MagicIcon from 'react-icons/lib/fa/magic';
import styles from '../../styles/entry-input';

Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/archive/entry.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component, PropTypes } from 'react';
import TrashIcon from 'react-icons/lib/fa/trash-o';
import EditIcon from 'react-icons/lib/fa/edit';
import { Button } from 'buttercup-ui';
import { Button } from '@buttercup/ui';
import EntryForm from '../../containers/archive/entry-form';
import styles from '../../styles/entry';
import Column from '../column';
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/archive/sort-button.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { PropTypes } from 'react';
import SortIcon from 'react-icons/lib/md/sort';
import { Button } from 'buttercup-ui';
import { Button } from '@buttercup/ui';
import { showContextMenu, createSortMenu } from '../../system/menu';

const SORT_MODES = [
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/file-manager/cells.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'path';
import React, { Component, PropTypes } from 'react';
import { Input } from 'buttercup-ui';
import { Input } from '@buttercup/ui';
import { Cell } from 'fixed-data-table-2';
import humanize from 'humanize';
import Icon from '../icon';
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/file-manager/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component, PropTypes } from 'react';
import { HashRouter as Router, Route, NavLink } from 'react-router-dom';
import { Button, ButtonRow } from 'buttercup-ui';
import { Button, ButtonRow } from '@buttercup/ui';
import { Flex } from 'styled-flexbox';
import styled from 'styled-components';
import '../../styles/workspace.global.scss';
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/file-manager/sources/dropbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Component, PropTypes } from 'react';
import styled from 'styled-components';
import DropboxIcon from 'react-icons/lib/fa/dropbox';
import InfoIcon from 'react-icons/lib/md/info-outline';
import { Button, SmallType, Center } from 'buttercup-ui';
import { Button, SmallType, Center } from '@buttercup/ui';
import { Flex } from 'styled-flexbox';
import { authenticateDropbox, getFsInstance } from '../../../system/auth';
import { isButtercupFile } from '../../../system/utils';
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/file-manager/sources/webdav.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component, PropTypes } from 'react';
import InfoIcon from 'react-icons/lib/md/info-outline';
import { Button, SmallType, Input } from 'buttercup-ui';
import { Button, SmallType, Input } from '@buttercup/ui';
import { Flex } from 'styled-flexbox';
import styled from 'styled-components';
import { getFsInstance } from '../../../system/auth';
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/recent-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import HistoryIcon from 'react-icons/lib/go/history';
import CloudIcon from 'react-icons/lib/md/cloud-queue';
import DropboxIcon from 'react-icons/lib/fa/dropbox';
import LaptopIcon from 'react-icons/lib/md/laptop-mac';
import { Button } from 'buttercup-ui';
import { Button } from '@buttercup/ui';
import { ArchiveTypes } from '../../shared/buttercup/types';
import styles from '../styles/recent-files';
import { parsePath } from '../system/utils';
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/tree-view/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { isString } from 'lodash';
import cx from 'classnames';
import Tree, { TreeNode } from 'rc-tree';
import PlusIcon from 'react-icons/lib/md/add';
import { Button } from 'buttercup-ui';
import { Button } from '@buttercup/ui';
import { showContextMenu, createMenuFromGroups, createSortMenu } from '../../system/menu';
import { isOSX } from '../../system/utils';
import '../../styles/tree-view.global';
Expand Down
10 changes: 0 additions & 10 deletions src/renderer/styles/workspace.global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,6 @@ input, button, textarea, :focus {
-webkit-app-region: no-drag;
}

.Popover-body {
display: inline-flex;
padding: 0;
flex-direction: column;
}

.Popover-tip {
fill: $dark-secondary;
}

:root {
--spacing-half: 6px;
--spacing-one: 12px;
Expand Down
66 changes: 41 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@
version "0.0.6"
resolved "https://registry.yarnpkg.com/7zip/-/7zip-0.0.6.tgz#9cafb171af82329490353b4816f03347aa150a30"

"@buttercup/ui@^0.6.0":
version "0.6.0"
resolved "https://registry.yarnpkg.com/@buttercup/ui/-/ui-0.6.0.tgz#cd7bd604b359f541168fdc15fc1e7a40bef0fdf2"
dependencies:
buttercup-generator "^0.0.2"
classnames "^2.2.5"
filter-react-dom-props "^0.0.2"
polished "^1.0.2"
react "^15.4.2"
react-dom "^15.4.2"
react-icons "^2.2.3"
react-popover "^0.4.8"
styled-components "^1.4.4"
zxcvbn "^4.4.2"

"@types/electron@^1.4.29":
version "1.4.31"
resolved "https://registry.yarnpkg.com/@types/electron/-/electron-1.4.31.tgz#6ef658e97152a4d3c9cda44f56bd3f917149bb33"
Expand Down Expand Up @@ -783,12 +798,12 @@ babel-plugin-espower@^2.3.1:
estraverse "^4.1.1"

babel-plugin-istanbul@^4.0.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.1.tgz#c12de0fc6fe42adfb16be56f1ad11e4a9782eca9"
version "4.1.3"
resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.3.tgz#6ee6280410dcf59c7747518c3dfd98680958f102"
dependencies:
find-up "^2.1.0"
istanbul-lib-instrument "^1.6.2"
test-exclude "^4.0.3"
istanbul-lib-instrument "^1.7.1"
test-exclude "^4.1.0"

babel-plugin-jest-hoist@^19.0.0:
version "19.0.0"
Expand Down Expand Up @@ -1798,21 +1813,6 @@ buttercup-importer@^0.8.0:
pify "~2.3.0"
xml2js "~0.4.13"

buttercup-ui@^0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/buttercup-ui/-/buttercup-ui-0.5.1.tgz#bc99743583eae083fb288db7496a8a3af641b60e"
dependencies:
buttercup-generator "^0.0.2"
classnames "^2.2.5"
filter-react-dom-props "^0.0.2"
polished "^1.0.2"
react "^15.4.2"
react-dom "^15.4.2"
react-icons "^2.2.3"
react-popover "^0.4.8"
styled-components "^1.4.4"
zxcvbn "^4.4.2"

buttercup-web@~0.25.2:
version "0.25.2"
resolved "https://registry.yarnpkg.com/buttercup-web/-/buttercup-web-0.25.2.tgz#7d805e2c49f54f2ef51cdcf12908d71c0c9c47d8"
Expand Down Expand Up @@ -2680,7 +2680,7 @@ [email protected], debug@~0.7.0:
version "0.7.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39"

debug@2, [email protected], debug@^2.3.2, debug@^2.6.1, debug@^2.6.3:
debug@2, [email protected], debug@^2.1.3, debug@^2.3.2, debug@^2.6.1, debug@^2.6.3:
version "2.6.6"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.6.tgz#a9fa6fbe9ca43cf1e79f73b75c0189cbb7d6db5a"
dependencies:
Expand All @@ -2692,7 +2692,7 @@ [email protected], debug@~2.2.0:
dependencies:
ms "0.7.1"

debug@^2.1.1, debug@^2.1.3, debug@^2.2.0:
debug@^2.1.1, debug@^2.2.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b"
dependencies:
Expand Down Expand Up @@ -4931,13 +4931,17 @@ istanbul-lib-coverage@^1.0.0-alpha.4:
version "1.0.1"
resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.0.1.tgz#f263efb519c051c5f1f3343034fc40e7b43ff212"

istanbul-lib-coverage@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.0.tgz#caca19decaef3525b5d6331d701f3f3b7ad48528"

istanbul-lib-hook@^1.0.0-alpha.4:
version "1.0.0"
resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.0.tgz#fc5367ee27f59268e8f060b0c7aaf051d9c425c5"
dependencies:
append-transform "^0.4.0"

istanbul-lib-instrument@^1.1.0-alpha.3, istanbul-lib-instrument@^1.6.2:
istanbul-lib-instrument@^1.1.0-alpha.3:
version "1.7.0"
resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.0.tgz#b8e0dc25709bb44e17336ab47b7bb5c97c23f659"
dependencies:
Expand All @@ -4949,6 +4953,18 @@ istanbul-lib-instrument@^1.1.0-alpha.3, istanbul-lib-instrument@^1.6.2:
istanbul-lib-coverage "^1.0.2"
semver "^5.3.0"

istanbul-lib-instrument@^1.7.1:
version "1.7.1"
resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.1.tgz#169e31bc62c778851a99439dd99c3cc12184d360"
dependencies:
babel-generator "^6.18.0"
babel-template "^6.16.0"
babel-traverse "^6.18.0"
babel-types "^6.18.0"
babylon "^6.13.0"
istanbul-lib-coverage "^1.1.0"
semver "^5.3.0"

istanbul-lib-report@^1.0.0-alpha.3:
version "1.0.0-alpha.3"
resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.0.0-alpha.3.tgz#32d5f6ec7f33ca3a602209e278b2e6ff143498af"
Expand Down Expand Up @@ -8242,9 +8258,9 @@ test-exclude@^1.1.0:
read-pkg-up "^1.0.1"
require-main-filename "^1.0.1"

test-exclude@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.0.3.tgz#86a13ce3effcc60e6c90403cf31a27a60ac6c4e7"
test-exclude@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.0.tgz#04ca70b7390dd38c98d4a003a173806ca7991c91"
dependencies:
arrify "^1.0.1"
micromatch "^2.3.11"
Expand Down

0 comments on commit 3506bbf

Please sign in to comment.