sag_components 1.0.29 → 1.0.31
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/package.json +1 -1
- package/.babelrc.json +0 -15
- package/azure-pipelines.yml +0 -50
- package/azure-static-web-apps-delightful-cliff-010f39003.yml +0 -32
- package/babel.config.js +0 -10
- package/dist/stories/Benchmark.stories.js +0 -122
- package/dist/stories/Button.stories.js +0 -117
- package/dist/stories/Dropdown.stories.js +0 -252
- package/dist/stories/OneColumnContainer.stories.js +0 -22
- package/dist/stories/SegmentedButton.stories.js +0 -187
- package/dist/stories/TotalDoughnutChart.stories.js +0 -136
package/package.json
CHANGED
package/.babelrc.json
DELETED
package/azure-pipelines.yml
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# Starter pipeline
|
|
2
|
-
# Start with a minimal pipeline that you can customize to build and deploy your code.
|
|
3
|
-
# Add steps that build, run tests, deploy, and more:
|
|
4
|
-
# https://aka.ms/yaml
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
# 👇 Event to trigger pipeline execution
|
|
8
|
-
trigger:
|
|
9
|
-
- DEV
|
|
10
|
-
|
|
11
|
-
# Other configurations
|
|
12
|
-
|
|
13
|
-
# Pipeline stages
|
|
14
|
-
stages:
|
|
15
|
-
- stage: Test
|
|
16
|
-
displayName: Chromatic Testing
|
|
17
|
-
# Job list
|
|
18
|
-
jobs:
|
|
19
|
-
- job: Chromatic_Deploy
|
|
20
|
-
displayName: Install packages and publishes to Chromatic
|
|
21
|
-
variables:
|
|
22
|
-
# Sets scoped environment variable to cache packages
|
|
23
|
-
npm_config_cache: $(Pipeline.Workspace)/.npm
|
|
24
|
-
# List of steps
|
|
25
|
-
steps:
|
|
26
|
-
- checkout: self
|
|
27
|
-
displayName: "Get full Git history"
|
|
28
|
-
fetchDepth: 0
|
|
29
|
-
# 👇 Installs and configures Node environment
|
|
30
|
-
- task: NodeTool@0
|
|
31
|
-
inputs:
|
|
32
|
-
versionSpec: "16.x"
|
|
33
|
-
displayName: "Install Node.js"
|
|
34
|
-
- task: Cache@2
|
|
35
|
-
displayName: Install and cache packages
|
|
36
|
-
inputs:
|
|
37
|
-
key: 'npm | "$(Agent.OS)" | package-lock.json'
|
|
38
|
-
restoreKeys: |
|
|
39
|
-
npm | "$(Agent.OS)"
|
|
40
|
-
path: $(npm_config_cache)
|
|
41
|
-
- script: npm ci
|
|
42
|
-
condition: ne(variables.CACHE_RESTORED, 'true')
|
|
43
|
-
# 👇 Adds Chromatic as a step
|
|
44
|
-
- task: CmdLine@2
|
|
45
|
-
displayName: Publish to Chromatic
|
|
46
|
-
inputs:
|
|
47
|
-
# 👇 Runs Chromatic
|
|
48
|
-
script: npx chromatic --project-token=c74e7c242a07 --exit-zero-on-changes
|
|
49
|
-
env:
|
|
50
|
-
CHROMATIC_PROJECT_TOKEN: $(CHROMATIC_PROJECT_TOKEN)
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
name: Azure Static Web Apps CI/CD
|
|
2
|
-
|
|
3
|
-
pr:
|
|
4
|
-
branches:
|
|
5
|
-
include:
|
|
6
|
-
- Task-9085-Create-basic-dropdown
|
|
7
|
-
trigger:
|
|
8
|
-
branches:
|
|
9
|
-
include:
|
|
10
|
-
- Task-9085-Create-basic-dropdown
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
- job: build_and_deploy_job
|
|
14
|
-
displayName: Build and Deploy Job
|
|
15
|
-
condition: or(eq(variables['Build.Reason'], 'Manual'),or(eq(variables['Build.Reason'], 'PullRequest'),eq(variables['Build.Reason'], 'IndividualCI')))
|
|
16
|
-
pool:
|
|
17
|
-
vmImage: ubuntu-latest
|
|
18
|
-
variables:
|
|
19
|
-
- group: Azure-Static-Web-Apps-delightful-cliff-010f39003-variable-group
|
|
20
|
-
steps:
|
|
21
|
-
- checkout: self
|
|
22
|
-
submodules: true
|
|
23
|
-
- task: AzureStaticWebApp@0
|
|
24
|
-
inputs:
|
|
25
|
-
azure_static_web_apps_api_token: $(AZURE_STATIC_WEB_APPS_API_TOKEN_DELIGHTFUL_CLIFF_010F39003)
|
|
26
|
-
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
|
|
27
|
-
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
|
|
28
|
-
app_location: "/" # App source code path
|
|
29
|
-
api_location: "" # Api source code path - optional
|
|
30
|
-
output_location: "build" # Built app content directory - optional
|
|
31
|
-
###### End of Repository/Build Configurations ######
|
|
32
|
-
|
package/babel.config.js
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = exports.LessAvarage = exports.GreaterAvarage = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _Benchmark = require("./components/Benchmark");
|
|
10
|
-
var _default = {
|
|
11
|
-
title: "SAG BI/Benchmark",
|
|
12
|
-
component: _Benchmark.Benchmark,
|
|
13
|
-
tags: ["autodocs"],
|
|
14
|
-
argTypes: {
|
|
15
|
-
currentValue: {
|
|
16
|
-
name: "currentValue",
|
|
17
|
-
control: {
|
|
18
|
-
type: "number",
|
|
19
|
-
min: 0,
|
|
20
|
-
max: 100000000000000
|
|
21
|
-
},
|
|
22
|
-
description: "curent value (<=100%) "
|
|
23
|
-
},
|
|
24
|
-
totalValue: {
|
|
25
|
-
name: "totalValue",
|
|
26
|
-
control: {
|
|
27
|
-
type: "number",
|
|
28
|
-
min: 0,
|
|
29
|
-
max: 100000000000000
|
|
30
|
-
},
|
|
31
|
-
description: "total value (100%) "
|
|
32
|
-
},
|
|
33
|
-
width: {
|
|
34
|
-
name: "width",
|
|
35
|
-
control: {
|
|
36
|
-
type: "number",
|
|
37
|
-
min: 0,
|
|
38
|
-
max: 600
|
|
39
|
-
},
|
|
40
|
-
description: "width of the control (in px)"
|
|
41
|
-
},
|
|
42
|
-
height: {
|
|
43
|
-
name: "height",
|
|
44
|
-
control: {
|
|
45
|
-
type: "number",
|
|
46
|
-
min: 0,
|
|
47
|
-
max: 600
|
|
48
|
-
},
|
|
49
|
-
description: "height of the control (in px)"
|
|
50
|
-
},
|
|
51
|
-
color: {
|
|
52
|
-
name: "color",
|
|
53
|
-
description: "Sets the color of current value when it is greater then 50% of total value",
|
|
54
|
-
control: {
|
|
55
|
-
type: "color",
|
|
56
|
-
presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"]
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
linearGradientColor: {
|
|
60
|
-
name: "linearGradientColor",
|
|
61
|
-
description: "Sets the linear-Gradient color of current value when it is greater then 50% of total value",
|
|
62
|
-
control: {
|
|
63
|
-
type: "color",
|
|
64
|
-
presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"]
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
underAvarageColor: {
|
|
68
|
-
name: "underAvarageColor",
|
|
69
|
-
description: "Sets the color of current value when it is under 50% of total value",
|
|
70
|
-
control: {
|
|
71
|
-
type: "color",
|
|
72
|
-
presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"]
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
linearGradientUnderAvarageColor: {
|
|
76
|
-
name: "linearGradientUnderAvarageColor",
|
|
77
|
-
description: "Sets the linear-Gradient color of current value when it is under 50% of total value",
|
|
78
|
-
control: {
|
|
79
|
-
type: "color",
|
|
80
|
-
presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"]
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
backgroundColor: {
|
|
84
|
-
name: "backgroundColor",
|
|
85
|
-
description: "Sets the background color of the control",
|
|
86
|
-
control: {
|
|
87
|
-
type: "color",
|
|
88
|
-
presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"]
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
exports.default = _default;
|
|
94
|
-
var Template = function Template(args) {
|
|
95
|
-
return /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, args);
|
|
96
|
-
};
|
|
97
|
-
var GreaterAvarage = Template.bind({});
|
|
98
|
-
exports.GreaterAvarage = GreaterAvarage;
|
|
99
|
-
GreaterAvarage.args = {
|
|
100
|
-
totalValue: 100000,
|
|
101
|
-
currentValue: 60000,
|
|
102
|
-
width: 100,
|
|
103
|
-
height: 12,
|
|
104
|
-
color: "#79DB95",
|
|
105
|
-
linearGradientColor: "#C3EFD0",
|
|
106
|
-
underAvarageColor: "#FD5959",
|
|
107
|
-
linearGradientUnderAvarageColor: "#FDB1B1",
|
|
108
|
-
backgroundColor: "#F2F2F2"
|
|
109
|
-
};
|
|
110
|
-
var LessAvarage = Template.bind({});
|
|
111
|
-
exports.LessAvarage = LessAvarage;
|
|
112
|
-
LessAvarage.args = {
|
|
113
|
-
totalValue: 1000,
|
|
114
|
-
currentValue: 400,
|
|
115
|
-
width: 100,
|
|
116
|
-
height: 12,
|
|
117
|
-
color: "#79DB95",
|
|
118
|
-
linearGradientColor: "#C3EFD0",
|
|
119
|
-
underAvarageColor: "#FD5959",
|
|
120
|
-
linearGradientUnderAvarageColor: "#FDB1B1",
|
|
121
|
-
backgroundColor: "#F2F2F2"
|
|
122
|
-
};
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = exports.SmallContainedStyle = exports.MediumOutlinedStyle = exports.LargeTextStyle = exports.DisabledContainedStyle = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _Button = require("./components/Button");
|
|
10
|
-
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
|
11
|
-
var _default = {
|
|
12
|
-
title: "SAG/Button",
|
|
13
|
-
component: _Button.Button,
|
|
14
|
-
tags: ["autodocs"],
|
|
15
|
-
argTypes: {
|
|
16
|
-
text: {
|
|
17
|
-
name: "text",
|
|
18
|
-
control: {
|
|
19
|
-
type: "text"
|
|
20
|
-
},
|
|
21
|
-
description: "text inside of the button",
|
|
22
|
-
defaultValue: ""
|
|
23
|
-
},
|
|
24
|
-
shape: {
|
|
25
|
-
control: {
|
|
26
|
-
type: "radio"
|
|
27
|
-
},
|
|
28
|
-
options: ["contained", "outlined", "text"],
|
|
29
|
-
description: "shape of the button"
|
|
30
|
-
},
|
|
31
|
-
radius: {
|
|
32
|
-
name: "radius",
|
|
33
|
-
control: {
|
|
34
|
-
type: "number"
|
|
35
|
-
},
|
|
36
|
-
description: "radius of the button",
|
|
37
|
-
defaultValue: 50
|
|
38
|
-
},
|
|
39
|
-
size: {
|
|
40
|
-
control: {
|
|
41
|
-
type: "radio"
|
|
42
|
-
},
|
|
43
|
-
options: ["small", "medium", "large"],
|
|
44
|
-
description: "size of the button"
|
|
45
|
-
},
|
|
46
|
-
disabled: {
|
|
47
|
-
name: "disabled",
|
|
48
|
-
control: {
|
|
49
|
-
type: "boolean"
|
|
50
|
-
},
|
|
51
|
-
description: "changes the button to be enabled/disabled",
|
|
52
|
-
defaultValue: ""
|
|
53
|
-
},
|
|
54
|
-
backgroundColor: {
|
|
55
|
-
control: {
|
|
56
|
-
type: "color",
|
|
57
|
-
presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"],
|
|
58
|
-
description: "Sets Background Color"
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
textColor: {
|
|
62
|
-
control: {
|
|
63
|
-
type: "select"
|
|
64
|
-
},
|
|
65
|
-
options: ["none", "inherit", "black", "green", "red", "yellow", "blue", "white"],
|
|
66
|
-
description: "text color of the button"
|
|
67
|
-
},
|
|
68
|
-
onClick: {
|
|
69
|
-
action: "onClick",
|
|
70
|
-
description: "returns an event click object when user clicks on a button"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
exports.default = _default;
|
|
75
|
-
var Template = function Template(args) {
|
|
76
|
-
return /*#__PURE__*/_react.default.createElement(_Button.Button, args);
|
|
77
|
-
};
|
|
78
|
-
var SmallContainedStyle = Template.bind({});
|
|
79
|
-
exports.SmallContainedStyle = SmallContainedStyle;
|
|
80
|
-
SmallContainedStyle.args = {
|
|
81
|
-
text: "Confirm",
|
|
82
|
-
shape: "contained",
|
|
83
|
-
radius: 50,
|
|
84
|
-
size: "small",
|
|
85
|
-
textColor: "none",
|
|
86
|
-
disabled: false
|
|
87
|
-
};
|
|
88
|
-
var DisabledContainedStyle = Template.bind({});
|
|
89
|
-
exports.DisabledContainedStyle = DisabledContainedStyle;
|
|
90
|
-
DisabledContainedStyle.args = {
|
|
91
|
-
size: "small",
|
|
92
|
-
text: "Confirm",
|
|
93
|
-
shape: "contained",
|
|
94
|
-
radius: 50,
|
|
95
|
-
textColor: "inherit",
|
|
96
|
-
disabled: true
|
|
97
|
-
};
|
|
98
|
-
var MediumOutlinedStyle = Template.bind({});
|
|
99
|
-
exports.MediumOutlinedStyle = MediumOutlinedStyle;
|
|
100
|
-
MediumOutlinedStyle.args = {
|
|
101
|
-
text: "Confirm",
|
|
102
|
-
size: "medium",
|
|
103
|
-
radius: 50,
|
|
104
|
-
shape: "outlined",
|
|
105
|
-
textColor: "",
|
|
106
|
-
disabled: false
|
|
107
|
-
};
|
|
108
|
-
var LargeTextStyle = Template.bind({});
|
|
109
|
-
exports.LargeTextStyle = LargeTextStyle;
|
|
110
|
-
LargeTextStyle.args = {
|
|
111
|
-
text: "Confirm",
|
|
112
|
-
size: "large",
|
|
113
|
-
radius: 50,
|
|
114
|
-
shape: "text",
|
|
115
|
-
textColor: "inherit",
|
|
116
|
-
disabled: false
|
|
117
|
-
};
|
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = exports.UpDownArrowIcon = exports.SmallSquare = exports.SmallRound = exports.SearchIcon = exports.MultiSelectWithIcons = exports.MultiSelectSmall = exports.MultiSelectLarge = exports.LargeSquareWithIcons = exports.LargeRoundWithoutIcons = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _Dropdown = require("./components/Dropdown");
|
|
10
|
-
var options = [{
|
|
11
|
-
id: 0,
|
|
12
|
-
label: "Shufersal"
|
|
13
|
-
}, {
|
|
14
|
-
id: 1,
|
|
15
|
-
label: "EPC"
|
|
16
|
-
}, {
|
|
17
|
-
id: 2,
|
|
18
|
-
label: "Food Lion"
|
|
19
|
-
}, {
|
|
20
|
-
id: 3,
|
|
21
|
-
label: "Hannaford"
|
|
22
|
-
}, {
|
|
23
|
-
id: 4,
|
|
24
|
-
label: "Giant Food"
|
|
25
|
-
}, {
|
|
26
|
-
id: 5,
|
|
27
|
-
label: "The Giant Company"
|
|
28
|
-
}, {
|
|
29
|
-
id: 6,
|
|
30
|
-
label: "Stop&Shop"
|
|
31
|
-
}, {
|
|
32
|
-
id: 7,
|
|
33
|
-
label: "Price Chopper"
|
|
34
|
-
}, {
|
|
35
|
-
id: 8,
|
|
36
|
-
label: "South Eastern Grocers"
|
|
37
|
-
}];
|
|
38
|
-
|
|
39
|
-
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
|
40
|
-
var _default = {
|
|
41
|
-
title: "SAG/Dropdown",
|
|
42
|
-
component: _Dropdown.Dropdown,
|
|
43
|
-
tags: ["autodocs"],
|
|
44
|
-
argTypes: {
|
|
45
|
-
width: {
|
|
46
|
-
control: {
|
|
47
|
-
type: "number"
|
|
48
|
-
},
|
|
49
|
-
description: "width of the input field",
|
|
50
|
-
defaultValue: 300
|
|
51
|
-
},
|
|
52
|
-
size: {
|
|
53
|
-
control: {
|
|
54
|
-
type: "radio"
|
|
55
|
-
},
|
|
56
|
-
options: ["small", "large"],
|
|
57
|
-
description: "size: small/large"
|
|
58
|
-
},
|
|
59
|
-
text: {
|
|
60
|
-
name: "text",
|
|
61
|
-
control: {
|
|
62
|
-
type: "text"
|
|
63
|
-
},
|
|
64
|
-
description: "text inside of the input field",
|
|
65
|
-
defaultValue: 'Search...'
|
|
66
|
-
},
|
|
67
|
-
placeHolder: {
|
|
68
|
-
name: "placeHolder",
|
|
69
|
-
control: {
|
|
70
|
-
type: "text"
|
|
71
|
-
},
|
|
72
|
-
description: "notify the user how to type a text",
|
|
73
|
-
defaultValue: "Type..."
|
|
74
|
-
},
|
|
75
|
-
multiSelect: {
|
|
76
|
-
name: "multiSelect",
|
|
77
|
-
// control: { type: "boolean",
|
|
78
|
-
// },
|
|
79
|
-
control: false,
|
|
80
|
-
description: "true/false - allows multi select - (switch multiSelect / singleSelect is disabled in this story)"
|
|
81
|
-
},
|
|
82
|
-
limitTagsOnMultiSelect: {
|
|
83
|
-
name: "limitTagsOnMultiSelect",
|
|
84
|
-
control: {
|
|
85
|
-
type: "number"
|
|
86
|
-
},
|
|
87
|
-
description: "limit noumber displayed tags on multi select when not focused"
|
|
88
|
-
},
|
|
89
|
-
options: {
|
|
90
|
-
description: "array [] of objects: {id: string1 , label: string2 } to fill dropdown options "
|
|
91
|
-
},
|
|
92
|
-
shape: {
|
|
93
|
-
control: {
|
|
94
|
-
type: "radio"
|
|
95
|
-
},
|
|
96
|
-
options: ["round", "square"],
|
|
97
|
-
description: "shape: round/square"
|
|
98
|
-
},
|
|
99
|
-
showPopupIcon: {
|
|
100
|
-
name: "showPopupIcon",
|
|
101
|
-
control: {
|
|
102
|
-
type: "boolean"
|
|
103
|
-
},
|
|
104
|
-
description: "show/hide popup (up/down arrow) icon"
|
|
105
|
-
},
|
|
106
|
-
showSearchIcon: {
|
|
107
|
-
name: "showSearchIcon",
|
|
108
|
-
control: {
|
|
109
|
-
type: "boolean"
|
|
110
|
-
},
|
|
111
|
-
description: "show/hide search icon "
|
|
112
|
-
},
|
|
113
|
-
onChange: {
|
|
114
|
-
action: "onChange",
|
|
115
|
-
description: "returns an option (object) selected by the user"
|
|
116
|
-
},
|
|
117
|
-
onInputChange: {
|
|
118
|
-
action: "onInputChange",
|
|
119
|
-
description: "returns a value (string) displayed in the textbox"
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
exports.default = _default;
|
|
124
|
-
var Template = function Template(args) {
|
|
125
|
-
return /*#__PURE__*/_react.default.createElement(_Dropdown.Dropdown, args);
|
|
126
|
-
};
|
|
127
|
-
var SmallSquare = Template.bind({});
|
|
128
|
-
exports.SmallSquare = SmallSquare;
|
|
129
|
-
SmallSquare.args = {
|
|
130
|
-
width: 300,
|
|
131
|
-
size: "small",
|
|
132
|
-
text: "Retailer",
|
|
133
|
-
multiSelect: false,
|
|
134
|
-
limitTagsOnMultiSelect: 0,
|
|
135
|
-
placeHolder: "Type...",
|
|
136
|
-
shape: "square",
|
|
137
|
-
showPopupIcon: false,
|
|
138
|
-
showSearchIcon: false,
|
|
139
|
-
options: options
|
|
140
|
-
};
|
|
141
|
-
var SmallRound = Template.bind({});
|
|
142
|
-
exports.SmallRound = SmallRound;
|
|
143
|
-
SmallRound.args = {
|
|
144
|
-
width: 300,
|
|
145
|
-
size: "small",
|
|
146
|
-
text: "Retailer",
|
|
147
|
-
multiSelect: false,
|
|
148
|
-
limitTagsOnMultiSelect: 0,
|
|
149
|
-
placeHolder: "Type...",
|
|
150
|
-
shape: "round",
|
|
151
|
-
showPopupIcon: false,
|
|
152
|
-
showSearchIcon: false,
|
|
153
|
-
options: options
|
|
154
|
-
};
|
|
155
|
-
var UpDownArrowIcon = Template.bind({});
|
|
156
|
-
exports.UpDownArrowIcon = UpDownArrowIcon;
|
|
157
|
-
UpDownArrowIcon.args = {
|
|
158
|
-
width: 300,
|
|
159
|
-
size: "small",
|
|
160
|
-
text: "Retailer",
|
|
161
|
-
multiSelect: false,
|
|
162
|
-
limitTagsOnMultiSelect: 0,
|
|
163
|
-
placeHolder: "Type...",
|
|
164
|
-
shape: "round",
|
|
165
|
-
showPopupIcon: true,
|
|
166
|
-
showSearchIcon: false,
|
|
167
|
-
options: options
|
|
168
|
-
};
|
|
169
|
-
var SearchIcon = Template.bind({});
|
|
170
|
-
exports.SearchIcon = SearchIcon;
|
|
171
|
-
SearchIcon.args = {
|
|
172
|
-
width: 300,
|
|
173
|
-
size: "small",
|
|
174
|
-
text: "Retailer",
|
|
175
|
-
multiSelect: false,
|
|
176
|
-
limitTagsOnMultiSelect: 0,
|
|
177
|
-
placeHolder: "Type...",
|
|
178
|
-
shape: "round",
|
|
179
|
-
showPopupIcon: false,
|
|
180
|
-
showSearchIcon: true,
|
|
181
|
-
options: options
|
|
182
|
-
};
|
|
183
|
-
var MultiSelectSmall = Template.bind({});
|
|
184
|
-
exports.MultiSelectSmall = MultiSelectSmall;
|
|
185
|
-
MultiSelectSmall.args = {
|
|
186
|
-
width: 400,
|
|
187
|
-
size: "small",
|
|
188
|
-
text: "Retailer",
|
|
189
|
-
multiSelect: true,
|
|
190
|
-
limitTagsOnMultiSelect: 2,
|
|
191
|
-
placeHolder: "Type...",
|
|
192
|
-
shape: "square",
|
|
193
|
-
showPopupIcon: false,
|
|
194
|
-
showSearchIcon: false,
|
|
195
|
-
options: options
|
|
196
|
-
};
|
|
197
|
-
var MultiSelectLarge = Template.bind({});
|
|
198
|
-
exports.MultiSelectLarge = MultiSelectLarge;
|
|
199
|
-
MultiSelectLarge.args = {
|
|
200
|
-
width: 500,
|
|
201
|
-
size: "large",
|
|
202
|
-
text: "Retailer",
|
|
203
|
-
multiSelect: true,
|
|
204
|
-
limitTagsOnMultiSelect: 2,
|
|
205
|
-
placeHolder: "Type...",
|
|
206
|
-
shape: "round",
|
|
207
|
-
showPopupIcon: false,
|
|
208
|
-
showSearchIcon: false,
|
|
209
|
-
options: options
|
|
210
|
-
};
|
|
211
|
-
var MultiSelectWithIcons = Template.bind({});
|
|
212
|
-
exports.MultiSelectWithIcons = MultiSelectWithIcons;
|
|
213
|
-
MultiSelectWithIcons.args = {
|
|
214
|
-
width: 500,
|
|
215
|
-
size: "large",
|
|
216
|
-
text: "Retailer",
|
|
217
|
-
multiSelect: true,
|
|
218
|
-
limitTagsOnMultiSelect: 2,
|
|
219
|
-
placeHolder: "Type...",
|
|
220
|
-
shape: "square",
|
|
221
|
-
showPopupIcon: true,
|
|
222
|
-
showSearchIcon: true,
|
|
223
|
-
options: options
|
|
224
|
-
};
|
|
225
|
-
var LargeRoundWithoutIcons = Template.bind({});
|
|
226
|
-
exports.LargeRoundWithoutIcons = LargeRoundWithoutIcons;
|
|
227
|
-
LargeRoundWithoutIcons.args = {
|
|
228
|
-
width: 400,
|
|
229
|
-
size: "large",
|
|
230
|
-
text: "Retailer",
|
|
231
|
-
multiSelect: false,
|
|
232
|
-
limitTagsOnMultiSelect: 0,
|
|
233
|
-
placeHolder: "Type part of name...",
|
|
234
|
-
shape: "round",
|
|
235
|
-
showPopupIcon: false,
|
|
236
|
-
showSearchIcon: false,
|
|
237
|
-
options: options
|
|
238
|
-
};
|
|
239
|
-
var LargeSquareWithIcons = Template.bind({});
|
|
240
|
-
exports.LargeSquareWithIcons = LargeSquareWithIcons;
|
|
241
|
-
LargeSquareWithIcons.args = {
|
|
242
|
-
width: 400,
|
|
243
|
-
size: "large",
|
|
244
|
-
text: "Retailer",
|
|
245
|
-
multiSelect: false,
|
|
246
|
-
limitTagsOnMultiSelect: 0,
|
|
247
|
-
placeHolder: "Type part of name...",
|
|
248
|
-
shape: "square",
|
|
249
|
-
showPopupIcon: true,
|
|
250
|
-
showSearchIcon: true,
|
|
251
|
-
options: options
|
|
252
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.Primary = void 0;
|
|
7
|
-
var _OneColumnContainer = require("./components/OneColumnContainer");
|
|
8
|
-
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
|
9
|
-
var _default = {
|
|
10
|
-
title: 'Sag BI/OneColumnContainer',
|
|
11
|
-
component: _OneColumnContainer.OneColumnContainer,
|
|
12
|
-
tags: ['autodocs']
|
|
13
|
-
}; // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
14
|
-
exports.default = _default;
|
|
15
|
-
var Primary = {
|
|
16
|
-
args: {
|
|
17
|
-
infoText: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s",
|
|
18
|
-
width: "250px",
|
|
19
|
-
height: "250px"
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
exports.Primary = Primary;
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = exports.SegmentedFilter = exports.Period = exports.DollarsOrUnits = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _SegmentedButton = require("./components/SegmentedButton");
|
|
10
|
-
var arrSegmentedFilters = [{
|
|
11
|
-
value: "Total"
|
|
12
|
-
}, {
|
|
13
|
-
value: "Ecommerce"
|
|
14
|
-
}, {
|
|
15
|
-
value: "In Store"
|
|
16
|
-
}];
|
|
17
|
-
var arrDollarsOrUnits = [{
|
|
18
|
-
value: "Dollars"
|
|
19
|
-
}, {
|
|
20
|
-
value: "Units"
|
|
21
|
-
}];
|
|
22
|
-
var arrPeriod = [{
|
|
23
|
-
value: "52 w"
|
|
24
|
-
}, {
|
|
25
|
-
value: "26 w"
|
|
26
|
-
}, {
|
|
27
|
-
value: "13 w"
|
|
28
|
-
}];
|
|
29
|
-
var _default = {
|
|
30
|
-
title: "SAG/SegmentedButton",
|
|
31
|
-
component: _SegmentedButton.SegmentedButton,
|
|
32
|
-
tags: ["autodocs"],
|
|
33
|
-
argTypes: {
|
|
34
|
-
name: {
|
|
35
|
-
name: "name",
|
|
36
|
-
control: {
|
|
37
|
-
type: "text"
|
|
38
|
-
},
|
|
39
|
-
description: "name of the object"
|
|
40
|
-
},
|
|
41
|
-
backgroundColor: {
|
|
42
|
-
name: "backgroundColor",
|
|
43
|
-
description: "Sets Background Color",
|
|
44
|
-
control: {
|
|
45
|
-
type: "color",
|
|
46
|
-
presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"]
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
selectedSegmentColor: {
|
|
50
|
-
name: "selectedSegmentColor",
|
|
51
|
-
description: "Sets selected Segment Color Color",
|
|
52
|
-
control: {
|
|
53
|
-
type: "color",
|
|
54
|
-
presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"]
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
selectedTextColor: {
|
|
58
|
-
name: "selectedTextColor",
|
|
59
|
-
description: "Sets selected text Color",
|
|
60
|
-
control: {
|
|
61
|
-
type: "color",
|
|
62
|
-
presetColors: ["#000000", "#ffffff", "#ff0000", "#00ff00", "#0000ff"]
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
unselectedTextColor: {
|
|
66
|
-
name: "unselectedTextColor",
|
|
67
|
-
description: "Sets unselected text Color",
|
|
68
|
-
control: {
|
|
69
|
-
type: "color",
|
|
70
|
-
presetColors: ["#000000", "#ffffff", "#ff0000", "#00ff00", "#0000ff"]
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
defaultIndex: {
|
|
74
|
-
name: "defaultIndex",
|
|
75
|
-
control: {
|
|
76
|
-
type: "number",
|
|
77
|
-
min: 0,
|
|
78
|
-
max: 20
|
|
79
|
-
},
|
|
80
|
-
description: "set default index to init segmented button component (in px)"
|
|
81
|
-
},
|
|
82
|
-
segmentWidth: {
|
|
83
|
-
name: "segmentWidth",
|
|
84
|
-
control: {
|
|
85
|
-
type: "number",
|
|
86
|
-
min: 0,
|
|
87
|
-
max: 300
|
|
88
|
-
},
|
|
89
|
-
description: "width of the segment in the control (in px)"
|
|
90
|
-
},
|
|
91
|
-
controlRadius: {
|
|
92
|
-
name: "controlRadius",
|
|
93
|
-
control: {
|
|
94
|
-
type: "number",
|
|
95
|
-
min: 0,
|
|
96
|
-
max: 40
|
|
97
|
-
},
|
|
98
|
-
description: "radius of the control corners (in px) "
|
|
99
|
-
},
|
|
100
|
-
segmentRadius: {
|
|
101
|
-
name: "segmentRadius",
|
|
102
|
-
control: {
|
|
103
|
-
type: "number",
|
|
104
|
-
min: 0,
|
|
105
|
-
max: 40
|
|
106
|
-
},
|
|
107
|
-
description: "radius of the selected segment corners (in px)"
|
|
108
|
-
},
|
|
109
|
-
segmentHeigth: {
|
|
110
|
-
name: "segmentHeigth",
|
|
111
|
-
control: {
|
|
112
|
-
type: "number",
|
|
113
|
-
min: 0,
|
|
114
|
-
max: 100
|
|
115
|
-
},
|
|
116
|
-
description: "height of the segments "
|
|
117
|
-
},
|
|
118
|
-
fontSize: {
|
|
119
|
-
name: "fontSize",
|
|
120
|
-
control: {
|
|
121
|
-
type: "number",
|
|
122
|
-
min: 9,
|
|
123
|
-
max: 40
|
|
124
|
-
},
|
|
125
|
-
description: "font size (in px)"
|
|
126
|
-
},
|
|
127
|
-
options: {
|
|
128
|
-
description: "array [] of objects: {value: string } to fill segmented buttons "
|
|
129
|
-
},
|
|
130
|
-
onClick: {
|
|
131
|
-
action: "onClick",
|
|
132
|
-
description: "onClick event - returns an object of selected button {index: number, value: string} "
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
exports.default = _default;
|
|
137
|
-
var Template = function Template(args) {
|
|
138
|
-
return /*#__PURE__*/_react.default.createElement(_SegmentedButton.SegmentedButton, args);
|
|
139
|
-
};
|
|
140
|
-
var SegmentedFilter = Template.bind({});
|
|
141
|
-
exports.SegmentedFilter = SegmentedFilter;
|
|
142
|
-
SegmentedFilter.args = {
|
|
143
|
-
name: "segmentedFilter",
|
|
144
|
-
options: arrSegmentedFilters,
|
|
145
|
-
defaultIndex: 0,
|
|
146
|
-
segmentWidth: 120,
|
|
147
|
-
controlRadius: 8,
|
|
148
|
-
segmentRadius: 8,
|
|
149
|
-
segmentHeigth: 40,
|
|
150
|
-
fontSize: 14,
|
|
151
|
-
backgroundColor: "#ECF0FF",
|
|
152
|
-
selectedSegmentColor: '#fcfcfc',
|
|
153
|
-
selectedTextColor: '#000000',
|
|
154
|
-
unselectedTextColor: '#000000'
|
|
155
|
-
};
|
|
156
|
-
var DollarsOrUnits = Template.bind({});
|
|
157
|
-
exports.DollarsOrUnits = DollarsOrUnits;
|
|
158
|
-
DollarsOrUnits.args = {
|
|
159
|
-
name: "segmentedDollarsOrUnits",
|
|
160
|
-
options: arrDollarsOrUnits,
|
|
161
|
-
defaultIndex: 1,
|
|
162
|
-
segmentWidth: 100,
|
|
163
|
-
controlRadius: 8,
|
|
164
|
-
segmentRadius: 8,
|
|
165
|
-
segmentHeigth: 40,
|
|
166
|
-
fontSize: 14,
|
|
167
|
-
backgroundColor: "#ECF0FF",
|
|
168
|
-
selectedSegmentColor: 'rgba(61, 154, 242, 0.83)',
|
|
169
|
-
selectedTextColor: '#ffffff',
|
|
170
|
-
unselectedTextColor: '#000000'
|
|
171
|
-
};
|
|
172
|
-
var Period = Template.bind({});
|
|
173
|
-
exports.Period = Period;
|
|
174
|
-
Period.args = {
|
|
175
|
-
name: "period",
|
|
176
|
-
options: arrPeriod,
|
|
177
|
-
defaultIndex: 1,
|
|
178
|
-
segmentWidth: 60,
|
|
179
|
-
controlRadius: 8,
|
|
180
|
-
segmentRadius: 8,
|
|
181
|
-
segmentHeigth: 41,
|
|
182
|
-
fontSize: 14,
|
|
183
|
-
backgroundColor: "#ECF0FF",
|
|
184
|
-
selectedSegmentColor: 'rgba(61, 154, 242, 0.83)',
|
|
185
|
-
selectedTextColor: '#ffffff',
|
|
186
|
-
unselectedTextColor: '#000000'
|
|
187
|
-
};
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = exports.TotalCost3rows = exports.TotalCost = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _TotalDoughnutChart = require("./components/TotalDoughnutChart");
|
|
10
|
-
var arrLegendData = [{
|
|
11
|
-
name: "Package Cost",
|
|
12
|
-
value: 30000,
|
|
13
|
-
color: "#85A1D2"
|
|
14
|
-
}, {
|
|
15
|
-
name: "Redemption Cost",
|
|
16
|
-
value: 6500,
|
|
17
|
-
color: "#9AE6FF"
|
|
18
|
-
}];
|
|
19
|
-
var arrLegendDat3rows = [{
|
|
20
|
-
name: "Package Cost",
|
|
21
|
-
value: 30000,
|
|
22
|
-
color: "#85A1D2"
|
|
23
|
-
}, {
|
|
24
|
-
name: "Existing Redeemers",
|
|
25
|
-
value: 6500,
|
|
26
|
-
color: "#9AE6FF"
|
|
27
|
-
}, {
|
|
28
|
-
name: "Others",
|
|
29
|
-
value: 20000,
|
|
30
|
-
color: "#FD5959"
|
|
31
|
-
}
|
|
32
|
-
// { name: "My test 2", value: 35000, color: "#79DB95"},
|
|
33
|
-
];
|
|
34
|
-
var _default = {
|
|
35
|
-
title: "SAG BI/TotalDoughnutChart",
|
|
36
|
-
component: _TotalDoughnutChart.TotalDoughnutChart,
|
|
37
|
-
tags: ["autodocs"],
|
|
38
|
-
argTypes: {
|
|
39
|
-
title: {
|
|
40
|
-
name: "title",
|
|
41
|
-
control: {
|
|
42
|
-
type: "text"
|
|
43
|
-
},
|
|
44
|
-
description: "title on top of the component"
|
|
45
|
-
},
|
|
46
|
-
value: {
|
|
47
|
-
name: "value",
|
|
48
|
-
control: {
|
|
49
|
-
type: "number",
|
|
50
|
-
min: 0,
|
|
51
|
-
max: 100000000000000
|
|
52
|
-
},
|
|
53
|
-
description: "value (total) "
|
|
54
|
-
},
|
|
55
|
-
dotCut: {
|
|
56
|
-
name: "dotCut",
|
|
57
|
-
control: {
|
|
58
|
-
type: "boolean"
|
|
59
|
-
},
|
|
60
|
-
description: "true/false - format total value with dot cut"
|
|
61
|
-
},
|
|
62
|
-
currency: {
|
|
63
|
-
name: "currency",
|
|
64
|
-
control: {
|
|
65
|
-
type: "boolean"
|
|
66
|
-
},
|
|
67
|
-
description: "true/false - show/hide currency before total value"
|
|
68
|
-
},
|
|
69
|
-
currencyType: {
|
|
70
|
-
name: "currencyType",
|
|
71
|
-
options: ["USD", "EUR", "ILS", "GBP", "JPY"],
|
|
72
|
-
control: {
|
|
73
|
-
type: "select"
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
width: {
|
|
77
|
-
name: "width",
|
|
78
|
-
control: {
|
|
79
|
-
type: "number",
|
|
80
|
-
min: 0,
|
|
81
|
-
max: 600
|
|
82
|
-
},
|
|
83
|
-
description: "width of the control (in px)"
|
|
84
|
-
},
|
|
85
|
-
height: {
|
|
86
|
-
name: "height",
|
|
87
|
-
control: {
|
|
88
|
-
type: "number",
|
|
89
|
-
min: 0,
|
|
90
|
-
max: 600
|
|
91
|
-
},
|
|
92
|
-
description: "height of the control (in px)"
|
|
93
|
-
},
|
|
94
|
-
textColor: {
|
|
95
|
-
name: "textColor",
|
|
96
|
-
description: "Sets the text color",
|
|
97
|
-
control: {
|
|
98
|
-
type: "color",
|
|
99
|
-
presetColors: ["#ffffff", "#ff0000", "#00ff00", "#0000ff"]
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
legendData: {
|
|
103
|
-
description: "array [] of objects: {displayName: string, value:number} to fill the pie chart "
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
exports.default = _default;
|
|
108
|
-
var Template = function Template(args) {
|
|
109
|
-
return /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TotalDoughnutChart, args);
|
|
110
|
-
};
|
|
111
|
-
var TotalCost = Template.bind({});
|
|
112
|
-
exports.TotalCost = TotalCost;
|
|
113
|
-
TotalCost.args = {
|
|
114
|
-
title: "Total Cost",
|
|
115
|
-
value: 36500,
|
|
116
|
-
dotCut: true,
|
|
117
|
-
currency: true,
|
|
118
|
-
currencyType: "USD",
|
|
119
|
-
legendData: arrLegendData,
|
|
120
|
-
width: 260,
|
|
121
|
-
height: 350,
|
|
122
|
-
textColor: "#212121"
|
|
123
|
-
};
|
|
124
|
-
var TotalCost3rows = Template.bind({});
|
|
125
|
-
exports.TotalCost3rows = TotalCost3rows;
|
|
126
|
-
TotalCost3rows.args = {
|
|
127
|
-
title: "Total Cost",
|
|
128
|
-
value: 56500,
|
|
129
|
-
dotCut: true,
|
|
130
|
-
currency: true,
|
|
131
|
-
currencyType: "USD",
|
|
132
|
-
legendData: arrLegendDat3rows,
|
|
133
|
-
width: 260,
|
|
134
|
-
height: 350,
|
|
135
|
-
textColor: "#212121"
|
|
136
|
-
};
|