@innovaccer/design-system 2.9.0-0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/components/organisms/pageHeader/__stories__/variants/withTabs.story.tsx +7 -7
- package/css/dist/index.css +14 -0
- package/css/dist/index.css.map +1 -1
- package/css/src/components/calendar.css +1 -0
- package/css/src/components/checkbox.css +1 -0
- package/css/src/components/chip.css +1 -0
- package/css/src/components/dropdown.css +1 -0
- package/css/src/components/dropdownButton.css +1 -0
- package/css/src/components/horizontalNav.css +1 -0
- package/css/src/components/input.css +1 -0
- package/css/src/components/link.css +1 -0
- package/css/src/components/metricInput.css +1 -0
- package/css/src/components/radio.css +2 -0
- package/css/src/components/slider.css +2 -0
- package/css/src/components/verticalNav.css +1 -0
- package/dist/index.esm.js +3 -3
- package/dist/index.js +3 -3
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.br +0 -0
- package/dist/index.umd.js.gz +0 -0
- package/docs/src/components/Container/ComponentsContainer.js +2 -2
- package/docs/src/components/Container/Container.js +1 -1
- package/docs/src/components/Header/Header.js +6 -8
- package/docs/src/components/Layout.js +8 -13
- package/docs/src/components/LeftNav/LeftNav.js +1 -1
- package/docs/src/components/Meta.js +5 -2
- package/docs/src/components/css/style.css +4 -0
- package/docs/src/components/templates/Default.js +1 -2
- package/docs/src/pages/components/avatar/code.mdx +0 -1
- package/docs/src/pages/components/avatar/usage.mdx +0 -1
- package/docs/src/pages/components/badges/code.mdx +0 -1
- package/docs/src/pages/components/badges/usage.mdx +0 -1
- package/docs/src/pages/components/breadcrumbs/code.mdx +0 -1
- package/docs/src/pages/components/breadcrumbs/usage.mdx +0 -1
- package/docs/src/pages/components/button/code.mdx +0 -1
- package/docs/src/pages/components/button/content.mdx +0 -1
- package/docs/src/pages/components/button/usage.mdx +0 -1
- package/docs/src/pages/components/calendar/code.mdx +0 -1
- package/docs/src/pages/components/calendar/usage.mdx +0 -1
- package/docs/src/pages/components/card/code.mdx +0 -1
- package/docs/src/pages/components/card/usage.mdx +0 -1
- package/docs/src/pages/components/checkbox/code.mdx +0 -1
- package/docs/src/pages/components/checkbox/usage.mdx +0 -1
- package/docs/src/pages/components/chips/code.mdx +0 -1
- package/docs/src/pages/components/chips/usage.mdx +0 -1
- package/docs/src/pages/components/index.mdx +0 -1
- package/docs/src/pages/components/message/code.mdx +0 -1
- package/docs/src/pages/components/message/usage.mdx +0 -1
- package/docs/src/pages/components/overview/tabs/Overview.js +1 -1
- package/docs/src/pages/components/overview/tabs/overview.css +2 -3
- package/docs/src/pages/components/radio/code.mdx +0 -1
- package/docs/src/pages/components/radio/usage.mdx +0 -1
- package/docs/src/pages/components/sidesheet/code.mdx +0 -1
- package/docs/src/pages/components/sidesheet/interactions.mdx +0 -1
- package/docs/src/pages/components/sidesheet/usage.mdx +0 -1
- package/docs/src/pages/components/slider/code.mdx +0 -1
- package/docs/src/pages/components/slider/usage.mdx +0 -1
- package/docs/src/pages/components/statushint/code.mdx +0 -1
- package/docs/src/pages/components/statushint/usage.mdx +0 -1
- package/docs/src/pages/components/steppers/code.mdx +0 -1
- package/docs/src/pages/components/steppers/interactions.mdx +0 -1
- package/docs/src/pages/components/steppers/usage.mdx +0 -1
- package/docs/src/pages/components/switch/code.mdx +0 -1
- package/docs/src/pages/components/switch/interactions.mdx +0 -1
- package/docs/src/pages/components/switch/usage.mdx +0 -1
- package/docs/src/pages/components/table/code.mdx +0 -1
- package/docs/src/pages/components/table/interactions.mdx +0 -1
- package/docs/src/pages/components/table/usage.mdx +0 -1
- package/docs/src/pages/components/tabs/code.mdx +0 -1
- package/docs/src/pages/components/tabs/interactions.mdx +0 -1
- package/docs/src/pages/components/tabs/usage.mdx +0 -1
- package/docs/src/pages/components/toast/code.mdx +0 -1
- package/docs/src/pages/components/toast/interactions.mdx +0 -1
- package/docs/src/pages/components/toast/usage.mdx +0 -1
- package/docs/src/pages/components/tooltip/code.mdx +0 -1
- package/docs/src/pages/components/tooltip/interactions.mdx +0 -1
- package/docs/src/pages/components/tooltip/usage.mdx +0 -1
- package/docs/src/pages/index.js +1 -1
- package/docs/src/util/Frontmatter.js +0 -2
- package/package.json +1 -1
package/dist/index.umd.js.br
CHANGED
|
Binary file
|
package/dist/index.umd.js.gz
CHANGED
|
Binary file
|
|
@@ -46,13 +46,13 @@ const ComponentsContainer = ({
|
|
|
46
46
|
const pagePath = relativePagePath.split('/');
|
|
47
47
|
const pages = pagePath.slice(0, pagePath.length - 1);
|
|
48
48
|
const path = `${pages.join('/')}/${nextTabSlug}/`;
|
|
49
|
-
navigate(path);
|
|
49
|
+
navigate(path, { state: { animation: false }, });
|
|
50
50
|
setActiveIndex(tabIndex);
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
return (
|
|
54
54
|
<>
|
|
55
|
-
<Heading>{isSiblingTab ? frontmatter?.title : pageTitle}</Heading>
|
|
55
|
+
<Heading size='xl' className='my-5'>{isSiblingTab ? frontmatter?.title : pageTitle}</Heading>
|
|
56
56
|
<Paragraph>{isSiblingTab ? frontmatter?.description : pageDescription}</Paragraph>
|
|
57
57
|
|
|
58
58
|
{tabsList && tabsList.length && (
|
|
@@ -52,7 +52,7 @@ const Container = ({
|
|
|
52
52
|
const pagePath = relativePagePath.split('/');
|
|
53
53
|
const pages = pagePath.slice(0, pagePath.length - 1);
|
|
54
54
|
const path = `${pages.join('/')}/${nextTabSlug}/`;
|
|
55
|
-
navigate(path);
|
|
55
|
+
navigate(path, { state: { animation: false }, });
|
|
56
56
|
setActiveIndex(tabIndex);
|
|
57
57
|
};
|
|
58
58
|
|
|
@@ -6,6 +6,11 @@ import { Link as MDSLink } from '@innovaccer/design-system';
|
|
|
6
6
|
|
|
7
7
|
const Header = ({ relativePagePath }) => {
|
|
8
8
|
const items = useHeaderItems();
|
|
9
|
+
const checkActive = (label) => {
|
|
10
|
+
const pagePath = relativePagePath.split('/');
|
|
11
|
+
if(pagePath[1]===label.toLowerCase() || pagePath[2]===label.toLowerCase()) return true;
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
9
14
|
return (
|
|
10
15
|
<div
|
|
11
16
|
id="mainHeader"
|
|
@@ -36,14 +41,7 @@ const Header = ({ relativePagePath }) => {
|
|
|
36
41
|
<Link
|
|
37
42
|
key={index}
|
|
38
43
|
to={link}
|
|
39
|
-
className={`HeaderLink
|
|
40
|
-
label.toLowerCase()
|
|
41
|
-
)
|
|
42
|
-
? 'HeaderLink--active'
|
|
43
|
-
: ''
|
|
44
|
-
} ${relativePagePath.includes(
|
|
45
|
-
label.toLowerCase()
|
|
46
|
-
)
|
|
44
|
+
className={`HeaderLink ${checkActive(label)
|
|
47
45
|
? 'HeaderLink--active'
|
|
48
46
|
: 'HeaderLink--default'
|
|
49
47
|
}`}
|
|
@@ -84,10 +84,10 @@ const Layout = ({
|
|
|
84
84
|
pageDescription,
|
|
85
85
|
pageKeywords,
|
|
86
86
|
relativePagePath,
|
|
87
|
-
component,
|
|
88
87
|
tabs,
|
|
89
88
|
logos,
|
|
90
89
|
showMobile,
|
|
90
|
+
location,
|
|
91
91
|
...rest
|
|
92
92
|
}) => {
|
|
93
93
|
const is404 = children && children.key === null;
|
|
@@ -198,13 +198,7 @@ const Layout = ({
|
|
|
198
198
|
};
|
|
199
199
|
|
|
200
200
|
const showAnimation = () => {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
const { tabs } = frontmatter;
|
|
204
|
-
const name = relativePagePath.slice(relativePagePath.lastIndexOf('/') + 1, relativePagePath.lastIndexOf('.mdx'));
|
|
205
|
-
if (tabs?.length && name !== tabs[0].toLowerCase().split(' ').join('-')) {
|
|
206
|
-
return false;
|
|
207
|
-
}
|
|
201
|
+
if (location.state?.animation === false) return false;
|
|
208
202
|
return true;
|
|
209
203
|
}
|
|
210
204
|
|
|
@@ -212,9 +206,11 @@ const Layout = ({
|
|
|
212
206
|
<>
|
|
213
207
|
<Meta
|
|
214
208
|
titleType={titleType}
|
|
215
|
-
|
|
216
|
-
|
|
209
|
+
docTitle={pageTitle}
|
|
210
|
+
docDescription={pageDescription}
|
|
217
211
|
pageKeywords={pageKeywords}
|
|
212
|
+
frontmatter={frontmatter}
|
|
213
|
+
relativePagePath={relativePagePath}
|
|
218
214
|
/>
|
|
219
215
|
<Header
|
|
220
216
|
leftMenuList={leftMenuList}
|
|
@@ -229,8 +225,8 @@ const Layout = ({
|
|
|
229
225
|
frontmatter={frontmatter}
|
|
230
226
|
/>
|
|
231
227
|
<Column className={`${showAnimation() ? "page-animation" : ''} page-scroll h-100`}>
|
|
232
|
-
<Row>
|
|
233
|
-
<Column className="px-12 py-8 min-vh-100" size={9}>
|
|
228
|
+
<Row className='justify-content-center'>
|
|
229
|
+
<Column className="px-12 py-8 min-vh-100 inner-left-container" size={9}>
|
|
234
230
|
{!relativePagePath.includes('components') && (
|
|
235
231
|
<Container
|
|
236
232
|
pageTitle={pageTitle}
|
|
@@ -249,7 +245,6 @@ const Layout = ({
|
|
|
249
245
|
<ComponentsContainer
|
|
250
246
|
pageTitle={pageTitle}
|
|
251
247
|
relativePagePath={relativePagePath}
|
|
252
|
-
component={component}
|
|
253
248
|
tabs={tabs}
|
|
254
249
|
pageDescription={pageDescription}
|
|
255
250
|
frontmatter={frontmatter}
|
|
@@ -5,10 +5,13 @@ import { useMetadata } from '../util/hooks';
|
|
|
5
5
|
const favicon = '/icons/favicon_io/favicon-16x16.png';
|
|
6
6
|
const faviconLarge = '/icons/favicon_io/favicon-32x32.png';
|
|
7
7
|
const faviconApple = '/icons/favicon_io/apple-touch-icon.png';
|
|
8
|
-
const
|
|
8
|
+
const cardImage = '/icons/card-image.png';
|
|
9
9
|
|
|
10
|
-
const Meta = ({
|
|
10
|
+
const Meta = ({ docTitle, docDescription, pageKeywords, titleType, frontmatter, relativePagePath }) => {
|
|
11
11
|
const { title, description, keywords, lang } = useMetadata();
|
|
12
|
+
const isSiblingTab = relativePagePath?.split('.')[0] === '/' + docTitle?.replace(/\s/g, '');
|
|
13
|
+
const pageTitle = isSiblingTab ? frontmatter?.title : docTitle;
|
|
14
|
+
const pageDescription = isSiblingTab ? frontmatter?.description : docDescription;
|
|
12
15
|
|
|
13
16
|
const getPageTitle = () => {
|
|
14
17
|
switch (titleType) {
|
|
@@ -4,7 +4,7 @@ import LastModifiedDate from '../LastModifiedDate';
|
|
|
4
4
|
|
|
5
5
|
export default ({ pageContext, children, ...rest }) => {
|
|
6
6
|
const { frontmatter = {}, titleType, relativePagePath } = pageContext;
|
|
7
|
-
const { title, description, keywords,
|
|
7
|
+
const { title, description, keywords, tabs, logos, showMobile=false } = frontmatter;
|
|
8
8
|
return (
|
|
9
9
|
<Layout
|
|
10
10
|
pageTitle={title}
|
|
@@ -12,7 +12,6 @@ export default ({ pageContext, children, ...rest }) => {
|
|
|
12
12
|
pageDescription={description}
|
|
13
13
|
pageKeywords={keywords}
|
|
14
14
|
relativePagePath={relativePagePath}
|
|
15
|
-
component={component}
|
|
16
15
|
tabs={tabs}
|
|
17
16
|
logos={logos}
|
|
18
17
|
showMobile={showMobile}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Checkbox
|
|
3
3
|
description: A checkbox lets users select one or more values from a list of options. Options are not mutually exclusive here so the selection of any option won’t affect the other.
|
|
4
|
-
component: Checkbox
|
|
5
4
|
tabs: ['Usage', 'Code']
|
|
6
5
|
showMobile: true
|
|
7
6
|
---
|
|
@@ -3,7 +3,6 @@ title: Checkbox
|
|
|
3
3
|
description:
|
|
4
4
|
A checkbox lets users select one or more values from a list of options.
|
|
5
5
|
Options are not mutually exclusive here so the selection of any option won’t affect the other.
|
|
6
|
-
component: Checkbox
|
|
7
6
|
tabs: ["Usage", "Code"]
|
|
8
7
|
showMobile: true
|
|
9
8
|
---
|
|
@@ -45,7 +45,7 @@ function Overview() {
|
|
|
45
45
|
className='w-100 overflow-hidden overview-card pb-5'
|
|
46
46
|
>
|
|
47
47
|
<CardBody>
|
|
48
|
-
<div className='py-5'>
|
|
48
|
+
<div className='py-5 card-opacity'>
|
|
49
49
|
<div className='d-flex justify-content-center align-items-center' style={{ overflow: 'hidden', height: '136px' }}>
|
|
50
50
|
{React.createElement(image)}
|
|
51
51
|
</div>
|
|
@@ -4,7 +4,6 @@ description:
|
|
|
4
4
|
Radio button lets users select one value from a list
|
|
5
5
|
of mutually exclusive choices. Whenever a user makes a new selection,
|
|
6
6
|
the previously selected option is deselected. If multi-select is required use checkboxes instead of radio.
|
|
7
|
-
component: radio
|
|
8
7
|
tabs: ['Usage', 'Code']
|
|
9
8
|
showMobile: true
|
|
10
9
|
---
|
|
@@ -4,7 +4,6 @@ description:
|
|
|
4
4
|
Radio button lets users select one value from a list
|
|
5
5
|
of mutually exclusive choices. Whenever a user makes a new selection,
|
|
6
6
|
the previously selected option is deselected. If multi-select is required use checkboxes instead of radio.
|
|
7
|
-
date: 13 Jan 2022
|
|
8
7
|
tabs: ['Usage', 'Code']
|
|
9
8
|
showMobile: true
|
|
10
9
|
---
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
title: Side sheet
|
|
3
3
|
description:
|
|
4
4
|
Side sheets are used to present a great amount of information as a part of users' primary task while maintaining the context with the background content.
|
|
5
|
-
component: sidesheet
|
|
6
5
|
tabs: ['Usage','Interactions', 'Code']
|
|
7
6
|
showMobile: true
|
|
8
7
|
---
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
title: Side sheet
|
|
3
3
|
description:
|
|
4
4
|
Side sheets are used to present a great amount of information as a part of users' primary task while maintaining the context with the background content.
|
|
5
|
-
component: sidesheet
|
|
6
5
|
tabs: ['Usage','Interactions', 'Code']
|
|
7
6
|
showMobile: true
|
|
8
7
|
---
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
title: Side sheet
|
|
3
3
|
description:
|
|
4
4
|
Side sheets are used to present a great amount of information as a part of users' primary task while maintaining the context with the background content.
|
|
5
|
-
component: sidesheet
|
|
6
5
|
tabs: ['Usage','Interactions', 'Code']
|
|
7
6
|
showMobile: true
|
|
8
7
|
---
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
title: Switch
|
|
3
3
|
description:
|
|
4
4
|
Switches are used to toggle between two states in a user interface - ON and OFF, hence resembling the real-life switches used to turn something ON or OFF.
|
|
5
|
-
date: 24 Jan 2022
|
|
6
5
|
tabs: ['Usage', 'Interactions', 'Code']
|
|
7
6
|
showMobile: true
|
|
8
7
|
---
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
title: Switch
|
|
3
3
|
description:
|
|
4
4
|
Switches are used to toggle between two states in a user interface - ON and OFF, hence resembling the real-life switches used to turn something ON or OFF.
|
|
5
|
-
date: 24 Jan 2022
|
|
6
5
|
tabs: ['Usage', 'Interactions', 'Code']
|
|
7
6
|
showMobile: true
|
|
8
7
|
---
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
title: Switch
|
|
3
3
|
description:
|
|
4
4
|
Switches are used to toggle between two states in a user interface - ON and OFF, hence resembling the real-life switches used to turn something ON or OFF.
|
|
5
|
-
date: 24 Jan 2022
|
|
6
5
|
tabs: ['Usage', 'Interactions', 'Code']
|
|
7
6
|
showMobile: true
|
|
8
7
|
---
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Table
|
|
3
3
|
description: Tables are used for arranging information in a tabular format by laying out resource items, displaying data heavily based on numbers, or a list of homogenous items in their simplest form.
|
|
4
|
-
component: Table
|
|
5
4
|
tabs: ['Usage', 'Interactions', 'Code']
|
|
6
5
|
showMobile: true
|
|
7
6
|
---
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Table
|
|
3
3
|
description: Tables are used for arranging information in a tabular format by laying out resource items, displaying data heavily based on numbers, or a list of homogenous items in their simplest form.
|
|
4
|
-
component: Table
|
|
5
4
|
tabs: ['Usage', 'Interactions', 'Code']
|
|
6
5
|
showMobile: true
|
|
7
6
|
---
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Table
|
|
3
3
|
description: Tables are used for arranging information in a tabular format by laying out resource items, displaying data heavily based on numbers, or a list of homogenous items in their simplest form.
|
|
4
|
-
component: Table
|
|
5
4
|
tabs: ['Usage', 'Interactions', 'Code']
|
|
6
5
|
showMobile: true
|
|
7
6
|
---
|
package/docs/src/pages/index.js
CHANGED
|
@@ -56,7 +56,7 @@ const Home = () => {
|
|
|
56
56
|
|
|
57
57
|
return (
|
|
58
58
|
<Homepage relativePagePath={'/404'} is404={true}>
|
|
59
|
-
<Meta titleType='page'
|
|
59
|
+
<Meta titleType='page' docTitle='Masala Design System' />
|
|
60
60
|
<Row className="h-100">
|
|
61
61
|
<Column className="page-animation">
|
|
62
62
|
|