tharaday 0.5.2 → 0.5.4
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/components/Box/Box.d.ts +1 -1
- package/dist/components/Box/Box.stories.d.ts +1 -11
- package/dist/components/Box/Box.types.d.ts +4 -11
- package/dist/components/Box/helpers/getSpacingStyles.d.ts +2 -0
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/Text/Text.stories.d.ts +44 -1
- package/dist/components/Text/Text.types.d.ts +29 -0
- package/dist/ds.css +1 -1
- package/dist/ds.js +1492 -1285
- package/dist/ds.umd.cjs +1 -1
- package/dist/layouts/AppLayout/AppLayout.stories.d.ts +0 -3
- package/package.json +3 -2
- package/src/components/Badge/Badge.stories.tsx +1 -1
- package/src/components/Box/Box.stories.tsx +0 -20
- package/src/components/Box/Box.tsx +39 -24
- package/src/components/Box/Box.types.ts +4 -11
- package/src/components/Box/helpers/getSpacingStyles.ts +41 -0
- package/src/components/Button/Button.stories.tsx +1 -1
- package/src/components/Input/Input.stories.tsx +1 -1
- package/src/components/Loader/Loader.stories.tsx +1 -1
- package/src/components/ProgressBar/ProgressBar.stories.tsx +1 -1
- package/src/components/RadioButton/RadioButton.stories.tsx +1 -1
- package/src/components/Select/Select.stories.tsx +1 -1
- package/src/components/Text/Text.module.css +556 -0
- package/src/components/Text/Text.stories.tsx +34 -0
- package/src/components/Text/Text.tsx +28 -0
- package/src/components/Text/Text.types.ts +30 -0
- package/src/components/Textarea/Textarea.stories.tsx +1 -1
- package/src/layouts/AppLayout/AppLayout.stories.tsx +0 -53
- package/src/layouts/AppLayout/AppLayout.tsx +16 -30
|
@@ -122,56 +122,3 @@ export const LoggedOut: Story = {
|
|
|
122
122
|
activeNavId: 'home',
|
|
123
123
|
},
|
|
124
124
|
};
|
|
125
|
-
|
|
126
|
-
export const HeaderOnly: Story = {
|
|
127
|
-
args: {
|
|
128
|
-
headerTitle: 'Header Only',
|
|
129
|
-
headerLogo: logo,
|
|
130
|
-
user: { name: 'John Doe' },
|
|
131
|
-
navItems: [],
|
|
132
|
-
children: (
|
|
133
|
-
<Box padding={8} textAlign="center">
|
|
134
|
-
<Text variant="h2">Layout with Header only</Text>
|
|
135
|
-
<Text variant="body-md">NavBar is hidden because navItems is empty.</Text>
|
|
136
|
-
</Box>
|
|
137
|
-
),
|
|
138
|
-
},
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
export const NavBarOnly: Story = {
|
|
142
|
-
args: {
|
|
143
|
-
headerTitle: '',
|
|
144
|
-
headerLogo: undefined,
|
|
145
|
-
user: undefined,
|
|
146
|
-
onLogin: undefined,
|
|
147
|
-
onLogout: undefined,
|
|
148
|
-
onCreateAccount: undefined,
|
|
149
|
-
navItems,
|
|
150
|
-
children: (
|
|
151
|
-
<Box padding={8} textAlign="center">
|
|
152
|
-
<Text variant="h2">Layout with NavBar only</Text>
|
|
153
|
-
<Text variant="body-md">
|
|
154
|
-
Header is hidden because no branding or user props are provided.
|
|
155
|
-
</Text>
|
|
156
|
-
</Box>
|
|
157
|
-
),
|
|
158
|
-
},
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
export const ContentOnly: Story = {
|
|
162
|
-
args: {
|
|
163
|
-
headerTitle: '',
|
|
164
|
-
headerLogo: undefined,
|
|
165
|
-
user: undefined,
|
|
166
|
-
onLogin: undefined,
|
|
167
|
-
onLogout: undefined,
|
|
168
|
-
onCreateAccount: undefined,
|
|
169
|
-
navItems: [],
|
|
170
|
-
children: (
|
|
171
|
-
<Box padding={8} textAlign="center" border backgroundColor="subtle">
|
|
172
|
-
<Text variant="h2">Layout with Content only</Text>
|
|
173
|
-
<Text variant="body-md">Both Header and NavBar are hidden.</Text>
|
|
174
|
-
</Box>
|
|
175
|
-
),
|
|
176
|
-
},
|
|
177
|
-
};
|
|
@@ -26,38 +26,24 @@ export const AppLayout = ({
|
|
|
26
26
|
className,
|
|
27
27
|
maxWidth,
|
|
28
28
|
}: AppLayoutProps) => {
|
|
29
|
-
const showHeader = !!(
|
|
30
|
-
headerLogo ||
|
|
31
|
-
headerTitle ||
|
|
32
|
-
user ||
|
|
33
|
-
onLogin ||
|
|
34
|
-
onLogout ||
|
|
35
|
-
onCreateAccount
|
|
36
|
-
);
|
|
37
|
-
const showNavBar = !!(navItems?.length || navActions);
|
|
38
|
-
|
|
39
29
|
return (
|
|
40
30
|
<div className={clsx(styles.root, className)}>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
onItemClick={onNavItemClick}
|
|
58
|
-
maxWidth={maxWidth}
|
|
59
|
-
/>
|
|
60
|
-
)}
|
|
31
|
+
<Header
|
|
32
|
+
logo={headerLogo}
|
|
33
|
+
title={headerTitle}
|
|
34
|
+
user={user}
|
|
35
|
+
onLogin={onLogin}
|
|
36
|
+
onLogout={onLogout}
|
|
37
|
+
onCreateAccount={onCreateAccount}
|
|
38
|
+
maxWidth={maxWidth}
|
|
39
|
+
/>
|
|
40
|
+
<NavBar
|
|
41
|
+
items={navItems}
|
|
42
|
+
activeId={activeNavId}
|
|
43
|
+
actions={navActions}
|
|
44
|
+
onItemClick={onNavItemClick}
|
|
45
|
+
maxWidth={maxWidth}
|
|
46
|
+
/>
|
|
61
47
|
<main className={styles.main}>
|
|
62
48
|
<div className={styles.container}>{children}</div>
|
|
63
49
|
</main>
|