pagy 7.0.11 → 8.6.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/apps/calendar.ru +745 -0
  3. data/apps/demo.ru +435 -0
  4. data/apps/rails.ru +212 -0
  5. data/apps/repro.ru +177 -0
  6. data/apps/tmp/calendar.sqlite3 +0 -0
  7. data/apps/tmp/calendar.sqlite3-shm +0 -0
  8. data/apps/tmp/calendar.sqlite3-wal +0 -0
  9. data/apps/tmp/local_secret.txt +1 -0
  10. data/apps/tmp/pagy-keyset.sqlite3 +0 -0
  11. data/apps/tmp/pagy-keyset.sqlite3-shm +0 -0
  12. data/apps/tmp/pagy-keyset.sqlite3-wal +0 -0
  13. data/bin/pagy +100 -0
  14. data/{lib/config → config}/pagy.rb +31 -73
  15. data/javascripts/pagy-module.js +100 -0
  16. data/javascripts/pagy.js +4 -0
  17. data/javascripts/pagy.min.js +4 -0
  18. data/javascripts/pagy.min.js.map +10 -0
  19. data/javascripts/pagy.mjs +100 -0
  20. data/lib/optimist.rb +1022 -0
  21. data/lib/pagy/backend.rb +8 -3
  22. data/lib/pagy/calendar/day.rb +4 -3
  23. data/lib/pagy/calendar/month.rb +4 -3
  24. data/lib/pagy/calendar/quarter.rb +4 -3
  25. data/lib/pagy/calendar/unit.rb +106 -0
  26. data/lib/pagy/calendar/week.rb +3 -3
  27. data/lib/pagy/calendar/year.rb +4 -3
  28. data/lib/pagy/calendar.rb +55 -99
  29. data/lib/pagy/console.rb +2 -2
  30. data/lib/pagy/countless.rb +15 -10
  31. data/lib/pagy/extras/arel.rb +1 -1
  32. data/lib/pagy/extras/array.rb +1 -1
  33. data/lib/pagy/extras/bootstrap.rb +52 -63
  34. data/lib/pagy/extras/bulma.rb +49 -64
  35. data/lib/pagy/extras/calendar.rb +35 -5
  36. data/lib/pagy/extras/countless.rb +2 -2
  37. data/lib/pagy/extras/foundation.rb +52 -62
  38. data/lib/pagy/extras/gearbox.rb +28 -27
  39. data/lib/pagy/extras/headers.rb +1 -1
  40. data/lib/pagy/extras/i18n.rb +1 -1
  41. data/lib/pagy/extras/items.rb +21 -18
  42. data/lib/pagy/extras/{frontend_helpers.rb → js_tools.rb} +9 -6
  43. data/lib/pagy/extras/jsonapi.rb +2 -2
  44. data/lib/pagy/extras/materialize.rb +56 -52
  45. data/lib/pagy/extras/metadata.rb +6 -2
  46. data/lib/pagy/extras/overflow.rb +5 -4
  47. data/lib/pagy/extras/pagy.rb +82 -0
  48. data/lib/pagy/extras/semantic.rb +50 -51
  49. data/lib/pagy/extras/size.rb +40 -0
  50. data/lib/pagy/extras/standalone.rb +2 -2
  51. data/lib/pagy/extras/trim.rb +12 -12
  52. data/lib/pagy/extras/uikit.rb +51 -50
  53. data/lib/pagy/frontend.rb +39 -53
  54. data/lib/pagy/url_helpers.rb +9 -10
  55. data/lib/pagy.rb +51 -82
  56. data/{lib/locales → locales}/ar.yml +10 -11
  57. data/{lib/locales → locales}/be.yml +5 -5
  58. data/{lib/locales → locales}/bg.yml +5 -5
  59. data/{lib/locales → locales}/bs.yml +5 -5
  60. data/locales/ca.yml +21 -0
  61. data/locales/ckb.yml +18 -0
  62. data/{lib/locales → locales}/cs.yml +5 -5
  63. data/locales/da.yml +21 -0
  64. data/{lib/locales → locales}/de.yml +5 -5
  65. data/{lib/locales → locales}/en.yml +5 -5
  66. data/{lib/locales → locales}/es.yml +3 -3
  67. data/{lib/locales → locales}/fr.yml +5 -5
  68. data/{lib/locales → locales}/hr.yml +5 -5
  69. data/{lib/locales → locales}/id.yml +5 -5
  70. data/{lib/locales → locales}/it.yml +5 -5
  71. data/{lib/locales → locales}/ja.yml +5 -5
  72. data/{lib/locales → locales}/km.yml +5 -5
  73. data/locales/ko.yml +17 -0
  74. data/{lib/locales → locales}/nb.yml +5 -5
  75. data/{lib/locales → locales}/nl.yml +5 -5
  76. data/{lib/locales → locales}/nn.yml +5 -5
  77. data/{lib/locales → locales}/pl.yml +5 -5
  78. data/{lib/locales → locales}/pt-BR.yml +3 -3
  79. data/{lib/locales → locales}/pt.yml +3 -3
  80. data/locales/ru.yml +25 -0
  81. data/{lib/locales → locales}/sr.yml +5 -5
  82. data/{lib/locales → locales}/sv-SE.yml +5 -5
  83. data/{lib/locales → locales}/sv.yml +5 -5
  84. data/{lib/locales → locales}/sw.yml +5 -5
  85. data/{lib/locales → locales}/ta.yml +5 -5
  86. data/{lib/locales → locales}/tr.yml +5 -5
  87. data/{lib/locales → locales}/uk.yml +5 -5
  88. data/locales/vi.yml +17 -0
  89. data/{lib/locales → locales}/zh-CN.yml +5 -5
  90. data/{lib/locales → locales}/zh-HK.yml +5 -5
  91. data/{lib/locales → locales}/zh-TW.yml +5 -5
  92. data/{lib/stylesheets → stylesheets}/pagy.css +19 -34
  93. data/{lib/stylesheets → stylesheets}/pagy.scss +17 -19
  94. data/stylesheets/pagy.tailwind.css +21 -0
  95. metadata +76 -53
  96. data/lib/javascripts/pagy-dev.js +0 -112
  97. data/lib/javascripts/pagy-module.js +0 -111
  98. data/lib/javascripts/pagy.js +0 -1
  99. data/lib/locales/ca.yml +0 -23
  100. data/lib/locales/ckb.yml +0 -18
  101. data/lib/locales/da.yml +0 -23
  102. data/lib/locales/ko.yml +0 -19
  103. data/lib/locales/ru.yml +0 -27
  104. data/lib/locales/vi.yml +0 -17
  105. data/lib/pagy/calendar/helper.rb +0 -65
  106. data/lib/pagy/extras/navs.rb +0 -51
  107. data/lib/pagy/extras/support.rb +0 -40
  108. data/lib/stylesheets/pagy.tailwind.scss +0 -24
  109. /data/{lib/javascripts/pagy-module.d.ts → javascripts/pagy.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  pt:
3
3
  pagy:
4
4
  aria_label:
@@ -17,5 +17,5 @@ pt:
17
17
  no_items: "Sem resultados"
18
18
  single_page: "Mostrando %{count} %{item_name}"
19
19
  multiple_pages: "Mostrando %{item_name} %{from}-%{to} de um total de %{count}"
20
- combo_nav_js: "<label>Página %{page_input} de %{pages}</label>"
21
- items_selector_js: "<label>Mostrar %{items_input} %{item_name} por página</label>"
20
+ combo_nav_js: "Página %{page_input} de %{pages}"
21
+ items_selector_js: "Mostrar %{items_input} %{item_name} por página"
data/locales/ru.yml ADDED
@@ -0,0 +1,25 @@
1
+ # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ ru:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ one: "Страница"
7
+ few: "Страницы"
8
+ many: "Страниц"
9
+ other: "Страниц"
10
+ prev: "Назад"
11
+ next: "Вперёд"
12
+ prev: "&lt;"
13
+ next: "&gt;"
14
+ gap: "&hellip;"
15
+ item_name:
16
+ one: "запись"
17
+ few: "записи"
18
+ many: "записей"
19
+ other: "записей"
20
+ info:
21
+ no_items: "Пока %{item_name} нет"
22
+ single_page: "%{count} %{item_name}"
23
+ multiple_pages: "Всего %{count} %{item_name}, показаны с %{from} по %{to}"
24
+ combo_nav_js: "Страница %{page_input} из %{pages}"
25
+ items_selector_js: "Показать %{items_input} %{item_name} на странице"
@@ -1,4 +1,4 @@
1
- # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  sr:
3
3
  pagy:
4
4
  aria_label:
@@ -19,7 +19,7 @@ sr:
19
19
  other: "ставки"
20
20
  info:
21
21
  no_items: "Нema пронађених %{item_name}"
22
- single_page: "Приказује се <b>%{count}</b> %{item_name}"
23
- multiple_pages: "Приказ %{item_name} <b>%{from}-%{to}</b> од <b>%{count}</b> укупно"
24
- combo_nav_js: "<label>Страниca %{page_input} од %{pages}</label>"
25
- items_selector_js: "<label>Прикажи %{items_input} %{item_name} по страниcи</label>"
22
+ single_page: "Приказује се %{count} %{item_name}"
23
+ multiple_pages: "Приказ %{item_name} %{from}-%{to} од %{count} укупно"
24
+ combo_nav_js: "Страниca %{page_input} од %{pages}"
25
+ items_selector_js: "Прикажи %{items_input} %{item_name} по страниcи"
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  sv-SE:
3
3
  pagy:
4
4
  aria_label:
@@ -15,7 +15,7 @@ sv-SE:
15
15
  other: "resultat"
16
16
  info:
17
17
  no_items: "Inga %{item_name} hittade"
18
- single_page: "Visar <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Visar %{item_name} <b>%{from}-%{to}</b> av <b>%{count}</b> totalt"
20
- combo_nav_js: "<label>Sida %{page_input} av %{pages}</label>"
21
- items_selector_js: "<label>Visa %{items_input} %{item_name} per sida</label>"
18
+ single_page: "Visar %{count} %{item_name}"
19
+ multiple_pages: "Visar %{item_name} %{from}-%{to} av %{count} totalt"
20
+ combo_nav_js: "Sida %{page_input} av %{pages}"
21
+ items_selector_js: "Visa %{items_input} %{item_name} per sida"
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  sv:
3
3
  pagy:
4
4
  aria_label:
@@ -15,7 +15,7 @@ sv:
15
15
  other: "resultat"
16
16
  info:
17
17
  no_items: "Inga %{item_name} hittade"
18
- single_page: "Visar <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Visar %{item_name} <b>%{from}-%{to}</b> av <b>%{count}</b> totalt"
20
- combo_nav_js: "<label>Sida %{page_input} av %{pages}</label>"
21
- items_selector_js: "<label>Visa %{items_input} %{item_name} per sida</label>"
18
+ single_page: "Visar %{count} %{item_name}"
19
+ multiple_pages: "Visar %{item_name} %{from}-%{to} av %{count} totalt"
20
+ combo_nav_js: "Sida %{page_input} av %{pages}"
21
+ items_selector_js: "Visa %{items_input} %{item_name} per sida"
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  sw:
3
3
  pagy:
4
4
  # please add a comment in the https://github.com/ddnexus/pagy/issues/603
@@ -17,7 +17,7 @@ sw:
17
17
  other: "vifaa"
18
18
  info:
19
19
  no_items: "Hamna %{item_name} vilivyopatikana"
20
- single_page: "Inaonyesha %{item_name} <b>%{count}</b>"
21
- multiple_pages: "Inaonyesha %{item_name} <b>%{from}-%{to}</b> ya <b>%{count}</b> kwa jumla"
22
- combo_nav_js: "<label>Kurasa %{page_input} ya %{pages}</label>"
23
- items_selector_js: "<label>Onyesha %{items_input} %{item_name} kwa kila ukurasa</label>"
20
+ single_page: "Inaonyesha %{item_name} %{count}"
21
+ multiple_pages: "Inaonyesha %{item_name} %{from}-%{to} ya %{count} kwa jumla"
22
+ combo_nav_js: "Kurasa %{page_input} ya %{pages}"
23
+ items_selector_js: "Onyesha %{items_input} %{item_name} kwa kila ukurasa"
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  ta:
3
3
  pagy:
4
4
  aria_label:
@@ -17,7 +17,7 @@ ta:
17
17
  other: "பதிவுகள்"
18
18
  info:
19
19
  no_items: "%{item_name} கிடைக்கவில்லை"
20
- single_page: "<b>%{count}</b> %{item_name} காட்டப்படுகின்றது"
21
- multiple_pages: "மொத்தம் <b>%{count}</b> %{item_name}, காட்டப்படுபவை <b>%{from}-%{to}</b>"
22
- combo_nav_js: "<label>%{pages}-இல் %{page_input}-வது பக்கம்</label>"
23
- items_selector_js: "<label>ஒரு பக்கத்திற்கு %{items_input} %{item_name} காட்டு</label>"
20
+ single_page: "%{count} %{item_name} காட்டப்படுகின்றது"
21
+ multiple_pages: "மொத்தம் %{count} %{item_name}, காட்டப்படுபவை %{from}-%{to}"
22
+ combo_nav_js: "%{pages}-இல் %{page_input}-வது பக்கம்"
23
+ items_selector_js: "ஒரு பக்கத்திற்கு %{items_input} %{item_name} காட்டு"
@@ -1,4 +1,4 @@
1
- # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  tr:
3
3
  pagy:
4
4
  aria_label:
@@ -13,7 +13,7 @@ tr:
13
13
  item_name: "kayıt"
14
14
  info:
15
15
  no_items: "Hiç %{item_name} bulunamadı"
16
- single_page: "Toplam <b>%{count}</b> %{item_name} gösteriliyor"
17
- multiple_pages: "<b>%{count}</b> %{item_name} içerisinden <b>%{from}-%{to}</b> kadarı gösteriliyor"
18
- combo_nav_js: "<label>Sayfa %{page_input} / %{pages}</label>"
19
- items_selector_js: "<label>Sayfada %{items_input} %{item_name} göster</label>"
16
+ single_page: "Toplam %{count} %{item_name} gösteriliyor"
17
+ multiple_pages: "%{count} %{item_name} içerisinden %{from}-%{to} kadarı gösteriliyor"
18
+ combo_nav_js: "Sayfa %{page_input} / %{pages}"
19
+ items_selector_js: "Sayfada %{items_input} %{item_name} göster"
@@ -1,4 +1,4 @@
1
- # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  uk:
3
3
  pagy:
4
4
  aria_label:
@@ -19,7 +19,7 @@ uk:
19
19
  other: "записів"
20
20
  info:
21
21
  no_items: "Більше %{item_name} немає"
22
- single_page: "<b>%{count}</b> %{item_name}"
23
- multiple_pages: "Загалом <b>%{count}</b> %{item_name}, показані з <b>%{from}</b> по <b>%{to}</b>"
24
- combo_nav_js: "<label>Сторінка %{page_input} з %{pages}</label>"
25
- items_selector_js: "<label>Показати %{items_input} %{item_name} на сторінці</label>"
22
+ single_page: "%{count} %{item_name}"
23
+ multiple_pages: "Загалом %{count} %{item_name}, показані з %{from} по %{to}"
24
+ combo_nav_js: "Сторінка %{page_input} з %{pages}"
25
+ items_selector_js: "Показати %{items_input} %{item_name} на сторінці"
data/locales/vi.yml ADDED
@@ -0,0 +1,17 @@
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ vi:
3
+ pagy:
4
+ aria_label:
5
+ nav: "Trang"
6
+ prev: "Trang trước"
7
+ next: "Trang sau"
8
+ prev: "&lt;"
9
+ next: "&gt;"
10
+ gap: "&hellip;"
11
+ item_name: "kết quả"
12
+ info:
13
+ no_items: "Không tìm thấy %{item_name} nào"
14
+ single_page: "%{count} %{item_name}"
15
+ multiple_pages: "Đang hiển thị %{from}-%{to} trong tổng số %{count} %{item_name}"
16
+ combo_nav_js: "Trang %{page_input} trên %{pages}"
17
+ items_selector_js: "Hiển thị %{items_input} %{item_name} mỗi trang"
@@ -1,4 +1,4 @@
1
- # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  zh-CN:
3
3
  pagy:
4
4
  aria_label:
@@ -13,7 +13,7 @@ zh-CN:
13
13
  item_name: ""
14
14
  info:
15
15
  no_items: "项目未找到"
16
- single_page: "显示<b>%{count}</b> 项%{item_name}"
17
- multiple_pages: "共 <b>%{count}</b> 项%{item_name},显示 <b>%{from}-%{to}</b>"
18
- combo_nav_js: "<label>第 %{page_input} / %{pages} 页</label>"
19
- items_selector_js: "<label>每页显示 %{items_input} 条%</label>"
16
+ single_page: "显示%{count} 项%{item_name}"
17
+ multiple_pages: "共 %{count} 项%{item_name},显示 %{from}-%{to}"
18
+ combo_nav_js: " %{page_input} / %{pages} "
19
+ items_selector_js: "每页显示 %{items_input} 条%"
@@ -1,4 +1,4 @@
1
- # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  zh-HK:
3
3
  pagy:
4
4
  aria_label:
@@ -13,7 +13,7 @@ zh-HK:
13
13
  item_name: ""
14
14
  info:
15
15
  no_items: "記錄未搵到"
16
- single_page: "顯示 <b>%{count}</b> %{item_name}"
17
- multiple_pages: "共 <b>%{count}</b> %{item_name},顯示 <b>%{from}-%{to}</b>"
18
- combo_nav_js: "<label>第 %{page_input} / %{pages} 頁</label>"
19
- items_selector_js: "<label>每頁顯示 %{items_input} 記錄</label>"
16
+ single_page: "顯示 %{count} %{item_name}"
17
+ multiple_pages: "共 %{count} %{item_name},顯示 %{from}-%{to}"
18
+ combo_nav_js: " %{page_input} / %{pages} "
19
+ items_selector_js: "每頁顯示 %{items_input} 記錄"
@@ -1,4 +1,4 @@
1
- # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  zh-TW:
3
3
  pagy:
4
4
  aria_label:
@@ -13,7 +13,7 @@ zh-TW:
13
13
  item_name: ""
14
14
  info:
15
15
  no_items: "沒找到項"
16
- single_page: "顯示 <b>%{count}</b> 項%{item_name}"
17
- multiple_pages: "共 <b>%{count}</b> 項%{item_name},顯示 <b>%{from}-%{to}</b>"
18
- combo_nav_js: "<label>第 %{page_input} / %{pages} 頁</label>"
19
- items_selector_js: "<label>每頁顯示 %{items_input} 項%{item_name}</label>"
16
+ single_page: "顯示 %{count} 項%{item_name}"
17
+ multiple_pages: "共 %{count} 項%{item_name},顯示 %{from}-%{to}"
18
+ combo_nav_js: " %{page_input} / %{pages} "
19
+ items_selector_js: "每頁顯示 %{items_input} 項%{item_name}"
@@ -1,61 +1,46 @@
1
1
  .pagy {
2
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
3
  font-family: sans-serif;
13
4
  font-size: 0.875rem;
14
5
  line-height: 1.25rem;
15
6
  font-weight: 600;
16
- color: rgb(107 114 128);
7
+ color: #6b7280;
17
8
  }
18
-
19
- .pagy .page.gap {
20
- /* if you need to customize it */
9
+ .pagy > :not([hidden]) ~ :not([hidden]) {
10
+ --space-reverse: 0;
11
+ margin-right: calc(0.25rem * var(--space-reverse));
12
+ margin-left: calc(0.25rem * calc(1 - var(--space-reverse)));
21
13
  }
22
-
23
- .pagy .page a {
14
+ .pagy a:not(.gap) {
24
15
  display: block;
25
16
  text-decoration: none;
26
17
  border-radius: 0.5rem;
27
- background-color: rgb(229 231 235);
18
+ background-color: #e5e7eb;
28
19
  padding: 0.25rem 0.75rem;
29
20
  color: inherit;
30
21
  }
31
-
32
- .pagy .page a:hover {
33
- background-color: rgb(209 213 219);
22
+ .pagy a:not(.gap):hover {
23
+ background-color: #d1d5db;
34
24
  }
35
-
36
- .pagy .page.active a {
25
+ .pagy a:not(.gap):not([href]) { /* disabled links */
37
26
  cursor: default;
38
- background-color: rgb(156 163 175);
39
- color: rgb(255 255 255);
27
+ background-color: #f3f4f6;
28
+ color: #d1d5db;
40
29
  }
41
-
42
- .pagy .page.disabled a {
43
- cursor: default;
44
- background-color: rgb(243 244 246);
45
- color: rgb(209 213 219);
30
+ .pagy a:not(.gap).current {
31
+ background-color: #9ca3af;
32
+ color: white;
46
33
  }
47
-
48
- .pagy .pagy-combo-input, .pagy.pagy-items-selector-js {
34
+ .pagy label {
49
35
  white-space: nowrap;
50
36
  display: inline-block;
51
37
  border-radius: 0.5rem;
52
- background-color: rgb(229 231 235);
38
+ background-color: #e5e7eb;
53
39
  padding: 0.125rem 0.75rem;
54
40
  }
55
-
56
- .pagy .pagy-combo-input input, .pagy.pagy-items-selector-js input {
41
+ .pagy label input {
57
42
  line-height: 1.5rem;
58
43
  border-radius: 0.375rem;
59
44
  border-style: none;
60
- background-color: rgb(243 244 246);
45
+ background-color: #f3f4f6;
61
46
  }
@@ -10,31 +10,29 @@
10
10
  margin-right: calc(0.25rem * var(--space-reverse));
11
11
  margin-left: calc(0.25rem * calc(1 - var(--space-reverse)));
12
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
- color: inherit;
21
- &:hover {
22
- background-color: rgb(209 213 219);
23
- }
24
- }
25
- &.active a {
26
- cursor: default;
27
- background-color: rgb(156 163 175);
28
- color: rgb(255 255 255);
13
+
14
+ a:not(.gap) {
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
+ color: inherit;
21
+ &:hover {
22
+ background-color: rgb(209 213 219);
29
23
  }
30
- &.disabled a {
24
+ &:not([href]) { /* disabled links */
31
25
  cursor: default;
32
26
  background-color: rgb(243 244 246);
33
27
  color: rgb(209 213 219);
34
28
  }
35
- &.gap { } /* if you need to customize it */
29
+ &.current {
30
+ background-color: rgb(156 163 175);
31
+ color: rgb(255 255 255);
32
+ }
36
33
  }
37
- .pagy-combo-input, &.pagy-items-selector-js {
34
+
35
+ label {
38
36
  white-space: nowrap;
39
37
  display: inline-block;
40
38
  border-radius: 0.5rem;
@@ -0,0 +1,21 @@
1
+ .pagy {
2
+ @apply flex space-x-1 font-semibold text-sm text-gray-500;
3
+ a:not(.gap) {
4
+ @apply block rounded-lg px-3 py-1 bg-gray-200;
5
+ &:hover {
6
+ @apply bg-gray-300;
7
+ }
8
+ &:not([href]) { /* disabled links */
9
+ @apply text-gray-300 bg-gray-100 cursor-default;
10
+ }
11
+ &.current {
12
+ @apply text-white bg-gray-400;
13
+ }
14
+ }
15
+ label {
16
+ @apply inline-block whitespace-nowrap bg-gray-200 rounded-lg px-3 py-0.5;
17
+ input {
18
+ @apply bg-gray-100 border-none rounded-md;
19
+ }
20
+ }
21
+ }
metadata CHANGED
@@ -1,71 +1,51 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagy
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.11
4
+ version: 8.6.3
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-03-18 00:00:00.000000000 Z
11
+ date: 2024-07-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Agnostic pagination in plain ruby. It does it all. Better.
14
14
  email:
15
15
  - dd.nexus@gmail.com
16
- executables: []
16
+ executables:
17
+ - pagy
17
18
  extensions: []
18
19
  extra_rdoc_files: []
19
20
  files:
20
21
  - LICENSE.txt
21
- - lib/config/pagy.rb
22
- - lib/javascripts/pagy-dev.js
23
- - lib/javascripts/pagy-module.d.ts
24
- - lib/javascripts/pagy-module.js
25
- - lib/javascripts/pagy.js
26
- - lib/locales/ar.yml
27
- - lib/locales/be.yml
28
- - lib/locales/bg.yml
29
- - lib/locales/bs.yml
30
- - lib/locales/ca.yml
31
- - lib/locales/ckb.yml
32
- - lib/locales/cs.yml
33
- - lib/locales/da.yml
34
- - lib/locales/de.yml
35
- - lib/locales/en.yml
36
- - lib/locales/es.yml
37
- - lib/locales/fr.yml
38
- - lib/locales/hr.yml
39
- - lib/locales/id.yml
40
- - lib/locales/it.yml
41
- - lib/locales/ja.yml
42
- - lib/locales/km.yml
43
- - lib/locales/ko.yml
44
- - lib/locales/nb.yml
45
- - lib/locales/nl.yml
46
- - lib/locales/nn.yml
47
- - lib/locales/pl.yml
48
- - lib/locales/pt-BR.yml
49
- - lib/locales/pt.yml
50
- - lib/locales/ru.yml
51
- - lib/locales/sr.yml
52
- - lib/locales/sv-SE.yml
53
- - lib/locales/sv.yml
54
- - lib/locales/sw.yml
55
- - lib/locales/ta.yml
56
- - lib/locales/tr.yml
57
- - lib/locales/uk.yml
58
- - lib/locales/vi.yml
59
- - lib/locales/zh-CN.yml
60
- - lib/locales/zh-HK.yml
61
- - lib/locales/zh-TW.yml
22
+ - apps/calendar.ru
23
+ - apps/demo.ru
24
+ - apps/rails.ru
25
+ - apps/repro.ru
26
+ - apps/tmp/calendar.sqlite3
27
+ - apps/tmp/calendar.sqlite3-shm
28
+ - apps/tmp/calendar.sqlite3-wal
29
+ - apps/tmp/local_secret.txt
30
+ - apps/tmp/pagy-keyset.sqlite3
31
+ - apps/tmp/pagy-keyset.sqlite3-shm
32
+ - apps/tmp/pagy-keyset.sqlite3-wal
33
+ - bin/pagy
34
+ - config/pagy.rb
35
+ - javascripts/pagy-module.js
36
+ - javascripts/pagy.d.ts
37
+ - javascripts/pagy.js
38
+ - javascripts/pagy.min.js
39
+ - javascripts/pagy.min.js.map
40
+ - javascripts/pagy.mjs
41
+ - lib/optimist.rb
62
42
  - lib/pagy.rb
63
43
  - lib/pagy/backend.rb
64
44
  - lib/pagy/calendar.rb
65
45
  - lib/pagy/calendar/day.rb
66
- - lib/pagy/calendar/helper.rb
67
46
  - lib/pagy/calendar/month.rb
68
47
  - lib/pagy/calendar/quarter.rb
48
+ - lib/pagy/calendar/unit.rb
69
49
  - lib/pagy/calendar/week.rb
70
50
  - lib/pagy/calendar/year.rb
71
51
  - lib/pagy/console.rb
@@ -79,29 +59,65 @@ files:
79
59
  - lib/pagy/extras/countless.rb
80
60
  - lib/pagy/extras/elasticsearch_rails.rb
81
61
  - lib/pagy/extras/foundation.rb
82
- - lib/pagy/extras/frontend_helpers.rb
83
62
  - lib/pagy/extras/gearbox.rb
84
63
  - lib/pagy/extras/headers.rb
85
64
  - lib/pagy/extras/i18n.rb
86
65
  - lib/pagy/extras/items.rb
66
+ - lib/pagy/extras/js_tools.rb
87
67
  - lib/pagy/extras/jsonapi.rb
88
68
  - lib/pagy/extras/materialize.rb
89
69
  - lib/pagy/extras/meilisearch.rb
90
70
  - lib/pagy/extras/metadata.rb
91
- - lib/pagy/extras/navs.rb
92
71
  - lib/pagy/extras/overflow.rb
72
+ - lib/pagy/extras/pagy.rb
93
73
  - lib/pagy/extras/searchkick.rb
94
74
  - lib/pagy/extras/semantic.rb
75
+ - lib/pagy/extras/size.rb
95
76
  - lib/pagy/extras/standalone.rb
96
- - lib/pagy/extras/support.rb
97
77
  - lib/pagy/extras/trim.rb
98
78
  - lib/pagy/extras/uikit.rb
99
79
  - lib/pagy/frontend.rb
100
80
  - lib/pagy/i18n.rb
101
81
  - lib/pagy/url_helpers.rb
102
- - lib/stylesheets/pagy.css
103
- - lib/stylesheets/pagy.scss
104
- - lib/stylesheets/pagy.tailwind.scss
82
+ - locales/ar.yml
83
+ - locales/be.yml
84
+ - locales/bg.yml
85
+ - locales/bs.yml
86
+ - locales/ca.yml
87
+ - locales/ckb.yml
88
+ - locales/cs.yml
89
+ - locales/da.yml
90
+ - locales/de.yml
91
+ - locales/en.yml
92
+ - locales/es.yml
93
+ - locales/fr.yml
94
+ - locales/hr.yml
95
+ - locales/id.yml
96
+ - locales/it.yml
97
+ - locales/ja.yml
98
+ - locales/km.yml
99
+ - locales/ko.yml
100
+ - locales/nb.yml
101
+ - locales/nl.yml
102
+ - locales/nn.yml
103
+ - locales/pl.yml
104
+ - locales/pt-BR.yml
105
+ - locales/pt.yml
106
+ - locales/ru.yml
107
+ - locales/sr.yml
108
+ - locales/sv-SE.yml
109
+ - locales/sv.yml
110
+ - locales/sw.yml
111
+ - locales/ta.yml
112
+ - locales/tr.yml
113
+ - locales/uk.yml
114
+ - locales/vi.yml
115
+ - locales/zh-CN.yml
116
+ - locales/zh-HK.yml
117
+ - locales/zh-TW.yml
118
+ - stylesheets/pagy.css
119
+ - stylesheets/pagy.scss
120
+ - stylesheets/pagy.tailwind.css
105
121
  homepage: https://github.com/ddnexus/pagy
106
122
  licenses:
107
123
  - MIT
@@ -112,7 +128,14 @@ metadata:
112
128
  bug_tracker_uri: https://github.com/ddnexus/pagy/issues
113
129
  changelog_uri: https://github.com/ddnexus/pagy/blob/master/CHANGELOG.md
114
130
  support: https://github.com/ddnexus/pagy/discussions/categories/q-a
115
- post_install_message:
131
+ post_install_message: |
132
+ *********************** PAGY WARNING! ***********************
133
+ The foundation, materialize, semantic and uikit CSS extras
134
+ have been discontinued and will be removed in v9
135
+ https://github.com/ddnexus/pagy/discussions/672
136
+ The javascript files have been deprecated/renamed
137
+ https://ddnexus.github.io/pagy/changelog/#deprecations
138
+ *************************************************************
116
139
  rdoc_options: []
117
140
  require_paths:
118
141
  - lib
@@ -127,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
150
  - !ruby/object:Gem::Version
128
151
  version: '0'
129
152
  requirements: []
130
- rubygems_version: 3.5.3
153
+ rubygems_version: 3.5.11
131
154
  signing_key:
132
155
  specification_version: 4
133
156
  summary: The best pagination ruby gem