Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* Copyright (c) HashiCorp, Inc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this is the old file header, should be IBM now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iโ€™ve created a ticket here, so we can update them all in one batch https://hashicorp.atlassian.net/browse/HDS-6034 (context)

* SPDX-License-Identifier: MPL-2.0
*/

// these files come from `packages/tokens/dist/products/css/`
@use "helpers/color";
@use "helpers/elevation";
@use "helpers/focus-ring";
@use "helpers/typography";

// Vendor styles
@use "./design-system-ember-a11y-refocus";

// main components file
@use "../components/index";

// screen-reader utility class
@use "../mixins/screen-reader-only" as *;

// The `.sr-only` utility class visually hides content but keeps it accessible to screen readers for accessibility purposes.
.sr-only {
@include screen-reader-only();
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,66 +3,8 @@
* SPDX-License-Identifier: MPL-2.0
*/

// these files come from the 'design-system-tokens' package
// these are the "standard" HDS tokens (the file comes from `packages/tokens/dist/products/css/`)
@use "tokens";
@use "helpers/color";
@use "helpers/elevation";
@use "helpers/focus-ring";
@use "helpers/typography";

// Vendor styles
@use "./design-system-ember-a11y-refocus";

// Notice: this list can be automatically edited by the Ember blueprint, please don't remove the start/end comments
// START COMPONENTS CSS FILES IMPORTS
@use "../components/accordion";
@use "../components/advanced-table";
@use "../components/alert";
@use "../components/app-footer";
@use "../components/app-frame";
@use "../components/app-header";
@use "../components/app-side-nav";
@use "../components/application-state";
@use "../components/badge";
@use "../components/badge-count";
@use "../components/breadcrumb";
@use "../components/button";
@use "../components/button-set";
@use "../components/card";
@use "../components/code-block";
@use "../components/code-editor";
@use "../components/copy";
@use "../components/dialog-primitive";
@use "../components/disclosure-primitive";
@use "../components/dismiss-button";
@use "../components/dropdown";
@use "../components/filter-bar";
@use "../components/flyout";
@use "../components/form"; // multiple components
@use "../components/icon";
@use "../components/icon-tile";
@use "../components/layout"; // multiple components
@use "../components/link"; // multiple components
@use "../components/modal";
@use "../components/page-header";
@use "../components/pagination";
@use "../components/reveal";
@use "../components/rich-tooltip";
@use "../components/segmented-group";
@use "../components/separator";
@use "../components/stepper";
@use "../components/table";
@use "../components/tabs";
@use "../components/tag";
@use "../components/text";
@use "../components/time";
@use "../components/toast";
@use "../components/tooltip";
// END COMPONENT CSS FILES IMPORTS

@use "../mixins/screen-reader-only" as *;

// stylelint-disable-next-line selector-class-pattern
.sr-only {
@include screen-reader-only();
}
// these are the styles specific (and only) for the HDS components
@use "./design-system-components-common";
51 changes: 51 additions & 0 deletions packages/components/src/styles/components/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

// Notice: this list can be automatically edited by the Ember blueprint, please don't remove the start/end comments
// START COMPONENTS CSS FILES IMPORTS
@use "./accordion";
@use "./advanced-table";
@use "./alert";
@use "./app-footer";
@use "./app-frame";
@use "./app-header";
@use "./app-side-nav";
@use "./application-state";
@use "./badge";
@use "./badge-count";
@use "./breadcrumb";
@use "./button";
@use "./button-set";
@use "./card";
@use "./code-block";
@use "./code-editor";
@use "./copy";
@use "./dialog-primitive";
@use "./disclosure-primitive";
@use "./dismiss-button";
@use "./dropdown";
@use "./filter-bar";
@use "./flyout";
@use "./form"; // multiple components
@use "./icon";
@use "./icon-tile";
@use "./layout"; // multiple components
@use "./link"; // multiple components
@use "./modal";
@use "./page-header";
@use "./pagination";
@use "./reveal";
@use "./rich-tooltip";
@use "./segmented-group";
@use "./separator";
@use "./stepper";
@use "./table";
@use "./tabs";
@use "./tag";
@use "./text";
@use "./time";
@use "./toast";
@use "./tooltip";
// END COMPONENT CSS FILES IMPORTS
2 changes: 1 addition & 1 deletion showcase/blueprints/hds-component/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = {

const updateHDSComponentsCSS = (options) => {
const name = options.entity.name;
const cssFilePath = `${options.project.root}/../packages/components/src/styles/@hashicorp/design-system-components.scss`;
const cssFilePath = `${options.project.root}/../packages/components/src/styles/components/index.scss`;
const source = fs.readFileSync(cssFilePath, 'utf-8');
const oldLinesArray = source.split(/\r?\n/);
const firstComponentImportIndex =
Expand Down