@openedx/paragon 23.6.1 → 23.7.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/dist/Alert/index.scss +5 -0
- package/dist/ProductTour/Checkpoint.js +23 -16
- package/dist/ProductTour/Checkpoint.js.map +1 -1
- package/dist/ProductTour/Checkpoint.scss +8 -36
- package/dist/ProductTour/CheckpointActionRow.js +17 -21
- package/dist/ProductTour/CheckpointActionRow.js.map +1 -1
- package/dist/ProductTour/CheckpointHeader.js +57 -0
- package/dist/ProductTour/CheckpointHeader.js.map +1 -0
- package/dist/ProductTour/index.js +120 -20
- package/dist/ProductTour/index.js.map +1 -1
- package/dist/ProductTour/messages.js +10 -0
- package/dist/core.css +11 -29
- package/dist/core.css.map +1 -1
- package/dist/core.min.css +1 -1
- package/dist/withDeprecatedProps.js +11 -3
- package/dist/withDeprecatedProps.js.map +1 -1
- package/lib/build-scss.js +1 -1
- package/package.json +1 -1
- package/src/Alert/index.scss +5 -0
- package/src/ProductTour/Checkpoint.jsx +22 -16
- package/src/ProductTour/Checkpoint.scss +8 -36
- package/src/ProductTour/Checkpoint.test.jsx +20 -53
- package/src/ProductTour/CheckpointActionRow.jsx +32 -32
- package/src/ProductTour/CheckpointHeader.jsx +60 -0
- package/src/ProductTour/ProductTour.test.jsx +69 -60
- package/src/ProductTour/README.md +11 -3
- package/src/ProductTour/index.jsx +125 -17
- package/src/ProductTour/messages.js +10 -0
- package/src/withDeprecatedProps.tsx +10 -3
- package/dist/ProductTour/CheckpointBreadcrumbs.js +0 -37
- package/dist/ProductTour/CheckpointBreadcrumbs.js.map +0 -1
- package/dist/TransitionReplace/DemoTransitionReplace.js +0 -32
- package/dist/TransitionReplace/DemoTransitionReplace.js.map +0 -1
- package/src/ProductTour/CheckpointBreadcrumbs.jsx +0 -45
- package/src/TransitionReplace/DemoTransitionReplace.jsx +0 -57
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import TransitionReplace from './index';
|
|
3
|
-
export default function DemoTransitionReplace() {
|
|
4
|
-
const contentOptions = [/*#__PURE__*/React.createElement("blockquote", {
|
|
5
|
-
className: "h2 m-0",
|
|
6
|
-
key: 0
|
|
7
|
-
}, /*#__PURE__*/React.createElement("p", null, "You know the golden rule, don\u2019t you boy? Those who have the gold make the rules."), /*#__PURE__*/React.createElement("footer", null, "\u2014 Crazy hunch-backed old guy in Aladdin")), /*#__PURE__*/React.createElement("blockquote", {
|
|
8
|
-
className: "m-0",
|
|
9
|
-
key: 1
|
|
10
|
-
}, /*#__PURE__*/React.createElement("p", null, "People say nothing is impossible, but I do nothing every day."), /*#__PURE__*/React.createElement("footer", null, "\u2014 A. A. Milne")), /*#__PURE__*/React.createElement("blockquote", {
|
|
11
|
-
className: "h2 m-0",
|
|
12
|
-
key: 2
|
|
13
|
-
}, /*#__PURE__*/React.createElement("p", null, "I won\u2019t go into a big spiel about reincarnation, but the first time I was in the Gucci store in Chicago was the closest I\u2019ve ever felt to home."), /*#__PURE__*/React.createElement("footer", null, "\u2014 Kanye")), /*#__PURE__*/React.createElement("blockquote", {
|
|
14
|
-
className: "m-0",
|
|
15
|
-
key: 3
|
|
16
|
-
}, /*#__PURE__*/React.createElement("p", null, "The first time I see a jogger smiling, I\u2019ll consider it."), /*#__PURE__*/React.createElement("footer", null, "\u2014 Joan Rivers"))];
|
|
17
|
-
const [currentContentIndex, setCurrentContentIndex] = useState(0);
|
|
18
|
-
const changeContent = () => {
|
|
19
|
-
setCurrentContentIndex((currentContentIndex + 1) % contentOptions.length);
|
|
20
|
-
};
|
|
21
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("button", {
|
|
22
|
-
className: "btn btn-primary mb-2",
|
|
23
|
-
onClick: changeContent
|
|
24
|
-
}, "Next Quote"), /*#__PURE__*/React.createElement("div", {
|
|
25
|
-
style: {
|
|
26
|
-
background: '#eee',
|
|
27
|
-
padding: '1rem',
|
|
28
|
-
maxWidth: '15rem'
|
|
29
|
-
}
|
|
30
|
-
}, /*#__PURE__*/React.createElement(TransitionReplace, null, contentOptions[currentContentIndex])));
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=DemoTransitionReplace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DemoTransitionReplace.js","names":["React","useState","TransitionReplace","DemoTransitionReplace","contentOptions","createElement","className","key","currentContentIndex","setCurrentContentIndex","changeContent","length","onClick","style","background","padding","maxWidth"],"sources":["../../src/TransitionReplace/DemoTransitionReplace.jsx"],"sourcesContent":["import React, { useState } from 'react';\nimport TransitionReplace from './index';\n\nexport default function DemoTransitionReplace() {\n const contentOptions = [\n (\n <blockquote className=\"h2 m-0\" key={0}>\n <p>You know the golden rule, don’t you boy? Those who have the gold make the rules.</p>\n <footer>— Crazy hunch-backed old guy in Aladdin</footer>\n </blockquote>\n ),\n (\n <blockquote className=\"m-0\" key={1}>\n <p>People say nothing is impossible, but I do nothing every day.</p>\n <footer>— A. A. Milne</footer>\n </blockquote>\n ),\n (\n <blockquote className=\"h2 m-0\" key={2}>\n <p>\n I won’t go into a big spiel about reincarnation, but the first time I was in the\n Gucci store in Chicago was the closest I’ve ever felt to home.\n </p>\n <footer>— Kanye</footer>\n </blockquote>\n ),\n (\n <blockquote className=\"m-0\" key={3}>\n <p>The first time I see a jogger smiling, I’ll consider it.</p>\n <footer>— Joan Rivers</footer>\n </blockquote>\n ),\n ];\n\n const [currentContentIndex, setCurrentContentIndex] = useState(0);\n const changeContent = () => {\n setCurrentContentIndex((currentContentIndex + 1) % contentOptions.length);\n };\n\n return (\n <div>\n {/* eslint-disable-next-line react/button-has-type */}\n <button className=\"btn btn-primary mb-2\" onClick={changeContent}>Next Quote</button>\n <div\n style={{\n background: '#eee',\n padding: '1rem',\n maxWidth: '15rem',\n }}\n >\n <TransitionReplace>\n {contentOptions[currentContentIndex]}\n </TransitionReplace>\n </div>\n </div>\n );\n}\n"],"mappings":"AA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AK,aAAA;IACEQ,KAAK,EAAE;MACLC,UAAU,EAAE,MAAM;MAClBC,OAAO,EAAE,MAAM;MACfC,QAAQ,EAAE;IACZ;EAAE,gBAEFhB,KAAA,CAAAK,aAAA,CAACH,iBAAiB,QACfE,cAAc,CAACI,mBAAmB,CAClB,CAChB,CACF,CAAC;AAEV","ignoreList":[]}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
4
|
-
const CheckpointBreadcrumbs = React.forwardRef(({ currentIndex, totalCheckpoints }, ref) => {
|
|
5
|
-
if (totalCheckpoints === 1) {
|
|
6
|
-
return null;
|
|
7
|
-
}
|
|
8
|
-
return (
|
|
9
|
-
<span className="pgn__checkpoint-breadcrumb-container" ref={ref}>
|
|
10
|
-
{new Array(totalCheckpoints).fill(0).map((v, i) => (
|
|
11
|
-
i === currentIndex
|
|
12
|
-
? (
|
|
13
|
-
<span
|
|
14
|
-
/* eslint-disable-next-line react/no-array-index-key */
|
|
15
|
-
key={i}
|
|
16
|
-
className="pgn__checkpoint-breadcrumb pgn__checkpoint-breadcrumb_active"
|
|
17
|
-
data-testid="pgn__checkpoint-breadcrumb_active"
|
|
18
|
-
/>
|
|
19
|
-
)
|
|
20
|
-
: (
|
|
21
|
-
<span
|
|
22
|
-
/* eslint-disable-next-line react/no-array-index-key */
|
|
23
|
-
key={i}
|
|
24
|
-
className="pgn__checkpoint-breadcrumb pgn__checkpoint-breadcrumb_inactive"
|
|
25
|
-
data-testid="pgn__checkpoint-breadcrumb_inactive"
|
|
26
|
-
/>
|
|
27
|
-
)
|
|
28
|
-
))}
|
|
29
|
-
</span>
|
|
30
|
-
);
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
CheckpointBreadcrumbs.defaultProps = {
|
|
34
|
-
currentIndex: null,
|
|
35
|
-
totalCheckpoints: null,
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
CheckpointBreadcrumbs.propTypes = {
|
|
39
|
-
/** The current index of the parent Checkpoint within the tour. */
|
|
40
|
-
currentIndex: PropTypes.number,
|
|
41
|
-
/** The total number of Checkpoints within the tour. */
|
|
42
|
-
totalCheckpoints: PropTypes.number,
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export default CheckpointBreadcrumbs;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import TransitionReplace from './index';
|
|
3
|
-
|
|
4
|
-
export default function DemoTransitionReplace() {
|
|
5
|
-
const contentOptions = [
|
|
6
|
-
(
|
|
7
|
-
<blockquote className="h2 m-0" key={0}>
|
|
8
|
-
<p>You know the golden rule, don’t you boy? Those who have the gold make the rules.</p>
|
|
9
|
-
<footer>— Crazy hunch-backed old guy in Aladdin</footer>
|
|
10
|
-
</blockquote>
|
|
11
|
-
),
|
|
12
|
-
(
|
|
13
|
-
<blockquote className="m-0" key={1}>
|
|
14
|
-
<p>People say nothing is impossible, but I do nothing every day.</p>
|
|
15
|
-
<footer>— A. A. Milne</footer>
|
|
16
|
-
</blockquote>
|
|
17
|
-
),
|
|
18
|
-
(
|
|
19
|
-
<blockquote className="h2 m-0" key={2}>
|
|
20
|
-
<p>
|
|
21
|
-
I won’t go into a big spiel about reincarnation, but the first time I was in the
|
|
22
|
-
Gucci store in Chicago was the closest I’ve ever felt to home.
|
|
23
|
-
</p>
|
|
24
|
-
<footer>— Kanye</footer>
|
|
25
|
-
</blockquote>
|
|
26
|
-
),
|
|
27
|
-
(
|
|
28
|
-
<blockquote className="m-0" key={3}>
|
|
29
|
-
<p>The first time I see a jogger smiling, I’ll consider it.</p>
|
|
30
|
-
<footer>— Joan Rivers</footer>
|
|
31
|
-
</blockquote>
|
|
32
|
-
),
|
|
33
|
-
];
|
|
34
|
-
|
|
35
|
-
const [currentContentIndex, setCurrentContentIndex] = useState(0);
|
|
36
|
-
const changeContent = () => {
|
|
37
|
-
setCurrentContentIndex((currentContentIndex + 1) % contentOptions.length);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<div>
|
|
42
|
-
{/* eslint-disable-next-line react/button-has-type */}
|
|
43
|
-
<button className="btn btn-primary mb-2" onClick={changeContent}>Next Quote</button>
|
|
44
|
-
<div
|
|
45
|
-
style={{
|
|
46
|
-
background: '#eee',
|
|
47
|
-
padding: '1rem',
|
|
48
|
-
maxWidth: '15rem',
|
|
49
|
-
}}
|
|
50
|
-
>
|
|
51
|
-
<TransitionReplace>
|
|
52
|
-
{contentOptions[currentContentIndex]}
|
|
53
|
-
</TransitionReplace>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
);
|
|
57
|
-
}
|