@thecb/components 5.0.0-beta.8 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/index.cjs.js +595 -397
  2. package/dist/index.cjs.js.map +1 -0
  3. package/dist/index.esm.js +41626 -0
  4. package/dist/index.esm.js.map +1 -0
  5. package/package.json +7 -3
  6. package/src/.DS_Store +0 -0
  7. package/src/components/.DS_Store +0 -0
  8. package/src/components/atoms/icons/CashIcon.js +21 -0
  9. package/src/components/atoms/icons/index.js +3 -1
  10. package/src/components/molecules/.DS_Store +0 -0
  11. package/src/components/molecules/modal/Modal.js +1 -1
  12. package/src/components/molecules/payment-form-card/PaymentFormCard.js +1 -0
  13. package/src/components/molecules/payment-form-card/PaymentFormCard.state.js +4 -2
  14. package/src/deprecated/.DS_Store +0 -0
  15. package/src/deprecated/utility/__tests__/safeConcat.spec.js +30 -28
  16. package/src/deprecated/utility/__tests__/validateKeyType.spec.js +65 -49
  17. package/src/deprecated/utility/index.js +2 -2
  18. package/src/deprecated/utility/safeConcat.js +3 -3
  19. package/src/deprecated/utility/validateKeyType.js +4 -6
  20. package/.eslintrc.json +0 -34
  21. package/.github/PULL_REQUEST_TEMPLATE.md +0 -18
  22. package/.github/stale.yml +0 -17
  23. package/.github/workflows/bump-version.yml +0 -30
  24. package/.github/workflows/create-release/build-body.sh +0 -35
  25. package/.github/workflows/create-release.yml +0 -52
  26. package/.github/workflows/disabled-workflows/publish-update.yml +0 -73
  27. package/.prettierignore +0 -3
  28. package/.storybook/main.js +0 -4
  29. package/.storybook/page.js +0 -64
  30. package/.storybook/themes/apc.theme.js +0 -1
  31. package/.storybook/themes/index.js +0 -2
  32. package/.storybook/themes/sf.theme.js +0 -1
  33. package/.tool-versions +0 -1
  34. package/rollup.config.js +0 -53
@@ -1,73 +0,0 @@
1
- name: Publish and Update
2
-
3
- on:
4
- release:
5
- types: [published]
6
-
7
- jobs:
8
- build:
9
- name: Build
10
- runs-on: ubuntu-latest
11
-
12
- steps:
13
- - name: Checkout repository
14
- uses: actions/checkout@v2
15
- with:
16
- ref: master
17
-
18
- - name: Set up Node.js
19
- uses: actions/setup-node@v1.2.0
20
- with:
21
- node-version: "10.x"
22
-
23
- - name: Install dependencies
24
- run: yarn install --silent
25
-
26
- - name: Compile build
27
- run: yarn build --silent
28
-
29
- - name: Commit changes
30
- uses: EndBug/add-and-commit@v2.1.0
31
- with:
32
- author_name: CB Feeps
33
- author_email: feeps@thecitybase.com
34
- message: "[auto] Update dist"
35
- path: dist
36
- pattern: "*.*"
37
- force: true
38
- ref: deploy
39
- env:
40
- GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
41
-
42
- publish:
43
- name: Publish to NPM Registry
44
- runs-on: ubuntu-latest
45
- needs: build
46
-
47
- steps:
48
- - name: Checkout repository
49
- uses: actions/checkout@v2
50
- with:
51
- ref: deploy
52
-
53
- - name: Set up Node.js for NPM
54
- if: steps.check.outputs.changed == 'true'
55
- uses: actions/setup-node@v1.2.0
56
- with:
57
- node-version: "10.x"
58
- registry-url: "https://registry.npmjs.org"
59
- scope: "@thecb"
60
-
61
- - name: Install dependencies
62
- if: steps.check.outputs.changed == 'true'
63
- run: yarn install
64
-
65
- - name: Create build
66
- if: steps.check.outputs.changed == 'true'
67
- run: yarn build
68
-
69
- - name: Publish package to NPM
70
- if: steps.check.outputs.changed == 'true'
71
- run: yarn publish
72
- env:
73
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/.prettierignore DELETED
@@ -1,3 +0,0 @@
1
- node_modules/
2
- dist/
3
- .storybook/
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- stories: ['../src/**/*.stories.[tj]s'],
3
- addons: ['@storybook/addon-knobs/register', '@storybook/addon-a11y']
4
- };
@@ -1,64 +0,0 @@
1
- import React from "react"
2
- import { ThemeProvider } from "styled-components"
3
- import { withKnobs, select, radios, text } from "@storybook/addon-knobs";
4
- import { withA11y } from "@storybook/addon-a11y";
5
- import { Provider } from 'react-redux';
6
- import { createStore } from "redux";
7
- import { Router } from "react-router-dom";
8
- import { createBrowserHistory } from "history";
9
-
10
- import ResizingContainer from "../src/components/atoms/layouts/examples/ResizingContainer";
11
- import { SFTheme, APCTheme } from "./themes";
12
-
13
- const themesLabel = "Theme";
14
- const themes = {
15
- SF: SFTheme,
16
- APC: APCTheme,
17
- None: {},
18
- };
19
- const defaultValue = SFTheme;
20
- const groupId = "Theme";
21
-
22
- const animateLabel = "Animate";
23
- const animateOptions = {
24
- play: "play",
25
- pause: "pause"
26
- };
27
- const animateDefaultValue = "pause";
28
- const animateGroupID = "Container";
29
-
30
- const themeDecorator = storyFn => (
31
- <ThemeProvider theme={select(themesLabel, themes, defaultValue, groupId)}>{storyFn()}</ThemeProvider>
32
- )
33
-
34
- export default ({ title, Component, height, reducer = () => { }, containerMax = "40rem", containerMin = "20rem" }) => {
35
- const history = createBrowserHistory();
36
- const store =createStore(
37
- reducer,
38
- window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
39
- )
40
- return {
41
- title,
42
- component: Component,
43
- decorators: [
44
- themeDecorator,
45
- withKnobs,
46
- withA11y,
47
- storyFn => (
48
- <Router history={history} >
49
- <Provider store={store}>
50
- <div style={{ height: "max-content", display: "flex", justifyContent: "center", flexDirection: "column" }}>
51
- <ResizingContainer
52
- height={height}
53
- animate={radios(animateLabel, animateOptions, animateDefaultValue, animateGroupID)}
54
- containerMax={text("Container Max", containerMax, animateGroupID)}
55
- containerMin={text("Container Min", containerMin, animateGroupID)}>
56
- {storyFn()}
57
- </ResizingContainer >
58
- </div>
59
- </Provider>
60
- </Router>
61
- )
62
- ]
63
- }
64
- };
@@ -1 +0,0 @@
1
- export const APCTheme = {values: {"Button":{"active":{"primary":"background-color: #C8171E; border: 2px solid #C8171E; box-shadow: 0 0 10px #E30100;","secondary":"background-color: #F58D91; color: #FF0000; box-shadow: 0 0 10px #FF0000","smallPrimary":"background-color: #C8171E; border: 2px solid #C8171E; box-shadow: 0 0 10px #E30100","smallSecondary":"background-color: #F58D91; color: #FF0000; box-shadow: 0 0 10px #FF0000"},"backgroundColor":{"primary":"#EC1C24","secondary":"#F6F6F9","smallPrimary":"#EC1C24","smallSecondary":"#F6F6F9"},"border":{"primary":"2px solid #EC1C24;","secondary":"2px solid #EC1C24;","smallPrimary":"2px solid %#EC1C24;","smallSecondary":"2px solid #EC1C24;"},"color":{"primary":"#F6F6F9","secondary":"#EC1C24","smallPrimary":"#F6F6F9","smallSecondary":"#EC1C24"},"focus":{"primary":"outline: none; background-color: #C8171E; border: 2px solid #C8171E; box-shadow: 0 0 10px #E30100","secondary":"outline: none; background-color: #F58D91; color: #FF0000; box-shadow: 0 0 10px #FF0000;","smallPrimary":"outline: none; background-color: #C8171E; border: 2px solid #C8171E; box-shadow: 0 0 10px #E30100","smallSecondary":"outline: none; background-color: #F58D91; color: #FF0000; box-shadow: 0 0 10px #FF0000;"},"hover":{"primary":"cursor: pointer; background-color: #E30100; border: 2px solid #E30100; box-shadow: 0 0 10px #E30100;","secondary":"cursor: pointer; background-color: #FBD9D9; box-shadow: 0 0 10px #EC1C24; color: #EC1C24;","smallPrimary":"cursor: pointer; background-color: #E30100; border: 2px solid #E30100; box-shadow: 0 0 10px #E30100;","smallSecondary":"cursor: pointer; background-color: #FBD9D9; box-shadow: 0 0 10px #EC1C24; color: #EC1C24;"}},"Footer":{"backgroundColor":"#56575B"},"Header":{"backgroundColor":"#FFFFFF"},"HighlightTabRow":{"backgroundColor":"#215B9E"},"linkColor":"#15749D","logo":"logo.png","primaryColor":"#3B414D","secondaryColor":"#E5E7EC","textColor":"#000000"}}
@@ -1,2 +0,0 @@
1
- export { SFTheme } from "./sf.theme"
2
- export { APCTheme } from "./apc.theme"
@@ -1 +0,0 @@
1
- export const SFTheme = {values: {"AmountCallout":{"color":"#347BB2"},"Breadcrumb":{"color":"#347BB2"},"Button":{"active":{"danger":"background-color: #870000; border: 2px solid #870000; box-shadow: 0 0 10px #ED125F;","ghost":"background-color: $(transparent)s; color: #001952; box-shadow: none;","primary":"background-color: #001952; border: 2px solid #001952; box-shadow: 0 0 10px #347BB2","secondary":"background-color: #D8E5F2; box-shadow: 0 0 10px #D8E5F2;","smallGhost":"background-color: $(transparent)s; color: #001952; box-shadow: none;","smallPrimary":"background-color: #001952; border: 2px solid #001952; box-shadow: 0 0 10px #347BB2;","smallSecondary":"background-color: #D8E5F2; box-shadow: 0 0 10px #D8E5F2;"},"backgroundColor":{"danger":"#ED125F","ghost":"transparent","primary":"#347BB2","secondary":"transparent","smallGhost":"transparent","smallPrimary":"#347BB2","smallSecondary":"transparent"},"border":{"danger":"2px solid #ED125F;","ghost":"none","primary":"2px solid #347BB2;","secondary":"2px solid #347BB2;","smallGhost":"none","smallPrimary":"2px solid #347BB2;","smallSecondary":"2px solid #347BB2;"},"color":{"danger":"#FFFFFF","ghost":"#347BB2","primary":"#FFFFFF","secondary":"#347BB2","smallGhost":"#347BB2","smallPrimary":"#FFFFFF","smallSecondary":"#347BB2"},"disabled":{"danger":"background-color: #6E727E; border: 2px solid #6E727E; &:focus { box-shadow: 0 0 10px #6E727E; }","ghost":"color: #6E727E; border: none","primary":"background-color: #6E727E; border: 2px solid #6E727E; &:focus { box-shadow: 0 0 10px #6E727E; }","secondary":"background-color: #6E727E; border: 2px solid #6E727E; &:focus { box-shadow: 0 0 10px #6E727E; }","smallGhost":"color: #6E727E; border: none;","smallPrimary":"background-color: #6E727E; border: 2px solid #6E727E; &:focus { box-shadow: 0 0 10px #6E727E; }","smallSecondary":"background-color: #6E727E; border: 2px solid #6E727E; &:focus { box-shadow: 0 0 10px #6E727E; }"},"focus":{"danger":"outline: none; background-color: #BA002C; border: 2px solid #BA002C; box-shadow: 0 0 10px #ED125F","ghost":"outline: none; box-shadow: none; color: #024C85;","primary":"outline: none; background-color: #024C85; border: 2px solid #024C85; box-shadow: 0 0 10px #347BB2","secondary":"outline: none; background-color: #EAF2F8; box-shadow: 0 0 10px #EAF2F8;","smallGhost":"outline: none; box-shadow: none; color: #024C85;","smallPrimary":"outline: none; background-color: #024C85; border: 2px solid #024C85; box-shadow: 0 0 10px #347BB2","smallSecondary":"outline: none; background-color: #EAF2F8; box-shadow: 0 0 10px #EAF2F8;"},"hover":{"danger":"background-color: #BA002C; border: 2px solid #BA002C; box-shadow: 0 0 10px #ED125F;","ghost":"cursor: pointer; color: #024C85;","primary":"cursor: pointer; background-color: #024C85; border: 2px solid #024C85; box-shadow: 0 0 10px #347BB2","secondary":"cursor: pointer; background-color: #EAF2F8; box-shadow: 0 0 10px #EAF2F8;","smallGhost":"cursor: pointer; color: #024C85;","smallPrimary":"cursor: pointer; background-color: #024C85; border: 2px solid #024C85; box-shadow: 0 0 10px #347BB2","smallSecondary":"cursor: pointer; background-color: #EAF2F8; box-shadow: 0 0 10px #EAF2F8;"}},"Checkbox":{"boxShadow":{"default":"0 0 0 3px #D8E5F2;"},"checkedStyles":{"default":"background: #347BB2; border: 1px solid #347BB2;"}},"Dropdown":{"hoverColor":"#EFFAFF","selectedColor":"#347BB2"},"Footer":{"backgroundColor":"#182848","logoHeight":"52px","subfooterColor":"#347BB2"},"FormInput":{"hoverFocusStyles":{"default":"outline: none; text-decoration: underline; color: #024C85;"},"linkColor":{"default":"#347BB2"}},"Global":{"baseFontSize":"16px","baseMobileFontSize":"14px","pageBackground":"#F6F6F9"},"Header":{"backgroundColor":"#347BB2"},"Icons":{"accentColor":{"error":"#3B414D","info":"#3B414D","success":"#3B414D"},"primaryColor":{"error":"#FFFFFF","info":"#FFFFFF","success":"#FFFFFF"},"singleIconColor":{"darkMode":"#FFFFFF","primary":"#347BB2","secondary":"#3B414D"},"subIconColor":{"error":"#ED125F","info":"#347BB2","success":"#317D4F"}},"ModalLink":{"linkColor":"#347BB2"},"NavMenu":{"backgroundColor":"#347BB2"},"ProfileTab":{"activeTabAccent":"#347BB2","activeTabBackground":"#FFFFFF","activeTabHover":"#D8E5F2"},"RadioButton":{"activeColor":"#347BB2"},"Spinner":{"color":"#347BB2"},"ToggleSwitch":{"onBackground":"#347BB2"},"Workflow":{"accentColor":"#214566","fontFamily":"Open Sans, sans-serif","linkColor":"#214566","primaryButtonColor":"#347BB2","secondaryButtonColor":"#347BB2","textColor":"#091325","workflowFooterColor":"#182848","workflowHeaderColor":"#347BB2"},"linkColor":"#15749D","logo":"logo.png","primaryColor":"#3B414D","secondaryColor":"#E5E7EC","textColor":"#000000"}}
package/.tool-versions DELETED
@@ -1 +0,0 @@
1
- nodejs 15.8.0
package/rollup.config.js DELETED
@@ -1,53 +0,0 @@
1
- import resolve from "rollup-plugin-node-resolve";
2
- import commonjs from "rollup-plugin-commonjs";
3
- import babel from "rollup-plugin-babel";
4
- import json from "rollup-plugin-json";
5
- import visualizer from "rollup-plugin-visualizer";
6
- import pkg from "./package.json";
7
-
8
- import * as formattedInput from "formatted-input";
9
-
10
- const globals = {
11
- react: "React",
12
- "react-dom": "ReactDOM"
13
- };
14
-
15
- const plugins = [
16
- resolve({ preferBuiltins: false }),
17
- babel({
18
- exclude: "node_modules/**",
19
- presets: ["@babel/env", "@babel/preset-react"]
20
- }),
21
- json(),
22
- commonjs({
23
- include: "node_modules/**",
24
- namedExports: {
25
- "formatted-input": Object.keys(formattedInput)
26
- }
27
- }),
28
- visualizer()
29
- ];
30
-
31
- const external = [...Object.keys(pkg.peerDependencies || {})];
32
-
33
- const output_data = [
34
- {
35
- file: pkg.main,
36
- format: "cjs"
37
- },
38
- {
39
- file: pkg.module,
40
- format: "esm"
41
- }
42
- ];
43
-
44
- export default output_data.map(({ file, format }) => ({
45
- input: "src/index.js",
46
- output: {
47
- file,
48
- format,
49
- globals
50
- },
51
- plugins,
52
- external
53
- }));