Skip to content

Commit

Permalink
Merge pull request #2458 from anuradha9712/v4.x
Browse files Browse the repository at this point in the history
V4.x
  • Loading branch information
anuradha9712 authored Dec 17, 2024
2 parents 7e5860c + ad05656 commit 8ca0e16
Show file tree
Hide file tree
Showing 13 changed files with 221 additions and 132 deletions.
14 changes: 14 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ module.exports = {
'@storybook/addon-essentials',
'@storybook/addon-a11y',
'@storybook/addon-knobs',
{
name: '@storybook/addon-postcss',
options: {
postcssLoaderOptions: {
implementation: require('postcss'),
postcssOptions: {
plugins: [
require('autoprefixer'),
require('postcss-color-mod-function'),
],
},
},
},
},
{
name: 'storybook-css-modules',
options: {
Expand Down
2 changes: 0 additions & 2 deletions css/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const sourcemaps = require('gulp-sourcemaps');
const concat = require('gulp-concat');
const postcssColorMod = require('postcss-color-mod-function');
const cleaner = require('gulp-clean');
const path = require('path');

const materialIcons = './material-design-icons/iconfont/material-icons.css';
const materialFont = './material-design-icons/iconfont/*.{ttf,otf,woff2}';
Expand All @@ -18,7 +17,6 @@ const sources = [
'./src/components/*.css',
'./src/ai-components/*.css',
'./src/utils/*.css',
path.join(__dirname, '../core/components/**/*.css'),
];

function clean() {
Expand Down
8 changes: 7 additions & 1 deletion examples/esm-ts/src/Page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Row, Column, PageHeader, Button, Tabs, Card, Table, ButtonProps } from '@innovaccer/design-system';
import { Row, Column, PageHeader, Button, Tabs, Card, Table, ButtonProps, Message } from '@innovaccer/design-system';

// You can now use the Button component and its props in your React components
const MyComponent: React.FC = () => {
Expand Down Expand Up @@ -156,6 +156,12 @@ const UserManagementTable: React.FC = () => {
'<button data-test="DesignSystem-Button" class="Button Button--regular Button--alert Button--iconAlign-left" tabindex="0" aria-label="Delete"><span class="Button-text">Delete</span></button>',
}}
></div>

<Message
appearance="alert"
className="w-50"
description="Could not start verification. Please try again later."
/>
</Column>
</Row>
);
Expand Down
9 changes: 7 additions & 2 deletions examples/esm-umd-ts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<!-- Don't use this in production: -->
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<!-- <script src="index.js"></script> -->
<script src="https://unpkg.com/@innovaccer/design-system@2.36.2/dist/index.umd.js"></script>
<!-- <script src="https://unpkg.com/@innovaccer/design-system@2.36.2/dist/index.umd.js"></script> -->
</head>

<body>
Expand All @@ -26,7 +26,7 @@
<div id="umd"></div>

<script type="text/babel">
const { Icon, GridCell, Button, Card, Table } = InnovaccerDesignSystem;
const { Icon, GridCell, Button, Card, Table, Message } = InnovaccerDesignSystem;

const MyTable = () => {
const data = [
Expand Down Expand Up @@ -918,6 +918,11 @@
return (
<div className="p-8 vh-100 bg-secondary-lighter">
<MyTable />
<Message
appearance="alert"
className="w-50"
description="Could not start verification. Please try again later."
/>
</div>
);
}
Expand Down
14 changes: 6 additions & 8 deletions examples/esm-umd-ts/src/Page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import React from 'react';
import { Row, Column, PageHeader, Button, Tabs, Card, Table, ButtonProps } from '@innovaccer/design-system';





import { Row, Column, PageHeader, Button, Tabs, Card, Table, ButtonProps, Message } from '@innovaccer/design-system';

// You can now use the Button component and its props in your React components
const MyComponent: React.FC = () => {
Expand All @@ -22,8 +17,6 @@ const MyComponent: React.FC = () => {
);
};



const UserManagementTable: React.FC = () => {
const tabs = [
{
Expand Down Expand Up @@ -163,6 +156,11 @@ const UserManagementTable: React.FC = () => {
'<button data-test="DesignSystem-Button" class="Button Button--regular Button--alert Button--iconAlign-left" tabindex="0" aria-label="Delete"><span class="Button-text">Delete</span></button>',
}}
></div>
<Message
appearance="alert"
className="w-50"
description="Could not start verification. Please try again later."
/>
</Column>
</Row>
);
Expand Down
120 changes: 39 additions & 81 deletions examples/umd/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/umd/index.css.map

Large diffs are not rendered by default.

73 changes: 39 additions & 34 deletions examples/umd/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<div id="root"></div>

<script type="text/babel">
console.log('InnovaccerDesignSystem', InnovaccerDesignSystem)
const { Icon, GridCell, Table } = InnovaccerDesignSystem;
console.log('InnovaccerDesignSystem', InnovaccerDesignSystem);
const { Icon, GridCell, Table, Message } = InnovaccerDesignSystem;

const MyTable = () => {
const data = [
Expand Down Expand Up @@ -874,38 +874,38 @@

return (
<div className="vh-75">
<Table
error={error}
data={data}
schema={schema}
withHeader={true}
uniqueColumnName="email"
headerOptions={{
withSearch: true,
globalActionRenderer: globalActionTrigger,
allowSelectAll: true,
}}
onSearch={(currData, searchTerm) => {
console.log('onsearch called', searchTerm);
setError(!error);
return currData.filter(
(d) =>
d.firstName.toLowerCase().match(searchTerm.toLowerCase()) ||
d.lastName.toLowerCase().match(searchTerm.toLowerCase())
);
}}
withCheckbox={true}
onSelect={(rowIndex, selected, selectedList, selectAll) =>
console.log(
`on-select:- rowIndex: ${rowIndex} selected: ${selected} selectedList: ${JSON.stringify(
selectedList
)} selectAll: ${selectAll}`
)
}
withPagination={true}
pageSize={50}
onPageChange={(newPage) => console.log(`on-page-change:- ${newPage}`)}
/>
<Table
error={error}
data={data}
schema={schema}
withHeader={true}
uniqueColumnName="email"
headerOptions={{
withSearch: true,
globalActionRenderer: globalActionTrigger,
allowSelectAll: true,
}}
onSearch={(currData, searchTerm) => {
console.log('onsearch called', searchTerm);
setError(!error);
return currData.filter(
(d) =>
d.firstName.toLowerCase().match(searchTerm.toLowerCase()) ||
d.lastName.toLowerCase().match(searchTerm.toLowerCase())
);
}}
withCheckbox={true}
onSelect={(rowIndex, selected, selectedList, selectAll) =>
console.log(
`on-select:- rowIndex: ${rowIndex} selected: ${selected} selectedList: ${JSON.stringify(
selectedList
)} selectAll: ${selectAll}`
)
}
withPagination={true}
pageSize={50}
onPageChange={(newPage) => console.log(`on-page-change:- ${newPage}`)}
/>
</div>
);
};
Expand All @@ -914,6 +914,11 @@
return (
<div className="p-8 vh-100 bg-secondary-lighter">
<MyTable />
<Message
appearance="alert"
className="w-50"
description="Could not start verification. Please try again later."
/>
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/umd/index.js

Large diffs are not rendered by default.

Loading

0 comments on commit 8ca0e16

Please sign in to comment.