Skip to content

Commit d3126ea

Browse files
authored
Merge branch 'master' into fix/inputgroup-validation
2 parents 9fc5770 + 930b158 commit d3126ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+346
-345
lines changed

.storybook/custom/custom.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
html {
2+
font-size: 16px;
3+
}
4+
15
body {
26
font-family: '72', 'Open Sans', sans-serif;
37
}

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,43 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [0.14.0-rc.5](https://github.com/SAP/fundamental-react/compare/v0.14.0-rc.4...v0.14.0-rc.5) (2020-11-06)
6+
7+
8+
### ⚠ BREAKING CHANGES
9+
10+
* Removed `todayAction` property from Datepicker. Add `todayActionType` property to Datepicker to configure the type of today action. Update Datepicker to use a label for the Today action button from `localizedText.todayLabel`.
11+
12+
### Bug Fixes
13+
14+
* Datepicker today actions props interface ([#1259](https://github.com/SAP/fundamental-react/issues/1259)) ([74ba734](https://github.com/SAP/fundamental-react/commit/74ba7345b6961e678724802db413e960d8738a4e))
15+
16+
## [0.14.0-rc.4](https://github.com/SAP/fundamental-react/compare/v0.14.0-rc.3...v0.14.0-rc.4) (2020-11-05)
17+
18+
19+
### Bug Fixes
20+
21+
* Call DatePicker buttonProps.onClick when button is clicked ([#1258](https://github.com/SAP/fundamental-react/issues/1258)) ([a6a5d95](https://github.com/SAP/fundamental-react/commit/a6a5d955a972b579c6819b917cb1031c0c55035c))
22+
23+
## [0.14.0-rc.3](https://github.com/SAP/fundamental-react/compare/v0.14.0-rc.2...v0.14.0-rc.3) (2020-11-05)
24+
25+
26+
### ⚠ BREAKING CHANGES
27+
28+
* `form-select` component has been removed
29+
30+
* feat: update fd-styles to 0.13.0-rc.34
31+
32+
* chore: update storybook tests
33+
34+
* chore: remove FormSelect from index
35+
36+
### Features
37+
38+
* update fd-styles to 0.13.0-rc.34 ([#1257](https://github.com/SAP/fundamental-react/issues/1257)) ([0136683](https://github.com/SAP/fundamental-react/commit/01366833fe8a3e918efd92c72a8e4e1dbee5fa74))
39+
40+
## [0.14.0-rc.2](https://github.com/SAP/fundamental-react/compare/v0.14.0-rc.1...v0.14.0-rc.2) (2020-11-05)
41+
542
## [0.14.0-rc.1](https://github.com/SAP/fundamental-react/compare/v0.14.0-rc.0...v0.14.0-rc.1) (2020-10-20)
643

744

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ For an existing react application, follow the steps below:
7575

7676
Additionally, edit your webpack configuration to load font and icon fonts - see [file-loader](https://webpack.js.org/loaders/file-loader/).
7777

78+
All styles are based on `rem` units. Include the following in your CSS to ensure components are sized correctly:
79+
80+
```css
81+
html {
82+
font-size: 16px;
83+
}
84+
```
85+
7886
## Versioning
7987

8088
The `fundamental-react` library follows [Semantic Versioning](https://semver.org/). These components strictly adhere to the `[MAJOR].[MINOR].[PATCH]` numbering system (also known as `[BREAKING].[FEATURE].[FIX]`).

devtools/buildVisualStories.js

Lines changed: 60 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,73 @@
1+
/* eslint-disable no-console */
12
const { lstatSync, readdirSync, writeFileSync } = require('fs');
23
const path = require('path');
4+
const rimraf = require('rimraf');
35

4-
const srcPath = path.join(__dirname, '../src');
56

6-
const isComponentDirectory = (source) => {
7-
const ignoredDirectories = ['utils', 'Docs'];
8-
return lstatSync(source).isDirectory() && !ignoredDirectories.some(ignored => source.includes(ignored));
9-
};
7+
console.info('Trying to clean/remove all visual stories. 🗑 ');
108

11-
const componentDirs = readdirSync(srcPath).map(name => path.join(srcPath, name)).filter(isComponentDirectory).map(directory => {
12-
return {
13-
path: `${directory}/__stories__/`,
14-
fileNames: readdirSync(`${directory}/__stories__/`)
15-
};
16-
});
9+
rimraf('**/*.visual.js', (rimRafError) => {
10+
if (rimRafError) {
11+
console.error('Unable to clean all visual stories!! ❌', rimRafError);
12+
} else {
13+
console.info('Removed all visual stories. 🗑 ✅');
14+
}
1715

18-
// For every component directory.
19-
componentDirs.map((directory) => {
20-
// Loop through its files.
21-
directory.fileNames.map((fileName) => {
22-
// get only stories.js files
23-
if (fileName.includes('.stories.js')) {
24-
// Grab the component name
25-
const componentName = fileName.substr(0, fileName.indexOf('.'));
26-
// TODO: reenable storyshots for examples using hooks in storybook@6
27-
// https://github.com/storybookjs/storybook/releases/tag/v6.0.0-alpha.43
28-
if (componentName === 'Calendar'
29-
|| componentName === 'Dialog') {
30-
return;
31-
}
16+
console.info('Trying to build all visual stories. 🏗');
3217

33-
const fileContents = `
34-
import React from 'react';
35-
import * as stories from './${componentName}.stories';
18+
const srcPath = path.join(__dirname, '../src');
3619

37-
export default {
38-
title: 'Visual'
39-
};
20+
const isComponentDirectory = (source) => {
21+
const ignoredDirectories = ['utils', 'Docs'];
22+
return lstatSync(source).isDirectory() && !ignoredDirectories.some(ignored => source.includes(ignored));
23+
};
4024

41-
export const ${componentName} = () => {
42-
let storyNames = Object.keys(stories).filter(story => {
43-
return story !== 'default' && story !== 'dev';
25+
const componentDirs = readdirSync(srcPath).map(name => path.join(srcPath, name)).filter(isComponentDirectory).map(directory => {
26+
return {
27+
path: `${directory}/__stories__/`,
28+
fileNames: readdirSync(`${directory}/__stories__/`)
29+
};
4430
});
4531

46-
return (<>{storyNames.map((item, index) => <div key={index}>{stories[item]()}</div>)}</>);
47-
};
48-
${componentName}.parameters = {
49-
docs: { disable: true }
50-
};
51-
`;
52-
// write the visual story file into the directory.
53-
let visualPath = path.join(directory.path, `${componentName}.visual.js`);
54-
writeFileSync(visualPath, fileContents);
55-
}
32+
// For every component directory.
33+
componentDirs.map((directory) => {
34+
// Loop through its files.
35+
directory.fileNames.map((fileName) => {
36+
// get only stories.js files
37+
if (fileName.includes('.stories.js')) {
38+
// Grab the component name
39+
const componentName = fileName.substr(0, fileName.indexOf('.'));
40+
// TODO: reenable storyshots for examples using hooks in storybook@6
41+
// https://github.com/storybookjs/storybook/releases/tag/v6.0.0-alpha.43
42+
if (componentName === 'Calendar'
43+
|| componentName === 'Dialog') {
44+
return;
45+
}
46+
47+
const fileContents = `
48+
import React from 'react';
49+
import * as stories from './${componentName}.stories';
50+
51+
export default {
52+
title: 'Visual'
53+
};
54+
55+
export const ${componentName} = () => {
56+
let storyNames = Object.keys(stories).filter(story => {
57+
return story !== 'default' && story !== 'dev';
58+
});
59+
60+
return (<>{storyNames.map((item, index) => <div key={index}>{stories[item]()}</div>)}</>);
61+
};
62+
${componentName}.parameters = {
63+
docs: { disable: true }
64+
};
65+
`;
66+
// write the visual story file into the directory.
67+
let visualPath = path.join(directory.path, `${componentName}.visual.js`);
68+
writeFileSync(visualPath, fileContents);
69+
}
70+
});
5671
});
72+
5773
});

package-lock.json

Lines changed: 92 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)