Skip to content

Commit

Permalink
fix(jv-ui-components): fix styles for components in storybook
Browse files Browse the repository at this point in the history
after the update on how the styles are loaded when the libraries were published in npm, the storybook had to be updated as well to use the local components because the "preview.tsx" file already loads the styles, so no need to use the compiled components
  • Loading branch information
ecanchev-jaspersoft committed Nov 1, 2024
1 parent 589abca commit 88cb2eb
Show file tree
Hide file tree
Showing 25 changed files with 28 additions and 39 deletions.
3 changes: 1 addition & 2 deletions packages/jv-ui-components/.storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import "@jaspersoft/jv-ui-components/material-ui/styles/JVMuiClassNameSetup";
import "./styles/storybook-jv-ui.scss";
import { JVStylesProvider } from "@jaspersoft/jv-ui-components";
import { JVStylesProvider } from "../material-ui";
import type { Preview } from "@storybook/react";

const preview: Preview = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
JVAccordionDetails,
JVAccordionFull,
JVAccordionSummary,
} from "@jaspersoft/jv-ui-components";
} from "../../../material-ui";
import { Typography } from "@mui/material";

/*----------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
JVIcon,
JVIconButton,
JVTextField,
} from "@jaspersoft/jv-ui-components";
} from "../../../material-ui";
import {
Checkbox,
FormControlLabel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
JVPaper,
JVPopper,
JVTextField,
} from "@jaspersoft/jv-ui-components";
} from "../../../material-ui";
import "../css/demoPages.css";
import "./autoCompleteInput.css";
import { useRef, useState } from "react";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "../css/demoPages.css";
import "./badge.css";
import { JVBadge, JVTypography } from "@jaspersoft/jv-ui-components";
import { JVBadge, JVTypography } from "../../../material-ui";
import MailIcon from "@mui/icons-material/Mail";

/*------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
JVButtonGroup,
JVIconButton,
JVLabeledButtonGroup,
} from "@jaspersoft/jv-ui-components";
} from "../../../material-ui";
import "./buttonGroup.css";

/*----------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
JVIcon,
JVIconButton,
JVToolbar,
} from "@jaspersoft/jv-ui-components";
} from "../../../material-ui";

/* --------------------------------------------------------------
* TABLE OF CONTENTS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
JVPopper,
JVSelectItem,
JVTextField,
} from "@jaspersoft/jv-ui-components";
} from "../../../material-ui";
import {
Button,
List,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ import {
JVSelectItem,
JVTextField,
JVTypography,
} from "@jaspersoft/jv-ui-components";
} from "../../../material-ui";
import { useRef, useState } from "react";
import "../css/demoPages.css";
import "./calendar.css";

import "../css/demoPages.css";
import "./calendar.css";
/*----------------------------
* TABLE OF CONTENTS
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
JVPaper,
JVTextField,
JVTypography,
} from "@jaspersoft/jv-ui-components";
} from "../../../material-ui";
import { DialogContentText, Typography } from "@mui/material";
import { useEffect, useRef, useState } from "react";
import Draggable from "react-draggable";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import "../inputs/inputs.css";
import {
JVDivider,
JVIconButton,
JVTextField,
} from "@jaspersoft/jv-ui-components";
import { JVDivider, JVIconButton, JVTextField } from "../../../material-ui";

/*----------------------------
* TABLE OF CONTENTS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { JVButton, JVDrawer, JVTypography } from "@jaspersoft/jv-ui-components";
import { JVButton, JVDrawer, JVTypography } from "../../../material-ui";
/* ------------------------------ */
/* Table of Contents */
/* */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "./icon.css";
import { JVIcon } from "@jaspersoft/jv-ui-components";
import { JVIcon } from "../../../material-ui";

/*----------------------------
* TABLE OF CONTENTS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import {
JVIcon,
JVIconButton,
JVTextField,
} from "@jaspersoft/jv-ui-components";
import { JVIcon, JVIconButton, JVTextField } from "../../../material-ui";
import {
Button,
Checkbox,
Expand Down Expand Up @@ -3001,7 +2997,7 @@ inputSelect.storyName = "Select";
/* 07. SWITCH */
/* -------------- */
export const inputSwitch = () => {
const [state, setState] = React.useState({
const [state, setState] = useState({
checkedA: true,
checkedB: true,
checkedC: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
JVSwitch,
JVTextField,
JVTypography,
} from "@jaspersoft/jv-ui-components";
} from "../../../material-ui";
// this grid component is used for proper alignment of all variations of input in storybook. That's why directly imported from the
// material-ui.
import { Grid } from "@mui/material";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "../inputs/inputs.css";
import "./instructor.css";
import { JVInstructor, JVTextField } from "@jaspersoft/jv-ui-components";
import { JVInstructor, JVTextField } from "../../../material-ui";

/*----------------------------
* TABLE OF CONTENTS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
JVIcon,
JVIconButton,
JVButton,
} from "@jaspersoft/jv-ui-components";
} from "../../../material-ui";

/*----------------------------
* TABLE OF CONTENTS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
JVIconButton,
JVSubPanel,
JVFlushPanel,
} from "@jaspersoft/jv-ui-components";
} from "../../../material-ui";
import { Snackbar } from "@mui/material";

/*----------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
JVCircularProgress,
JVLinearProgress,
} from "@jaspersoft/jv-ui-components";
import { JVCircularProgress, JVLinearProgress } from "../../../material-ui";
import { useEffect, useState } from "react";
import "../css/demoPages.css";
import "./progress.css";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { JVIcon } from "@jaspersoft/jv-ui-components";
import { JVIcon } from "../../../material-ui";
import {
Button,
Checkbox,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
JVTabs,
JVTextField,
JVTypography,
} from "@jaspersoft/jv-ui-components";
} from "../../../material-ui";
import { ChangeEvent, useState } from "react";
import "./stepper.css";
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from "react";
import "../css/demoPages.css";
import "./tabs.css";
import { JVTabs, JVTab } from "@jaspersoft/jv-ui-components";
import { JVTabs, JVTab } from "../../../material-ui";

/*------------------------------
* TABLE OF CONTENTS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { JVIcon, JVInputAdornment } from "@jaspersoft/jv-ui-components";
import { JVIcon, JVInputAdornment } from "../../../material-ui";
import {
Divider,
IconButton,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
JVTypography,
JVInputAdornment,
JVIcon,
} from "@jaspersoft/jv-ui-components";
} from "../../../material-ui";

/* ------------------------------
* TABLE OF CONTENTS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import "./typography.css";
import { JVTypography, JVLink } from "@jaspersoft/jv-ui-components";
import { JVTypography, JVLink } from "../../../material-ui";

/*------------------------------
* TABLE OF CONTENTS
Expand Down

0 comments on commit 88cb2eb

Please sign in to comment.