@thecb/components 5.0.0-beta.7 → 5.0.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.
- package/dist/index.cjs.js +548 -396
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.esm.js +41581 -0
- package/dist/index.esm.js.map +1 -0
- package/package.json +8 -4
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/molecules/.DS_Store +0 -0
- package/src/components/molecules/modal/Modal.js +1 -1
- package/src/components/molecules/payment-form-card/PaymentFormCard.state.js +1 -1
- package/src/deprecated/.DS_Store +0 -0
- package/src/deprecated/utility/__tests__/safeConcat.spec.js +30 -28
- package/src/deprecated/utility/__tests__/validateKeyType.spec.js +65 -49
- package/src/deprecated/utility/index.js +2 -2
- package/src/deprecated/utility/safeConcat.js +3 -3
- package/src/deprecated/utility/validateKeyType.js +4 -6
- package/.eslintrc.json +0 -29
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -18
- package/.github/stale.yml +0 -17
- package/.github/workflows/bump-version.yml +0 -30
- package/.github/workflows/create-release/build-body.sh +0 -35
- package/.github/workflows/create-release.yml +0 -52
- package/.github/workflows/disabled-workflows/publish-update.yml +0 -73
- package/.prettierignore +0 -3
- package/.storybook/main.js +0 -4
- package/.storybook/page.js +0 -64
- package/.storybook/themes/apc.theme.js +0 -1
- package/.storybook/themes/index.js +0 -2
- package/.storybook/themes/sf.theme.js +0 -1
- package/.tool-versions +0 -1
- package/rollup.config.js +0 -53
package/.storybook/main.js
DELETED
package/.storybook/page.js
DELETED
|
@@ -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 +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
|
-
}));
|