easy-navigation 1.0.52 → 2.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/README.md +18 -12
- package/example.js +305 -392
- package/lib/button/accordion.js +2 -2
- package/lib/button/navigation/accordion.js +3 -3
- package/lib/constants.js +4 -2
- package/lib/div/accordion.js +3 -3
- package/lib/example/article/{accordion/buttons.js → buttons.js} +17 -17
- package/lib/example/article/{accordion/codes.js → codes.js} +17 -17
- package/lib/example/article/{accordion/inputs.js → headings.js} +19 -19
- package/lib/example/article/{accordion/home.js → home.js} +18 -18
- package/lib/example/article/{accordion/headings.js → inputs.js} +19 -19
- package/lib/example/article/{accordion/links.js → links.js} +17 -17
- package/lib/example/article/{accordion/sections.js → sections.js} +17 -17
- package/lib/{article/accordion.js → example/article.js} +35 -53
- package/lib/example/articlesArray.js +8 -8
- package/lib/index.js +9 -16
- package/lib/item/accordion.js +3 -3
- package/package.json +2 -2
- package/src/button/accordion.js +1 -1
- package/src/button/navigation/accordion.js +3 -2
- package/src/constants.js +1 -0
- package/src/div/accordion.js +3 -3
- package/src/example/article/{accordion/buttons.js → buttons.js} +4 -4
- package/src/example/article/{accordion/codes.js → codes.js} +4 -4
- package/src/example/article/{accordion/headings.js → headings.js} +4 -4
- package/src/example/article/{accordion/home.js → home.js} +5 -5
- package/src/example/article/{accordion/inputs.js → inputs.js} +4 -4
- package/src/example/article/{accordion/links.js → links.js} +4 -4
- package/src/example/article/{accordion/sections.js → sections.js} +4 -4
- package/src/example/{article/accordion.js → article.js} +6 -2
- package/src/example/articlesArray.js +11 -11
- package/src/index.js +0 -1
- package/src/item/accordion.js +5 -3
- package/lib/example/article/accordion.js +0 -35
- package/src/article/accordion.js +0 -30
package/src/item/accordion.js
CHANGED
|
@@ -29,7 +29,8 @@ export default class AccordionItem extends Element {
|
|
|
29
29
|
getArticleIndex(uri) {
|
|
30
30
|
const { Articles } = this.properties,
|
|
31
31
|
articleIndex = Articles.findIndex((Article) => {
|
|
32
|
-
const
|
|
32
|
+
const { path } = Article,
|
|
33
|
+
uriArticleURI = path.test(uri);
|
|
33
34
|
|
|
34
35
|
if (uriArticleURI) {
|
|
35
36
|
return true;
|
|
@@ -83,8 +84,9 @@ export default class AccordionItem extends Element {
|
|
|
83
84
|
initialHeight = this.getInitialHeight(collapsed);
|
|
84
85
|
|
|
85
86
|
Articles.forEach((Article, index) => {
|
|
86
|
-
const
|
|
87
|
-
|
|
87
|
+
const { path } = Article,
|
|
88
|
+
article = articles[index],
|
|
89
|
+
uriArticleURI = path.test(uri);
|
|
88
90
|
|
|
89
91
|
uriArticleURI ?
|
|
90
92
|
article.show() :
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
exports.default = void 0;
|
|
6
|
-
var _easyWithStyle = _interopRequireDefault(require("easy-with-style"));
|
|
7
|
-
var _index = require("../../index");
|
|
8
|
-
function _interopRequireDefault(obj) {
|
|
9
|
-
return obj && obj.__esModule ? obj : {
|
|
10
|
-
default: obj
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
function _taggedTemplateLiteral(strings, raw) {
|
|
14
|
-
if (!raw) {
|
|
15
|
-
raw = strings.slice(0);
|
|
16
|
-
}
|
|
17
|
-
return Object.freeze(Object.defineProperties(strings, {
|
|
18
|
-
raw: {
|
|
19
|
-
value: Object.freeze(raw)
|
|
20
|
-
}
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
function _templateObject() {
|
|
24
|
-
var data = _taggedTemplateLiteral([
|
|
25
|
-
"\n\n padding: 2rem;\n \n :not(:first-of-type) {\n\n border-top: 1px solid black;\n \n }\n\n @media (min-width: 800px) {\n \n padding: 0;\n \n :not(:first-of-type) {\n \n border-top: none;\n \n }\n \n }\n \n"
|
|
26
|
-
]);
|
|
27
|
-
_templateObject = function _templateObject() {
|
|
28
|
-
return data;
|
|
29
|
-
};
|
|
30
|
-
return data;
|
|
31
|
-
}
|
|
32
|
-
var _default = (0, _easyWithStyle).default(_index.AccordionArticle)(_templateObject());
|
|
33
|
-
exports.default = _default;
|
|
34
|
-
|
|
35
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9leGFtcGxlL2FydGljbGUvYWNjb3JkaW9uLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgd2l0aFN0eWxlIGZyb20gXCJlYXN5LXdpdGgtc3R5bGVcIjsgIC8vL1xuXG5pbXBvcnQgeyBBY2NvcmRpb25BcnRpY2xlIH0gZnJvbSBcIi4uLy4uL2luZGV4XCI7XG5cbmV4cG9ydCBkZWZhdWx0IHdpdGhTdHlsZShBY2NvcmRpb25BcnRpY2xlKWBcblxuICBwYWRkaW5nOiAycmVtO1xuICBcbiAgOm5vdCg6Zmlyc3Qtb2YtdHlwZSkge1xuXG4gICAgYm9yZGVyLXRvcDogMXB4IHNvbGlkIGJsYWNrO1xuICAgIFxuICB9XG5cbiAgQG1lZGlhIChtaW4td2lkdGg6IDgwMHB4KSB7XG4gIFxuICAgIHBhZGRpbmc6IDA7XG4gICAgXG4gICAgOm5vdCg6Zmlyc3Qtb2YtdHlwZSkge1xuICBcbiAgICAgIGJvcmRlci10b3A6IG5vbmU7XG4gICAgICBcbiAgICB9XG4gIFxuICB9XG4gIFxuYDtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxDQUFZOzs7OztBQUVVLEdBQWlCLENBQWpCLGNBQWlCO0FBRU4sR0FBYSxDQUFiLE1BQWE7Ozs7Ozs7Ozs7Ozs7Ozs7OztRQUVILENBc0IzQzs7Ozs7OzttQkExQnNCLGNBQWlCLFVBRU4sTUFBYSJ9
|
package/src/article/accordion.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { Element } from "easy";
|
|
4
|
-
|
|
5
|
-
export default class AccordionArticle extends Element {
|
|
6
|
-
static getURI() {
|
|
7
|
-
return this.uri;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
static getPath() {
|
|
11
|
-
return this.path;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
static getTitle() {
|
|
15
|
-
return this.title;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
static isURIArticleURI(uri) {
|
|
19
|
-
const path = this.getPath(),
|
|
20
|
-
uriArticleURI = path.test(uri); ///
|
|
21
|
-
|
|
22
|
-
return uriArticleURI;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
static tagName = "article";
|
|
26
|
-
|
|
27
|
-
static defaultProperties = {
|
|
28
|
-
className: "accordion"
|
|
29
|
-
};
|
|
30
|
-
}
|