"start:force": "node scripts/start.js --force-build-design-system",
"build": "node scripts/build.js",
"build-release": "yarn install --immutable && node scripts/build.js release",
- "test": "jest",
+ "test": "NODE_OPTIONS=--max-old-space-size=1024 jest",
+ "test-ci": "NODE_OPTIONS=\"-r dd-trace/ci/init\" jest --coverage --maxWorkers=5 --workerIdleMemoryLimit=2G --ci",
"test-eslint-local-rules": "jest -c eslint-local-rules/jest.config.js",
"format": "prettier --write --list-different \"src/main/js/**/*.{js,ts,tsx,css}\"",
"format-check": "prettier --check \"src/main/js/**/*.{js,ts,tsx,css}\"",
"lint-report-ci": "yarn install --immutable && eslint --ext js,ts,tsx --config .eslintrc-ci -f json -o eslint-report/eslint-report.json src/main/js || yarn lint",
"ts-check": "tsc --noEmit",
"validate": "yarn dep-check && yarn lint && yarn ts-check && yarn format-check && yarn test",
- "validate-ci": "yarn install --immutable && yarn dep-check && NODE_OPTIONS=\"-r dd-trace/ci/init\" yarn test --coverage --maxWorkers=5 --workerIdleMemoryLimit=2G --ci",
+ "validate-ci": "yarn install --immutable && yarn dep-check && yarn test-ci",
"check-ci": "yarn install --immutable && yarn ts-check && yarn format-check && yarn test-eslint-local-rules",
"update-cwes": "node scripts/update-cwes.js",
"dep-check": "node scripts/validate-package-json.js"
overflow: hidden;
}
-.note {
- color: var(--secondFontColor);
- font-size: var(--smallFontSize);
-}
-
.null-spacer-bottom {
margin-bottom: 0 !important;
}
vertical-align: text-top;
}
-.property .note {
- margin-top: 5px;
-}
-
.shortcuts-modal h3 {
margin-bottom: 0;
}
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { isSameDay } from 'date-fns';
-import { BarChart, DateRangePicker, FacetBox, FacetItem } from 'design-system';
-import { max } from 'lodash';
+import { BarChart, DateRangePicker, FacetBox, FacetItem, Note } from 'design-system';
+import { isEmpty, max } from 'lodash';
import * as React from 'react';
import { WrappedComponentProps, injectIntl } from 'react-intl';
import { longFormatterOption } from '../../../components/intl/DateFormatter';
renderInner() {
const { createdAfter, createdAfterIncludesTime, createdAt } = this.props;
- if (createdAt) {
+ if (!isEmpty(createdAt)) {
return (
<div className="search-navigator-facet-container">
<DateTimeFormatter date={this.props.createdAt} />
<br />
- <span className="note">
+ <Note>
<DateFromNow date={this.props.createdAt} />
- </span>
+ </Note>
</div>
);
}
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { FacetBox, FacetItem, FlagMessage, InputSearch } from 'design-system';
+import { FacetBox, FacetItem, FlagMessage, InputSearch, Note } from 'design-system';
import { max, sortBy, values, without } from 'lodash';
import * as React from 'react';
import ListFooter from '../../../components/controls/ListFooter';
{selectedBelowLimit.length > 0 && (
<>
- <div className="note spacer-bottom text-center">⋯</div>
+ <Note as="div" className="sw-mb-2 sw-text-center">
+ ⋯
+ </Note>
<FacetItemsList labelledby={this.getFacetHeaderId(property)}>
{selectedBelowLimit.map((item) => (
*/
/* eslint-disable react/no-unused-prop-types */
-import { FacetBox, FacetItem, TextMuted } from 'design-system';
+import { FacetBox, FacetItem, Note, TextMuted } from 'design-system';
import { omit, sortBy, without } from 'lodash';
import * as React from 'react';
import { translate, translateWithParameters } from '../../../helpers/l10n';
{selectedBelowLimit.length > 0 && (
<>
- {!allItemShown && <div className="note spacer-bottom text-center">⋯</div>}
+ {!allItemShown && (
+ <Note as="div" className="sw-mb-2 sw-text-center">
+ ⋯
+ </Note>
+ )}
{selectedBelowLimit.map((item) => (
<FacetItem
active
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { FacetBox, FacetItem } from 'design-system';
+import { FacetBox, FacetItem, Note } from 'design-system';
import { orderBy, sortBy, without } from 'lodash';
import * as React from 'react';
import { translate, translateWithParameters } from '../../../helpers/l10n';
>
<FacetItemsList labelledby={id}>
{nbSelectableItems === 0 && (
- <div className="note spacer-bottom">{translate('no_results')}</div>
+ <Note as="div" className="sw-mb-2 sw-text-center">
+ {translate('no_results')}
+ </Note>
)}
{sortBy(
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import classNames from 'classnames';
-import { RadioButton } from 'design-system';
+import { Note, RadioButton } from 'design-system';
import * as React from 'react';
import { translate } from '../../helpers/l10n';
import { Visibility } from '../../types/component';
>
<div>
{translate('visibility', v)}
- {showDetails && (
- <p className="note">{translate('visibility', v, 'description.long')}</p>
- )}
+ {showDetails && <Note as="p">{translate('visibility', v, 'description.long')}</Note>}
</div>
</RadioButton>
))}
color: var(--darkBlue);
}
-.search-navigator-facet-header > .note {
- font-weight: 400;
-}
-
.search-navigator-facet-header > h3,
.search-navigator-facet-header > h4 {
line-height: inherit;