Skip to content

Commit

Permalink
docs(PPDSC-2252): Misc updates on the site (#317)
Browse files Browse the repository at this point in the history
* docs(PPDSC-2252): Misc updates on the site changes.
  • Loading branch information
Srinivasan-Ramasamy authored Aug 3, 2022
1 parent fbac629 commit 677174f
Show file tree
Hide file tree
Showing 59 changed files with 289 additions and 1,459 deletions.
233 changes: 68 additions & 165 deletions site/components/sidebar/__tests__/__snapshots__/sidebar.test.tsx.snap

Large diffs are not rendered by default.

16 changes: 14 additions & 2 deletions site/components/table/column-renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const renderIcon = (value?: TableRowValue) => {
const remapComponents: {[id: string]: string} = {
'Icon Button': 'Button',
Icon: 'Icons',
'Text Block (input)': 'Text Block',
};

const renderSingleOrMultiple = (
Expand Down Expand Up @@ -149,15 +150,26 @@ export const renderCols = (

if (!route) return v;

return (
const getLink = (value: string) => (
<Link
type="standalone"
overrides={{typographyPreset: 'utilityButton020'}}
href={route.id}
>
{v}
{value}
</Link>
);

if (v.includes('(')) {
const strArr = v.split('(');
return (
<>
{getLink(strArr[0])}
{` (${strArr[1]}`}
</>
);
}
return getLink(v);
}, cellValue as string | string[]);
break;
}
Expand Down
2 changes: 1 addition & 1 deletion site/pages/components/accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ const AccordionComponent = (layoutProps: LayoutProps) => (
uiKit: true,
}}
related={{
related: ['Tabs', 'Link', 'Menu'],
related: ['Link', 'Menu', 'Scroll', 'Tabs', 'Tags', 'Title Bar'],
}}
/>
);
Expand Down
9 changes: 7 additions & 2 deletions site/pages/components/banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,13 @@ const BannerComponent = (layoutProps: LayoutProps) => (
uiKit: true,
}}
related={{
introduction: 'Componenets related to Banner',
related: ['Drawer', 'Toast', 'Modal'],
related: [
'Flag',
'Progress Indicator',
'Toast',
'Inline Message',
'Tooltip',
],
}}
/>
);
Expand Down
15 changes: 13 additions & 2 deletions site/pages/components/block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,19 @@ const BlockComponent = (layoutProps: LayoutProps) => (
uiKit: true,
}}
related={{
introduction: 'Componenets related to Block',
related: ['Grid', 'Stack', 'Text Block'],
related: [
'Card',
'Divider',
'Drawer',
'Fieldset',
'Grid',
'Grid Layout',
'Modal',
'Popover',
'Stack',
'Structured List',
'Visibility',
],
}}
/>
);
Expand Down
10 changes: 8 additions & 2 deletions site/pages/components/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,14 @@ const ButtonComponent = (layoutProps: LayoutProps) => (
themes: true,
}}
related={{
introduction: '',
related: ['Tag', 'Link', 'Share Bar'],
related: [
'Checkbox',
'Form',
'Radio Button',
'Select',
'Slider',
'Text Field',
],
}}
/>
);
Expand Down
10 changes: 8 additions & 2 deletions site/pages/components/checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -894,8 +894,14 @@ const CheckboxComponent = (layoutProps: LayoutProps) => (
themes: true,
}}
related={{
introduction: '',
related: ['Form', 'Radio Button'],
related: [
'Button',
'Form',
'Radio Button',
'Select',
'Slider',
'Text Field',
],
}}
/>
);
Expand Down
20 changes: 13 additions & 7 deletions site/pages/components/divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,19 @@ const DividerComponent = (layoutProps: LayoutProps) => (
themes: true,
}}
related={{
introduction: '',
related: ['Block', 'Stack'],
}}
featureCard={{
title: 'Need Help?',
description: 'Cant find what you are looking for?',
href: '/about/contact-us/',
related: [
'Block',
'Card',
'Drawer',
'Fieldset',
'Grid',
'Grid Layout',
'Modal',
'Popover',
'Stack',
'Structured List',
'Visibility',
],
}}
/>
);
Expand Down
19 changes: 15 additions & 4 deletions site/pages/components/drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -634,10 +634,6 @@ const DrawerComponent = (layoutProps: LayoutProps) => (
},
],
}}
related={{
introduction: '',
related: ['Modal', 'Menu'],
}}
compliance={{
states: true,
variations: true,
Expand All @@ -651,6 +647,21 @@ const DrawerComponent = (layoutProps: LayoutProps) => (
props: true,
uiKit: true,
}}
related={{
related: [
'Block',
'Card',
'Divider',
'Fieldset',
'Grid',
'Grid Layout',
'Modal',
'Popover',
'Stack',
'Structured List',
'Visibility',
],
}}
/>
);

Expand Down
15 changes: 13 additions & 2 deletions site/pages/components/fieldset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,19 @@ const FieldsetComponent = (layoutProps: LayoutProps) => (
themes: true,
}}
related={{
introduction: '',
related: ['Form', 'Checkbox', 'Radio Button'],
related: [
'Block',
'Card',
'Divider',
'Drawer',
'Grid',
'Grid Layout',
'Modal',
'Popover',
'Stack',
'Structured List',
'Visibility',
],
}}
/>
);
Expand Down
3 changes: 1 addition & 2 deletions site/pages/components/inline-message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,7 @@ const InlineMessageComponent = (layoutProps: LayoutProps) => (
uiKit: true,
}}
related={{
introduction: 'Components related to inline message',
related: ['Toast', 'Modal', 'Drawer'],
related: ['Banner', 'Flag', 'Progress Indicator', 'Toast', 'Tooltip'],
}}
/>
);
Expand Down
3 changes: 1 addition & 2 deletions site/pages/components/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,7 @@ const MenuComponent = (layoutProps: LayoutProps) => (
uiKit: true,
}}
related={{
introduction: 'Componenets related to Menu',
related: ['Tabs', 'Link', 'Divider'],
related: ['Accordion', 'Link', 'Scroll', 'Tabs', 'Tags', 'Title Bar'],
}}
/>
);
Expand Down
15 changes: 13 additions & 2 deletions site/pages/components/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -667,8 +667,19 @@ const ModalComponent = (layoutProps: LayoutProps) => (
uiKit: true,
}}
related={{
introduction: '',
related: ['Drawer', 'Menu'],
related: [
'Block',
'Card',
'Divider',
'Drawer',
'Fieldset',
'Grid',
'Grid Layout',
'Popover',
'Stack',
'Structured List',
'Visibility',
],
}}
/>
);
Expand Down
14 changes: 13 additions & 1 deletion site/pages/components/popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,19 @@ const PopoverComponent = (layoutProps: LayoutProps) => (
uiKit: true,
}}
related={{
related: ['Tooltip', 'Modal'],
related: [
'Block',
'Card',
'Divider',
'Drawer',
'Fieldset',
'Grid',
'Grid Layout',
'Modal',
'Stack',
'Structured List',
'Visibility',
],
}}
/>
);
Expand Down
3 changes: 1 addition & 2 deletions site/pages/components/radio-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -880,8 +880,7 @@ const RadioButtonComponent = (layoutProps: LayoutProps) => (
themes: true,
}}
related={{
introduction: '',
related: ['Form', 'Checkbox'],
related: ['Button', 'Checkbox', 'Form', 'Select', 'Slider', 'Text Field'],
}}
/>
);
Expand Down
28 changes: 22 additions & 6 deletions site/pages/components/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ const SelectComponent = (layoutProps: LayoutProps) => (
rows: [
{
name: 'Input Container',
description: 'Interactable input area',
description: 'Interactive input area',
component: ['HTML Input', 'Block'],
optional: undefined,
},
Expand All @@ -323,9 +323,19 @@ const SelectComponent = (layoutProps: LayoutProps) => (
},
{
name: 'Input & Placeholder Text',
description:
'Input text - a value the user has entered into a input. Placeholder text - a short hint that describes the expected value of an input',
component: 'Text block',
description: (
<>
Input text - a value the user has entered into an input.
<br />
<br />
Placeholder text - a short hint that describes the expected value
of an input
</>
),
component: [
'Text Block (input)',
'HTML attribute (placeholder text)',
],
optional: undefined,
},
{
Expand Down Expand Up @@ -885,8 +895,14 @@ const SelectComponent = (layoutProps: LayoutProps) => (
themes: true,
}}
related={{
introduction: '',
related: ['Form'],
related: [
'Button',
'Checkbox',
'Form',
'Radio Button',
'Slider',
'Text Field',
],
}}
/>
);
Expand Down
11 changes: 9 additions & 2 deletions site/pages/components/share-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,15 @@ const ShareBarComponent = (layoutProps: LayoutProps) => (
themes: true,
}}
related={{
introduction: '',
related: ['Button', 'Icon Button'],
related: [
'Button',
'Checkbox',
'Form',
'Radio Button',
'Select',
'Slider',
'Text Field',
],
}}
/>
);
Expand Down
15 changes: 13 additions & 2 deletions site/pages/components/structured-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,19 @@ const StructuredListComponent = (layoutProps: LayoutProps) => (
themes: true,
}}
related={{
introduction: '',
related: ['Grid', 'Block'],
related: [
'Block',
'Card',
'Divider',
'Drawer',
'Fieldset',
'Grid',
'Grid Layout',
'Modal',
'Popover',
'Stack',
'Visibility',
],
}}
/>
);
Expand Down
10 changes: 3 additions & 7 deletions site/pages/components/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -999,10 +999,6 @@ const TabsComponent = (layoutProps: LayoutProps) => (
},
],
}}
related={{
introduction: '',
related: ['Scroll'],
}}
accessibility={{
introduction: (
<>
Expand All @@ -1028,8 +1024,6 @@ const TabsComponent = (layoutProps: LayoutProps) => (
},
],
},
infoNoticeFocus: 'Scroll controls are not focussable.',

interaction: {
title: 'Keyboard Interactions',
tableRows: [
Expand Down Expand Up @@ -1073,7 +1067,6 @@ const TabsComponent = (layoutProps: LayoutProps) => (
},
],
},

aria: {
title: 'WAI-ARIA',
tableRows: [
Expand Down Expand Up @@ -1134,6 +1127,9 @@ const TabsComponent = (layoutProps: LayoutProps) => (
title: 'SEO Considerations',
introduction: 'Ensure icons have Alt Text applied.',
}}
related={{
related: ['Accordion', 'Link', 'Scroll', 'Menu', 'Tags', 'Title Bar'],
}}
/>
);

Expand Down
Loading

0 comments on commit 677174f

Please sign in to comment.