Skip to content

Commit

Permalink
Merge branch 'main' into add-prefill-pattern-components
Browse files Browse the repository at this point in the history
  • Loading branch information
bellepx0 authored Oct 22, 2024
2 parents f71a2d2 + d86b902 commit ded3688
Show file tree
Hide file tree
Showing 27 changed files with 374 additions and 177 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
onlyChanged: true
workingDir: packages/storybook
skip: "dependabot/**"
skip: 'dependabot/**'
43 changes: 22 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

This is a monorepo containing two main packages:

- `react-components`
- `web-components`
- `react-components`

The `core` package is for bundling the two main packages into one for publishing. The `storybook` package is for the combined story files from each `*-components` package.
The `design-system-dashboard-cli` package is used to gather metrics on design system usage.
Expand Down Expand Up @@ -78,36 +78,37 @@ Releases will occur no less often than at the beginning of each sprint (every ot
# Running Build via Storybook

1. `cd packages/web-components/`
1. `yarn install`
2. `yarn build`
3. `yarn build-bindings` (build React bindings)
4. `yarn watch:stencil` (optional)
1. `yarn install`
2. `yarn build`
3. `yarn build-bindings` (build React bindings)
4. `yarn watch:stencil` (optional)
2. `cd ../react-components/`
1. `yarn install`
2. `yarn build`
1. `yarn install`
2. `yarn build`
3. `cd ../core/`
1. `yarn install`
2. `yarn build`
1. `yarn install`
2. `yarn build`
4. `cd ../storybook/`
1. `yarn install`
2. `yarn storybook`
1. `yarn install`
2. `yarn storybook`

This will allow you to run Storybook locally to view all components

# Stencil Dev Server for Testing IE11

1. Update `stencil.config.ts` line 16 to `buildEs5: true,`
1. [More information on buildEs5 in Stencil](https://stenciljs.com/docs/config#buildes5)
2. Stencil Dev Server is run in `dev` mode
1. [More information on buildEs5 in Stencil](https://stenciljs.com/docs/config#buildes5)
2. Stencil Dev Server is run in `dev` mode
2. Within `component-library/packages/web-components/src/index.html` Web Components can be added inside of the `<body>` tag for testing
1. Example:

```
<body>
<va-progress-bar label="Add a label here" percent={35}></va-progress-bar>
<va-segmented-progress-bar current={2} total={6}></va-segmented-progress-bar>
</body>
```

1. Example:

```
<body>
<va-progress-bar label="Add a label here" percent={35}></va-progress-bar>
<va-segmented-progress-bar current={2} total={6}></va-segmented-progress-bar>
</body>
```

3. Run `yarn serve` inside `packages/web-components/` to start the Stencil Dev Server

Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@department-of-veterans-affairs/component-library",
"description": "VA.gov component library. Includes React and web components.",
"version": "47.0.0",
"version": "47.1.0",
"license": "MIT",
"scripts": {
"build": "webpack"
Expand Down
64 changes: 32 additions & 32 deletions packages/css-library/dist/stylesheets/utilities.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/css-library/dist/tokens/css/variables.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Do not edit directly
* Generated on Tue, 01 Oct 2024 21:23:29 GMT
* Generated on Fri, 04 Oct 2024 19:27:10 GMT
*/

:root {
Expand Down
2 changes: 1 addition & 1 deletion packages/css-library/dist/tokens/scss/variables.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// Do not edit directly
// Generated on Tue, 01 Oct 2024 21:23:29 GMT
// Generated on Fri, 04 Oct 2024 19:27:10 GMT

$xsmall-screen: 320px;
$small-screen: 481px;
Expand Down
2 changes: 1 addition & 1 deletion packages/css-library/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@department-of-veterans-affairs/css-library",
"version": "0.12.1",
"version": "0.12.2",
"description": "Department of Veterans Affairs stylesheets, tokens, and utilities",
"packageManager": "[email protected]",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/css-library/src/tokens/margin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ $tokens-margin-x: map-collect(
$tokens-margin,
$tokens-negative-margin,
(
auto: -1px,
auto: auto,
)
);
2 changes: 1 addition & 1 deletion packages/css-library/src/utilities/font.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

$u-font-family: (
font-family: (
base: 'vads-u-font-',
base: 'vads-u-font-family-',
modifiers: null,
values: map-collect($tokens-font-family),
settings: $font-settings,
Expand Down
31 changes: 30 additions & 1 deletion packages/storybook/stories/va-accordion-uswds.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -351,4 +351,33 @@ Internationalization.args = {
export const ManyAccordions = ManyItemsTemplate.bind(null);
ManyAccordions.args = {
...defaultArgs,
};
};


const PrintTemplate = args => (
<va-accordion {...args}>
<va-accordion-item id="first" header="First Item">
<p>
This story is for the Design System Team to be able to test the
accordion items being opened when the page they're on is being printed.
</p>
</va-accordion-item>
<va-accordion-item id="second" header="Second Item">
<p>
Accordion items will always open when being printed.
</p>
</va-accordion-item>
</va-accordion>
);

// todo: after upgrading to storybook 8 we can hide this story from the sidebar: https://storybook.js.org/docs/writing-stories/tags
export const PrintAccordion = PrintTemplate.bind(null);
PrintAccordion.args = {
...defaultArgs,
};
PrintAccordion.parameters = {
chromatic: {
media: 'print'
},

}
8 changes: 8 additions & 0 deletions packages/storybook/stories/va-file-input-uswds.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ export default {
page: () => <StoryDocs storyDefault={Default} data={fileInputDocs} />,
},
},
argTypes: {
// hide the uploadMessage prop from the properties table in storybook
uploadMessage: {
table: {
disable: true
}
}
}
};

const defaultArgs = {
Expand Down
Loading

0 comments on commit ded3688

Please sign in to comment.