sag_components 1.0.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/.babelrc.json +15 -0
- package/.storybook/YourTheme.js +11 -0
- package/.storybook/main.js +30 -0
- package/.storybook/manager.js +8 -0
- package/.storybook/preview.js +14 -0
- package/.storybook/webpack.config.js +16 -0
- package/README.md +85 -0
- package/azure-pipelines.yml +50 -0
- package/babel.config.js +10 -0
- package/build/favicon.ico +0 -0
- package/build/manifest.json +25 -0
- package/build/robots.txt +3 -0
- package/dist/Dropdown.js +237 -0
- package/dist/OneColumnContainer.js +44 -0
- package/package.json +66 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +52 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +3 -0
- package/src/App.css +7 -0
- package/src/App.js +55 -0
- package/src/App.test.js +8 -0
- package/src/index.css +13 -0
- package/src/index.js +22 -0
- package/src/logo.svg +1 -0
- package/src/stories/ButtonText.jsx +28 -0
- package/src/stories/ButtonText.stories.js +65 -0
- package/src/stories/ButtonText.style.js +9 -0
- package/src/stories/Dropdown.stories.jsx +238 -0
- package/src/stories/Dropdown.style.js +9 -0
- package/src/stories/InfoIcon.jsx +5 -0
- package/src/stories/Introduction.mdx +119 -0
- package/src/stories/OneColumnContainer.stories.js +20 -0
- package/src/stories/OneColumnContainer.style.js +41 -0
- package/src/stories/assets/code-brackets.svg +1 -0
- package/src/stories/assets/colors.svg +1 -0
- package/src/stories/assets/comments.svg +1 -0
- package/src/stories/assets/direction.svg +1 -0
- package/src/stories/assets/flow.svg +1 -0
- package/src/stories/assets/info.svg +1 -0
- package/src/stories/assets/plugin.svg +1 -0
- package/src/stories/assets/repo.svg +1 -0
- package/src/stories/assets/stackalt.svg +1 -0
- package/src/stories/components/Dropdown.jsx +249 -0
- package/src/stories/components/OneColumnContainer.jsx +33 -0
- package/storybook-static/256.47510a7e.iframe.bundle.js +2 -0
- package/storybook-static/256.47510a7e.iframe.bundle.js.LICENSE.txt +9 -0
- package/storybook-static/333.c94a363a.iframe.bundle.js +1 -0
- package/storybook-static/383.2aff9f43.iframe.bundle.js +1 -0
- package/storybook-static/385.7e265f0d.iframe.bundle.js +402 -0
- package/storybook-static/385.7e265f0d.iframe.bundle.js.LICENSE.txt +53 -0
- package/storybook-static/385.7e265f0d.iframe.bundle.js.map +1 -0
- package/storybook-static/433.06d7c436.iframe.bundle.js +1 -0
- package/storybook-static/446.dd9a0d77.iframe.bundle.js +1 -0
- package/storybook-static/463.60fe9b8e.iframe.bundle.js +44 -0
- package/storybook-static/463.60fe9b8e.iframe.bundle.js.map +1 -0
- package/storybook-static/537.29807a20.iframe.bundle.js +121 -0
- package/storybook-static/537.29807a20.iframe.bundle.js.map +1 -0
- package/storybook-static/55.d0744d52.iframe.bundle.js +76 -0
- package/storybook-static/55.d0744d52.iframe.bundle.js.LICENSE.txt +26 -0
- package/storybook-static/55.d0744d52.iframe.bundle.js.map +1 -0
- package/storybook-static/58.676f9d84.iframe.bundle.js +1 -0
- package/storybook-static/661.14a42934.iframe.bundle.js +1 -0
- package/storybook-static/720.f79ea110.iframe.bundle.js +1 -0
- package/storybook-static/923.47c94418.iframe.bundle.js +1 -0
- package/storybook-static/ButtonText-stories.ac096281.iframe.bundle.js +1 -0
- package/storybook-static/Dropdown-stories.825dde1a.iframe.bundle.js +8 -0
- package/storybook-static/Dropdown-stories.825dde1a.iframe.bundle.js.map +1 -0
- package/storybook-static/Introduction-mdx.f8264230.iframe.bundle.js +2 -0
- package/storybook-static/Introduction-mdx.f8264230.iframe.bundle.js.LICENSE.txt +9 -0
- package/storybook-static/OneColumnContainer-stories.65049871.iframe.bundle.js +36 -0
- package/storybook-static/OneColumnContainer-stories.65049871.iframe.bundle.js.LICENSE.txt +18 -0
- package/storybook-static/OneColumnContainer-stories.65049871.iframe.bundle.js.map +1 -0
- package/storybook-static/favicon.svg +7 -0
- package/storybook-static/iframe.html +355 -0
- package/storybook-static/index.html +138 -0
- package/storybook-static/index.json +1 -0
- package/storybook-static/main.612c6447.iframe.bundle.js +1 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/runtime~main.55585f00.iframe.bundle.js +1 -0
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +4 -0
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js.map +7 -0
- package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js +13 -0
- package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js.map +7 -0
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +117 -0
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js.LEGAL.txt +18 -0
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js.map +7 -0
- package/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js +4 -0
- package/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js.map +7 -0
- package/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js +4 -0
- package/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js.map +7 -0
- package/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js +4 -0
- package/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js.map +7 -0
- package/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js +4 -0
- package/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js.map +7 -0
- package/storybook-static/sb-addons/interactions-8/manager-bundle.js +31 -0
- package/storybook-static/sb-addons/interactions-8/manager-bundle.js.LEGAL.txt +18 -0
- package/storybook-static/sb-addons/interactions-8/manager-bundle.js.map +7 -0
- package/storybook-static/sb-addons/links-0/manager-bundle.js +4 -0
- package/storybook-static/sb-addons/links-0/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/links-0/manager-bundle.js.map +7 -0
- package/storybook-static/sb-addons/storybook-10/manager-bundle.js +4 -0
- package/storybook-static/sb-addons/storybook-10/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/storybook-10/manager-bundle.js.map +7 -0
- package/storybook-static/sb-addons/storysource-9/manager-bundle.js +23 -0
- package/storybook-static/sb-addons/storysource-9/manager-bundle.js.LEGAL.txt +14 -0
- package/storybook-static/sb-addons/storysource-9/manager-bundle.js.map +7 -0
- package/storybook-static/sb-common-assets/fonts.css +31 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/GlobalScrollAreaStyles-XIHNDKUY-F4JIPIHL.js +1 -0
- package/storybook-static/sb-manager/OverlayScrollbars-VAV6LJAB-K3TMPSMY.js +6 -0
- package/storybook-static/sb-manager/WithTooltip-FBT32F6Q-7QJ37TCY.js +1 -0
- package/storybook-static/sb-manager/chunk-3FAXWWKG.js +15 -0
- package/storybook-static/sb-manager/chunk-54KM6K5Z.js +7 -0
- package/storybook-static/sb-manager/chunk-AS2AMEUR.js +1 -0
- package/storybook-static/sb-manager/chunk-F3MVQVF6.js +207 -0
- package/storybook-static/sb-manager/chunk-FENICTK6.js +1 -0
- package/storybook-static/sb-manager/chunk-GQDEE62S.js +406 -0
- package/storybook-static/sb-manager/chunk-PUVLCKJJ.js +140 -0
- package/storybook-static/sb-manager/chunk-QPL63VNK.js +1 -0
- package/storybook-static/sb-manager/formatter-S4K5WUZV-4LPR5OBX.js +156 -0
- package/storybook-static/sb-manager/globals.js +1 -0
- package/storybook-static/sb-manager/index.js +1 -0
- package/storybook-static/sb-manager/runtime.js +1 -0
- package/storybook-static/sb-manager/syntaxhighlighter-QTQ2UBB4-F5YUFYAB.js +1 -0
- package/storybook-static/sb-preview/globals.js +1 -0
- package/storybook-static/sb-preview/runtime.js +105 -0
- package/storybook-static/static/media/code-brackets.2e1112d7.svg +1 -0
- package/storybook-static/static/media/colors.a4bd0486.svg +1 -0
- package/storybook-static/static/media/comments.a3859089.svg +1 -0
- package/storybook-static/static/media/direction.b770f9af.svg +1 -0
- package/storybook-static/static/media/flow.edad2ac1.svg +1 -0
- package/storybook-static/static/media/plugin.d494b228.svg +1 -0
- package/storybook-static/static/media/repo.6d496322.svg +1 -0
- package/storybook-static/static/media/stackalt.dba9fbb3.svg +1 -0
- package/storybook-static/stories.json +1 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
+
<meta name="theme-color" content="#000000" />
|
|
8
|
+
<meta
|
|
9
|
+
name="description"
|
|
10
|
+
content="Web site created using create-react-app"
|
|
11
|
+
/>
|
|
12
|
+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
|
13
|
+
<!--
|
|
14
|
+
manifest.json provides metadata used when your web app is installed on a
|
|
15
|
+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
16
|
+
-->
|
|
17
|
+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
|
18
|
+
<!--
|
|
19
|
+
Notice the use of %PUBLIC_URL% in the tags above.
|
|
20
|
+
It will be replaced with the URL of the `public` folder during the build.
|
|
21
|
+
Only files inside the `public` folder can be referenced from the HTML.
|
|
22
|
+
|
|
23
|
+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
24
|
+
work correctly both with client-side routing and a non-root public URL.
|
|
25
|
+
Learn how to configure a non-root public URL by running `npm run build`.
|
|
26
|
+
-->
|
|
27
|
+
<link
|
|
28
|
+
rel="stylesheet"
|
|
29
|
+
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
|
|
30
|
+
/>
|
|
31
|
+
<link
|
|
32
|
+
rel="stylesheet"
|
|
33
|
+
href="https://fonts.googleapis.com/icon?family=Material+Icons"
|
|
34
|
+
/>
|
|
35
|
+
<meta name="viewport" content="initial-scale=1, width=device-width" />
|
|
36
|
+
<title>React App</title>
|
|
37
|
+
</head>
|
|
38
|
+
<body>
|
|
39
|
+
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
40
|
+
<div id="root"></div>
|
|
41
|
+
<!--
|
|
42
|
+
This HTML file is a template.
|
|
43
|
+
If you open it directly in the browser, you will see an empty page.
|
|
44
|
+
|
|
45
|
+
You can add webfonts, meta tags, or analytics to this file.
|
|
46
|
+
The build step will place the bundled scripts into the <body> tag.
|
|
47
|
+
|
|
48
|
+
To begin the development, run `npm start` or `yarn start`.
|
|
49
|
+
To create a production bundle, use `npm run build` or `yarn build`.
|
|
50
|
+
-->
|
|
51
|
+
</body>
|
|
52
|
+
</html>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"short_name": "React App",
|
|
3
|
+
"name": "Create React App Sample",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "favicon.ico",
|
|
7
|
+
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
+
"type": "image/x-icon"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"src": "logo192.png",
|
|
12
|
+
"type": "image/png",
|
|
13
|
+
"sizes": "192x192"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"src": "logo512.png",
|
|
17
|
+
"type": "image/png",
|
|
18
|
+
"sizes": "512x512"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"start_url": ".",
|
|
22
|
+
"display": "standalone",
|
|
23
|
+
"theme_color": "#000000",
|
|
24
|
+
"background_color": "#ffffff"
|
|
25
|
+
}
|
package/src/App.css
ADDED
package/src/App.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import logo from "./logo.svg";
|
|
2
|
+
import "./App.css";
|
|
3
|
+
import { Button } from "./stories/Button";
|
|
4
|
+
import Dropdown from "./stories/Dropdown";
|
|
5
|
+
|
|
6
|
+
const onChangehandler = (event, newValue) => {
|
|
7
|
+
console.log("Dropdown onChange event returned:");
|
|
8
|
+
console.log(newValue);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const onInputChangeHandler = (event, newInputValue) => {
|
|
12
|
+
console.log("Dropdown onInputChange event returned:");
|
|
13
|
+
console.log(newInputValue);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
function App() {
|
|
17
|
+
const options = [
|
|
18
|
+
{ id: "1", label: "Shufersal" },
|
|
19
|
+
{ id: "2", label: "EPC" },
|
|
20
|
+
{ id: "3", label: "Food Lion" },
|
|
21
|
+
{ id: "4", label: "Hannaford" },
|
|
22
|
+
{ id: "5", label: "Giant Food" },
|
|
23
|
+
{ id: "6", label: "The Giant Company" },
|
|
24
|
+
{ id: "7", label: "Stop&Shop" },
|
|
25
|
+
{ id: "8", label: "Price Chopper" },
|
|
26
|
+
{ id: "9", label: "South Eastern Grocers" },
|
|
27
|
+
];
|
|
28
|
+
return (
|
|
29
|
+
<div className="App">
|
|
30
|
+
<Dropdown
|
|
31
|
+
width="300"
|
|
32
|
+
size="small"
|
|
33
|
+
text="Select retailer......"
|
|
34
|
+
multiSelect={false}
|
|
35
|
+
options={options}
|
|
36
|
+
shape="round"
|
|
37
|
+
onChange={onChangehandler}
|
|
38
|
+
onInputChange={onInputChangeHandler}
|
|
39
|
+
/>
|
|
40
|
+
|
|
41
|
+
<Dropdown
|
|
42
|
+
width={400}
|
|
43
|
+
size="small"
|
|
44
|
+
text="Select retailer......"
|
|
45
|
+
multiSelect={true}
|
|
46
|
+
options={options}
|
|
47
|
+
shape="round"
|
|
48
|
+
onChange={onChangehandler}
|
|
49
|
+
onInputChange={onInputChangeHandler}
|
|
50
|
+
/>
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export default App;
|
package/src/App.test.js
ADDED
package/src/index.css
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
body {
|
|
2
|
+
margin: 0;
|
|
3
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
|
4
|
+
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
5
|
+
sans-serif;
|
|
6
|
+
-webkit-font-smoothing: antialiased;
|
|
7
|
+
-moz-osx-font-smoothing: grayscale;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
code {
|
|
11
|
+
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
|
12
|
+
monospace;
|
|
13
|
+
}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom/client';
|
|
3
|
+
import './index.css';
|
|
4
|
+
import App from './App';
|
|
5
|
+
import '@fontsource/roboto/300.css';
|
|
6
|
+
import '@fontsource/roboto/400.css';
|
|
7
|
+
import '@fontsource/roboto/500.css';
|
|
8
|
+
import '@fontsource/roboto/700.css';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
13
|
+
root.render(
|
|
14
|
+
<React.StrictMode>
|
|
15
|
+
<App />
|
|
16
|
+
</React.StrictMode>
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
// If you want to start measuring performance in your app, pass a function
|
|
20
|
+
// to log results (for example: reportWebVitals(console.log))
|
|
21
|
+
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
|
22
|
+
|
package/src/logo.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
// import {Button as MuiButton} from "@mui/material/Button" ;
|
|
3
|
+
import Button from "@mui/material/Button";
|
|
4
|
+
import Stack from "@mui/material/Stack";
|
|
5
|
+
|
|
6
|
+
export const ButtonText = (text, size, disabled, onClick) => {
|
|
7
|
+
const myText = "Ok";
|
|
8
|
+
return (
|
|
9
|
+
<Stack direction="row" spacing={2}>
|
|
10
|
+
{/* <Button variant="contained"
|
|
11
|
+
>
|
|
12
|
+
{myText}
|
|
13
|
+
</Button> */}
|
|
14
|
+
<Button
|
|
15
|
+
variant="contained"
|
|
16
|
+
// size={size}
|
|
17
|
+
// disabled={disabled ? true : false}
|
|
18
|
+
// onClick={(event) => {
|
|
19
|
+
// onClick(event);
|
|
20
|
+
// }}
|
|
21
|
+
>
|
|
22
|
+
{myText}
|
|
23
|
+
</Button>
|
|
24
|
+
</Stack>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default ButtonText;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ButtonText } from "./ButtonText";
|
|
3
|
+
|
|
4
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
|
5
|
+
export default {
|
|
6
|
+
title: "SAG BI/Button",
|
|
7
|
+
component: ButtonText,
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
|
|
10
|
+
argTypes: {
|
|
11
|
+
// width: {
|
|
12
|
+
// control: { type: "number" },
|
|
13
|
+
// description: "width of the input field",
|
|
14
|
+
// defaultValue: 300,
|
|
15
|
+
// },
|
|
16
|
+
|
|
17
|
+
size: {
|
|
18
|
+
control: { type: "radio" },
|
|
19
|
+
options: ["small", "large"],
|
|
20
|
+
description: "size: small/large",
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
text: {
|
|
24
|
+
name: "text",
|
|
25
|
+
control: { type: "text" },
|
|
26
|
+
description: "text inside of the button",
|
|
27
|
+
defaultValue: "",
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
// shape: {
|
|
31
|
+
// control: { type: "radio" },
|
|
32
|
+
// options: ["round", "square"],
|
|
33
|
+
// description: "shape: round/square",
|
|
34
|
+
// },
|
|
35
|
+
|
|
36
|
+
onClick: {
|
|
37
|
+
action: "onClick",
|
|
38
|
+
description: "returns an event click object when user clicks on a button",
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const Template = (args) => <ButtonText {...args} />;
|
|
44
|
+
|
|
45
|
+
export const Small = Template.bind({});
|
|
46
|
+
Small.args = {
|
|
47
|
+
// width: 300,
|
|
48
|
+
size: "small",
|
|
49
|
+
text: "Yes",
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const Large = Template.bind({});
|
|
53
|
+
Large.args = {
|
|
54
|
+
// width: 300,
|
|
55
|
+
size: "small",
|
|
56
|
+
text: "No",
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const Disabled = Template.bind({});
|
|
60
|
+
Disabled.args = {
|
|
61
|
+
// width: 300,
|
|
62
|
+
size: "small",
|
|
63
|
+
text: "Ok",
|
|
64
|
+
disabled: true,
|
|
65
|
+
};
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Dropdown } from "./components/Dropdown";
|
|
3
|
+
|
|
4
|
+
const options = [
|
|
5
|
+
{ id: 0, label: "Shufersal" },
|
|
6
|
+
{ id: 1, label: "EPC" },
|
|
7
|
+
{ id: 2, label: "Food Lion" },
|
|
8
|
+
{ id: 3, label: "Hannaford" },
|
|
9
|
+
{ id: 4, label: "Giant Food" },
|
|
10
|
+
{ id: 5, label: "The Giant Company" },
|
|
11
|
+
{ id: 6, label: "Stop&Shop" },
|
|
12
|
+
{ id: 7, label: "Price Chopper" },
|
|
13
|
+
{ id: 8, label: "South Eastern Grocers" },
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
|
17
|
+
export default {
|
|
18
|
+
title: "SAG BI/Dropdown",
|
|
19
|
+
component: Dropdown,
|
|
20
|
+
tags: ["autodocs"],
|
|
21
|
+
|
|
22
|
+
argTypes: {
|
|
23
|
+
width: {
|
|
24
|
+
control: { type: "number" },
|
|
25
|
+
description: "width of the input field",
|
|
26
|
+
defaultValue: 300,
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
size: {
|
|
30
|
+
control: { type: "radio" },
|
|
31
|
+
options: ["small", "large"],
|
|
32
|
+
description: "size: small/large",
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
text: {
|
|
36
|
+
name: "text",
|
|
37
|
+
control: { type: "text" },
|
|
38
|
+
description: "text inside of the input field",
|
|
39
|
+
defaultValue: 'Search...',
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
placeHolder: {
|
|
43
|
+
name: "placeHolder",
|
|
44
|
+
control: { type: "text" },
|
|
45
|
+
description: "notify the user how to type a text",
|
|
46
|
+
defaultValue: "Type...",
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
multiSelect: {
|
|
50
|
+
name: "multiSelect",
|
|
51
|
+
// control: { type: "boolean",
|
|
52
|
+
// },
|
|
53
|
+
control: false,
|
|
54
|
+
description: "true/false - allows multi select - (switch multiSelect / singleSelect is disabled in this story)",
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
limitTagsOnMultiSelect: {
|
|
59
|
+
name: "limitTagsOnMultiSelect",
|
|
60
|
+
control: { type: "number" },
|
|
61
|
+
description: "limit noumber displayed tags on multi select when not focused",
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
options: {
|
|
67
|
+
description:
|
|
68
|
+
"array [] of objects: {id: string1 , label: string2 } to fill dropdown options ",
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
shape: {
|
|
72
|
+
control: { type: "radio" },
|
|
73
|
+
options: ["round", "square"],
|
|
74
|
+
description: "shape: round/square",
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
showPopupIcon: {
|
|
79
|
+
name: "showPopupIcon",
|
|
80
|
+
control: { type: "boolean" },
|
|
81
|
+
description: "show/hide popup (up/down arrow) icon",
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
showSearchIcon: {
|
|
86
|
+
name: "showSearchIcon",
|
|
87
|
+
control: { type: "boolean" },
|
|
88
|
+
description: "show/hide search icon ",
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
onChange: {
|
|
92
|
+
action: "onChange",
|
|
93
|
+
description: "returns an option (object) selected by the user",
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
onInputChange: {
|
|
97
|
+
action: "onInputChange",
|
|
98
|
+
description: "returns a value (string) displayed in the textbox",
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const Template = (args) => <Dropdown {...args} />;
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
export const SmallSquare = Template.bind({});
|
|
108
|
+
SmallSquare.args = {
|
|
109
|
+
width: 300,
|
|
110
|
+
size: "small",
|
|
111
|
+
text: "Retailer",
|
|
112
|
+
multiSelect: false,
|
|
113
|
+
limitTagsOnMultiSelect: 0,
|
|
114
|
+
placeHolder: "Type...",
|
|
115
|
+
shape: "square",
|
|
116
|
+
showPopupIcon: false,
|
|
117
|
+
showSearchIcon: false,
|
|
118
|
+
options: options,
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
export const SmallRound = Template.bind({});
|
|
123
|
+
SmallRound.args = {
|
|
124
|
+
width: 300,
|
|
125
|
+
size: "small",
|
|
126
|
+
text: "Retailer",
|
|
127
|
+
multiSelect: false,
|
|
128
|
+
limitTagsOnMultiSelect: 0,
|
|
129
|
+
placeHolder: "Type...",
|
|
130
|
+
shape: "round",
|
|
131
|
+
showPopupIcon: false,
|
|
132
|
+
showSearchIcon: false,
|
|
133
|
+
options: options,
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
export const UpDownArrowIcon = Template.bind({});
|
|
139
|
+
UpDownArrowIcon.args = {
|
|
140
|
+
width: 300,
|
|
141
|
+
size: "small",
|
|
142
|
+
text: "Retailer",
|
|
143
|
+
multiSelect: false,
|
|
144
|
+
limitTagsOnMultiSelect: 0,
|
|
145
|
+
placeHolder: "Type...",
|
|
146
|
+
shape: "round",
|
|
147
|
+
showPopupIcon: true,
|
|
148
|
+
showSearchIcon: false,
|
|
149
|
+
options: options,
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
export const SearchIcon = Template.bind({});
|
|
153
|
+
SearchIcon.args = {
|
|
154
|
+
width: 300,
|
|
155
|
+
size: "small",
|
|
156
|
+
text: "Retailer",
|
|
157
|
+
multiSelect: false,
|
|
158
|
+
limitTagsOnMultiSelect: 0,
|
|
159
|
+
placeHolder: "Type...",
|
|
160
|
+
shape: "round",
|
|
161
|
+
showPopupIcon: false,
|
|
162
|
+
showSearchIcon: true,
|
|
163
|
+
options: options,
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
export const MultiSelectSmall = Template.bind({});
|
|
168
|
+
MultiSelectSmall.args = {
|
|
169
|
+
width: 400,
|
|
170
|
+
size: "small",
|
|
171
|
+
text: "Retailer",
|
|
172
|
+
multiSelect: true,
|
|
173
|
+
limitTagsOnMultiSelect: 2,
|
|
174
|
+
placeHolder: "Type...",
|
|
175
|
+
shape: "square",
|
|
176
|
+
showPopupIcon: false,
|
|
177
|
+
showSearchIcon: false,
|
|
178
|
+
options: options,
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
export const MultiSelectLarge = Template.bind({});
|
|
183
|
+
MultiSelectLarge.args = {
|
|
184
|
+
width: 500,
|
|
185
|
+
size: "large",
|
|
186
|
+
text: "Retailer",
|
|
187
|
+
multiSelect: true,
|
|
188
|
+
limitTagsOnMultiSelect: 2,
|
|
189
|
+
placeHolder: "Type...",
|
|
190
|
+
shape: "round",
|
|
191
|
+
showPopupIcon: false,
|
|
192
|
+
showSearchIcon: false,
|
|
193
|
+
options: options,
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
export const MultiSelectWithIcons = Template.bind({});
|
|
198
|
+
MultiSelectWithIcons.args = {
|
|
199
|
+
width: 500,
|
|
200
|
+
size: "large",
|
|
201
|
+
text: "Retailer",
|
|
202
|
+
multiSelect: true,
|
|
203
|
+
limitTagsOnMultiSelect: 2,
|
|
204
|
+
placeHolder: "Type...",
|
|
205
|
+
shape: "square",
|
|
206
|
+
showPopupIcon: true,
|
|
207
|
+
showSearchIcon: true,
|
|
208
|
+
options: options,
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
export const LargeRoundWithoutIcons = Template.bind({});
|
|
212
|
+
LargeRoundWithoutIcons.args = {
|
|
213
|
+
width: 400,
|
|
214
|
+
size: "large",
|
|
215
|
+
text: "Retailer",
|
|
216
|
+
multiSelect: false,
|
|
217
|
+
limitTagsOnMultiSelect: 0,
|
|
218
|
+
placeHolder: "Type part of name...",
|
|
219
|
+
shape: "round",
|
|
220
|
+
showPopupIcon: false,
|
|
221
|
+
showSearchIcon: false,
|
|
222
|
+
options: options,
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
export const LargeSquareWithIcons = Template.bind({});
|
|
226
|
+
LargeSquareWithIcons.args = {
|
|
227
|
+
width: 400,
|
|
228
|
+
size: "large",
|
|
229
|
+
text: "Retailer",
|
|
230
|
+
multiSelect: false,
|
|
231
|
+
limitTagsOnMultiSelect: 0,
|
|
232
|
+
placeHolder: "Type part of name...",
|
|
233
|
+
shape: "square",
|
|
234
|
+
showPopupIcon: true,
|
|
235
|
+
showSearchIcon: true,
|
|
236
|
+
options: options,
|
|
237
|
+
};
|
|
238
|
+
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export const InfoIcon = ({clicked}) => {
|
|
2
|
+
return (
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke={clicked ? "white" : "black"} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="feather feather-info"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="8"></line></svg>
|
|
4
|
+
);
|
|
5
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { Meta } from '@storybook/blocks';
|
|
2
|
+
import Code from './assets/code-brackets.svg';
|
|
3
|
+
import Colors from './assets/colors.svg';
|
|
4
|
+
import Comments from './assets/comments.svg';
|
|
5
|
+
import Direction from './assets/direction.svg';
|
|
6
|
+
import Flow from './assets/flow.svg';
|
|
7
|
+
import Plugin from './assets/plugin.svg';
|
|
8
|
+
import Repo from './assets/repo.svg';
|
|
9
|
+
import StackAlt from './assets/stackalt.svg';
|
|
10
|
+
|
|
11
|
+
<Meta title="SAG/Introduction" />
|
|
12
|
+
|
|
13
|
+
<style>
|
|
14
|
+
{`
|
|
15
|
+
.subheading {
|
|
16
|
+
--mediumdark: '#999999';
|
|
17
|
+
font-weight: 700;
|
|
18
|
+
font-size: 13px;
|
|
19
|
+
color: #999;
|
|
20
|
+
letter-spacing: 6px;
|
|
21
|
+
line-height: 24px;
|
|
22
|
+
text-transform: uppercase;
|
|
23
|
+
margin-bottom: 12px;
|
|
24
|
+
margin-top: 40px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.link-list {
|
|
28
|
+
display: grid;
|
|
29
|
+
grid-template-columns: 1fr;
|
|
30
|
+
grid-template-rows: 1fr 1fr;
|
|
31
|
+
row-gap: 10px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media (min-width: 620px) {
|
|
35
|
+
.link-list {
|
|
36
|
+
row-gap: 20px;
|
|
37
|
+
column-gap: 20px;
|
|
38
|
+
grid-template-columns: 1fr 1fr;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@media all and (-ms-high-contrast:none) {
|
|
43
|
+
.link-list {
|
|
44
|
+
display: -ms-grid;
|
|
45
|
+
-ms-grid-columns: 1fr 1fr;
|
|
46
|
+
-ms-grid-rows: 1fr 1fr;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.link-item {
|
|
51
|
+
display: block;
|
|
52
|
+
padding: 20px;
|
|
53
|
+
border: 1px solid #00000010;
|
|
54
|
+
border-radius: 5px;
|
|
55
|
+
transition: background 150ms ease-out, border 150ms ease-out, transform 150ms ease-out;
|
|
56
|
+
color: #333333;
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: flex-start;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.link-item:hover {
|
|
62
|
+
border-color: #1EA7FD50;
|
|
63
|
+
transform: translate3d(0, -3px, 0);
|
|
64
|
+
box-shadow: rgba(0, 0, 0, 0.08) 0 3px 10px 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.link-item:active {
|
|
68
|
+
border-color: #1EA7FD;
|
|
69
|
+
transform: translate3d(0, 0, 0);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.link-item strong {
|
|
73
|
+
font-weight: 700;
|
|
74
|
+
display: block;
|
|
75
|
+
margin-bottom: 2px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.link-item img {
|
|
79
|
+
height: 40px;
|
|
80
|
+
width: 40px;
|
|
81
|
+
margin-right: 15px;
|
|
82
|
+
flex: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.link-item span,
|
|
86
|
+
.link-item p {
|
|
87
|
+
margin: 0;
|
|
88
|
+
font-size: 14px;
|
|
89
|
+
line-height: 20px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.tip {
|
|
93
|
+
display: inline-block;
|
|
94
|
+
border-radius: 1em;
|
|
95
|
+
font-size: 11px;
|
|
96
|
+
line-height: 12px;
|
|
97
|
+
font-weight: 700;
|
|
98
|
+
background: #E7FDD8;
|
|
99
|
+
color: #66BF3C;
|
|
100
|
+
padding: 4px 12px;
|
|
101
|
+
margin-right: 10px;
|
|
102
|
+
vertical-align: top;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.tip-wrapper {
|
|
106
|
+
font-size: 13px;
|
|
107
|
+
line-height: 20px;
|
|
108
|
+
margin-top: 40px;
|
|
109
|
+
margin-bottom: 40px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.tip-wrapper code {
|
|
113
|
+
font-size: 12px;
|
|
114
|
+
display: inline-block;
|
|
115
|
+
}
|
|
116
|
+
`}
|
|
117
|
+
</style>
|
|
118
|
+
|
|
119
|
+
# Welcome to Sagramata Storybook
|