Skip to content

Commit

Permalink
Merge branch 'development' into dependabot/npm_and_yarn/fortawesome/r…
Browse files Browse the repository at this point in the history
…eact-fontawesome-0.2.2
  • Loading branch information
mfacar authored Jun 21, 2024
2 parents 42de191 + 34a715c commit fc57ef1
Show file tree
Hide file tree
Showing 14 changed files with 655 additions and 516 deletions.
10 changes: 10 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ module.exports = {
'../app/react/stories/**/*.stories.mdx',
'../app/react/stories/**/*.stories.@(js|jsx|ts|tsx)',
],

staticDirs: ['../cypress/test_files'],

addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
Expand All @@ -15,10 +17,12 @@ module.exports = {
'@storybook/addon-webpack5-compiler-babel',
'@chromatic-com/storybook'
],

framework: {
name: '@storybook/react-webpack5',
options: {},
},

previewHead: head => `
${head}
<style>
Expand All @@ -29,6 +33,7 @@ module.exports = {
}
</style>
`,

webpackFinal: async config => {
config.plugins.push(new MiniCssExtractPlugin({}));
return {
Expand All @@ -39,7 +44,12 @@ module.exports = {
},
};
},

docs: {
autodocs: true,
},

typescript: {
reactDocgen: 'react-docgen-typescript'
}
};
1 change: 0 additions & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ configureActions({
});

export const parameters = {
actions: { argTypesRegex: '^on.\*' } ,
controls: {
matchers: {
color: /(background|color)$/i,
Expand Down
33 changes: 8 additions & 25 deletions app/react/App/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -1833,10 +1833,6 @@ input[type="range"]::-ms-fill-lower {
margin-top: 1.5rem;
}

.ml-1 {
margin-left: 0.25rem;
}

.block {
display: block;
}
Expand Down Expand Up @@ -3129,19 +3125,14 @@ input[type="range"]::-ms-fill-lower {
padding-bottom: 2rem;
}

.py-\[3px\] {
padding-top: 3px;
padding-bottom: 3px;
}

.py-\[2px\] {
padding-top: 2px;
padding-bottom: 2px;
}

.py-\[1px\] {
padding-top: 1px;
padding-bottom: 1px;
.py-\[3px\] {
padding-top: 3px;
padding-bottom: 3px;
}

.pb-14 {
Expand Down Expand Up @@ -3289,14 +3280,6 @@ input[type="range"]::-ms-fill-lower {
line-height: 1rem;
}

.text-\[8px\] {
font-size: 8px;
}

.text-\[10px\] {
font-size: 10px;
}

.font-black {
font-weight: 900;
}
Expand Down Expand Up @@ -3511,6 +3494,11 @@ input[type="range"]::-ms-fill-lower {
color: rgb(55 48 163 / var(--tw-text-opacity));
}

.text-primary-900 {
--tw-text-opacity: 1;
color: rgb(49 46 129 / var(--tw-text-opacity));
}

.text-red-800 {
--tw-text-opacity: 1;
color: rgb(155 28 28 / var(--tw-text-opacity));
Expand Down Expand Up @@ -3546,11 +3534,6 @@ input[type="range"]::-ms-fill-lower {
color: rgb(114 59 19 / var(--tw-text-opacity));
}

.text-primary-900 {
--tw-text-opacity: 1;
color: rgb(49 46 129 / var(--tw-text-opacity));
}

.underline {
text-decoration-line: underline;
}
Expand Down
6 changes: 2 additions & 4 deletions app/react/stories/ConfirmationModal.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import type { Meta, StoryObj } from '@storybook/react';
import { fn } from '@storybook/test';
import { action } from '@storybook/addon-actions';
import { Provider } from 'react-redux';
import { ConfirmationModal } from 'app/V2/Components/UI/ConfirmationModal';
Expand All @@ -9,10 +10,7 @@ import { Translate } from 'app/I18N';
const meta: Meta<typeof ConfirmationModal> = {
title: 'Components/Modal/ConfirmationModal',
component: ConfirmationModal,
argTypes: {
onAcceptClick: { action: 'onAcceptClick' },
onCancelClick: { action: 'onCancelClick' },
},
args: { onAcceptClick: fn(), onCancelClick: fn() },
parameters: {
actions: {
handles: ['change'],
Expand Down
5 changes: 3 additions & 2 deletions app/react/stories/Forms/Checkbox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import React from 'react';
import { Meta, StoryObj } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { fn } from '@storybook/test';
import { Checkbox } from 'app/V2/Components/Forms';
import { LEGACY_createStore as createStore } from 'V2/shared/testingHelpers';
import { Provider } from 'react-redux';

const meta: Meta<typeof Checkbox> = {
title: 'Forms/Checkbox',
component: Checkbox,
argTypes: {
onChange: { action: 'changed' },
args: {
onChange: fn(),
},
};

Expand Down
5 changes: 3 additions & 2 deletions app/react/stories/Forms/ColorPicker.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ import React from 'react';
import { Provider as ReduxProvider } from 'react-redux';
import { Provider } from 'jotai';
import { Meta, StoryObj } from '@storybook/react';
import { fn } from '@storybook/test';
import { action } from '@storybook/addon-actions';
import { ColorPicker } from 'app/V2/Components/Forms';
import { LEGACY_createStore as createStore, atomsGlobalState } from 'V2/shared/testingHelpers';

const meta: Meta<typeof ColorPicker> = {
title: 'Forms/ColorPicker',
component: ColorPicker,
argTypes: {
onChange: { action: 'onChange' },
args: {
onChange: fn(),
},
parameters: {
actions: {
Expand Down
9 changes: 5 additions & 4 deletions app/react/stories/Forms/DatePicker.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ import { Provider as ReduxProvider } from 'react-redux';
import { Provider } from 'jotai';
import { Meta, StoryObj } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { fn } from '@storybook/test';
import { DatePicker } from 'app/V2/Components/Forms';
import { LEGACY_createStore as createStore, atomsGlobalState } from 'V2/shared/testingHelpers';

const meta: Meta<typeof DatePicker> = {
title: 'Forms/DatePicker',
component: DatePicker,
argTypes: {
onChange: { action: 'onChange' },
onBlur: { action: 'onBlur' },
clearFieldAction: { action: 'clearFieldAction' },
args: {
onChange: fn(),
onBlur: fn(),
clearFieldAction: fn(),
},
parameters: {
actions: {
Expand Down
7 changes: 4 additions & 3 deletions app/react/stories/Forms/DateRangePicker.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ import React from 'react';
import { Provider } from 'react-redux';
import { Meta, StoryObj } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { fn } from '@storybook/test';
import { DateRangePicker } from 'app/V2/Components/Forms';
import { LEGACY_createStore as createStore } from 'V2/shared/testingHelpers';

const meta: Meta<typeof DateRangePicker> = {
title: 'Forms/DateRangePicker',
component: DateRangePicker,
argTypes: {
onFromDateSelected: { action: 'onFromDateSelected' },
onToDateSelected: { action: 'onToDateSelected' },
args: {
onFromDateSelected: fn(),
onToDateSelected: fn(),
},
parameters: {
actions: {
Expand Down
5 changes: 3 additions & 2 deletions app/react/stories/Forms/Geolocation.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import React from 'react';
import { Meta, StoryObj } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { fn } from '@storybook/test';
import { Geolocation } from 'app/V2/Components/Forms';
import { LEGACY_createStore as createStore } from 'V2/shared/testingHelpers';
import { Provider } from 'react-redux';

const meta: Meta<typeof Geolocation> = {
title: 'Forms/Geolocation',
component: Geolocation,
argTypes: {
onChange: { action: 'changed' },
args: {
onChange: fn(),
},
};

Expand Down
5 changes: 3 additions & 2 deletions app/react/stories/Forms/RadioSelect.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import React from 'react';
import { Meta, StoryObj } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { fn } from '@storybook/test';
import { RadioSelect } from 'app/V2/Components/Forms';
import { LEGACY_createStore as createStore } from 'V2/shared/testingHelpers';
import { Provider } from 'react-redux';

const meta: Meta<typeof RadioSelect> = {
title: 'Forms/RadioSelect',
component: RadioSelect,
argTypes: {
onChange: { action: 'changed' },
args: {
onChange: fn(),
},
};

Expand Down
3 changes: 2 additions & 1 deletion app/react/stories/PDF.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import type { Meta, StoryObj } from '@storybook/react';
import { fn } from '@storybook/test';
import { Provider } from 'react-redux';
import { LEGACY_createStore as createStore } from 'V2/shared/testingHelpers';
import { PDF } from 'V2/Components/PDFViewer';
Expand All @@ -8,7 +9,7 @@ import { highlights } from './fixtures/PDFStoryFixtures';
const meta: Meta<typeof PDF> = {
title: 'Viewers/PDF',
component: PDF,
argTypes: { onSelect: { action: 'selected' }, onDeselect: { action: 'unselected' } },
args: { onSelect: fn(), onDeselect: fn() },
};

type Story = StoryObj<typeof PDF>;
Expand Down
1 change: 0 additions & 1 deletion app/react/stories/Paginator.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { LEGACY_createStore as createStore } from 'V2/shared/testingHelpers';
const meta: Meta<typeof Paginator> = {
title: 'Components/Paginator',
component: Paginator,
argTypes: {},
};

type Story = StoryObj<typeof Paginator>;
Expand Down
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -270,14 +270,15 @@
"@cfaester/enzyme-adapter-react-18": "^0.8.0",
"@chromatic-com/storybook": "^1.3.4",
"@cypress/react18": "^2.0.0",
"@storybook/addon-actions": "^8.0.10",
"@storybook/addon-essentials": "^8.0.10",
"@storybook/addon-interactions": "^8.0.10",
"@storybook/addon-links": "^8.0.10",
"@storybook/addon-viewport": "^8.0.10",
"@storybook/addon-actions": "^8.1.10",
"@storybook/addon-essentials": "^8.1.10",
"@storybook/addon-interactions": "^8.1.10",
"@storybook/addon-links": "^8.1.10",
"@storybook/addon-viewport": "^8.1.10",
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
"@storybook/react": "^8.0.10",
"@storybook/react-webpack5": "^8.0.10",
"@storybook/react": "^8.1.10",
"@storybook/react-webpack5": "^8.1.10",
"@storybook/test": "^8.1.10",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^15.0.7",
"@testing-library/user-event": "^14.5.2",
Expand Down Expand Up @@ -378,7 +379,7 @@
"sass": "^1.74.1",
"sass-loader": "14.2.1",
"sharp": "^0.33.2",
"storybook": "^8.0.10",
"storybook": "^8.1.10",
"stream-mock": "^2.0.5",
"supertest": "7.0.0",
"svg-inline-loader": "^0.8.2",
Expand Down
Loading

0 comments on commit fc57ef1

Please sign in to comment.