@thecb/components 3.1.1 → 3.1.10

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 (102) hide show
  1. package/.storybook/main.js +4 -0
  2. package/.storybook/page.js +62 -0
  3. package/.storybook/themes/apc.theme.js +1 -0
  4. package/.storybook/themes/index.js +2 -0
  5. package/.storybook/themes/sf.theme.js +1 -0
  6. package/.tool-versions +1 -0
  7. package/dist/index.cjs.js +539 -13398
  8. package/package.json +14 -6
  9. package/rollup.config.js +0 -2
  10. package/src/components/atoms/alert/Alert.stories.js +28 -0
  11. package/src/components/atoms/amount-callout/AmountCallout.stories.js +41 -0
  12. package/src/components/atoms/amount-callout/AmountCallout.theme.js +4 -4
  13. package/src/components/atoms/breadcrumb/Breadcrumb.js +7 -0
  14. package/src/components/atoms/breadcrumb/Breadcrumb.stories.js +38 -0
  15. package/src/components/atoms/breadcrumb/Breadcrumb.theme.js +3 -1
  16. package/src/components/atoms/button-with-action/ButtonWithAction.stories.js +31 -122
  17. package/src/components/atoms/button-with-action/ButtonWithAction.theme.js +20 -7
  18. package/src/components/atoms/button-with-link/ButtonWithLink.js +17 -3
  19. package/src/components/atoms/button-with-link/ButtonWithLink.stories.js +32 -0
  20. package/src/components/atoms/checkbox/Checkbox.stories.js +29 -0
  21. package/src/components/atoms/checkbox-list/CheckboxList.stories.js +50 -0
  22. package/src/components/atoms/country-dropdown/CountryDropdown.stories.js +42 -0
  23. package/src/components/atoms/display-box/DisplayBox.stories.js +25 -0
  24. package/src/components/atoms/display-card/DisplayCard.js +2 -0
  25. package/src/components/atoms/display-card/DisplayCard.stories.js +24 -0
  26. package/src/components/atoms/dropdown/Dropdown.js +3 -6
  27. package/src/components/atoms/dropdown/Dropdown.stories.js +70 -0
  28. package/src/components/atoms/form-layouts/FormLayouts.stories.js +72 -0
  29. package/src/components/atoms/form-select/FormSelect.stories.js +44 -0
  30. package/src/components/atoms/formatted-address/FormattedAddress.js +1 -3
  31. package/src/components/atoms/formatted-address/FormattedAddress.stories.js +32 -0
  32. package/src/components/atoms/hamburger-button/HamburgerButton.js +7 -1
  33. package/src/components/atoms/hamburger-button/HamburgerButton.stories.js +21 -0
  34. package/src/components/atoms/heading/Heading.stories.js +20 -0
  35. package/src/components/atoms/icons/icons.stories.js +50 -0
  36. package/src/components/atoms/labeled-amount/LabeledAmount.js +1 -1
  37. package/src/components/atoms/labeled-amount/LabeledAmount.stories.js +29 -0
  38. package/src/components/atoms/layouts/Cluster.js +2 -0
  39. package/src/components/atoms/layouts/Cluster.styled.js +1 -1
  40. package/src/components/atoms/layouts/examples/ResizingContainer.js +3 -1
  41. package/src/components/atoms/layouts/examples/ResizingContainer.styled.js +1 -1
  42. package/src/components/atoms/layouts/examples/box-example/BoxExample.stories.js +58 -0
  43. package/src/components/atoms/layouts/examples/center-example/CenterExample.stories.js +28 -0
  44. package/src/components/atoms/layouts/examples/cover-example/CoverExample.stories.js +53 -0
  45. package/src/components/atoms/layouts/examples/frame-example/FrameExample.stories.js +22 -0
  46. package/src/components/atoms/layouts/examples/imposter-example/ImposterExample.stories.js +35 -0
  47. package/src/components/atoms/layouts/examples/motion-example/MotionExample.stories.js +62 -0
  48. package/src/components/atoms/layouts/examples/reel-example/ReelExample.stories.js +57 -0
  49. package/src/components/atoms/line-item/LineItem.js +2 -2
  50. package/src/components/atoms/line-item/LineItem.stories.js +19 -0
  51. package/src/components/atoms/link/ExternalLink.js +1 -3
  52. package/src/components/atoms/link/ExternalLink.styled.js +2 -2
  53. package/src/components/atoms/link/InternalLink.styled.js +5 -4
  54. package/src/components/atoms/link/Link.stories.js +57 -0
  55. package/src/components/atoms/link/Link.theme.js +3 -2
  56. package/src/components/atoms/nav-footer/NavFooter.stories.js +31 -0
  57. package/src/components/atoms/nav-header/NavHeader.stories.js +29 -0
  58. package/src/components/atoms/paragraph/Paragraph.stories.js +34 -0
  59. package/src/components/atoms/paragraph/Paragraph.theme.js +6 -2
  60. package/src/components/atoms/password-requirements/PasswordRequirements.stories.js +75 -0
  61. package/src/components/atoms/placeholder/Placeholder.js +16 -16
  62. package/src/components/atoms/placeholder/Placeholder.stories.js +38 -0
  63. package/src/components/atoms/processing-fee/ProcessingFee.stories.js +28 -0
  64. package/src/components/atoms/radio-button/RadioButton.stories.js +69 -0
  65. package/src/components/atoms/solid-divider/SolidDivider.stories.js +11 -0
  66. package/src/components/atoms/spinner/Spinner.stories.js +17 -0
  67. package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.stories.js +52 -0
  68. package/src/components/atoms/text/Text.stories.js +34 -0
  69. package/src/components/atoms/text/Text.theme.js +6 -2
  70. package/src/components/atoms/toggle-switch/ToggleSwitch.js +1 -1
  71. package/src/components/atoms/toggle-switch/ToggleSwitch.stories.js +70 -0
  72. package/src/components/molecules/address-form/AddressForm.stories.js +21 -0
  73. package/src/components/molecules/change-password-form/ChangePasswordForm.stories.js +22 -0
  74. package/src/components/molecules/collapsible-section/CollapsibleSection.js +2 -1
  75. package/src/components/molecules/collapsible-section/CollapsibleSection.stories.js +68 -0
  76. package/src/components/molecules/edit-name-form/EdidNameForm.stories.js +24 -0
  77. package/src/components/molecules/email-form/EmailForm.stories.js +24 -0
  78. package/src/components/molecules/forgot-password-form/ForgotPasswordForm.stories.js +24 -0
  79. package/src/components/molecules/highlight-tab-row/HighlightTabRow.js +8 -3
  80. package/src/components/molecules/highlight-tab-row/HighlightTabRow.stories.js +30 -0
  81. package/src/components/molecules/highlight-tab-row/index.js +1 -6
  82. package/src/components/molecules/login-form/LoginForm.stories.js +24 -0
  83. package/src/components/molecules/modal/Modal.stories.js +44 -0
  84. package/src/components/molecules/module/Module.js +6 -2
  85. package/src/components/molecules/module/Module.stories.js +31 -0
  86. package/src/components/molecules/module/index.js +1 -6
  87. package/src/components/molecules/obligation/Obligation.js +1 -1
  88. package/src/components/molecules/obligation/modules/AmountModule.js +6 -2
  89. package/src/components/molecules/payment-button-bar/PaymentButtonBar.stories.js +20 -0
  90. package/src/components/molecules/payment-details/PaymentDetails.stories.js +71 -0
  91. package/src/components/molecules/payment-form-card/PaymentFormCard.js +0 -16
  92. package/src/components/molecules/phone-form/PhoneForm.stories.js +24 -0
  93. package/src/components/molecules/radio-section/RadioSection.stories.js +31 -0
  94. package/src/components/molecules/registration-form/RegistrationForm.stories.js +24 -0
  95. package/src/components/molecules/reset-confirmation-form/ResetConfirmationForm.stories.js +11 -0
  96. package/src/components/molecules/reset-password-form/ResetPasswordForm.stories.js +24 -0
  97. package/src/components/molecules/reset-password-success/ResetPasswordSuccess.stories.js +11 -0
  98. package/src/components/molecules/tab-sidebar/TabSidebar.js +2 -1
  99. package/src/components/molecules/tab-sidebar/TabSidebar.stories.js +59 -0
  100. package/src/components/molecules/terms-and-conditions/TermsAndConditions.stories.js +24 -0
  101. package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.stories.js +31 -0
  102. package/src/components/molecules/workflow-tile/WorkflowTile.stories.js +25 -0
@@ -0,0 +1,4 @@
1
+ module.exports = {
2
+ stories: ['../src/**/*.stories.[tj]s'],
3
+ addons: ['@storybook/addon-knobs/register']
4
+ };
@@ -0,0 +1,62 @@
1
+ import React from "react"
2
+ import { ThemeProvider } from "styled-components"
3
+ import { withKnobs, select, radios, text } from "@storybook/addon-knobs";
4
+ import { Provider } from 'react-redux';
5
+ import { createStore } from "redux";
6
+ import { Router } from "react-router-dom";
7
+ import { createBrowserHistory } from "history";
8
+
9
+ import ResizingContainer from "../src/components/atoms/layouts/examples/ResizingContainer";
10
+ import { SFTheme, APCTheme } from "./themes";
11
+
12
+ const themesLabel = "Theme";
13
+ const themes = {
14
+ SF: SFTheme,
15
+ APC: APCTheme,
16
+ None: {},
17
+ };
18
+ const defaultValue = SFTheme;
19
+ const groupId = "Theme";
20
+
21
+ const animateLabel = "Animate";
22
+ const animateOptions = {
23
+ play: "play",
24
+ pause: "pause"
25
+ };
26
+ const animateDefaultValue = "pause";
27
+ const animateGroupID = "Container";
28
+
29
+ const themeDecorator = storyFn => (
30
+ <ThemeProvider theme={select(themesLabel, themes, defaultValue, groupId)}>{storyFn()}</ThemeProvider>
31
+ )
32
+
33
+ export default ({ title, Component, height, reducer = () => { }, containerMax = "40rem", containerMin = "20rem" }) => {
34
+ const history = createBrowserHistory();
35
+ const store =createStore(
36
+ reducer,
37
+ window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
38
+ )
39
+ return {
40
+ title,
41
+ component: Component,
42
+ decorators: [
43
+ themeDecorator,
44
+ withKnobs,
45
+ storyFn => (
46
+ <Router history={history} >
47
+ <Provider store={store}>
48
+ <div style={{ height: "max-content", display: "flex", justifyContent: "center", flexDirection: "column" }}>
49
+ <ResizingContainer
50
+ height={height}
51
+ animate={radios(animateLabel, animateOptions, animateDefaultValue, animateGroupID)}
52
+ containerMax={text("Container Max", containerMax, animateGroupID)}
53
+ containerMin={text("Container Min", containerMin, animateGroupID)}>
54
+ {storyFn()}
55
+ </ResizingContainer >
56
+ </div>
57
+ </Provider>
58
+ </Router>
59
+ )
60
+ ]
61
+ }
62
+ };
@@ -0,0 +1 @@
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"}}
@@ -0,0 +1,2 @@
1
+ export { SFTheme } from "./sf.theme"
2
+ export { APCTheme } from "./apc.theme"
@@ -0,0 +1 @@
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 ADDED
@@ -0,0 +1 @@
1
+ nodejs 10.13.0