pagy 7.0.4 → 7.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee84163cae8338f5a72ddfe9f1d6e2bfdc83b36cc169163bf8547e2716a562fb
4
- data.tar.gz: 66d27f04a76cf3898a98a1928abe8c153d7f21cb67e7ec6c011aba974e8e12b9
3
+ metadata.gz: 23ed181d6c937abde5035fce2fcc73ffdc41553461302f87ada5886db077b583
4
+ data.tar.gz: 5bddf3a36fc0b47c2f15501f55045f45b16d2419a160352616cb918f75ab47a7
5
5
  SHA512:
6
- metadata.gz: 86388caf84959469cc529d0ae9ccad6d2a832a36047b6c466f9f92ed9b0b5ac9b4e3b4a0a66ee2b40a1fa9e609c0fa4b266563e53be5074f4a4d4dea1a8a12da
7
- data.tar.gz: c3a135ab32a1334a54695cc883d6cde8f926df338241aab85c1afa084cde47f14f6fe75cd49c338f92c0df42650f8ab2514c40698866b75275e3a54475349c5c
6
+ metadata.gz: 3e727425a8e7efb69a4e2aa8cdf05d07233da12e7bb1859f6d1c757b863f18218bea4aec8be1f09b88496fe39c3bc1268c6c50db9afb2a56b2c680b1f997615c
7
+ data.tar.gz: 8e67bdc30add6a250c66e22ab9ec4129214bca152718abf0bc9282b423d836874971a7e418eeac1e5e8f2fee197b1b24662468a6debb53b2eaf4791d5e3aabb4
data/lib/config/pagy.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Pagy initializer file (7.0.4)
3
+ # Pagy initializer file (7.0.5)
4
4
  # Customize only what you really need and notice that the core Pagy works also without any of the following lines.
5
5
  # Should you just cherry pick part of this file, please maintain the require-order of the extras
6
6
 
@@ -82,7 +82,7 @@ window.Pagy = (() => {
82
82
  const trim = (link, param) => link.replace(new RegExp(`[?&]${param}=1\\b(?!&)|\\b${param}=1&`), "");
83
83
  // Public interface
84
84
  return {
85
- version: "7.0.4",
85
+ version: "7.0.5",
86
86
  // Scan for elements with a "data-pagy" attribute and call their init functions with the decoded args
87
87
  init(arg) {
88
88
  const target = arg instanceof Element ? arg : document;
@@ -111,4 +111,4 @@ window.Pagy = (() => {
111
111
  }
112
112
  };
113
113
  })();
114
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFneS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWtCQSxNQUFNLElBQUksR0FBRyxDQUFDLEdBQUcsRUFBRTtJQUNmLDRDQUE0QztJQUM1QyxNQUFNLFdBQVcsR0FBRyxJQUFJLGNBQWMsQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUNOLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLGdCQUFnQixDQUFhLFdBQVcsQ0FBQyxDQUFDLE9BQU8sQ0FDM0UsRUFBRSxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsVUFBVSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFFeEUsNEJBQTRCO0lBQzVCLE1BQU0sT0FBTyxHQUFHLENBQUMsRUFBYSxFQUFFLENBQUMsSUFBSSxFQUFFLE9BQU8sRUFBRSxZQUFZLEVBQUUsU0FBUyxDQUFTLEVBQUUsRUFBRTtRQUNoRixNQUFNLFNBQVMsR0FBRyxFQUFFLENBQUMsYUFBYSxJQUFJLEVBQUUsQ0FBQztRQUN6QyxNQUFNLE1BQU0sR0FBTSxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUM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dnNcbiAgICBjb25zdCByanNPYnNlcnZlciA9IG5ldyBSZXNpemVPYnNlcnZlcihlbnRyaWVzID0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudHJpZXMuZm9yRWFjaChlID0+IGUudGFyZ2V0LnF1ZXJ5U2VsZWN0b3JBbGw8TmF2RWxlbWVudD4oXCIucGFneS1yanNcIikuZm9yRWFjaChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsID0+IGVsLnBhZ3lSZW5kZXIoKSkpKTtcblxuICAgIC8vIEluaXQgdGhlICpfbmF2X2pzIGhlbHBlcnNcbiAgICBjb25zdCBpbml0TmF2ID0gKGVsOk5hdkVsZW1lbnQsIFt0YWdzLCBzZXF1ZWxzLCBsYWJlbFNlcXVlbHMsIHRyaW1QYXJhbV06TmF2QXJncykgPT4ge1xuICAgICAgICBjb25zdCBjb250YWluZXIgPSBlbC5wYXJlbnRFbGVtZW50ID8/IGVsO1xuICAgICAgICBjb25zdCB3aWR0aHMgICAgPSBPYmplY3Qua2V5cyhzZXF1ZWxzKS5tYXAodyA9PiBwYXJzZUludCh3KSkuc29ydCgoYSwgYikgPT4gYiAtIGEpO1xuICAgICAgICBsZXQgbGFzdFdpZHRoICAgPSAtMTtcbiAgICAgICAgY29uc3QgZmlsbEluICAgID0gKGxpbms6c3RyaW5nLCBwYWdlOnN0cmluZywgbGFiZWw6c3RyaW5nKTpzdHJpbmcgPT5cbiAgICAgICAgICAgIGxpbmsucmVwbGFjZSgvX19wYWd5X3BhZ2VfXy9nLCBwYWdlKS5yZXBsYWNlKC9fX3BhZ3lfbGFiZWxfXy9nLCBsYWJlbCk7XG4gICAgICAgIChlbC5wYWd5UmVuZGVyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgY29uc3Qgd2lkdGggPSB3aWR0aHMuZmluZCh3ID0+IHcgPCBjb250YWluZXIuY2xpZW50V2lkdGgpIHx8IDA7XG4gICAgICAgICAgICBpZiAod2lkdGggPT09IGxhc3RXaWR0aCkgeyByZXR1cm4gfSAvLyBubyBjaGFuZ2U6IGFib3J0XG4gICAgICAgICAgICBsZXQgaHRtbCAgICAgPSB0YWdzLmJlZm9yZTtcbiAgICAgICAgICAgIGNvbnN0IHNlcmllcyA9IHNlcXVlbHNbd2lkdGgudG9TdHJpbmcoKV07XG4gICAgICAgICAgICBjb25zdCBsYWJlbHMgPSBsYWJlbFNlcXVlbHM/Llt3aWR0aC50b1N0cmluZygpXSA/PyBzZXJpZXMubWFwKGwgPT4gbC50b1N0cmluZygpKTtcbiAgICAgICAgICAgIGZvciAoY29uc3QgaSBpbiBzZXJpZXMpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBpdGVtICA9IHNlcmllc1tpXTtcbiAgICAgICAgICAgICAgICBjb25zdCBsYWJlbCA9IGxhYmVsc1tpXTtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHRyaW1QYXJhbSA9PT0gXCJzdHJpbmdcIiAmJiBpdGVtID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gdHJpbShmaWxsSW4odGFncy5saW5rLCBpdGVtLnRvU3RyaW5nKCksIGxhYmVsKSwgdHJpbVBhcmFtKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiBpdGVtID09PSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gZmlsbEluKHRhZ3MubGluaywgaXRlbS50b1N0cmluZygpLCBsYWJlbCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtID09PSBcImdhcFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gdGFncy5nYXA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHsgLy8gYWN0aXZlIHBhZ2VcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSBmaWxsSW4odGFncy5hY3RpdmUsIGl0ZW0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gICB9IGVsc2UgaWYgKGtleXdvcmQgPT09IFwiY29tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlNraXBwZWQgUGFneS5pbml0KCkgZm9yOiAlb1xcblVua25vd24ga2V5d29yZCAnJXMnXCIsIGVsLCBrZXl3b3JkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikgeyBjb25zb2xlLndhcm4oXCJTa2lwcGVkIFBhZ3kuaW5pdCgpIGZvcjogJW9cXG4lc1wiLCBlbCwgZXJyKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufSkoKTtcbiJdfQ==
114
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFneS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWtCQSxNQUFNLElBQUksR0FBRyxDQUFDLEdBQUcsRUFBRTtJQUNmLDRDQUE0QztJQUM1QyxNQUFNLFdBQVcsR0FBRyxJQUFJLGNBQWMsQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUNOLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLGdCQUFnQixDQUFhLFdBQVcsQ0FBQyxDQUFDLE9BQU8s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XCJzdHJpbmdcIiAmJiBpdGVtID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gdHJpbShmaWxsSW4odGFncy5saW5rLCBpdGVtLnRvU3RyaW5nKCksIGxhYmVsKSwgdHJpbVBhcmFtKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiBpdGVtID09PSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gZmlsbEluKHRhZ3MubGluaywgaXRlbS50b1N0cmluZygpLCBsYWJlbCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtID09PSBcImdhcFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gdGFncy5nYXA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHsgLy8gYWN0aXZlIHBhZ2VcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSBmaWxsSW4odGFncy5hY3RpdmUsIGl0ZW0sIGxhYmVsKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBodG1sICs9IHRhZ3MuYWZ0ZXI7ICAgLy8gZXNsaW50LWRpc2FibGUtbGluZSBhbGlnbi1hc3NpZ25tZW50cy9hbGlnbi1hc3NpZ25tZW50c1xuICAgICAgICAgICAgZWwuaW5uZXJIVE1MID0gXCJcIjtcbiAgICAgICAgICAgIGVsLmluc2VydEFkamFjZW50SFRNTChcImFmdGVyYmVnaW5cIiwgaHRtbCk7XG4gICAgICAgICAgICBsYXN0V2lkdGggPSB3aWR0aDtcbiAgICAgICAgfSkoKTtcbiAgICAgICAgaWYgKGVsLmNsYXNzTGlzdC5jb250YWlucyhcInBhZ3ktcmpzXCIpKSB7IHJqc09ic2VydmVyLm9ic2VydmUoY29udGFpbmVyKSB9XG4gICAgfTtcblxuICAgIC8vIEluaXQgdGhlICpfY29tYm9fbmF2X2pzIGhlbHBlcnNcbiAgICBjb25zdCBpbml0Q29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HtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB1aW50OGFycmF5ICAgICAgICAgPSBVaW50OEFycmF5LmZyb20oYXRvYihlbC5nZXRBdHRyaWJ1dGUoXCJkYXRhLXBhZ3lcIikgYXMgc3RyaW5nKSwgYyA9PiBjLmNoYXJDb2RlQXQoMCkpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBba2V5d29yZCwgLi4uYXJnc10gPSBKU09OLnBhcnNlKChuZXcgVGV4dERlY29kZXIoKSkuZGVjb2RlKHVpbnQ4YXJyYXkpKTsgLy8gYmFzZTY0LXV0ZjggLT4gSlNPTiAtPiBBcnJheVxuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5d29yZCA9PT0gXCJuYXZcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdE5hdihlbCBhcyBOYXZFbGVtZW50LCBhcmdzIGFzIE5hdkFyZ3MpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleXdvcmQgPT09IFwiY29tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlNraXBwZWQgUGFneS5pbml0KCkgZm9yOiAlb1xcblVua25vd24ga2V5d29yZCAnJXMnXCIsIGVsLCBrZXl3b3JkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikgeyBjb25zb2xlLndhcm4oXCJTa2lwcGVkIFBhZ3kuaW5pdCgpIGZvcjogJW9cXG4lc1wiLCBlbCwgZXJyKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufSkoKTtcbiJdfQ==
@@ -81,7 +81,7 @@ const Pagy = (() => {
81
81
  const trim = (link, param) => link.replace(new RegExp(`[?&]${param}=1\\b(?!&)|\\b${param}=1&`), "");
82
82
  // Public interface
83
83
  return {
84
- version: "7.0.4",
84
+ version: "7.0.5",
85
85
  // Scan for elements with a "data-pagy" attribute and call their init functions with the decoded args
86
86
  init(arg) {
87
87
  const target = arg instanceof Element ? arg : document;
@@ -1 +1 @@
1
- !function(){let e=(()=>{let e=new ResizeObserver(e=>e.forEach(e=>e.target.querySelectorAll(".pagy-rjs").forEach(e=>e.pagyRender()))),t=(t,[r,n,a,i])=>{let l=t.parentElement??t,c=Object.keys(n).map(e=>parseInt(e)).sort((e,t)=>t-e),p=-1,s=(e,t,r)=>e.replace(/__pagy_page__/g,t).replace(/__pagy_label__/g,r);(t.pagyRender=function(){let e=c.find(e=>e<l.clientWidth)||0;if(e===p)return;let g=r.before,y=n[e.toString()],f=a?.[e.toString()]??y.map(e=>e.toString());for(let e in y){let t=y[e],n=f[e];"string"==typeof i&&1===t?g+=o(s(r.link,t.toString(),n),i):"number"==typeof t?g+=s(r.link,t.toString(),n):"gap"===t?g+=r.gap:g+=s(r.active,t,n)}g+=r.after,t.innerHTML="",t.insertAdjacentHTML("afterbegin",g),p=e})(),t.classList.contains("pagy-rjs")&&e.observe(l)},r=(e,[t,r])=>a(e,e=>[e,t.replace(/__pagy_page__/,e)],r),n=(e,[t,r,n])=>{a(e,e=>{let n=Math.max(Math.ceil(t/parseInt(e)),1).toString(),a=r.replace(/__pagy_page__/,n).replace(/__pagy_items__/,e);return[n,a]},n)},a=(e,t,r)=>{let n=e.querySelector("input"),a=n.value,i=function(){if(n.value===a)return;let[i,l,c]=[n.min,n.value,n.max].map(e=>parseInt(e)||0);if(l<i||l>c){n.value=a,n.select();return}let[p,s]=t(n.value);"string"==typeof r&&"1"===p&&(s=o(s,r)),e.insertAdjacentHTML("afterbegin",s),e.querySelector("a").click()};["change","focus"].forEach(e=>n.addEventListener(e,n.select)),n.addEventListener("focusout",i),n.addEventListener("keypress",e=>{"Enter"===e.key&&i()})},o=(e,t)=>e.replace(RegExp(`[?&]${t}=1\\b(?!&)|\\b${t}=1&`),"");return{version:"7.0.4",init(e){for(let a of(e instanceof Element?e:document).querySelectorAll("[data-pagy]"))try{let e=Uint8Array.from(atob(a.getAttribute("data-pagy")),e=>e.charCodeAt(0)),[o,...i]=JSON.parse(new TextDecoder().decode(e));"nav"===o?t(a,i):"combo"===o?r(a,i):"selector"===o?n(a,i):console.warn("Skipped Pagy.init() for: %o\nUnknown keyword '%s'",a,o)}catch(e){console.warn("Skipped Pagy.init() for: %o\n%s",a,e)}}}})();window.Pagy=e}();
1
+ !function(){let e=(()=>{let e=new ResizeObserver(e=>e.forEach(e=>e.target.querySelectorAll(".pagy-rjs").forEach(e=>e.pagyRender()))),t=(t,[r,n,a,i])=>{let l=t.parentElement??t,c=Object.keys(n).map(e=>parseInt(e)).sort((e,t)=>t-e),p=-1,s=(e,t,r)=>e.replace(/__pagy_page__/g,t).replace(/__pagy_label__/g,r);(t.pagyRender=function(){let e=c.find(e=>e<l.clientWidth)||0;if(e===p)return;let g=r.before,y=n[e.toString()],f=a?.[e.toString()]??y.map(e=>e.toString());for(let e in y){let t=y[e],n=f[e];"string"==typeof i&&1===t?g+=o(s(r.link,t.toString(),n),i):"number"==typeof t?g+=s(r.link,t.toString(),n):"gap"===t?g+=r.gap:g+=s(r.active,t,n)}g+=r.after,t.innerHTML="",t.insertAdjacentHTML("afterbegin",g),p=e})(),t.classList.contains("pagy-rjs")&&e.observe(l)},r=(e,[t,r])=>a(e,e=>[e,t.replace(/__pagy_page__/,e)],r),n=(e,[t,r,n])=>{a(e,e=>{let n=Math.max(Math.ceil(t/parseInt(e)),1).toString(),a=r.replace(/__pagy_page__/,n).replace(/__pagy_items__/,e);return[n,a]},n)},a=(e,t,r)=>{let n=e.querySelector("input"),a=n.value,i=function(){if(n.value===a)return;let[i,l,c]=[n.min,n.value,n.max].map(e=>parseInt(e)||0);if(l<i||l>c){n.value=a,n.select();return}let[p,s]=t(n.value);"string"==typeof r&&"1"===p&&(s=o(s,r)),e.insertAdjacentHTML("afterbegin",s),e.querySelector("a").click()};["change","focus"].forEach(e=>n.addEventListener(e,n.select)),n.addEventListener("focusout",i),n.addEventListener("keypress",e=>{"Enter"===e.key&&i()})},o=(e,t)=>e.replace(RegExp(`[?&]${t}=1\\b(?!&)|\\b${t}=1&`),"");return{version:"7.0.5",init(e){for(let a of(e instanceof Element?e:document).querySelectorAll("[data-pagy]"))try{let e=Uint8Array.from(atob(a.getAttribute("data-pagy")),e=>e.charCodeAt(0)),[o,...i]=JSON.parse(new TextDecoder().decode(e));"nav"===o?t(a,i):"combo"===o?r(a,i):"selector"===o?n(a,i):console.warn("Skipped Pagy.init() for: %o\nUnknown keyword '%s'",a,o)}catch(e){console.warn("Skipped Pagy.init() for: %o\n%s",a,e)}}}})();window.Pagy=e}();
data/lib/pagy.rb CHANGED
@@ -5,7 +5,7 @@ require 'pathname'
5
5
 
6
6
  # Core class
7
7
  class Pagy
8
- VERSION = '7.0.4'
8
+ VERSION = '7.0.5'
9
9
 
10
10
  # Root pathname to get the path of Pagy files like templates or dictionaries
11
11
  def self.root
@@ -0,0 +1,58 @@
1
+ .pagy {
2
+ display: flex;
3
+ }
4
+
5
+ .pagy > :not([hidden]) ~ :not([hidden]) {
6
+ --space-reverse: 0;
7
+ margin-right: calc(0.25rem * var(--space-reverse));
8
+ margin-left: calc(0.25rem * calc(1 - var(--space-reverse)));
9
+ }
10
+
11
+ .pagy {
12
+ font-family: sans-serif;
13
+ font-size: 0.875rem;
14
+ line-height: 1.25rem;
15
+ font-weight: 600;
16
+ color: rgb(107 114 128);
17
+ }
18
+
19
+ .pagy .page.gap {
20
+ /* if you need to customize it */
21
+ }
22
+
23
+ .pagy .page a {
24
+ display: block;
25
+ text-decoration: none;
26
+ border-radius: 0.5rem;
27
+ background-color: rgb(229 231 235);
28
+ padding: 0.25rem 0.75rem;
29
+ }
30
+
31
+ .pagy .page a:hover {
32
+ background-color: rgb(209 213 219);
33
+ }
34
+
35
+ .pagy .page.active a {
36
+ cursor: default;
37
+ background-color: rgb(156 163 175);
38
+ color: rgb(255 255 255)
39
+ }
40
+
41
+ .pagy .page.disabled a {
42
+ cursor: default;
43
+ background-color: rgb(243 244 246);
44
+ color: rgb(209 213 219)
45
+ }
46
+
47
+ .pagy .pagy-combo-input, .pagy.pagy-items-selector-js {
48
+ display: inline-block;
49
+ border-radius: 0.5rem;
50
+ background-color: rgb(229 231 235);
51
+ padding: 0.125rem 0.75rem;
52
+ }
53
+
54
+ .pagy .pagy-combo-input input, .pagy.pagy-items-selector-js input {
55
+ border-radius: 0.375rem;
56
+ border-style: none;
57
+ background-color: rgb(243 244 246);
58
+ }
@@ -0,0 +1,47 @@
1
+ .pagy {
2
+ display: flex;
3
+ font-family: sans-serif;
4
+ font-size: 0.875rem;
5
+ line-height: 1.25rem;
6
+ font-weight: 600;
7
+ color: rgb(107 114 128);
8
+ & > :not([hidden]) ~ :not([hidden]) {
9
+ --space-reverse: 0;
10
+ margin-right: calc(0.25rem * var(--space-reverse));
11
+ margin-left: calc(0.25rem * calc(1 - var(--space-reverse)));
12
+ }
13
+ .page {
14
+ a {
15
+ display: block;
16
+ text-decoration: none;
17
+ border-radius: 0.5rem;
18
+ background-color: rgb(229 231 235);
19
+ padding: 0.25rem 0.75rem;
20
+ &:hover {
21
+ background-color: rgb(209 213 219);
22
+ }
23
+ }
24
+ &.active a {
25
+ cursor: default;
26
+ background-color: rgb(156 163 175);
27
+ color: rgb(255 255 255);
28
+ }
29
+ &.disabled a {
30
+ cursor: default;
31
+ background-color: rgb(243 244 246);
32
+ color: rgb(209 213 219);
33
+ }
34
+ &.gap { } /* if you need to customize it */
35
+ }
36
+ .pagy-combo-input, &.pagy-items-selector-js {
37
+ display: inline-block;
38
+ border-radius: 0.5rem;
39
+ background-color: rgb(229 231 235);
40
+ padding: 0.125rem 0.75rem;
41
+ input {
42
+ border-radius: 0.375rem;
43
+ border-style: none;
44
+ background-color: rgb(243 244 246);
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,24 @@
1
+ .pagy {
2
+ @apply flex space-x-1 font-semibold text-sm text-gray-500;
3
+ .page {
4
+ a {
5
+ @apply block rounded-lg px-3 py-1 bg-gray-200;
6
+ &:hover {
7
+ @apply bg-gray-300;
8
+ }
9
+ }
10
+ &.active a {
11
+ @apply text-white bg-gray-400 cursor-default;
12
+ }
13
+ &.disabled a {
14
+ @apply text-gray-300 bg-gray-100 cursor-default;
15
+ }
16
+ &.gap { } /* if you need to customize it */
17
+ }
18
+ .pagy-combo-input, &.pagy-items-selector-js {
19
+ @apply inline-block bg-gray-200 rounded-lg px-3 py-0.5;
20
+ input {
21
+ @apply bg-gray-100 border-none rounded-md;
22
+ }
23
+ }
24
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagy
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.4
4
+ version: 7.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Domizio Demichelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-21 00:00:00.000000000 Z
11
+ date: 2024-02-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Agnostic pagination in plain ruby. It does it all. Better.
14
14
  email:
@@ -99,6 +99,9 @@ files:
99
99
  - lib/pagy/frontend.rb
100
100
  - lib/pagy/i18n.rb
101
101
  - lib/pagy/url_helpers.rb
102
+ - lib/stylesheets/pagy.css
103
+ - lib/stylesheets/pagy.scss
104
+ - lib/stylesheets/pagy.tailwind.scss
102
105
  homepage: https://github.com/ddnexus/pagy
103
106
  licenses:
104
107
  - MIT