@thecb/components 10.12.6 → 11.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/README.md +14 -6
- package/dist/index.cjs.js +1309 -1481
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1309 -1482
- package/dist/index.esm.js.map +1 -1
- package/package.json +25 -13
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/alert/Alert.mdx +19 -0
- package/src/components/atoms/alert/Alert.stories.js +148 -26
- package/src/components/atoms/badge/Badge.js +2 -2
- package/src/components/atoms/badge/Badge.mdx +27 -0
- package/src/components/atoms/badge/Badge.stories.js +143 -29
- package/src/components/atoms/breadcrumb/Breadcrumb.mdx +21 -0
- package/src/components/atoms/breadcrumb/Breadcrumb.stories.js +38 -29
- package/src/components/atoms/button-with-action/ButtonWithAction.stories.js +108 -55
- package/src/components/atoms/button-with-link/ButtonWithLink.mdx +21 -0
- package/src/components/atoms/button-with-link/ButtonWithLink.stories.js +160 -31
- package/src/components/atoms/card/Card.mdx +41 -0
- package/src/components/atoms/card/Card.stories.js +351 -0
- package/src/components/atoms/checkbox/Checkbox.mdx +15 -0
- package/src/components/atoms/checkbox/Checkbox.oldstories.js +34 -0
- package/src/components/atoms/checkbox/Checkbox.stories.js +140 -25
- package/src/components/atoms/country-dropdown/CountryDropdown.mdx +36 -0
- package/src/components/atoms/country-dropdown/CountryDropdown.stories.js +61 -27
- package/src/components/atoms/detail/Detail.js +0 -26
- package/src/components/atoms/detail/Detail.mdx +32 -0
- package/src/components/atoms/detail/Detail.stories.js +156 -0
- package/src/components/atoms/display-box/DisplayBox.mdx +11 -0
- package/src/components/atoms/display-box/DisplayBox.stories.js +65 -21
- package/src/components/atoms/display-card/DisplayCard.mdx +13 -0
- package/src/components/atoms/display-card/DisplayCard.stories.js +163 -22
- package/src/components/atoms/dropdown/Dropdown.mdx +65 -0
- package/src/components/atoms/dropdown/Dropdown.stories.js +91 -10
- package/src/components/atoms/form-layouts/FormInput.mdx +38 -0
- package/src/components/atoms/form-layouts/FormInput.stories.js +212 -26
- package/src/components/atoms/form-select/FormSelect.mdx +42 -0
- package/src/components/atoms/form-select/FormSelect.stories.js +55 -29
- package/src/components/atoms/formatted-address/FormattedAddress.mdx +13 -0
- package/src/components/atoms/formatted-address/FormattedAddress.stories.js +133 -27
- package/src/components/atoms/formatted-bank-account/FormattedBankAccount.mdx +17 -0
- package/src/components/atoms/formatted-bank-account/FormattedBankAccount.stories.js +57 -0
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.mdx +40 -0
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.stories.js +74 -0
- package/src/components/atoms/icons/Icons.mdx +40 -0
- package/src/components/atoms/icons/Icons.stories.js +325 -0
- package/src/components/atoms/labeled-amount/LabeledAmount.mdx +23 -0
- package/src/components/atoms/labeled-amount/LabeledAmount.stories.js +110 -34
- package/src/components/atoms/line-item/LineItem.mdx +28 -0
- package/src/components/atoms/line-item/LineItem.stories.js +89 -22
- package/src/components/atoms/link/Link.mdx +19 -0
- package/src/components/atoms/link/Link.stories.js +155 -49
- package/src/components/atoms/loading/Loading.mdx +13 -0
- package/src/components/atoms/loading/Loading.stories.js +22 -0
- package/src/components/atoms/loading-line/LoadingLine.js +14 -10
- package/src/components/atoms/loading-line/LoadingLine.mdx +15 -0
- package/src/components/atoms/loading-line/LoadingLine.stories.js +132 -28
- package/src/components/atoms/nav-footer/.DS_Store +0 -0
- package/src/components/atoms/nav-footer/NavFooter.mdx +15 -0
- package/src/components/atoms/nav-footer/NavFooter.stories.js +235 -22
- package/src/components/atoms/nav-header/NavHeader.mdx +13 -0
- package/src/components/atoms/nav-header/NavHeader.stories.js +122 -21
- package/src/components/atoms/nav-tabs/NavTabs.mdx +30 -0
- package/src/components/atoms/nav-tabs/NavTabs.stories.js +49 -0
- package/src/components/atoms/password-requirements/PasswordRequirements.mdx +39 -0
- package/src/components/atoms/password-requirements/PasswordRequirements.stories.js +108 -44
- package/src/components/atoms/placeholder/Placeholder.mdx +19 -0
- package/src/components/atoms/placeholder/Placeholder.stories.js +164 -36
- package/src/components/atoms/searchable-select/SearchableSelect.mdx +44 -0
- package/src/components/atoms/searchable-select/SearchableSelect.stories.js +103 -28
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.mdx +36 -0
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.stories.js +65 -40
- package/src/components/atoms/table/Table.mdx +71 -0
- package/src/components/atoms/table/Table.oldstories.js +84 -0
- package/src/components/atoms/table/Table.stories.js +59 -75
- package/src/components/atoms/table/TableRow.js +1 -0
- package/src/components/atoms/title/Title.js +0 -23
- package/src/components/atoms/title/Title.mdx +26 -0
- package/src/components/atoms/title/Title.stories.js +144 -0
- package/src/components/atoms/toggle-switch/ToggleSwitch.mdx +17 -0
- package/src/components/atoms/toggle-switch/ToggleSwitch.stories.js +103 -20
- package/src/components/atoms/toggle-switch/ToggleSwitch.theme.js +8 -5
- package/src/components/atoms/typeahead-input/TypeaheadInput.mdx +13 -0
- package/src/components/atoms/typeahead-input/TypeaheadInput.stories.js +63 -0
- package/src/components/molecules/.DS_Store +0 -0
- package/src/components/molecules/address-form/AddressForm.mdx +18 -0
- package/src/components/molecules/address-form/AddressForm.stories.js +223 -20
- package/src/components/molecules/banner/Banner.mdx +23 -0
- package/src/components/molecules/banner/Banner.stories.js +122 -26
- package/src/components/molecules/change-password-form/ChangePasswordForm.mdx +15 -0
- package/src/components/molecules/change-password-form/ChangePasswordForm.stories.js +203 -19
- package/src/components/molecules/collapsible-section/CollapsibleSection.mdx +15 -0
- package/src/components/molecules/collapsible-section/CollapsibleSection.stories.js +210 -61
- package/src/components/molecules/edit-name-form/EditNameForm.mdx +13 -0
- package/src/components/molecules/edit-name-form/EditNameForm.stories.js +117 -0
- package/src/components/molecules/idle-modal/IdleModal.js +101 -0
- package/src/components/molecules/idle-modal/IdleModal.mdx +17 -0
- package/src/components/molecules/idle-modal/IdleModal.stories.js +180 -0
- package/src/components/molecules/idle-modal/index.d.ts +16 -0
- package/src/components/molecules/idle-modal/index.js +3 -0
- package/src/components/molecules/index.js +1 -0
- package/src/components/molecules/link-card/LinkCard.mdx +17 -0
- package/src/components/molecules/link-card/LinkCard.stories.js +287 -72
- package/src/components/molecules/login-form/LoginForm.mdx +16 -0
- package/src/components/molecules/login-form/LoginForm.stories.js +117 -21
- package/src/components/molecules/modal/Modal.mdx +17 -0
- package/src/components/molecules/modal/Modal.stories.js +342 -128
- package/src/components/molecules/module/Module.mdx +17 -0
- package/src/components/molecules/module/Module.stories.js +267 -25
- package/src/components/molecules/obligation/.DS_Store +0 -0
- package/src/components/molecules/obligation/Obligation.mdx +23 -0
- package/src/components/molecules/obligation/Obligation.stories.js +460 -0
- package/src/components/molecules/obligation/icons/PropertyPersonalIcon.js +1 -1
- package/src/components/molecules/pagination/Pagination.mdx +15 -0
- package/src/components/molecules/pagination/Pagination.stories.js +177 -28
- package/src/components/molecules/popover/Popover.mdx +15 -0
- package/src/components/molecules/popover/Popover.stories.js +220 -0
- package/src/components/molecules/tabs/Tabs.mdx +17 -0
- package/src/components/molecules/tabs/Tabs.stories.js +135 -227
- package/src/components/molecules/toast-notification/Toast.mdx +15 -0
- package/src/components/molecules/toast-notification/Toast.stories.js +183 -0
- package/src/util/idleTimerUtils.js +36 -0
- package/src/util/index.js +3 -1
- package/src/components/molecules/edit-name-form/EdidNameForm.stories.js +0 -24
- package/src/components/molecules/toast-notification/ToastNotification.stories.js +0 -105
- /package/src/components/atoms/add-obligation/{AddObligation.stories.js → AddObligation.oldstories.js} +0 -0
- /package/src/components/atoms/amount-callout/{AmountCallout.stories.js → AmountCallout.oldstories.js} +0 -0
- /package/src/components/atoms/checkbox-list/{CheckboxList.stories.js → CheckboxList.oldstories.js} +0 -0
- /package/src/components/atoms/form-layouts/{FormLayouts.stories.js → FormLayouts.oldstories.js} +0 -0
- /package/src/components/atoms/hamburger-button/{HamburgerButton.stories.js → HamburgerButton.oldstories.js} +0 -0
- /package/src/components/atoms/heading/{Heading.stories.js → Heading.oldstories.js} +0 -0
- /package/src/components/atoms/icons/{icons.stories.js → icons.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/box-example/{BoxExample.stories.js → BoxExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/center-example/{CenterExample.stories.js → CenterExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/cluster-example/{ClusterExample.stories.js → ClusterExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/cover-example/{CoverExample.stories.js → CoverExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/frame-example/{FrameExample.stories.js → FrameExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/grid-example/{GridExample.stories.js → GridExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/imposter-example/{ImposterExample.stories.js → ImposterExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/motion-example/{MotionExample.stories.js → MotionExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/reel-example/{ReelExample.stories.js → ReelExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/sidebar-example/{SidebarExample.stories.js → SidebarExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/stack-example/{StackExample.stories.js → StackExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/switcher-example/{SwitcherExample.stories.js → SwitcherExample.oldstories.js} +0 -0
- /package/src/components/atoms/paragraph/{Paragraph.stories.js → Paragraph.oldstories.js} +0 -0
- /package/src/components/atoms/processing-fee/{ProcessingFee.stories.js → ProcessingFee.oldstories.js} +0 -0
- /package/src/components/atoms/search/{Search.stories.js → Search.oldstories.js} +0 -0
- /package/src/components/atoms/solid-divider/{SolidDivider.stories.js → SolidDivider.oldstories.js} +0 -0
- /package/src/components/atoms/sortable-table-heading/{SortableTableHeading.stories.js → SortableTableHeading.oldstories.js} +0 -0
- /package/src/components/atoms/spinner/{Spinner.stories.js → Spinner.oldstories.js} +0 -0
- /package/src/components/atoms/tab/{Tab.stories.js → Tab.oldstories.js} +0 -0
- /package/src/components/atoms/text/{Text.stories.js → Text.oldstories.js} +0 -0
- /package/src/components/atoms/typeahead-input/{TypeaheadIinput.stories.js → TypeaheadIinput.oldstories.js} +0 -0
- /package/src/components/atoms/wallet-name/{WalletName.stories.js → WalletName.oldstories.js} +0 -0
- /package/src/components/molecules/account-and-routing-modal/{AccountAndRoutingModal.stories.js → AccountAndRoutingModal.oldstories.js} +0 -0
- /package/src/components/molecules/editable-list/{EditableList.stories.js → EditableList.oldstories.js} +0 -0
- /package/src/components/molecules/email-form/{EmailForm.stories.js → EmailForm.oldstories.js} +0 -0
- /package/src/components/molecules/forgot-password-form/{ForgotPasswordForm.stories.js → ForgotPasswordForm.oldstories.js} +0 -0
- /package/src/components/molecules/highlight-tab-row/{HighlightTabRow.stories.js → HighlightTabRow.oldstories.js} +0 -0
- /package/src/components/molecules/multiple-select-filter/{MultipleSelectFilter.stories.js → MultipleSelectFilter.oldstories.js} +0 -0
- /package/src/components/molecules/obligation/modules/{AmountModule.stories.js → AmountModule.oldstories.js} +0 -0
- /package/src/components/molecules/payment-button-bar/{PaymentButtonBar.stories.js → PaymentButtonBar.oldstories.js} +0 -0
- /package/src/components/molecules/payment-details/{PaymentDetails.stories.js → PaymentDetails.oldstories.js} +0 -0
- /package/src/components/molecules/payment-form-ach/{PaymentFormACH.stories.js → PaymentFormACH.oldstories.js} +0 -0
- /package/src/components/molecules/payment-form-card/{PaymentFormCard.stories.js → PaymentFormCard.oldstories.js} +0 -0
- /package/src/components/molecules/periscope-dashboard-iframe/{PeriscopeDashBoardIframe.stories.js → PeriscopeDashBoardIframe.oldstories.js} +0 -0
- /package/src/components/molecules/phone-form/{PhoneForm.stories.js → PhoneForm.oldstories.js} +0 -0
- /package/src/components/molecules/popup-menu/{PopupMenu.stories.js → PopupMenu.oldstories.js} +0 -0
- /package/src/components/molecules/radio-group/{RadioGroup.stories.js → RadioGroup.oldstories.js} +0 -0
- /package/src/components/molecules/radio-section/{RadioSection.stories.js → RadioSection.oldstories.js} +0 -0
- /package/src/components/molecules/registration-form/{RegistrationForm.stories.js → RegistrationForm.oldstories.js} +0 -0
- /package/src/components/molecules/reset-confirmation-form/{ResetConfirmationForm.stories.js → ResetConfirmationForm.oldstories.js} +0 -0
- /package/src/components/molecules/reset-password-form/{ResetPasswordForm.stories.js → ResetPasswordForm.oldstories.js} +0 -0
- /package/src/components/molecules/reset-password-success/{ResetPasswordSuccess.stories.js → ResetPasswordSuccess.oldstories.js} +0 -0
- /package/src/components/molecules/tab-sidebar/{TabSidebar.stories.js → TabSidebar.oldstories.js} +0 -0
- /package/src/components/molecules/terms-and-conditions/{TermsAndConditions.stories.js → TermsAndConditions.oldstories.js} +0 -0
- /package/src/components/molecules/terms-and-conditions-modal/{TermsAndConditionsModal.stories.js → TermsAndConditionsModal.oldstories.js} +0 -0
- /package/src/components/molecules/workflow-tile/{WorkflowTile.stories.js → WorkflowTile.oldstories.js} +0 -0
|
@@ -1,57 +1,163 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { boolean, select, text, number } from "@storybook/addon-knobs";
|
|
3
|
-
import page from "../../../../.storybook/page";
|
|
4
2
|
import InternalLink from "./InternalLink";
|
|
5
3
|
import ExternalLink from "./ExternalLink";
|
|
6
|
-
import {
|
|
7
|
-
FONT_WEIGHT_BOLD,
|
|
8
|
-
FONT_WEIGHT_SEMIBOLD,
|
|
9
|
-
FONT_WEIGHT_REGULAR
|
|
10
|
-
} from "../../../constants/style_constants";
|
|
11
|
-
import * as colors from "../../../constants/colors";
|
|
12
4
|
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
const meta = {
|
|
6
|
+
title: "Atoms/Link",
|
|
7
|
+
component: InternalLink,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: "centered"
|
|
10
|
+
},
|
|
11
|
+
tags: ["!autodocs"],
|
|
12
|
+
args: {
|
|
13
|
+
to: undefined,
|
|
14
|
+
href: undefined,
|
|
15
|
+
size: undefined,
|
|
16
|
+
weight: undefined,
|
|
17
|
+
color: undefined,
|
|
18
|
+
lineHeight: undefined,
|
|
19
|
+
active: undefined,
|
|
20
|
+
fontWeight: undefined,
|
|
21
|
+
fontSize: undefined,
|
|
22
|
+
margin: undefined,
|
|
23
|
+
tabIndex: undefined,
|
|
24
|
+
extraStyles: undefined,
|
|
25
|
+
dataQa: undefined,
|
|
26
|
+
ref: undefined,
|
|
27
|
+
ariaLabel: undefined,
|
|
28
|
+
newTab: false,
|
|
29
|
+
children: undefined
|
|
30
|
+
},
|
|
31
|
+
argTypes: {
|
|
32
|
+
to: {
|
|
33
|
+
description: "The destination for an InternalLink like /activities",
|
|
34
|
+
table: {
|
|
35
|
+
type: { summary: "string" },
|
|
36
|
+
defaultValue: { summary: undefined }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
href: {
|
|
40
|
+
description:
|
|
41
|
+
"The destination for an ExternalLink like www.eunasolutions.com",
|
|
42
|
+
table: {
|
|
43
|
+
type: { summary: "string" },
|
|
44
|
+
defaultValue: { summary: undefined }
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
size: {
|
|
48
|
+
description: "Font size for an ExternalLink",
|
|
49
|
+
table: {
|
|
50
|
+
type: { summary: "string" },
|
|
51
|
+
defaultValue: { summary: undefined }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
weight: {
|
|
55
|
+
description: "Font weight for an ExternalLink",
|
|
56
|
+
table: {
|
|
57
|
+
type: { summary: "string" },
|
|
58
|
+
defaultValue: { summary: undefined }
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
fontWeight: {
|
|
62
|
+
description: "Font weight for an InternalLink",
|
|
63
|
+
table: {
|
|
64
|
+
type: { summary: "string" },
|
|
65
|
+
defaultValue: { summary: undefined }
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
fontSize: {
|
|
69
|
+
description: "Font size for an InternalLink",
|
|
70
|
+
table: {
|
|
71
|
+
type: { summary: "string" },
|
|
72
|
+
defaultValue: { summary: undefined }
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
color: {
|
|
76
|
+
description: "Color value to use for InternalLinks",
|
|
77
|
+
table: {
|
|
78
|
+
type: { summary: "string" },
|
|
79
|
+
defaultValue: { summary: undefined }
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
lineHeight: {
|
|
83
|
+
description: "Line height for a link",
|
|
84
|
+
table: {
|
|
85
|
+
type: { summary: "string" },
|
|
86
|
+
defaultValue: { summary: undefined }
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
active: {
|
|
90
|
+
description: "Whether an InternalLink should use active color styling",
|
|
91
|
+
table: {
|
|
92
|
+
type: { summary: "string" },
|
|
93
|
+
defaultValue: { summary: undefined }
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
margin: {
|
|
97
|
+
description: "Margin to apply to InternalLink element",
|
|
98
|
+
table: {
|
|
99
|
+
type: { summary: "string" },
|
|
100
|
+
defaultValue: { summary: undefined }
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
tabIndex: {
|
|
104
|
+
description: "Override for tab index value for link",
|
|
105
|
+
table: {
|
|
106
|
+
type: { summary: "string" },
|
|
107
|
+
defaultValue: { summary: undefined }
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
extraStyles: {
|
|
111
|
+
description: "Optional extra css styles to apply to link",
|
|
112
|
+
table: {
|
|
113
|
+
type: { summary: "string" },
|
|
114
|
+
defaultValue: { summary: undefined }
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
dataQa: {
|
|
118
|
+
description: "data-qa value to use for E2E testing libraries",
|
|
119
|
+
table: {
|
|
120
|
+
type: { summary: "string" },
|
|
121
|
+
defaultValue: { summary: undefined }
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
ariaLabel: {
|
|
125
|
+
description: "aria-label value for an ExternalLink",
|
|
126
|
+
table: {
|
|
127
|
+
type: { summary: "string" },
|
|
128
|
+
defaultValue: { summary: undefined }
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
newTab: {
|
|
132
|
+
description: "Whether an ExternalLink should open in a new browser tab",
|
|
133
|
+
table: {
|
|
134
|
+
type: { summary: "boolean" },
|
|
135
|
+
defaultValue: { summary: false }
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
17
139
|
};
|
|
18
|
-
const variantsLabel = "variant";
|
|
19
|
-
const variants = {
|
|
20
|
-
primary: "primary",
|
|
21
|
-
secondary: "secondary"
|
|
22
|
-
};
|
|
23
|
-
const defaultValue = "primary";
|
|
24
|
-
const groupId = "props";
|
|
25
140
|
|
|
26
|
-
export
|
|
27
|
-
<InternalLink
|
|
28
|
-
variant={select(variantsLabel, variants, defaultValue, groupId)}
|
|
29
|
-
to={text("to", "https://google.com", "props")}
|
|
30
|
-
extraStyles={text("extraStyles", "text-align: center;", "props")}
|
|
31
|
-
margin={number("margin", 0, { min: 0, max: 99 }, "props")}
|
|
32
|
-
fontWeight={select("fontWeight", fontWeights, 400, "props")}
|
|
33
|
-
color={select("color", colors, "black", "props")}
|
|
34
|
-
>
|
|
35
|
-
Internal Link
|
|
36
|
-
</InternalLink>
|
|
37
|
-
);
|
|
141
|
+
export default meta;
|
|
38
142
|
|
|
39
|
-
export const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
>
|
|
49
|
-
External Link
|
|
50
|
-
</ExternalLink>
|
|
51
|
-
);
|
|
143
|
+
export const StandardInternalLink = {
|
|
144
|
+
render: args => (
|
|
145
|
+
<InternalLink {...args}>Cityville Activities Calendar</InternalLink>
|
|
146
|
+
),
|
|
147
|
+
args: {
|
|
148
|
+
active: false,
|
|
149
|
+
to: "/activities-calendar"
|
|
150
|
+
}
|
|
151
|
+
};
|
|
52
152
|
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
export
|
|
153
|
+
export const StandardExternalLink = {
|
|
154
|
+
render: args => <ExternalLink {...args}>Austin City Hall</ExternalLink>
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export const ActiveInternalLink = {
|
|
158
|
+
render: args => <InternalLink {...args}>Transaction History</InternalLink>,
|
|
159
|
+
args: {
|
|
160
|
+
active: "true",
|
|
161
|
+
to: "/transaction-history"
|
|
162
|
+
}
|
|
163
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import * as LoadingStories from './Loading.stories.js';
|
|
4
|
+
|
|
5
|
+
<Meta of={LoadingStories} />
|
|
6
|
+
|
|
7
|
+
<Title />
|
|
8
|
+
|
|
9
|
+
The Loading component is a small spinner animation that can be used to signal a loading state to a user. The spinner has a fixed size of 100px, and it is themed using the theme values in FCS. For a customizable size version, use the Spinner atom directly.
|
|
10
|
+
|
|
11
|
+
<Story />
|
|
12
|
+
|
|
13
|
+
<Controls />
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import Loading from "./Loading";
|
|
2
|
+
import { Box } from "../layouts";
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Atoms/Loading",
|
|
6
|
+
component: Loading,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "centered",
|
|
9
|
+
controls: { expanded: true }
|
|
10
|
+
},
|
|
11
|
+
tags: ["!autodocs"]
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
|
|
16
|
+
export const Spinner = {
|
|
17
|
+
render: () => (
|
|
18
|
+
<Box>
|
|
19
|
+
<Loading />
|
|
20
|
+
</Box>
|
|
21
|
+
)
|
|
22
|
+
};
|
|
@@ -7,15 +7,19 @@ const LoadingLine = ({
|
|
|
7
7
|
exactWidth = null,
|
|
8
8
|
height = "16px",
|
|
9
9
|
margin = "0px"
|
|
10
|
-
}) =>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
}) => {
|
|
11
|
+
const calculatedWidth = Math.floor(
|
|
12
|
+
Math.random() * (parseInt(maxWidth) - parseInt(minWidth) + 1) +
|
|
13
|
+
parseInt(minWidth)
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<LoadingPill
|
|
18
|
+
margin={margin}
|
|
19
|
+
height={height}
|
|
20
|
+
width={exactWidth || calculatedWidth}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
20
24
|
|
|
21
25
|
export default LoadingLine;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import * as LoadingLineStories from './LoadingLine.stories.js';
|
|
4
|
+
|
|
5
|
+
<Meta of={LoadingLineStories} />
|
|
6
|
+
|
|
7
|
+
<Title />
|
|
8
|
+
|
|
9
|
+
The LoadingLine is a component with a gray ripple animation that can be used in place of an existing component as it renders. The LoadingLine can either be given an exact width and height using pixel strings, or it can be given an maximum and minimum width. If supplied with a maximum and minimum width, the component will have a random width within the range. Width values should be supplied as pixel values _without_ the "px" suffix. All supplied values will be applied as pixels in the component's style function.
|
|
10
|
+
|
|
11
|
+
Using the minimum and maximum width values can be useful to represent a series of items without a fixed width, like text content, list items, or table values.
|
|
12
|
+
|
|
13
|
+
<Story />
|
|
14
|
+
|
|
15
|
+
<Controls />
|
|
@@ -1,28 +1,132 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
1
|
+
import LoadingLine from "./LoadingLine";
|
|
2
|
+
import { Box, Cluster, Stack } from "../layouts";
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Atoms/LoadingLine",
|
|
6
|
+
component: LoadingLine,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "centered",
|
|
9
|
+
controls: { expanded: true }
|
|
10
|
+
},
|
|
11
|
+
tags: ["!autodocs"],
|
|
12
|
+
args: {
|
|
13
|
+
minWidth: undefined,
|
|
14
|
+
maxWidth: undefined,
|
|
15
|
+
exactWidth: undefined,
|
|
16
|
+
height: "16px",
|
|
17
|
+
margin: "0px"
|
|
18
|
+
},
|
|
19
|
+
argTypes: {
|
|
20
|
+
minWidth: {
|
|
21
|
+
description:
|
|
22
|
+
"The minimum width of the loading pill. Value will be appended with px in styles.",
|
|
23
|
+
table: {
|
|
24
|
+
type: { summary: "string or number" },
|
|
25
|
+
defaultValue: { summary: undefined }
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
maxWidth: {
|
|
29
|
+
description:
|
|
30
|
+
"The maximum width of the loading pill. Value will be appended with px in styles.",
|
|
31
|
+
table: {
|
|
32
|
+
type: { summary: "string or number" },
|
|
33
|
+
defaultValue: { summary: undefined }
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
exactWidth: {
|
|
37
|
+
description:
|
|
38
|
+
"Exact width value for the loading pill. Value will be appended with px in styles.",
|
|
39
|
+
table: {
|
|
40
|
+
type: { summary: "string or number" },
|
|
41
|
+
defaultValue: { summary: undefined }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
height: {
|
|
45
|
+
description: "Height of the loading pill",
|
|
46
|
+
table: {
|
|
47
|
+
type: { summary: "string" },
|
|
48
|
+
defaultValue: { summary: "16px" }
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
margin: {
|
|
52
|
+
description: "Margin value around the pill",
|
|
53
|
+
table: {
|
|
54
|
+
type: { summary: "string" },
|
|
55
|
+
defaultValue: { summary: "0px" }
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export default meta;
|
|
62
|
+
|
|
63
|
+
export const BasicLoadingLine = {
|
|
64
|
+
args: {
|
|
65
|
+
minWidth: "350",
|
|
66
|
+
maxWidth: "600",
|
|
67
|
+
height: "20px"
|
|
68
|
+
},
|
|
69
|
+
render: args => (
|
|
70
|
+
<Box minWidth="325px">
|
|
71
|
+
<LoadingLine {...args} />
|
|
72
|
+
</Box>
|
|
73
|
+
)
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export const LoadingLineAsShape = {
|
|
77
|
+
args: {
|
|
78
|
+
exactWidth: "375",
|
|
79
|
+
height: "325px"
|
|
80
|
+
},
|
|
81
|
+
render: args => (
|
|
82
|
+
<Box minWidth="375px">
|
|
83
|
+
<LoadingLine {...args} />
|
|
84
|
+
</Box>
|
|
85
|
+
)
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const minWidthFunc = () => Math.random() * 75 + 20;
|
|
89
|
+
|
|
90
|
+
const firstLineLength = Array.from({ length: 12 }, minWidthFunc);
|
|
91
|
+
const secondLineLength = Array.from({ length: 15 }, minWidthFunc);
|
|
92
|
+
const thirdLineLength = Array.from({ length: 8 }, minWidthFunc);
|
|
93
|
+
const fourthLineLength = Array.from({ length: 20 }, minWidthFunc);
|
|
94
|
+
|
|
95
|
+
const firstLine = firstLineLength.map(item => (
|
|
96
|
+
<LoadingLine key={`line-1-${item}`} minWidth={item} maxWidth="150" />
|
|
97
|
+
));
|
|
98
|
+
|
|
99
|
+
const secondLine = secondLineLength.map(item => (
|
|
100
|
+
<LoadingLine key={`line-2-${item}`} minWidth={item} maxWidth="150" />
|
|
101
|
+
));
|
|
102
|
+
const thirdLine = thirdLineLength.map(item => (
|
|
103
|
+
<LoadingLine key={`line-3-${item}`} minWidth={item} maxWidth="150" />
|
|
104
|
+
));
|
|
105
|
+
const fourthLine = fourthLineLength.map(item => (
|
|
106
|
+
<LoadingLine key={`line-4-${item}`} minWidth={item} maxWidth="150" />
|
|
107
|
+
));
|
|
108
|
+
|
|
109
|
+
export const LoadingTextContent = {
|
|
110
|
+
args: {
|
|
111
|
+
height: "12px",
|
|
112
|
+
margin: "0px"
|
|
113
|
+
},
|
|
114
|
+
render: args => (
|
|
115
|
+
<Box minWidth="400px" maxWidth="700px" minHeight="500px">
|
|
116
|
+
<Stack childGap="0.5rem">
|
|
117
|
+
<Cluster childGap="1rem" justify="flex-start" align="center">
|
|
118
|
+
{firstLine}
|
|
119
|
+
</Cluster>
|
|
120
|
+
<Cluster childGap="1rem" justify="flex-start" align="center">
|
|
121
|
+
{secondLine}
|
|
122
|
+
</Cluster>
|
|
123
|
+
<Cluster childGap="1rem" justify="flex-start" align="center">
|
|
124
|
+
{thirdLine}
|
|
125
|
+
</Cluster>
|
|
126
|
+
<Cluster childGap="1rem" justify="flex-start" align="center">
|
|
127
|
+
{fourthLine}
|
|
128
|
+
</Cluster>
|
|
129
|
+
</Stack>
|
|
130
|
+
</Box>
|
|
131
|
+
)
|
|
132
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import * as NavFooterStories from './NavFooter.stories.js';
|
|
4
|
+
|
|
5
|
+
<Meta of={NavFooterStories} />
|
|
6
|
+
|
|
7
|
+
<Title />
|
|
8
|
+
|
|
9
|
+
The NavFooter component is a wrapper designed to create a page footer. The component accepts children components for its left and right side and sizes itself to the width of the page. The component can take a maxWidth value that will center the footer within it, no matter the overall size of the screen.
|
|
10
|
+
|
|
11
|
+
The NavFooter can also be used to create a smaller subfooter by changing the minimum height value. Multiple footers can exist on one page, as long as they have proper key and aria-label values. The `largeSide` and `largeSideSize` props dictate which side of the footer is given more flex space.
|
|
12
|
+
|
|
13
|
+
<Controls />
|
|
14
|
+
|
|
15
|
+
<Story />
|