@20minutes/hela 0.0.4 → 0.0.5
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 +2 -0
- package/dist/css/articlePage-desktop.css +1 -1
- package/dist/css/articlePage-mobile.css +1 -1
- package/dist/css/global.css +1 -1
- package/dist/index.d.ts +112 -27
- package/dist/index.es.js +11881 -11398
- package/dist/index.umd.js +107 -107
- package/dist/js/datalayer.min.js +1 -1
- package/dist/js/main.min.js +1 -1
- package/package.json +10 -9
package/dist/js/datalayer.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(t){"use strict";
|
|
1
|
+
(function(t){"use strict";var l=Object.defineProperty,o=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,i=(e,r,a)=>r in e?l(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,n=(e,r)=>{for(var a in r||(r={}))u.call(r,a)&&i(e,a,r[a]);if(o)for(var a of o(r))d.call(r,a)&&i(e,a,r[a]);return e};const y=()=>({page_uri:"/"}),c=()=>({darkmode:0}),v=()=>{var e,r;return{signature:((e=window.datalayer)==null?void 0:e.signature)||void 0,nbParagraphs:((r=window.datalayer)==null?void 0:r.nbParagraphs)||void 0}},b=()=>{const e=y(),r=c(),a=v();window.datalayer=n(n(n({},e),r),a)};return t.initDatalayer=b,Object.defineProperty(t,"__esModule",{value:!0}),t})({});
|
package/dist/js/main.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";const
|
|
1
|
+
(function(){"use strict";const l=(t,e)=>{const r=t==="dark";e.setAttribute("aria-checked",String(r));const a=e.querySelector("span[aria-hidden]");a&&(a.setAttribute("aria-hidden",String(r)),a.innerHTML=r?"on":"off")},m=(t=document.querySelector(".js-switch-dark-mode"))=>{const e=localStorage.getItem("theme")||"light";e&&t&&(document.documentElement.dataset.theme=e,l(e,t))},h=(t=document.querySelector(".js-switch-dark-mode"))=>{t&&t.addEventListener("click",()=>{const e=document.documentElement.dataset.theme,r=!e||e==="light"?"dark":"light";document.documentElement.dataset.theme=r,localStorage.setItem("theme",r),l(r,t)})};var y=Object.defineProperty,c=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,d=(t,e,r)=>e in t?y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,i=(t,e)=>{for(var r in e||(e={}))f.call(e,r)&&d(t,r,e[r]);if(c)for(var r of c(e))g.call(e,r)&&d(t,r,e[r]);return t};const v=()=>({page_uri:"/"}),p=()=>({darkmode:0}),w=()=>{var t,e;return{signature:((t=window.datalayer)==null?void 0:t.signature)||void 0,nbParagraphs:((e=window.datalayer)==null?void 0:e.nbParagraphs)||void 0}},S=()=>{const t=v(),e=p(),r=w();window.datalayer=i(i(i({},t),e),r)},A=(t,e)=>{e.preventDefault();const r=e.target,a=t.querySelectorAll('[role="tab"]'),n=t.querySelectorAll('[role="tabpanel"]'),k=r.getAttribute("aria-controls"),b=Object.values(n).find(o=>o.id===k);a.forEach(o=>{o.setAttribute("aria-selected","false")}),n.forEach(o=>{o.setAttribute("aria-hidden","true")}),r.setAttribute("aria-selected","true"),b&&b.removeAttribute("aria-hidden")},s=t=>t.code==="ArrowLeft"||t.keyCode===39,u=t=>t.code==="ArrowRight"||t.keyCode===37,E=(t=document.querySelector(".js-tabs"))=>{if(t){const e=t.querySelectorAll('[role="tab"]');e.forEach(a=>{a.addEventListener("click",A.bind(!1,t))});const r=t.querySelector('[role="tablist"]');if(r&&e.length>0){let a=0;r.addEventListener("keydown",n=>{n instanceof KeyboardEvent&&(s(n)||u(n))&&(e[a].setAttribute("tabindex","-1"),s(n)?(a+=1,a>=e.length&&(a=0)):u(n)&&(a-=1,a<0&&(a=e.length-1)),e[a].setAttribute("tabindex","0"),e[a].focus())})}}};m(),h(),E(),S()})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@20minutes/hela",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.umd.js",
|
|
6
6
|
"module": "./dist/index.es.js",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"storybook": "start-storybook -p 6006",
|
|
23
23
|
"build:storybook": "build-storybook",
|
|
24
24
|
"lint:scss": "stylelint 'src/**/*.scss'",
|
|
25
|
-
"lint:ts": "eslint src"
|
|
25
|
+
"lint:ts": "eslint src tasks scripts gulpfile.ts rollup.config.ts vite.config.ts",
|
|
26
|
+
"upload:artifacts": "ts-node scripts/uploadArtifacts.ts"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
29
|
"@20minutes/eslint-config": "^1.2.3",
|
|
@@ -38,16 +39,16 @@
|
|
|
38
39
|
"@types/draft-js": "^0.11.9",
|
|
39
40
|
"@types/gulp": "^4.0.9",
|
|
40
41
|
"@types/gulp-sass": "^5.0.0",
|
|
41
|
-
"@types/node": "^18.7.
|
|
42
|
+
"@types/node": "^18.7.13",
|
|
42
43
|
"@types/react": "^18.0.17",
|
|
43
44
|
"@types/react-dom": "^18.0.6",
|
|
44
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
45
|
-
"@typescript-eslint/parser": "^5.
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^5.35.1",
|
|
46
|
+
"@typescript-eslint/parser": "^5.35.1",
|
|
46
47
|
"@vitejs/plugin-react": "^2.0.1",
|
|
47
48
|
"babel-loader": "^8.2.5",
|
|
48
49
|
"babel-preset-env": "^1.7.0",
|
|
49
50
|
"babel-preset-react": "^6.24.1",
|
|
50
|
-
"eslint": "^8.
|
|
51
|
+
"eslint": "^8.23.0",
|
|
51
52
|
"eslint-config-airbnb": "^19.0.4",
|
|
52
53
|
"eslint-config-prettier": "^8.5.0",
|
|
53
54
|
"eslint-import-resolver-typescript": "^3.5.0",
|
|
@@ -55,7 +56,7 @@
|
|
|
55
56
|
"eslint-plugin-import": "^2.25.3",
|
|
56
57
|
"eslint-plugin-jsx-a11y": "^6.6.1",
|
|
57
58
|
"eslint-plugin-prettier": "^4.2.1",
|
|
58
|
-
"eslint-plugin-react": "^7.
|
|
59
|
+
"eslint-plugin-react": "^7.31.1",
|
|
59
60
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
60
61
|
"glob": "^8.0.3",
|
|
61
62
|
"gulp": "^4.0.2",
|
|
@@ -69,14 +70,14 @@
|
|
|
69
70
|
"postcss": "^8.4.16",
|
|
70
71
|
"prettier": "^2.7.1",
|
|
71
72
|
"rollup-plugin-dts": "^4.2.2",
|
|
72
|
-
"rollup-plugin-esbuild": "^4.
|
|
73
|
+
"rollup-plugin-esbuild": "^4.10.1",
|
|
73
74
|
"rollup-plugin-scss": "^3.0.0",
|
|
74
75
|
"sass": "^1.54.5",
|
|
75
76
|
"size-limit": "^8.0.1",
|
|
76
77
|
"stylelint": "^14.11.0",
|
|
77
78
|
"stylelint-config-standard-scss": "^5.0.0",
|
|
78
79
|
"svg-sprite": "next",
|
|
79
|
-
"typescript": "^4.
|
|
80
|
+
"typescript": "^4.8.2",
|
|
80
81
|
"vite": "^3.0.9"
|
|
81
82
|
},
|
|
82
83
|
"engines": {
|