Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
1b674cd
[Design-System-FormSelect] Build the design system for the FormSelect…
daniele-zurico Apr 25, 2023
155a59c
Feature/sb 0.7 (#474)
daniele-zurico May 5, 2023
80002cf
feat: fix live edit version (#476)
daniele-zurico May 5, 2023
95f6488
feat: cleanup example deps (#478)
daniele-zurico May 5, 2023
c9b5135
Bug/autocomplete keydown scroll (#472)
peter-uzor-capgem May 5, 2023
8f26168
feat: remove controls (#481)
daniele-zurico May 9, 2023
e1886bb
Feature/heading (#482)
aismaelcap May 12, 2023
680d084
fix: heading component (#489)
daniele-zurico May 12, 2023
6524afd
Feature/label (#483)
JadhavJeet May 15, 2023
34c0938
Add new properties to the button component developer specified class …
byohannes May 16, 2023
eb37b46
feat: remove duplicated story (#493)
daniele-zurico May 16, 2023
c11a34a
Feature/link (#494)
JadhavJeet May 17, 2023
8c00f2f
InsertTextComponent (#491)
KavithaKurella May 18, 2023
ce2ce9b
Feature/autocomplete update value (#496)
Ahmet-K May 22, 2023
09fb288
Feature/paragraph (#479)
yunusfirat May 25, 2023
260b645
KeyboardInput Component (#504)
KavithaKurella May 26, 2023
a2765dc
feature/blockquote (#505)
yunusfirat Jun 1, 2023
c4849e9
create a list component (#495)
JadhavJeet Jun 2, 2023
fece80d
expose and document the hook useHydrated (#510)
byohannes Jun 9, 2023
b368e20
Highlight Component (#509)
Ahmet-K Jun 12, 2023
8cc4922
feature/abbreviate (#512)
yunusfirat Jun 16, 2023
50ef738
PreformattedText component (#511)
KavithaKurella Jun 16, 2023
3ebecdd
Breadcrumbs components (#508)
JadhavJeet Jun 16, 2023
72872a4
feature/code (#507)
yunusfirat Jun 16, 2023
6a18937
Fix: CharacterCount component not resetting red error text after vali…
Jun 16, 2023
0b138d7
Label Design System (#515)
JadhavJeet Jul 12, 2023
5200564
Feature/ds-paragraph (#514)
yunusfirat Jul 14, 2023
e864db9
feat: Tabs are now non-js compliant (#506)
sri-viswanathan Jul 14, 2023
b1f701b
Insert designing (#516)
KavithaKurella Jul 18, 2023
26d326c
feat: add button tokens (#520)
jgonza16 Sep 1, 2023
42a4cf2
feat: add list item design system styles (#519)
JadhavJeet Sep 1, 2023
a6e1a95
feat: add heading design system styles (#521)
Sep 1, 2023
93e93e9
Feature/bot upgrade libs (#525)
daniele-zurico Sep 5, 2023
9082b8a
Feature/release notes (#527)
daniele-zurico Sep 15, 2023
1cb8ba4
feat: upgrade to 0.8.0
daniele-zurico Sep 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 16 additions & 0 deletions .babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"sourceType": "unambiguous",
"presets": [
[
"@babel/preset-env",
{
"targets": {
"chrome": 100
}
}
],
"@babel/preset-typescript",
"@babel/preset-react"
],
"plugins": []
}
1 change: 0 additions & 1 deletion .storybook/capgeminiTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export default create({
appContentBg: 'white',
appBorderColor: '#2b0a3d',
appBorderRadius: 4,

// Text colors
textColor: '#0070ad',
fontWeight: 'bold',
Expand Down
24 changes: 19 additions & 5 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
module.exports = {
core: {
builder: 'webpack5',
},
stories: ['../stories/**/*.stories.@(mdx)'],
process.env.DESIGN_TOKEN_GLOB = "**/tokens.css";
const config = {
stories: ['../stories/**/*.mdx', '../stories/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-docs',
'@storybook/addon-controls',
'storybook-css-modules-preset',
'@storybook/addon-a11y',
{
name: "storybook-design-token",
options: {
preserveCSSVars: false
},
docs: {
autodocs: "tag",
},
},
'@storybook/addon-mdx-gfm'
],
framework: {
name: '@storybook/react-webpack5',
options: {}
},
};

export default config;
17 changes: 15 additions & 2 deletions .storybook/manager-head.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
<link rel="shortcut icon" href="https://www.capgemini.com/wp-content/themes/capgemini-komposite/assets/images/favicon.ico">
<link rel="icon" type="image/png" href="/storybook.png" sizes="192x192">
<link rel="shortcut icon"
href="https://www.capgemini.com/wp-content/themes/capgemini-komposite/assets/images/favicon.ico">
<link rel="icon" type="image/png" href="/storybook.png" sizes="192x192">
<!-- TODO-DS: we'll remove this one when we'll decide to release the design tokens-->
<script defer>
if (location.hostname !== 'localhost') {
const $hideDesignSystemFromSidebar = document.createElement('style');
$hideDesignSystemFromSidebar.innerText = `
button[data-item-id*="design-system"] {
display: none !important;
}
`;
document.head.appendChild($hideDesignSystemFromSidebar);
}
</script>
145 changes: 142 additions & 3 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,148 @@
// https://storybook.js.org/docs/react/writing-stories/parameters#global-parameters
import '../stories/govUkStyle.css';
import '../stories/govUkStyleOfficial.css';
import '../stories/liveEdit/style.css';
import {
Title,
Subtitle,
Description,
Primary,
Controls,
Stories,
} from '@storybook/blocks';

export const parameters = {
options: {
storySort: {
order: ['DCXLibrary', ['Introduction','Utils', 'Form', 'CopyToClipboard', 'Details', 'Tabs', 'Table', 'Changelog']]
order: [
'DCXLibrary',
[
'Introduction',
'Utils',
'Form',
[
'Autocomplete',
['Documentation', 'Live', 'Without style', 'Class based'],
'Button',
['Documentation', 'Live', 'Without style', 'Class based'],
'CharacterCount',
['Documentation', 'Live', 'Without style', 'Class based'],
'Checkbox',
['Documentation', 'Live', 'Without style', 'Class based'],
'CheckboxGroup',
['Documentation', 'Live', 'Without style', 'Class based'],
'RadioGroup',
['Documentation', 'Live', 'Without style', 'Class based'],
'Input',
['Documentation', 'Live', 'Without style', 'Class based'],
'InputMasked',
['Documentation', 'Live', 'Without style', 'Class based'],
'Select',
[
'Documentation',
'Live',
'Without style',
'Class based',
'Design system',
[
'Playground',
'Default',
'Accessible',
'Dark',
'Material',
'Floating',
],
],
'MultiSelect',
['Documentation', 'Live', 'Without style', 'Class based'],
'Date',
['Documentation', 'Live', 'Without style', 'Class based'],
'MultiUpload',
['Documentation', 'Live', 'Without style', 'Class based'],
'Progress',
['Documentation', 'Live', 'Without style', 'Class based'],
'Range',
['Documentation', 'Live', 'Without style', 'Class based'],
'Toggle',
['Documentation', 'Live', 'Without style', 'Class based'],
'Tooltip',
['Documentation', 'Live', 'Class based'],
],
'Breadcrumb',
['Documentation', 'Live', 'Without style', 'Class based'],
'CopyToClipboard',
['Documentation', 'Live', 'Without style', 'Class based'],
'Details',
['Documentation', 'Live', 'Without style', 'Class based'],
'Tabs',
['Documentation', 'Live', 'Without style', 'Class based'],
'Table',
['Documentation', 'Live', 'Without style', 'Class based'],
'Typography',
[
'Abbreviate',
['Documentation', 'Live', 'Without style', 'Class based'],
'Blockquote',
['Documentation', 'Live', 'Without style', 'Class based'],
'Heading',
['Documentation', 'Live', 'Without style', 'Class based'],
'Paragraph',
['Documentation', 'Live', 'Without style', 'Class based'],
'Blockquote',
['Documentation', 'Live', 'Without style', 'Class based'],
'CodeSnippet',
['Documentation', 'Live', 'Without style', 'Class based'],
'Label',
['Documentation', 'Live', 'Without style', 'Class based'],
'Link',
['Documentation', 'Live', 'Without style', 'Class based'],
'InsertText',
['Documentation', 'Live', 'Without style', 'Class based'],
'KeyboardInput',
['Documentation', 'Live', 'Without style', 'Class based'],
'Highlight',
['Documentation', 'Live', 'Without style', 'Class based'],
'List',
['Documentation', 'Live', 'Without style', 'Class based'],
],
'Changelog',
],
],
},
},
};
//with this custom configuration we removed the <Controls/> (the properties table) from the page. By default it sits between Primary and Stories
docs: {
page: () => (
<>
<Title />
<Subtitle />
<Description />
<Primary />
<Stories includePrimary={false} />
</>
),
},
};

//It will allow to refresh the iframe all the time you move from one story to another - https://github.com/storybookjs/storybook/issues/16016
let storyId;
let storyTitle;
export const decorators = [
(storyFn, context) => {
console.log('context.title:', context.title);
console.log('storyTitle:', storyTitle);
if (storyTitle && context.title !== storyTitle) {
document.location.reload();
console.log('first');
} else if (
storyId &&
context.id !== storyId &&
context.title !== storyTitle
) {
document.location.reload();
console.log('second');
}
storyId = context.id;
storyTitle = context.title;
return storyFn();
},
];
17 changes: 12 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"window.zoomLevel": 0,
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.formatOnSave": true
"window.zoomLevel": 0,
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.formatOnSave": true,
"stylelint.validate": [
"css",
"scss"
],
"files.associations": {
"*.css": "postcss"
}
}
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
## 0.8.0 (15/09/2023)

<a name="0.8.0"></a>

[Autocomplete - changing defaultValue prop has no affect](https://github.com/Capgemini/dcx-react-library/issues/455)
[Autocomplete - doesn't auto scroll for filtered list on keydown](https://github.com/Capgemini/dcx-react-library/issues/470)
[Button - add new properties](https://github.com/Capgemini/dcx-react-library/issues/466)
[Tabs - non-js compliant](https://github.com/Capgemini/dcx-react-library/issues/283)

**New components**
[Code Snippet](https://github.com/Capgemini/dcx-react-library/issues/500)
[Breadcrumbs](https://github.com/Capgemini/dcx-react-library/issues/415)
[Preformatted Text](https://github.com/Capgemini/dcx-react-library/issues/503)
[Abbreviate](https://github.com/Capgemini/dcx-react-library/issues/497)
[Highlight](https://github.com/Capgemini/dcx-react-library/issues/498)
[List item](https://github.com/Capgemini/dcx-react-library/issues/453)
[Blockquote](https://github.com/Capgemini/dcx-react-library/issues/499)
[Keyboard Shortcut](https://github.com/Capgemini/dcx-react-library/issues/501)
[Paragraph](https://github.com/Capgemini/dcx-react-library/issues/455)
[Insert Text](https://github.com/Capgemini/dcx-react-library/issues/452)
[Link](https://github.com/Capgemini/dcx-react-library/issues/467)
[Label](https://github.com/Capgemini/dcx-react-library/issues/466)
[Heading](https://github.com/Capgemini/dcx-react-library/issues/450)

**Documentation**
[clientOnly](https://github.com/Capgemini/dcx-react-library/issues/459)
[Storybook - v7](https://github.com/Capgemini/dcx-react-library/issues/473)

**Design system - not publicly available yet... stay tuned ;)**
[Button](https://github.com/Capgemini/dcx-react-library/issues/468)
[Select](https://github.com/Capgemini/dcx-react-library/issues/469)
[List Item](https://github.com/Capgemini/dcx-react-library/issues/487)
[Heading](https://github.com/Capgemini/dcx-react-library/issues/484)
[Insert Text](https://github.com/Capgemini/dcx-react-library/issues/486)
[Paragraph](https://github.com/Capgemini/dcx-react-library/issues/488)
[Label](https://github.com/Capgemini/dcx-react-library/issues/485)

## 0.7.0 (27/03/2023)

<a name="0.7.0"></a>
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ To create a new component the following must be satisfied before adding
4. create the test under `__tests__` within the component-name folder
5. create or edit a demo in the `example/src`
6. create or edit the story in the `stories`
7. in case you create a new component update the `./storybook/preview,js` file adding your component (follow the style of the other items already present)

Example folder structure with component `SnackBar`:

Expand Down
Loading