@hitachivantara/uikit-react-lab 3.53.0 → 3.55.1
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/dist/ImageCarousel/ImageCarousel.d.ts +11 -0
- package/dist/ImageCarousel/ImageCarousel.js +615 -0
- package/dist/ImageCarousel/ImageCarousel.js.map +1 -0
- package/dist/ImageCarousel/index.d.ts +2 -0
- package/dist/ImageCarousel/index.js +16 -0
- package/dist/ImageCarousel/index.js.map +1 -0
- package/dist/ImageCarousel/stories/resources/Ahsoka.jpg +0 -0
- package/dist/ImageCarousel/stories/resources/AnakinSkywalker.jpg +0 -0
- package/dist/ImageCarousel/stories/resources/BobaFett.jpg +0 -0
- package/dist/ImageCarousel/stories/resources/DarthVader.jpg +0 -0
- package/dist/ImageCarousel/stories/resources/MaceWindu.jpg +0 -0
- package/dist/ImageCarousel/stories/resources/ObiWan.png +0 -0
- package/dist/ImageCarousel/stories/resources/Panoramic.jpg +0 -0
- package/dist/ImageCarousel/stories/resources/Revan.jpg +0 -0
- package/dist/ImageCarousel/stories/resources/TheMandalorian.jpg +0 -0
- package/dist/ImageCarousel/stories/resources/Yoda.jpg +0 -0
- package/dist/ImageCarousel/styles.js +238 -0
- package/dist/ImageCarousel/styles.js.map +1 -0
- package/dist/StepNavigation/DefaultNavigation/Step/Step.d.ts +5 -0
- package/dist/StepNavigation/DefaultNavigation/Step/Step.js +9 -2
- package/dist/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -1
- package/dist/StepNavigation/SimpleNavigation/Dot/Dot.d.ts +1 -1
- package/dist/StepNavigation/SimpleNavigation/Dot/Dot.js +14 -4
- package/dist/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -1
- package/dist/StepNavigation/SimpleNavigation/Dot/styles.js +0 -3
- package/dist/StepNavigation/SimpleNavigation/Dot/styles.js.map +1 -1
- package/dist/StepNavigation/StepNavigation.d.ts +6 -5
- package/dist/StepNavigation/StepNavigation.js +17 -5
- package/dist/StepNavigation/StepNavigation.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy/ImageCarousel/ImageCarousel.d.ts +11 -0
- package/dist/legacy/ImageCarousel/ImageCarousel.js +574 -0
- package/dist/legacy/ImageCarousel/ImageCarousel.js.map +1 -0
- package/dist/legacy/ImageCarousel/index.d.ts +2 -0
- package/dist/legacy/ImageCarousel/index.js +2 -0
- package/dist/legacy/ImageCarousel/index.js.map +1 -0
- package/dist/legacy/ImageCarousel/stories/resources/Ahsoka.jpg +0 -0
- package/dist/legacy/ImageCarousel/stories/resources/AnakinSkywalker.jpg +0 -0
- package/dist/legacy/ImageCarousel/stories/resources/BobaFett.jpg +0 -0
- package/dist/legacy/ImageCarousel/stories/resources/DarthVader.jpg +0 -0
- package/dist/legacy/ImageCarousel/stories/resources/MaceWindu.jpg +0 -0
- package/dist/legacy/ImageCarousel/stories/resources/ObiWan.png +0 -0
- package/dist/legacy/ImageCarousel/stories/resources/Panoramic.jpg +0 -0
- package/dist/legacy/ImageCarousel/stories/resources/Revan.jpg +0 -0
- package/dist/legacy/ImageCarousel/stories/resources/TheMandalorian.jpg +0 -0
- package/dist/legacy/ImageCarousel/stories/resources/Yoda.jpg +0 -0
- package/dist/legacy/ImageCarousel/styles.js +228 -0
- package/dist/legacy/ImageCarousel/styles.js.map +1 -0
- package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.d.ts +5 -0
- package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.js +9 -2
- package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -1
- package/dist/legacy/StepNavigation/SimpleNavigation/Dot/Dot.d.ts +1 -1
- package/dist/legacy/StepNavigation/SimpleNavigation/Dot/Dot.js +14 -4
- package/dist/legacy/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -1
- package/dist/legacy/StepNavigation/SimpleNavigation/Dot/styles.js +0 -3
- package/dist/legacy/StepNavigation/SimpleNavigation/Dot/styles.js.map +1 -1
- package/dist/legacy/StepNavigation/StepNavigation.d.ts +6 -5
- package/dist/legacy/StepNavigation/StepNavigation.js +17 -5
- package/dist/legacy/StepNavigation/StepNavigation.js.map +1 -1
- package/dist/legacy/index.d.ts +3 -0
- package/dist/legacy/index.js +1 -0
- package/dist/legacy/index.js.map +1 -1
- package/dist/modern/ImageCarousel/ImageCarousel.d.ts +11 -0
- package/dist/modern/ImageCarousel/ImageCarousel.js +499 -0
- package/dist/modern/ImageCarousel/ImageCarousel.js.map +1 -0
- package/dist/modern/ImageCarousel/index.d.ts +2 -0
- package/dist/modern/ImageCarousel/index.js +2 -0
- package/dist/modern/ImageCarousel/index.js.map +1 -0
- package/dist/modern/ImageCarousel/stories/resources/Ahsoka.jpg +0 -0
- package/dist/modern/ImageCarousel/stories/resources/AnakinSkywalker.jpg +0 -0
- package/dist/modern/ImageCarousel/stories/resources/BobaFett.jpg +0 -0
- package/dist/modern/ImageCarousel/stories/resources/DarthVader.jpg +0 -0
- package/dist/modern/ImageCarousel/stories/resources/MaceWindu.jpg +0 -0
- package/dist/modern/ImageCarousel/stories/resources/ObiWan.png +0 -0
- package/dist/modern/ImageCarousel/stories/resources/Panoramic.jpg +0 -0
- package/dist/modern/ImageCarousel/stories/resources/Revan.jpg +0 -0
- package/dist/modern/ImageCarousel/stories/resources/TheMandalorian.jpg +0 -0
- package/dist/modern/ImageCarousel/stories/resources/Yoda.jpg +0 -0
- package/dist/modern/ImageCarousel/styles.js +241 -0
- package/dist/modern/ImageCarousel/styles.js.map +1 -0
- package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.d.ts +5 -0
- package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.js +9 -2
- package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -1
- package/dist/modern/StepNavigation/SimpleNavigation/Dot/Dot.d.ts +1 -1
- package/dist/modern/StepNavigation/SimpleNavigation/Dot/Dot.js +14 -4
- package/dist/modern/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -1
- package/dist/modern/StepNavigation/SimpleNavigation/Dot/styles.js +0 -3
- package/dist/modern/StepNavigation/SimpleNavigation/Dot/styles.js.map +1 -1
- package/dist/modern/StepNavigation/StepNavigation.d.ts +6 -5
- package/dist/modern/StepNavigation/StepNavigation.js +17 -5
- package/dist/modern/StepNavigation/StepNavigation.js.map +1 -1
- package/dist/modern/index.d.ts +3 -0
- package/dist/modern/index.js +1 -0
- package/dist/modern/index.js.map +1 -1
- package/package.json +3 -3
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
|
|
3
|
+
var styles = function styles(theme) {
|
|
4
|
+
var _notFullscreen, _img, _thumbnailSelected, _imageContainer;
|
|
5
|
+
|
|
6
|
+
return {
|
|
7
|
+
root: {
|
|
8
|
+
"&:not(.xs)": {
|
|
9
|
+
background: theme.hv.palette.atmosphere.atmo1,
|
|
10
|
+
display: "flex",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
flexDirection: "column",
|
|
13
|
+
margin: "0px",
|
|
14
|
+
paddingTop: "15px",
|
|
15
|
+
paddingBottom: "15px"
|
|
16
|
+
},
|
|
17
|
+
"&:not(.nxs)": {
|
|
18
|
+
width: "100%",
|
|
19
|
+
maxWidth: "500px",
|
|
20
|
+
height: "200px",
|
|
21
|
+
padding: "0px"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
fullscreenStyle: {
|
|
25
|
+
width: "100vw",
|
|
26
|
+
height: "100vh",
|
|
27
|
+
position: "fixed",
|
|
28
|
+
padding: "10px 150px 10px 150px",
|
|
29
|
+
top: 0,
|
|
30
|
+
left: 0,
|
|
31
|
+
zIndex: 1300
|
|
32
|
+
},
|
|
33
|
+
closeButton: {
|
|
34
|
+
position: "absolute",
|
|
35
|
+
right: "25px"
|
|
36
|
+
},
|
|
37
|
+
selectedImage: {
|
|
38
|
+
"&:not(.contain)": {
|
|
39
|
+
objectFit: "cover"
|
|
40
|
+
},
|
|
41
|
+
"&:not(.cover)": {
|
|
42
|
+
objectFit: "contain"
|
|
43
|
+
},
|
|
44
|
+
"&:not(.xs)": {
|
|
45
|
+
width: "100%",
|
|
46
|
+
textAlign: "center",
|
|
47
|
+
"&:not(.fullscreen)": (_notFullscreen = {}, _defineProperty(_notFullscreen, theme.breakpoints.up("xs"), {
|
|
48
|
+
height: "150px",
|
|
49
|
+
minHeight: "150px"
|
|
50
|
+
}), _defineProperty(_notFullscreen, theme.breakpoints.up("sm"), {
|
|
51
|
+
height: "300px",
|
|
52
|
+
minHeight: "300px"
|
|
53
|
+
}), _defineProperty(_notFullscreen, theme.breakpoints.up("lg"), {
|
|
54
|
+
height: "450px",
|
|
55
|
+
minHeight: "450px"
|
|
56
|
+
}), _notFullscreen),
|
|
57
|
+
"&:not(.notFullscreen)": {
|
|
58
|
+
height: "100%"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"&:not(.nxs)": {
|
|
62
|
+
width: "100%",
|
|
63
|
+
textAlign: "center"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
xsMode: {
|
|
67
|
+
width: "min-content",
|
|
68
|
+
height: "min-content",
|
|
69
|
+
margin: "0px",
|
|
70
|
+
textAlign: "center"
|
|
71
|
+
},
|
|
72
|
+
circles: {
|
|
73
|
+
display: "flex",
|
|
74
|
+
alignItems: "center",
|
|
75
|
+
justifyContent: "center"
|
|
76
|
+
},
|
|
77
|
+
xsCircles: {
|
|
78
|
+
display: "flex",
|
|
79
|
+
alignItems: "center",
|
|
80
|
+
justifyContent: "center",
|
|
81
|
+
position: "relative",
|
|
82
|
+
transform: "translateY(-63px)"
|
|
83
|
+
},
|
|
84
|
+
hidden: {
|
|
85
|
+
visibility: "hidden"
|
|
86
|
+
},
|
|
87
|
+
title: {
|
|
88
|
+
display: "flex",
|
|
89
|
+
alignItems: "flex-start",
|
|
90
|
+
width: "100%",
|
|
91
|
+
justifyContent: "space-between"
|
|
92
|
+
},
|
|
93
|
+
divCounter: {
|
|
94
|
+
width: "100%",
|
|
95
|
+
paddingTop: "10px",
|
|
96
|
+
paddingRight: "15px",
|
|
97
|
+
display: "flex",
|
|
98
|
+
justifyContent: "flex-end",
|
|
99
|
+
position: "relative",
|
|
100
|
+
bottom: "102%",
|
|
101
|
+
"&:not(.nxs)": {
|
|
102
|
+
right: "5%",
|
|
103
|
+
bottom: "262px",
|
|
104
|
+
padding: "0px"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
counter: {
|
|
108
|
+
width: "45px",
|
|
109
|
+
backgroundColor: theme.hv.palette.base.base2
|
|
110
|
+
},
|
|
111
|
+
img: (_img = {
|
|
112
|
+
width: "100%",
|
|
113
|
+
height: "70px"
|
|
114
|
+
}, _defineProperty(_img, theme.breakpoints.up("lg"), {
|
|
115
|
+
height: "75px"
|
|
116
|
+
}), _defineProperty(_img, "textAlign", "center"), _defineProperty(_img, "objectFit", "cover"), _img),
|
|
117
|
+
thumbnailSelected: (_thumbnailSelected = {
|
|
118
|
+
width: "100%",
|
|
119
|
+
height: "70px"
|
|
120
|
+
}, _defineProperty(_thumbnailSelected, theme.breakpoints.up("lg"), {
|
|
121
|
+
height: "75px"
|
|
122
|
+
}), _defineProperty(_thumbnailSelected, "textAlign", "center"), _defineProperty(_thumbnailSelected, "objectFit", "cover"), _defineProperty(_thumbnailSelected, "borderStyle", "solid"), _defineProperty(_thumbnailSelected, "borderColor", theme.hv.palette.base.base2), _defineProperty(_thumbnailSelected, "opacity", "50%"), _thumbnailSelected),
|
|
123
|
+
thumbnailButton: _defineProperty({
|
|
124
|
+
width: "110px",
|
|
125
|
+
height: "70px",
|
|
126
|
+
padding: "0px 0px"
|
|
127
|
+
}, theme.breakpoints.up("lg"), {
|
|
128
|
+
width: "120px",
|
|
129
|
+
height: "75px"
|
|
130
|
+
}),
|
|
131
|
+
miniCircle: {
|
|
132
|
+
width: "5px",
|
|
133
|
+
height: "5px",
|
|
134
|
+
borderRadius: "50%",
|
|
135
|
+
backgroundColor: theme.hv.palette.atmosphere.atmo4,
|
|
136
|
+
display: "inline-block",
|
|
137
|
+
margin: "10px"
|
|
138
|
+
},
|
|
139
|
+
selectedCircle: {
|
|
140
|
+
width: "10px",
|
|
141
|
+
height: "10px",
|
|
142
|
+
borderRadius: "50%",
|
|
143
|
+
backgroundColor: theme.hv.palette.atmosphere.atmo5,
|
|
144
|
+
display: "inline-block",
|
|
145
|
+
margin: "10px"
|
|
146
|
+
},
|
|
147
|
+
xsSelectedCircle: {
|
|
148
|
+
width: "10px",
|
|
149
|
+
height: "10px",
|
|
150
|
+
borderRadius: "50%",
|
|
151
|
+
backgroundColor: theme.hv.palette.atmosphere.atmo3,
|
|
152
|
+
display: "inline-block",
|
|
153
|
+
margin: "10px"
|
|
154
|
+
},
|
|
155
|
+
lowButtons: {
|
|
156
|
+
width: "95%",
|
|
157
|
+
display: "inline-flex",
|
|
158
|
+
justifyContent: "space-between",
|
|
159
|
+
position: "relative",
|
|
160
|
+
top: "-50%",
|
|
161
|
+
transform: "translateY(-16px)",
|
|
162
|
+
"&:not(.nxs)": {
|
|
163
|
+
width: "90%",
|
|
164
|
+
top: "-99px"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
imageContainer: (_imageContainer = {
|
|
168
|
+
width: "100%",
|
|
169
|
+
marginTop: "20px",
|
|
170
|
+
margin: "0px",
|
|
171
|
+
textAlign: "center",
|
|
172
|
+
padding: "0px"
|
|
173
|
+
}, _defineProperty(_imageContainer, theme.breakpoints.up("xs"), {
|
|
174
|
+
height: "150px",
|
|
175
|
+
minHeight: "150px"
|
|
176
|
+
}), _defineProperty(_imageContainer, theme.breakpoints.up("sm"), {
|
|
177
|
+
height: "300px",
|
|
178
|
+
minHeight: "300px"
|
|
179
|
+
}), _defineProperty(_imageContainer, theme.breakpoints.up("lg"), {
|
|
180
|
+
height: "450px",
|
|
181
|
+
minHeight: "450px"
|
|
182
|
+
}), _defineProperty(_imageContainer, "&:not(.notFullscreen)", {
|
|
183
|
+
height: "85%",
|
|
184
|
+
alignItems: "center"
|
|
185
|
+
}), _imageContainer),
|
|
186
|
+
button: {
|
|
187
|
+
backgroundColor: theme.hv.palette.atmosphere.atmo3
|
|
188
|
+
},
|
|
189
|
+
inputImage: _defineProperty({
|
|
190
|
+
width: "110px",
|
|
191
|
+
height: "70px",
|
|
192
|
+
padding: "0px 0px"
|
|
193
|
+
}, theme.breakpoints.up("lg"), {
|
|
194
|
+
width: "120px",
|
|
195
|
+
height: "75px"
|
|
196
|
+
}),
|
|
197
|
+
stack: {
|
|
198
|
+
"&:not(.xs)": {
|
|
199
|
+
width: "100%",
|
|
200
|
+
display: "flex",
|
|
201
|
+
alignSelf: "center",
|
|
202
|
+
height: "100%",
|
|
203
|
+
padding: "0px"
|
|
204
|
+
},
|
|
205
|
+
"&:not(.flag)": {
|
|
206
|
+
overflowX: "hidden"
|
|
207
|
+
},
|
|
208
|
+
"&:not(.nxs)": {
|
|
209
|
+
height: "200px",
|
|
210
|
+
display: "flex",
|
|
211
|
+
padding: "0px"
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
normalButtons: {
|
|
215
|
+
padding: "5px 0px"
|
|
216
|
+
},
|
|
217
|
+
panel: {
|
|
218
|
+
display: "flex",
|
|
219
|
+
width: "100%",
|
|
220
|
+
overflow: "hidden",
|
|
221
|
+
padding: "3px",
|
|
222
|
+
height: "75px"
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
export default styles;
|
|
228
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","theme","root","background","hv","palette","atmosphere","atmo1","display","alignItems","flexDirection","margin","paddingTop","paddingBottom","width","maxWidth","height","padding","fullscreenStyle","position","top","left","zIndex","closeButton","right","selectedImage","objectFit","textAlign","breakpoints","up","minHeight","xsMode","circles","justifyContent","xsCircles","transform","hidden","visibility","title","divCounter","paddingRight","bottom","counter","backgroundColor","base","base2","img","thumbnailSelected","thumbnailButton","miniCircle","borderRadius","atmo4","selectedCircle","atmo5","xsSelectedCircle","atmo3","lowButtons","imageContainer","marginTop","button","inputImage","stack","alignSelf","overflowX","normalButtons","panel","overflow"],"sources":["../../../src/ImageCarousel/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n \"&:not(.xs)\": {\n background: theme.hv.palette.atmosphere.atmo1,\n display: \"flex\",\n alignItems: \"center\",\n flexDirection: \"column\",\n margin: \"0px\",\n paddingTop: \"15px\",\n paddingBottom: \"15px\",\n },\n \"&:not(.nxs)\": {\n width: \"100%\",\n maxWidth: \"500px\",\n height: \"200px\",\n padding: \"0px\",\n },\n },\n fullscreenStyle: {\n width: \"100vw\",\n height: \"100vh\",\n position: \"fixed\",\n padding: \"10px 150px 10px 150px\",\n top: 0,\n left: 0,\n zIndex: 1300,\n },\n closeButton: {\n position: \"absolute\",\n right: \"25px\",\n },\n selectedImage: {\n \"&:not(.contain)\": {\n objectFit: \"cover\",\n },\n \"&:not(.cover)\": {\n objectFit: \"contain\",\n },\n \"&:not(.xs)\": {\n width: \"100%\",\n textAlign: \"center\",\n \"&:not(.fullscreen)\": {\n [theme.breakpoints.up(\"xs\")]: {\n height: \"150px\",\n minHeight: \"150px\",\n },\n [theme.breakpoints.up(\"sm\")]: {\n height: \"300px\",\n minHeight: \"300px\",\n },\n [theme.breakpoints.up(\"lg\")]: {\n height: \"450px\",\n minHeight: \"450px\",\n },\n },\n \"&:not(.notFullscreen)\": {\n height: \"100%\",\n },\n },\n \"&:not(.nxs)\": {\n width: \"100%\",\n textAlign: \"center\",\n },\n },\n xsMode: {\n width: \"min-content\",\n height: \"min-content\",\n margin: \"0px\",\n textAlign: \"center\",\n },\n circles: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n xsCircles: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"relative\",\n transform: \"translateY(-63px)\",\n },\n hidden: {\n visibility: \"hidden\",\n },\n title: {\n display: \"flex\",\n alignItems: \"flex-start\",\n width: \"100%\",\n justifyContent: \"space-between\",\n },\n divCounter: {\n width: \"100%\",\n paddingTop: \"10px\",\n paddingRight: \"15px\",\n display: \"flex\",\n justifyContent: \"flex-end\",\n position: \"relative\",\n bottom: \"102%\",\n \"&:not(.nxs)\": {\n right: \"5%\",\n bottom: \"262px\",\n padding: \"0px\",\n },\n },\n counter: {\n width: \"45px\",\n backgroundColor: theme.hv.palette.base.base2,\n },\n img: {\n width: \"100%\",\n height: \"70px\",\n [theme.breakpoints.up(\"lg\")]: {\n height: \"75px\",\n },\n textAlign: \"center\",\n objectFit: \"cover\",\n },\n thumbnailSelected: {\n width: \"100%\",\n height: \"70px\",\n [theme.breakpoints.up(\"lg\")]: {\n height: \"75px\",\n },\n textAlign: \"center\",\n objectFit: \"cover\",\n borderStyle: \"solid\",\n borderColor: theme.hv.palette.base.base2,\n opacity: \"50%\",\n },\n thumbnailButton: {\n width: \"110px\",\n height: \"70px\",\n padding: \"0px 0px\",\n [theme.breakpoints.up(\"lg\")]: {\n width: \"120px\",\n height: \"75px\",\n },\n },\n miniCircle: {\n width: \"5px\",\n height: \"5px\",\n borderRadius: \"50%\",\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n display: \"inline-block\",\n margin: \"10px\",\n },\n selectedCircle: {\n width: \"10px\",\n height: \"10px\",\n borderRadius: \"50%\",\n backgroundColor: theme.hv.palette.atmosphere.atmo5,\n display: \"inline-block\",\n margin: \"10px\",\n },\n xsSelectedCircle: {\n width: \"10px\",\n height: \"10px\",\n borderRadius: \"50%\",\n backgroundColor: theme.hv.palette.atmosphere.atmo3,\n display: \"inline-block\",\n margin: \"10px\",\n },\n lowButtons: {\n width: \"95%\",\n display: \"inline-flex\",\n justifyContent: \"space-between\",\n position: \"relative\",\n top: \"-50%\",\n transform: \"translateY(-16px)\",\n \"&:not(.nxs)\": {\n width: \"90%\",\n top: \"-99px\",\n },\n },\n imageContainer: {\n width: \"100%\",\n marginTop: \"20px\",\n margin: \"0px\",\n textAlign: \"center\",\n padding: \"0px\",\n [theme.breakpoints.up(\"xs\")]: {\n height: \"150px\",\n minHeight: \"150px\",\n },\n [theme.breakpoints.up(\"sm\")]: {\n height: \"300px\",\n minHeight: \"300px\",\n },\n [theme.breakpoints.up(\"lg\")]: {\n height: \"450px\",\n minHeight: \"450px\",\n },\n \"&:not(.notFullscreen)\": {\n height: \"85%\",\n alignItems: \"center\",\n },\n },\n button: {\n backgroundColor: theme.hv.palette.atmosphere.atmo3,\n },\n inputImage: {\n width: \"110px\",\n height: \"70px\",\n padding: \"0px 0px\",\n [theme.breakpoints.up(\"lg\")]: {\n width: \"120px\",\n height: \"75px\",\n },\n },\n stack: {\n \"&:not(.xs)\": {\n width: \"100%\",\n display: \"flex\",\n alignSelf: \"center\",\n height: \"100%\",\n padding: \"0px\",\n },\n \"&:not(.flag)\": {\n overflowX: \"hidden\",\n },\n \"&:not(.nxs)\": {\n height: \"200px\",\n display: \"flex\",\n padding: \"0px\",\n },\n },\n normalButtons: {\n padding: \"5px 0px\",\n },\n panel: {\n display: \"flex\",\n width: \"100%\",\n overflow: \"hidden\",\n padding: \"3px\",\n height: \"75px\",\n },\n});\n\nexport default styles;\n"],"mappings":";;AAAA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA;;EAAA,OAAY;IACzBC,IAAI,EAAE;MACJ,cAAc;QACZC,UAAU,EAAEF,KAAK,CAACG,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BC,KAD5B;QAEZC,OAAO,EAAE,MAFG;QAGZC,UAAU,EAAE,QAHA;QAIZC,aAAa,EAAE,QAJH;QAKZC,MAAM,EAAE,KALI;QAMZC,UAAU,EAAE,MANA;QAOZC,aAAa,EAAE;MAPH,CADV;MAUJ,eAAe;QACbC,KAAK,EAAE,MADM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9C,MAAM,EAAE,MAJI;QAKZC,OAAO,EAAE;MALG,CADT;MAQL,gBAAgB;QACd8C,SAAS,EAAE;MADG,CARX;MAWL,eAAe;QACb/C,MAAM,EAAE,OADK;QAEbR,OAAO,EAAE,MAFI;QAGbS,OAAO,EAAE;MAHI;IAXV,CAlNkB;IAmOzB+C,aAAa,EAAE;MACb/C,OAAO,EAAE;IADI,CAnOU;IAsOzBgD,KAAK,EAAE;MACLzD,OAAO,EAAE,MADJ;MAELM,KAAK,EAAE,MAFF;MAGLoD,QAAQ,EAAE,QAHL;MAILjD,OAAO,EAAE,KAJJ;MAKLD,MAAM,EAAE;IALH;EAtOkB,CAAZ;AAAA,CAAf;;AA+OA,eAAehB,MAAf"}
|
|
@@ -22,6 +22,11 @@ export type HvStepProps = StandardProps<React.HTMLAttributes<HTMLDivElement>, Hv
|
|
|
22
22
|
* Number of the step.
|
|
23
23
|
*/
|
|
24
24
|
number?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Define if a step is disabled/enabled.
|
|
27
|
+
* If this property is not defined and the step is on state "Disabled", the step component will be disabled
|
|
28
|
+
*/
|
|
29
|
+
disabled?: boolean;
|
|
25
30
|
};
|
|
26
31
|
|
|
27
32
|
export default function HvStep(props: HvStepProps): JSX.Element | null;
|
|
@@ -17,6 +17,7 @@ var HvStep = function HvStep(_ref) {
|
|
|
17
17
|
state = _ref.state,
|
|
18
18
|
title = _ref.title,
|
|
19
19
|
onClick = _ref.onClick,
|
|
20
|
+
disabled = _ref.disabled,
|
|
20
21
|
_ref$size = _ref.size,
|
|
21
22
|
size = _ref$size === void 0 ? "SM" : _ref$size,
|
|
22
23
|
_ref$number = _ref.number,
|
|
@@ -56,7 +57,7 @@ var HvStep = function HvStep(_ref) {
|
|
|
56
57
|
"aria-label": "step-".concat(title),
|
|
57
58
|
icon: true,
|
|
58
59
|
overrideIconColors: false,
|
|
59
|
-
disabled: ["Current", "Disabled"].includes(state),
|
|
60
|
+
disabled: disabled !== null && disabled !== void 0 ? disabled : ["Current", "Disabled"].includes(state),
|
|
60
61
|
onClick: onClick
|
|
61
62
|
}, /*#__PURE__*/React.createElement(HvAvatar, {
|
|
62
63
|
className: clsx(classes.avatar, classes[size]),
|
|
@@ -161,7 +162,13 @@ process.env.NODE_ENV !== "production" ? HvStep.propTypes = {
|
|
|
161
162
|
/**
|
|
162
163
|
* Event onClick of the step.
|
|
163
164
|
*/
|
|
164
|
-
onClick: PropTypes.func
|
|
165
|
+
onClick: PropTypes.func,
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Define if a step is disabled/enabled.
|
|
169
|
+
* If this property is not defined and the step is on state "Disabled", the step component will be disabled
|
|
170
|
+
*/
|
|
171
|
+
disabled: PropTypes.bool
|
|
165
172
|
} : void 0;
|
|
166
173
|
export default withStyles(styles, {
|
|
167
174
|
name: "HvStep"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Step.js","names":["React","PropTypes","clsx","withStyles","Level0Good","Level3Bad","HourGlass","HvAvatar","HvButton","getColor","styles","HvStep","className","classes","state","title","onClick","size","number","iconSize","XS","SM","MD","LG","XL","squareL","Pending","Failed","Completed","svgSize","backgroundColor","color","undefined","semantic","status","IconComponent","root","ghost","ghostDisabled","includes","avatar","propTypes","string","shape","stepTitle","isRequired","oneOf","func","name"],"sources":["../../../../../src/StepNavigation/DefaultNavigation/Step/Step.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles } from \"@material-ui/core\";\n\nimport { Level0Good, Level3Bad, HourGlass } from \"@hitachivantara/uikit-react-icons\";\nimport { HvAvatar, HvButton } from \"@hitachivantara/uikit-react-core\";\n\nimport { getColor } from \"../utils\";\nimport styles from \"./styles\";\n\n/**\n * Step element of \"Default\" Step Navigation root component\n */\nconst HvStep = ({
|
|
1
|
+
{"version":3,"file":"Step.js","names":["React","PropTypes","clsx","withStyles","Level0Good","Level3Bad","HourGlass","HvAvatar","HvButton","getColor","styles","HvStep","className","classes","state","title","onClick","disabled","size","number","iconSize","XS","SM","MD","LG","XL","squareL","Pending","Failed","Completed","svgSize","backgroundColor","color","undefined","semantic","status","IconComponent","root","ghost","ghostDisabled","includes","avatar","propTypes","string","shape","stepTitle","isRequired","oneOf","func","bool","name"],"sources":["../../../../../src/StepNavigation/DefaultNavigation/Step/Step.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles } from \"@material-ui/core\";\n\nimport { Level0Good, Level3Bad, HourGlass } from \"@hitachivantara/uikit-react-icons\";\nimport { HvAvatar, HvButton } from \"@hitachivantara/uikit-react-core\";\n\nimport { getColor } from \"../utils\";\nimport styles from \"./styles\";\n\n/**\n * Step element of \"Default\" Step Navigation root component\n */\nconst HvStep = ({\n className,\n classes,\n state,\n title,\n onClick,\n disabled,\n size = \"SM\",\n number = 1,\n}) => {\n const iconSize = {\n XS: \"XS\",\n SM: \"XS\",\n MD: \"S\",\n LG: \"M\",\n XL: \"M\",\n }[size];\n\n const squareL = {\n Pending: 16,\n Failed: 24,\n Completed: 24,\n }[state];\n\n const svgSize = {\n XS: squareL - 8,\n SM: squareL,\n MD: squareL + 8,\n LG: squareL + 16,\n XL: squareL + 24,\n }[size];\n\n const backgroundColor = getColor(state);\n\n const color = state === \"Pending\" ? \"atmo2\" : undefined;\n\n const semantic = state !== \"Pending\" ? backgroundColor : undefined;\n\n const status = state === \"Current\" ? \"atmo5\" : undefined;\n\n const IconComponent = {\n Pending: HourGlass,\n Failed: Level3Bad,\n Completed: Level0Good,\n }[state];\n\n return (\n <div\n className={clsx(className, classes.root, { [classes[\"not-current\"]]: state !== \"Current\" })}\n >\n <HvButton\n className={clsx(classes.ghost, { [classes.ghostDisabled]: state === \"Current\" })}\n aria-label={`step-${title}`}\n icon\n overrideIconColors={false}\n disabled={disabled ?? [\"Current\", \"Disabled\"].includes(state)}\n onClick={onClick}\n >\n <HvAvatar\n className={clsx(classes.avatar, classes[size])}\n backgroundColor={backgroundColor}\n status={status}\n size={size}\n >\n {IconComponent ? (\n <IconComponent\n color={color}\n semantic={semantic}\n width={svgSize}\n height={svgSize}\n iconSize={iconSize}\n />\n ) : (\n number\n )}\n </HvAvatar>\n </HvButton>\n </div>\n );\n};\n\nHvStep.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the ghost class.\n */\n ghost: PropTypes.string,\n /**\n * Styles applied to the ghostDisabled class.\n */\n ghostDisabled: PropTypes.string,\n /**\n * Styles applied to the root element when step is not in \"current\" state.\n */\n \"not-current\": PropTypes.string,\n /**\n * Styles applied to the root element when size is XS.\n */\n XS: PropTypes.string,\n /**\n * Styles applied to the root element when size is SM.\n */\n SM: PropTypes.string,\n /**\n * Styles applied to the root element when size is MD.\n */\n MD: PropTypes.string,\n /**\n * Styles applied to the root element when size is LG.\n */\n LG: PropTypes.string,\n /**\n * Styles applied to the root element when size is XL.\n */\n XL: PropTypes.string,\n /**\n * Styles applied to the avatar element.\n */\n avatar: PropTypes.string,\n /**\n * Styles applied to the title of a step element.\n */\n stepTitle: PropTypes.string,\n }).isRequired,\n /**\n * Sets one of the standard sizes of the step\n */\n size: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]),\n /**\n * State of the step. Values = {\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\"}\n */\n state: PropTypes.oneOf([\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\"]).isRequired,\n /**\n * Title of the step.\n */\n title: PropTypes.string.isRequired,\n /**\n * Number of the step.\n */\n number: PropTypes.number,\n /**\n * Event onClick of the step.\n */\n onClick: PropTypes.func,\n /**\n * Define if a step is disabled/enabled.\n * If this property is not defined and the step is on state \"Disabled\", the step component will be disabled\n */\n disabled: PropTypes.bool,\n};\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jE;;EA8DjB;AACF;AACA;EACE/B,KAAK,EAAEd,SAAS,CAAC0C,MAAV,CAAiBG,UAjEP;;EAkEjB;AACF;AACA;EACE3B,MAAM,EAAElB,SAAS,CAACkB,MArED;;EAsEjB;AACF;AACA;EACEH,OAAO,EAAEf,SAAS,CAAC+C,IAzEF;;EA0EjB;AACF;AACA;AACA;EACE/B,QAAQ,EAAEhB,SAAS,CAACgD;AA9EH,CAAnB;AAiFA,eAAe9C,UAAU,CAACO,MAAD,EAAS;EAAEwC,IAAI,EAAE;AAAR,CAAT,CAAV,CAAuCvC,MAAvC,CAAf"}
|
|
@@ -5,6 +5,6 @@ import { HvStepProps } from "../../DefaultNavigation/Step";
|
|
|
5
5
|
export type HvDotClassKey = "root";
|
|
6
6
|
|
|
7
7
|
export type HvDotProps = StandardProps<React.HTMLAttributes<HTMLDivElement>, HvDotClassKey> &
|
|
8
|
-
Pick<HvStepProps, "size" | "title" | "state" | "onClick">;
|
|
8
|
+
Pick<HvStepProps, "size" | "title" | "state" | "onClick" | "disabled">;
|
|
9
9
|
|
|
10
10
|
export default function HvDot(props: HvDotProps): JSX.Element | null;
|
|
@@ -30,7 +30,8 @@ var HvDot = function HvDot(_ref) {
|
|
|
30
30
|
state = _ref.state,
|
|
31
31
|
title = _ref.title,
|
|
32
32
|
size = _ref.size,
|
|
33
|
-
onClick = _ref.onClick
|
|
33
|
+
onClick = _ref.onClick,
|
|
34
|
+
disabled = _ref.disabled;
|
|
34
35
|
var dotSize = dotSizes[size] * (state === "Current" ? 1.5 : 1);
|
|
35
36
|
var getBackgroundColor = useCallback(function (theme) {
|
|
36
37
|
return state === "Disabled" ? disabledColor(theme) : defaultColor(theme);
|
|
@@ -45,6 +46,9 @@ var HvDot = function HvDot(_ref) {
|
|
|
45
46
|
width: dotSize,
|
|
46
47
|
height: dotSize,
|
|
47
48
|
backgroundColor: backgroundColor,
|
|
49
|
+
"&:hover": {
|
|
50
|
+
backgroundColor: backgroundColor
|
|
51
|
+
},
|
|
48
52
|
"&$ghostDisabled": _objectSpread(_objectSpread({}, styles.ghost["&$ghostDisabled"]), {}, {
|
|
49
53
|
backgroundColor: backgroundColor
|
|
50
54
|
}),
|
|
@@ -56,11 +60,11 @@ var HvDot = function HvDot(_ref) {
|
|
|
56
60
|
});
|
|
57
61
|
}, [dotSize, getBackgroundColor])();
|
|
58
62
|
return /*#__PURE__*/React.createElement(HvButton, {
|
|
59
|
-
className: clsx(classes.root, customClasses.ghost,
|
|
63
|
+
className: clsx(classes.root, customClasses.ghost, (disabled !== null && disabled !== void 0 ? disabled : "Current Disabled".includes(state)) && customClasses.ghostDisabled, className, state === "Current" && customClasses.active),
|
|
60
64
|
"aria-label": "step-".concat(title),
|
|
61
65
|
icon: true,
|
|
62
66
|
overrideIconColors: false,
|
|
63
|
-
disabled: ["Current", "Disabled"].includes(state),
|
|
67
|
+
disabled: disabled !== null && disabled !== void 0 ? disabled : ["Current", "Disabled"].includes(state),
|
|
64
68
|
onClick: onClick
|
|
65
69
|
}, []);
|
|
66
70
|
};
|
|
@@ -114,7 +118,13 @@ process.env.NODE_ENV !== "production" ? HvDot.propTypes = {
|
|
|
114
118
|
/**
|
|
115
119
|
* Event onClick of the step.
|
|
116
120
|
*/
|
|
117
|
-
onClick: PropTypes.func
|
|
121
|
+
onClick: PropTypes.func,
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Define if a step is disabled/enabled.
|
|
125
|
+
* If this property is not defined and the step is on state "Disabled", the step component will be disabled
|
|
126
|
+
*/
|
|
127
|
+
disabled: PropTypes.bool
|
|
118
128
|
} : void 0;
|
|
119
129
|
export default withStyles(styles, {
|
|
120
130
|
name: "HvDot"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dot.js","names":["React","useCallback","useMemo","PropTypes","clsx","HvButton","makeStyles","withStyles","defaultColor","disabledColor","dotSizes","styles","HvDot","classes","className","state","title","size","onClick","dotSize","getBackgroundColor","theme","customClasses","backgroundColor","ghostDisabled","active","ghost","width","height","root","includes","propTypes","string","shape","isRequired","oneOf","func","name"],"sources":["../../../../../src/StepNavigation/SimpleNavigation/Dot/Dot.js"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { HvButton } from \"@hitachivantara/uikit-react-core\";\nimport { makeStyles, withStyles } from \"@material-ui/core\";\n\nimport { defaultColor, disabledColor, dotSizes } from \"../utils\";\nimport styles from \"./styles\";\n\n/**\n * Step element of \"Simple\" Step Navigation root component\n */\nconst HvDot = ({ classes, className, state, title, size, onClick }) => {\n const dotSize = dotSizes[size] * (state === \"Current\" ? 1.5 : 1);\n const getBackgroundColor = useCallback(\n (theme) => (state === \"Disabled\" ? disabledColor(theme) : defaultColor(theme)),\n [state]\n );\n const customClasses = useMemo(\n () =>\n makeStyles((theme) => {\n const backgroundColor = getBackgroundColor(theme);\n return {\n ghostDisabled: {},\n active: {},\n ghost: {\n ...styles.ghost,\n width: dotSize,\n height: dotSize,\n backgroundColor,\n \"&$ghostDisabled\": {\n ...styles.ghost[\"&$ghostDisabled\"],\n backgroundColor,\n },\n \"&$ghostDisabled&:hover\": {\n ...styles.ghost[\"&$ghostDisabled&:hover\"],\n backgroundColor,\n },\n },\n };\n }),\n [dotSize, getBackgroundColor]\n )();\n return (\n <HvButton\n className={clsx(\n classes.root,\n customClasses.ghost,\n {\n [customClasses.active]: state === \"Current\",\n [customClasses.ghostDisabled]: [\"Current\", \"Disabled\"].includes(state),\n },\n className\n )}\n aria-label={`step-${title}`}\n icon\n overrideIconColors={false}\n disabled={[\"Current\", \"Disabled\"].includes(state)}\n onClick={onClick}\n >\n {[]}\n </HvButton>\n );\n};\n\nHvDot.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the active class.\n */\n active: PropTypes.string,\n /**\n * Styles applied to the ghost class.\n */\n ghost: PropTypes.string,\n /**\n * Styles applied to the ghostDisabled class.\n */\n ghostDisabled: PropTypes.string,\n }).isRequired,\n /**\n * State of the step. Values = {\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\"}\n */\n state: PropTypes.oneOf([\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\"]).isRequired,\n /**\n * Title of the step.\n */\n title: PropTypes.string.isRequired,\n /**\n * Sets one of the standard sizes of the steps\n */\n size: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]).isRequired,\n /**\n * Event onClick of the step.\n */\n onClick: PropTypes.func,\n};\n\nexport default withStyles(styles, { name: \"HvDot\" })(HvDot);\n"],"mappings":";;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,IAAgBC,WAAhB,EAA6BC,OAA7B,QAA4C,OAA5C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AAEA,SAASC,QAAT,QAAyB,kCAAzB;AACA,SAASC,UAAT,EAAqBC,UAArB,QAAuC,mBAAvC;AAEA,SAASC,YAAT,EAAuBC,aAAvB,EAAsCC,QAAtC,QAAsD,UAAtD;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA;AACA;AACA;;AACA,IAAMC,KAAK,GAAG,SAARA,KAAQ,
|
|
1
|
+
{"version":3,"file":"Dot.js","names":["React","useCallback","useMemo","PropTypes","clsx","HvButton","makeStyles","withStyles","defaultColor","disabledColor","dotSizes","styles","HvDot","classes","className","state","title","size","onClick","disabled","dotSize","getBackgroundColor","theme","customClasses","backgroundColor","ghostDisabled","active","ghost","width","height","root","includes","propTypes","string","shape","isRequired","oneOf","func","bool","name"],"sources":["../../../../../src/StepNavigation/SimpleNavigation/Dot/Dot.js"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { HvButton } from \"@hitachivantara/uikit-react-core\";\nimport { makeStyles, withStyles } from \"@material-ui/core\";\n\nimport { defaultColor, disabledColor, dotSizes } from \"../utils\";\nimport styles from \"./styles\";\n\n/**\n * Step element of \"Simple\" Step Navigation root component\n */\nconst HvDot = ({ classes, className, state, title, size, onClick, disabled }) => {\n const dotSize = dotSizes[size] * (state === \"Current\" ? 1.5 : 1);\n const getBackgroundColor = useCallback(\n (theme) => (state === \"Disabled\" ? disabledColor(theme) : defaultColor(theme)),\n [state]\n );\n const customClasses = useMemo(\n () =>\n makeStyles((theme) => {\n const backgroundColor = getBackgroundColor(theme);\n return {\n ghostDisabled: {},\n active: {},\n ghost: {\n ...styles.ghost,\n width: dotSize,\n height: dotSize,\n backgroundColor,\n \"&:hover\": {\n backgroundColor,\n },\n \"&$ghostDisabled\": {\n ...styles.ghost[\"&$ghostDisabled\"],\n backgroundColor,\n },\n \"&$ghostDisabled&:hover\": {\n ...styles.ghost[\"&$ghostDisabled&:hover\"],\n backgroundColor,\n },\n },\n };\n }),\n [dotSize, getBackgroundColor]\n )();\n return (\n <HvButton\n className={clsx(\n classes.root,\n customClasses.ghost,\n {\n [customClasses.active]: state === \"Current\",\n [customClasses.ghostDisabled]: disabled ?? [\"Current\", \"Disabled\"].includes(state),\n },\n className\n )}\n aria-label={`step-${title}`}\n icon\n overrideIconColors={false}\n disabled={disabled ?? [\"Current\", \"Disabled\"].includes(state)}\n onClick={onClick}\n >\n {[]}\n </HvButton>\n );\n};\n\nHvDot.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the active class.\n */\n active: PropTypes.string,\n /**\n * Styles applied to the ghost class.\n */\n ghost: PropTypes.string,\n /**\n * Styles applied to the ghostDisabled class.\n */\n ghostDisabled: PropTypes.string,\n }).isRequired,\n /**\n * State of the step. Values = {\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\"}\n */\n state: PropTypes.oneOf([\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\"]).isRequired,\n /**\n * Title of the step.\n */\n title: PropTypes.string.isRequired,\n /**\n * Sets one of the standard sizes of the steps\n */\n size: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]).isRequired,\n /**\n * Event onClick of the step.\n */\n onClick: PropTypes.func,\n /**\n * Define if a step is disabled/enabled.\n * If this property is not defined and the step is on state \"Disabled\", the step component will be disabled\n */\n disabled: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvDot\" })(HvDot);\n"],"mappings":";;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,IAAgBC,WAAhB,EAA6BC,OAA7B,QAA4C,OAA5C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AAEA,SAASC,QAAT,QAAyB,kCAAzB;AACA,SAASC,UAAT,EAAqBC,UAArB,QAAuC,mBAAvC;AAEA,SAASC,YAAT,EAAuBC,aAAvB,EAAsCC,QAAtC,QAAsD,UAAtD;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA;AACA;AACA;;AACA,IAAMC,KAAK,GAAG,SAARA,KAAQ,OAAmE;EAAA,IAAhEC,OAAgE,QAAhEA,OAAgE;EAAA,IAAvDC,SAAuD,QAAvDA,SAAuD;EAAA,IAA5CC,KAA4C,QAA5CA,KAA4C;EAAA,IAArCC,KAAqC,QAArCA,KAAqC;EAAA,IAA9BC,IAA8B,QAA9BA,IAA8B;EAAA,IAAxBC,OAAwB,QAAxBA,OAAwB;EAAA,IAAfC,QAAe,QAAfA,QAAe;EAC/E,IAAMC,OAAO,GAAGV,QAAQ,CAACO,IAAD,CAAR,IAAkBF,KAAK,KAAK,SAAV,GAAsB,GAAtB,GAA4B,CAA9C,CAAhB;EACA,IAAMM,kBAAkB,GAAGpB,WAAW,CACpC,UAACqB,KAAD;IAAA,OAAYP,KAA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xB;IAcE,OAAO,EAAEG;EAdX,GAgBG,EAhBH,CADF;AAoBD,CAtDD;;AAwDA,wCAAAN,KAAK,CAACoB,SAAN,GAAkB;EAChB;AACF;AACA;EACElB,SAAS,EAAEX,SAAS,CAAC8B,MAJL;;EAKhB;AACF;AACA;EACEpB,OAAO,EAAEV,SAAS,CAAC+B,KAAV,CAAgB;IACvB;AACJ;AACA;IACIJ,IAAI,EAAE3B,SAAS,CAAC8B,MAJO;;IAKvB;AACJ;AACA;IACIP,MAAM,EAAEvB,SAAS,CAAC8B,MARK;;IASvB;AACJ;AACA;IACIN,KAAK,EAAExB,SAAS,CAAC8B,MAZM;;IAavB;AACJ;AACA;IACIR,aAAa,EAAEtB,SAAS,CAAC8B;EAhBF,CAAhB,EAiBNE,UAzBa;;EA0BhB;AACF;AACA;EACEpB,KAAK,EAAEZ,SAAS,CAACiC,KAAV,CAAgB,CAAC,SAAD,EAAY,QAAZ,EAAsB,WAAtB,EAAmC,SAAnC,EAA8C,UAA9C,CAAhB,EAA2ED,UA7BlE;;EA8BhB;AACF;AACA;EACEnB,KAAK,EAAEb,SAAS,CAAC8B,MAAV,CAAiBE,UAjCR;;EAkChB;AACF;AACA;EACElB,IAAI,EAAEd,SAAS,CAACiC,KAAV,CAAgB,CAAC,IAAD,EAAO,IAAP,EAAa,IAAb,EAAmB,IAAnB,EAAyB,IAAzB,CAAhB,EAAgDD,UArCtC;;EAsChB;AACF;AACA;EACEjB,OAAO,EAAEf,SAAS,CAACkC,IAzCH;;EA0ChB;AACF;AACA;AACA;EACElB,QAAQ,EAAEhB,SAAS,CAACmC;AA9CJ,CAAlB;AAiDA,eAAe/B,UAAU,CAACI,MAAD,EAAS;EAAE4B,IAAI,EAAE;AAAR,CAAT,CAAV,CAAsC3B,KAAtC,CAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles","root","borderRadius","zIndex","ghostDisabled","active","ghost","
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","root","borderRadius","zIndex","ghostDisabled","active","ghost","cursor"],"sources":["../../../../../src/StepNavigation/SimpleNavigation/Dot/styles.js"],"sourcesContent":["const styles = {\n root: {\n borderRadius: \"50%\",\n zIndex: 1,\n },\n ghostDisabled: {},\n active: {},\n ghost: {\n \"&$active\": {\n cursor: \"default\",\n },\n \"&$active&:hover\": {\n cursor: \"default\",\n },\n },\n};\n\nexport default styles;\n"],"mappings":"AAAA,IAAMA,MAAM,GAAG;EACbC,IAAI,EAAE;IACJC,YAAY,EAAE,KADV;IAEJC,MAAM,EAAE;EAFJ,CADO;EAKbC,aAAa,EAAE,EALF;EAMbC,MAAM,EAAE,EANK;EAObC,KAAK,EAAE;IACL,YAAY;MACVC,MAAM,EAAE;IADE,CADP;IAIL,mBAAmB;MACjBA,MAAM,EAAE;IADS;EAJd;AAPM,CAAf;AAiBA,eAAeP,MAAf"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { StandardProps } from "@material-ui/core";
|
|
3
|
+
import { Breakpoint } from "@material-ui/core/styles/createBreakpoints";
|
|
3
4
|
import { HvStepProps } from "./DefaultNavigation/Step/Step";
|
|
4
5
|
|
|
5
6
|
export type HvStepNavigationClassKey = "root";
|
|
@@ -15,7 +16,7 @@ export type HvStepNavigationProps = StandardProps<
|
|
|
15
16
|
/**
|
|
16
17
|
* Steps to show on the component.
|
|
17
18
|
*/
|
|
18
|
-
steps: Array<Pick<HvStepProps, "state" | "title" | "onClick" | "className">> & {
|
|
19
|
+
steps: Array<Pick<HvStepProps, "state" | "title" | "onClick" | "className" | "disabled">> & {
|
|
19
20
|
/**
|
|
20
21
|
* Class names to override styles on the separator component after the step.
|
|
21
22
|
*/
|
|
@@ -26,15 +27,15 @@ export type HvStepNavigationProps = StandardProps<
|
|
|
26
27
|
titleClassName: string;
|
|
27
28
|
};
|
|
28
29
|
/**
|
|
29
|
-
* Sets one of the standard sizes of the steps
|
|
30
|
+
* Sets one of the standard sizes of the steps.
|
|
30
31
|
*/
|
|
31
32
|
stepSize?: "XS" | "SM" | "MD" | "LG" | "XL";
|
|
32
33
|
/**
|
|
33
|
-
* Width of the component element.
|
|
34
|
+
* Width of the component element on each breakpoint screen resolution.
|
|
34
35
|
*/
|
|
35
|
-
width?: number;
|
|
36
|
+
width?: { [breakpoint in Breakpoint]?: number };
|
|
36
37
|
/**
|
|
37
|
-
* Defines either show a title or only a tooltip on each step component
|
|
38
|
+
* Defines either show a title or only a tooltip on each step component.
|
|
38
39
|
*/
|
|
39
40
|
showTitles?: boolean;
|
|
40
41
|
};
|
|
@@ -165,9 +165,9 @@ var HvStepNavigation = function HvStepNavigation(_ref) {
|
|
|
165
165
|
};
|
|
166
166
|
|
|
167
167
|
var getDynamicValues = function getDynamicValues(stepsWidth) {
|
|
168
|
-
var _theme$breakpoints$va, _theme$breakpoints$va2;
|
|
168
|
+
var _width$breakpoint, _theme$breakpoints$va, _theme$breakpoints$va2;
|
|
169
169
|
|
|
170
|
-
var maxWidth = width !== null &&
|
|
170
|
+
var maxWidth = (_width$breakpoint = width === null || width === void 0 ? void 0 : width[breakpoint]) !== null && _width$breakpoint !== void 0 ? _width$breakpoint : Math.max(Number(hasTitles) * (TITLE_WIDTH + TITLE_MARGIN) * steps.length - TITLE_MARGIN, SEPARATOR_WIDTH * (steps.length - 1) + stepsWidth);
|
|
171
171
|
var next = theme.breakpoints.keys.find(function (_, index, self) {
|
|
172
172
|
return index - 1 >= 0 ? self[index - 1] === breakpoint : false;
|
|
173
173
|
});
|
|
@@ -317,7 +317,13 @@ process.env.NODE_ENV !== "production" ? HvStepNavigation.propTypes = {
|
|
|
317
317
|
/**
|
|
318
318
|
* State of the step. Values = {"Pending", "Failed", "Completed", "Current", "Disabled"}.
|
|
319
319
|
*/
|
|
320
|
-
state: PropTypes.oneOf(["Pending", "Failed", "Completed", "Current", "Disabled"]).isRequired
|
|
320
|
+
state: PropTypes.oneOf(["Pending", "Failed", "Completed", "Current", "Disabled"]).isRequired,
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Define if a step is disabled/enabled.
|
|
324
|
+
* If this property is not defined and the step is on state "Disabled", the step component will be disabled
|
|
325
|
+
*/
|
|
326
|
+
disabled: PropTypes.bool
|
|
321
327
|
})).isRequired,
|
|
322
328
|
|
|
323
329
|
/**
|
|
@@ -326,9 +332,15 @@ process.env.NODE_ENV !== "production" ? HvStepNavigation.propTypes = {
|
|
|
326
332
|
stepSize: PropTypes.oneOf(["XS", "SM", "MD", "LG", "XL"]),
|
|
327
333
|
|
|
328
334
|
/**
|
|
329
|
-
* Width of the component.
|
|
335
|
+
* Width of the component element on each breakpoint screen resolution.
|
|
330
336
|
*/
|
|
331
|
-
width: PropTypes.
|
|
337
|
+
width: PropTypes.shape({
|
|
338
|
+
xs: PropTypes.number,
|
|
339
|
+
sm: PropTypes.number,
|
|
340
|
+
md: PropTypes.number,
|
|
341
|
+
lg: PropTypes.number,
|
|
342
|
+
xl: PropTypes.number
|
|
343
|
+
}),
|
|
332
344
|
|
|
333
345
|
/**
|
|
334
346
|
* Defines either show a title or only a tooltip on each step component
|