diff --git a/.storybook/pages/ProjectOverview/ProjectOverview.stories.tsx b/.storybook/pages/ProjectOverview/ProjectOverview.stories.tsx index 923948e90..bf0afb6c3 100644 --- a/.storybook/pages/ProjectOverview/ProjectOverview.stories.tsx +++ b/.storybook/pages/ProjectOverview/ProjectOverview.stories.tsx @@ -10,3 +10,9 @@ export default { type Args = React.ComponentProps; export const StudentView: StoryObj = {}; + +export const ProjectCheckpoint: StoryObj = { + args: { + activeIndex: 1, + }, +}; diff --git a/.storybook/pages/ProjectOverview/ProjectOverview.tsx b/.storybook/pages/ProjectOverview/ProjectOverview.tsx index 4ad6c063a..f87f2636f 100644 --- a/.storybook/pages/ProjectOverview/ProjectOverview.tsx +++ b/.storybook/pages/ProjectOverview/ProjectOverview.tsx @@ -14,15 +14,25 @@ import { Section, TimelineNav, TimelineNavPanel, + DefinitionList, + Link, } from '../../../src'; // Project Overview pilot components -- not yet exported from src/index.ts import '../../../src/components/Utilities/Spacing.css'; +import ButtonActionCalloutCard from '../../recipes/ButtonActionCalloutCard'; import { PageShell } from '../../recipes/PageShell/PageShell'; -export const ProjectOverview = () => { +export interface Props { + /** + * Passed down to initially set the activeIndex state + */ + activeIndex?: number; +} + +export const ProjectOverview = ({ activeIndex = 0 }: Props) => { return ( - + @@ -36,7 +46,7 @@ export const ProjectOverview = () => { } title="Feudal Honor Codes and Values" /> - + What is this Project About? @@ -161,15 +171,55 @@ export const ProjectOverview = () => { - -

TimelineNavPanel 2

-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do - eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut - enim ad minim veniam, quis nostrud exercitation ullamco laboris - nisi ut aliquip ex -

-
+
+ + What to Focus on this Checkpoint + + +

+ Students individually develop a follow up question that builds + from their group’s experiment and describe their follow up + question in their conclusion. Students craft evidence-supported + explanations of how the body is organized and functions. +

+
+ + + Constructing and Evidence based Explanation + + + + +

+ Students collaboratively develop a single group research + question to frame their shared experiment, then describe the + group research question in the introduction. +

+
+ + + Constructing and Evidence based Explanation + + + + + What to Focus on this Checkpoint + + + Preview} + title="Do This Checkpoint" + > + Develop the text of your Body Book, crafting evidence-supported + explanations on how the body is organized and its functions. + +
diff --git a/.storybook/recipes/ButtonActionCalloutCard/ButtonActionCalloutCard.module.css b/.storybook/recipes/ButtonActionCalloutCard/ButtonActionCalloutCard.module.css new file mode 100644 index 000000000..8b4744931 --- /dev/null +++ b/.storybook/recipes/ButtonActionCalloutCard/ButtonActionCalloutCard.module.css @@ -0,0 +1,27 @@ +@import '../../../src/design-tokens/mixins.css'; + +/*------------------------------------*\ + # BUTTON ACTION CALLOUT CARD +\*------------------------------------*/ + +/** + * 1) Card elevated to drive attention and give an action + */ + +/** + * Button action callout card body inner + * 1) Wrapper around the description and button + */ +.button-action-callout-card__body-inner { + display: flex; + align-items: flex-start; + flex-direction: column; + gap: var(--eds-size-2); + margin-top: var(--eds-size-half); + + @media all and (min-width: $eds-bp-md) { + flex-direction: row; + align-items: center; + justify-content: space-between; + } +} diff --git a/.storybook/recipes/ButtonActionCalloutCard/ButtonActionCalloutCard.stories.tsx b/.storybook/recipes/ButtonActionCalloutCard/ButtonActionCalloutCard.stories.tsx new file mode 100644 index 000000000..464323da3 --- /dev/null +++ b/.storybook/recipes/ButtonActionCalloutCard/ButtonActionCalloutCard.stories.tsx @@ -0,0 +1,21 @@ +import { StoryObj, Meta } from '@storybook/react'; +import React from 'react'; + +import { ButtonActionCalloutCard } from './ButtonActionCalloutCard'; +import { Button } from '../../../src'; + +export default { + title: 'Recipes/ButtonActionCalloutCard', + component: ButtonActionCalloutCard, +} as Meta; + +type Args = React.ComponentProps; + +export const Default: StoryObj = { + args: { + title: 'Do This Checkpoint', + children: + 'Develop the text of your Body Book, crafting evidence-supported explanations on how the body is organized and its functions.', + actions: , + }, +}; diff --git a/.storybook/recipes/ButtonActionCalloutCard/ButtonActionCalloutCard.tsx b/.storybook/recipes/ButtonActionCalloutCard/ButtonActionCalloutCard.tsx new file mode 100644 index 000000000..3edf60db3 --- /dev/null +++ b/.storybook/recipes/ButtonActionCalloutCard/ButtonActionCalloutCard.tsx @@ -0,0 +1,69 @@ +import clsx from 'clsx'; +import React, { ReactNode } from 'react'; +import styles from './ButtonActionCalloutCard.module.css'; +import { Button, Card, Heading, Text } from '../../../src'; + +export interface Props { + /** + * Slot for buttons or other calls to action + */ + actions?: ReactNode; + /** + * CSS class names that can be appended to the component. + */ + className?: string; + /** + * Child node(s) that can be nested inside component + */ + children?: ReactNode; + /** + * Title of the card + */ + title?: string; +} + +/** + * Primary UI component for user interaction + */ +export const ButtonActionCalloutCard = ({ + actions, + className, + title, + children, + ...other +}: Props) => { + const componentClassName = clsx( + styles['button-action-callout-card'], + className, + {}, + ); + return ( + + + + {title} + +
+ {children && ( + + {children} + + )} + {actions && ( +
+ {actions} +
+ )} +
+
+
+ ); +}; diff --git a/.storybook/recipes/ButtonActionCalloutCard/index.ts b/.storybook/recipes/ButtonActionCalloutCard/index.ts new file mode 100644 index 000000000..3f758c3a2 --- /dev/null +++ b/.storybook/recipes/ButtonActionCalloutCard/index.ts @@ -0,0 +1 @@ +export { ButtonActionCalloutCard as default } from './ButtonActionCalloutCard'; diff --git a/src/upcoming-components/DefinitionList/DefinitionList.module.css b/src/components/DefinitionList/DefinitionList.module.css similarity index 96% rename from src/upcoming-components/DefinitionList/DefinitionList.module.css rename to src/components/DefinitionList/DefinitionList.module.css index ecd134b9b..0491f90cd 100644 --- a/src/upcoming-components/DefinitionList/DefinitionList.module.css +++ b/src/components/DefinitionList/DefinitionList.module.css @@ -51,7 +51,7 @@ * Definition list term */ .definition-list-item__term { - @mixin eds-theme-typography-body-text-bold; + @mixin eds-theme-typography-body-text-md; color: var(--eds-theme-color-text-neutral-strong); /** diff --git a/src/upcoming-components/DefinitionList/DefinitionList.stories.tsx b/src/components/DefinitionList/DefinitionList.stories.tsx similarity index 100% rename from src/upcoming-components/DefinitionList/DefinitionList.stories.tsx rename to src/components/DefinitionList/DefinitionList.stories.tsx diff --git a/src/upcoming-components/DefinitionList/DefinitionList.test.tsx b/src/components/DefinitionList/DefinitionList.test.tsx similarity index 100% rename from src/upcoming-components/DefinitionList/DefinitionList.test.tsx rename to src/components/DefinitionList/DefinitionList.test.tsx diff --git a/src/upcoming-components/DefinitionList/DefinitionList.tsx b/src/components/DefinitionList/DefinitionList.tsx similarity index 83% rename from src/upcoming-components/DefinitionList/DefinitionList.tsx rename to src/components/DefinitionList/DefinitionList.tsx index 9cda37999..40e5bc09f 100644 --- a/src/upcoming-components/DefinitionList/DefinitionList.tsx +++ b/src/components/DefinitionList/DefinitionList.tsx @@ -5,9 +5,10 @@ import DefinitionListItem from '../DefinitionListItem'; export interface Props { /** - * Behavioral variations + * Orientation variations + * - **horizontal** renders the term next to the definition */ - behavior?: 'horizontal'; + orientation?: 'horizontal'; /** * Child node(s) that can be nested inside component */ @@ -32,7 +33,7 @@ export interface Props { * TODO: update this comment with a description of the component. */ export const DefinitionList = ({ - behavior, + orientation, className, children, size, @@ -41,7 +42,7 @@ export const DefinitionList = ({ const componentClassName = clsx( styles['definition-list'], className, - behavior === 'horizontal' && styles['definition-list--horizontal'], + orientation === 'horizontal' && styles['definition-list--horizontal'], size === 'sm' && styles['definition-list--sm'], ); return ( diff --git a/src/upcoming-components/DefinitionList/index.ts b/src/components/DefinitionList/index.ts similarity index 100% rename from src/upcoming-components/DefinitionList/index.ts rename to src/components/DefinitionList/index.ts diff --git a/src/upcoming-components/DefinitionListItem/DefinitionListItem.tsx b/src/components/DefinitionListItem/DefinitionListItem.tsx similarity index 96% rename from src/upcoming-components/DefinitionListItem/DefinitionListItem.tsx rename to src/components/DefinitionListItem/DefinitionListItem.tsx index 9a75db7ec..6c5277eea 100644 --- a/src/upcoming-components/DefinitionListItem/DefinitionListItem.tsx +++ b/src/components/DefinitionListItem/DefinitionListItem.tsx @@ -33,7 +33,7 @@ export const DefinitionListItem = ({ ...other }: Props) => { const componentClassName = clsx( - styles['definition-list-item'], + styles['definition-list__item'], className, {}, ); diff --git a/src/upcoming-components/DefinitionListItem/index.ts b/src/components/DefinitionListItem/index.ts similarity index 100% rename from src/upcoming-components/DefinitionListItem/index.ts rename to src/components/DefinitionListItem/index.ts diff --git a/src/design-tokens/css/base/body.css b/src/design-tokens/css/base/body.css index 9f8c1588a..915bfc550 100644 --- a/src/design-tokens/css/base/body.css +++ b/src/design-tokens/css/base/body.css @@ -4,6 +4,7 @@ body { @mixin eds-theme-typography-body-text-md; display: flex; flex-direction: column; + min-height: 100vh; padding: 0; margin: 0; color: var(--eds-theme-color-text-neutral-default); @@ -15,3 +16,10 @@ body { min-height: 100%; } } + +/* Body with light background on small screens */ +.body--alternate { + @media all and (max-width: $eds-bp-lg) { + background: var(--eds-theme-color-background-neutral-default); + } +} diff --git a/src/index.ts b/src/index.ts index f08d56a5b..5d8a673a9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -14,6 +14,7 @@ export { default as CheckboxLabel } from './components/CheckboxLabel'; export { default as ClickableStyle } from './components/ClickableStyle'; export { default as DataBar } from './components/DataBar'; export { default as DataBarSegment } from './components/DataBarSegment'; +export { default as DefinitionList } from './components/DefinitionList'; export { default as DragDrop } from './components/DragDrop'; export { default as DragDropContainer } from './components/DragDropContainer'; export { default as DragDropContainerHeader } from './components/DragDropContainerHeader';