uikit 3.21.17 → 3.21.18-dev.27bfd7d2b

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.
Files changed (125) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/css/uikit-core-rtl.css +243 -69
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +243 -69
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +247 -65
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +247 -65
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +13 -8
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +1 -1
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +334 -103
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +351 -108
  17. package/dist/js/components/lightbox.min.js +1 -1
  18. package/dist/js/components/notification.js +1 -1
  19. package/dist/js/components/notification.min.js +1 -1
  20. package/dist/js/components/parallax.js +1 -1
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +1 -1
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +3 -7
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +1 -1
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +3 -7
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +1 -1
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +7 -2
  33. package/dist/js/components/tooltip.min.js +1 -1
  34. package/dist/js/components/upload.js +1 -1
  35. package/dist/js/components/upload.min.js +1 -1
  36. package/dist/js/uikit-core.js +92 -93
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +20 -17
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +379 -262
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +3 -3
  43. package/src/images/icons/arrow-down-arrow-up.svg +6 -0
  44. package/src/images/icons/arrow-down.svg +3 -3
  45. package/src/images/icons/arrow-left.svg +3 -3
  46. package/src/images/icons/arrow-right.svg +3 -3
  47. package/src/images/icons/arrow-up-right.svg +3 -3
  48. package/src/images/icons/arrow-up.svg +3 -3
  49. package/src/images/icons/close-circle.svg +5 -0
  50. package/src/images/icons/cloud-download.svg +4 -4
  51. package/src/images/icons/cloud-upload.svg +4 -4
  52. package/src/images/icons/download.svg +4 -4
  53. package/src/images/icons/expand.svg +5 -5
  54. package/src/images/icons/link-external.svg +4 -4
  55. package/src/images/icons/pull.svg +4 -4
  56. package/src/images/icons/push.svg +3 -3
  57. package/src/images/icons/shrink.svg +5 -5
  58. package/src/images/icons/sign-in.svg +4 -3
  59. package/src/images/icons/sign-out.svg +4 -3
  60. package/src/images/icons/sorting.svg +6 -0
  61. package/src/images/icons/upload.svg +4 -4
  62. package/src/js/components/countdown.js +10 -5
  63. package/src/js/components/lightbox-panel.js +181 -45
  64. package/src/js/components/lightbox.js +59 -6
  65. package/src/js/core/img.js +3 -5
  66. package/src/js/core/navbar.js +3 -6
  67. package/src/js/mixin/modal.js +1 -4
  68. package/src/js/mixin/slider-drag.js +3 -6
  69. package/src/js/mixin/slider-nav.js +1 -1
  70. package/src/js/mixin/togglable.js +7 -2
  71. package/src/js/util/dom.js +3 -1
  72. package/src/less/components/breadcrumb.less +6 -2
  73. package/src/less/components/button.less +1 -1
  74. package/src/less/components/form-range.less +52 -0
  75. package/src/less/components/form.less +1 -1
  76. package/src/less/components/lightbox.less +57 -89
  77. package/src/less/components/margin.less +14 -0
  78. package/src/less/components/search.less +49 -23
  79. package/src/less/components/subnav.less +8 -0
  80. package/src/less/components/text.less +11 -0
  81. package/src/less/components/totop.less +1 -1
  82. package/src/less/components/utility.less +2 -1
  83. package/src/less/components/visibility.less +2 -1
  84. package/src/less/theme/form-range.less +20 -8
  85. package/src/less/theme/lightbox.less +2 -20
  86. package/src/less/theme/search.less +24 -10
  87. package/src/scss/components/breadcrumb.scss +6 -2
  88. package/src/scss/components/button.scss +1 -1
  89. package/src/scss/components/form-range.scss +12 -0
  90. package/src/scss/components/form.scss +1 -1
  91. package/src/scss/components/lightbox.scss +50 -77
  92. package/src/scss/components/margin.scss +13 -0
  93. package/src/scss/components/search.scss +30 -12
  94. package/src/scss/components/subnav.scss +7 -0
  95. package/src/scss/components/text.scss +10 -0
  96. package/src/scss/components/totop.scss +1 -1
  97. package/src/scss/components/utility.scss +1 -1
  98. package/src/scss/components/visibility.scss +2 -1
  99. package/src/scss/mixins-theme.scss +51 -12
  100. package/src/scss/mixins.scss +45 -6
  101. package/src/scss/theme/form-range.scss +14 -4
  102. package/src/scss/theme/lightbox.scss +2 -20
  103. package/src/scss/theme/search.scss +10 -6
  104. package/src/scss/variables-theme.scss +36 -21
  105. package/src/scss/variables.scss +32 -24
  106. package/tests/badge.html +2 -2
  107. package/tests/base.html +1 -1
  108. package/tests/breadcrumb.html +23 -5
  109. package/tests/card.html +24 -24
  110. package/tests/countdown.html +6 -0
  111. package/tests/dropbar.html +15 -15
  112. package/tests/dropdown.html +6 -6
  113. package/tests/dropnav.html +100 -100
  114. package/tests/icon.html +8 -0
  115. package/tests/index.html +15 -15
  116. package/tests/lightbox.html +379 -28
  117. package/tests/margin.html +19 -0
  118. package/tests/nav.html +21 -21
  119. package/tests/navbar.html +273 -273
  120. package/tests/offcanvas.html +27 -27
  121. package/tests/placeholder.html +2 -2
  122. package/tests/sortable.html +5 -5
  123. package/tests/sticky-navbar.html +114 -114
  124. package/tests/sticky.html +1 -1
  125. package/tests/text.html +8 -0
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "uikit",
3
3
  "title": "UIkit",
4
4
  "description": "UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces.",
5
- "version": "3.21.17",
5
+ "version": "3.21.18-dev.27bfd7d2b",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -22,7 +22,7 @@
22
22
  "devDependencies": {
23
23
  "@eslint/js": "^9.6.0",
24
24
  "@rollup/plugin-alias": "^5.1.0",
25
- "@rollup/plugin-replace": "^5.0.5",
25
+ "@rollup/plugin-replace": "^6.0.1",
26
26
  "archiver": "^7.0.1",
27
27
  "camelcase": "^8.0.0",
28
28
  "chokidar-cli": "^3.0.0",
@@ -35,7 +35,7 @@
35
35
  "fs-extra": "^11.2.0",
36
36
  "glob": "^11.0.0",
37
37
  "globals": "^15.7.0",
38
- "inquirer": "^11.0.1",
38
+ "inquirer": "^12.0.0",
39
39
  "less": "^4.2.0",
40
40
  "minimist": "^1.2.8",
41
41
  "number-precision": "^1.6.0",
@@ -0,0 +1,6 @@
1
+ <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
+ <line fill="none" stroke="#000" x1="7" y1="3.38" x2="7" y2="15.38" />
3
+ <polyline fill="none" stroke="#000" points="10.18 12.75 7 15.93 3.83 12.76" />
4
+ <line fill="none" stroke="#000" x1="13" y1="16.62" x2="13" y2="4.62" />
5
+ <polyline fill="none" stroke="#000" points="9.82 7.25 13 4.07 16.17 7.24" />
6
+ </svg>
@@ -1,4 +1,4 @@
1
1
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
- <polygon points="10.5,16.08 5.63,10.66 6.37,10 10.5,14.58 14.63,10 15.37,10.66" />
3
- <line fill="none" stroke="#000" x1="10.5" y1="4" x2="10.5" y2="15" />
4
- </svg>
2
+ <line fill="none" stroke="#000" x1="10" y1="3.48" x2="10" y2="15.48" />
3
+ <polyline fill="none" stroke="#000" points="6.16 12 10 15.84 13.84 12" />
4
+ </svg>
@@ -1,4 +1,4 @@
1
1
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
- <polyline fill="none" stroke="#000" points="10 14 5 9.5 10 5" />
3
- <line fill="none" stroke="#000" x1="16" y1="9.5" x2="5" y2="9.52" />
4
- </svg>
2
+ <line fill="none" stroke="#000" x1="16.53" y1="10" x2="4.53" y2="10" />
3
+ <polyline fill="none" stroke="#000" points="8 6.16 4.18 10 8 13.84" />
4
+ </svg>
@@ -1,4 +1,4 @@
1
1
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
- <polyline fill="none" stroke="#000" points="10 5 15 9.5 10 14" />
3
- <line fill="none" stroke="#000" x1="4" y1="9.5" x2="15" y2="9.5" />
4
- </svg>
2
+ <line fill="none" stroke="#000" x1="3.47" y1="10" x2="15.47" y2="10" />
3
+ <polyline fill="none" stroke="#000" points="11.98 13.84 15.82 10 11.98 6.16" />
4
+ </svg>
@@ -1,4 +1,4 @@
1
1
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
- <polyline fill="none" stroke="#000" points="16 10 16 4 10 4"/>
3
- <line fill="none" stroke="#000" x1="4" y1="16" x2="16" y2="4"/>
4
- </svg>
2
+ <line fill="none" stroke="#000" x1="4.5" y1="15.53" x2="16.5" y2="3.53" />
3
+ <polyline fill="none" stroke="#000" points="16.5 9 16.5 3.5 11 3.5" />
4
+ </svg>
@@ -1,4 +1,4 @@
1
1
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
- <polygon points="10.5,4 15.37,9.4 14.63,10.08 10.5,5.49 6.37,10.08 5.63,9.4" />
3
- <line fill="none" stroke="#000" x1="10.5" y1="16" x2="10.5" y2="5" />
4
- </svg>
2
+ <line fill="none" stroke="#000" x1="10" y1="16.53" x2="10" y2="4.53" />
3
+ <polyline fill="none" stroke="#000" points="13.84 8 10 4.17 6.16 8" />
4
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
+ <circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9" />
3
+ <line fill="none" stroke="#000" x1="13.18" y1="6.82" x2="6.82" y2="13.18" />
4
+ <line fill="none" stroke="#000" x1="6.82" y1="6.82" x2="13.18" y2="13.18" />
5
+ </svg>
@@ -1,5 +1,5 @@
1
1
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
- <path fill="none" stroke="#000" stroke-width="1.1" d="M6.5,14.61 L3.75,14.61 C1.96,14.61 0.5,13.17 0.5,11.39 C0.5,9.76 1.72,8.41 3.3,8.2 C3.38,5.31 5.75,3 8.68,3 C11.19,3 13.31,4.71 13.89,7.02 C14.39,6.8 14.93,6.68 15.5,6.68 C17.71,6.68 19.5,8.45 19.5,10.64 C19.5,12.83 17.71,14.6 15.5,14.6 L12.5,14.6" />
3
- <polyline fill="none" stroke="#000" points="11.75 16 9.5 18.25 7.25 16" />
4
- <path fill="none" stroke="#000" d="M9.5,18 L9.5,9.5" />
5
- </svg>
2
+ <path fill="none" stroke="#000" stroke-width="1.1" d="M6.5,13.28h-2.75c-1.79,0-3.25-1.44-3.25-3.22,0-1.63,1.22-2.98,2.8-3.19.08-2.89,2.45-5.2,5.38-5.2,2.51,0,4.63,1.71,5.21,4.02.5-.22,1.04-.34,1.61-.34,2.21,0,4,1.77,4,3.96s-1.79,3.96-4,3.96h-3" />
3
+ <path fill="none" stroke="#000" d="M9.5,18.17v-10" />
4
+ <polyline fill="none" stroke="#000" points="12.67 15.66 9.5 18.83 6.33 15.66" />
5
+ </svg>
@@ -1,5 +1,5 @@
1
1
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
- <path fill="none" stroke="#000" stroke-width="1.1" d="M6.5,14.61 L3.75,14.61 C1.96,14.61 0.5,13.17 0.5,11.39 C0.5,9.76 1.72,8.41 3.31,8.2 C3.38,5.31 5.75,3 8.68,3 C11.19,3 13.31,4.71 13.89,7.02 C14.39,6.8 14.93,6.68 15.5,6.68 C17.71,6.68 19.5,8.45 19.5,10.64 C19.5,12.83 17.71,14.6 15.5,14.6 L12.5,14.6" />
3
- <polyline fill="none" stroke="#000" points="7.25 11.75 9.5 9.5 11.75 11.75" />
4
- <path fill="none" stroke="#000" d="M9.5,18 L9.5,9.5" />
5
- </svg>
2
+ <path fill="none" stroke="#000" stroke-width="1.1" d="M6.5,13.77h-2.75c-1.79,0-3.25-1.44-3.25-3.22,0-1.63,1.22-2.98,2.81-3.19.07-2.89,2.44-5.2,5.37-5.2,2.51,0,4.63,1.71,5.21,4.02.5-.22,1.04-.34,1.61-.34,2.21,0,4,1.77,4,3.96s-1.79,3.96-4,3.96h-3" />
3
+ <path fill="none" stroke="#000" d="M9.51,9.34v9" />
4
+ <polyline fill="none" stroke="#000" points="6.34 11.85 9.51 8.68 12.68 11.85" />
5
+ </svg>
@@ -1,5 +1,5 @@
1
1
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
- <polyline fill="none" stroke="#000" points="14,10 9.5,14.5 5,10" />
3
- <rect x="3" y="17" width="13" height="1" />
4
- <line fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3" />
5
- </svg>
2
+ <line fill="none" stroke="#000" x1="10" y1="2.09" x2="10" y2="14.09" />
3
+ <polyline fill="none" stroke="#000" points="6.16 10.62 10 14.46 13.84 10.62" />
4
+ <line stroke="#000" x1="3.5" y1="17.5" x2="16.5" y2="17.5" />
5
+ </svg>
@@ -1,6 +1,6 @@
1
1
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
- <polygon points="13 2 18 2 18 7 17 7 17 3 13 3" />
3
- <polygon points="2 13 3 13 3 17 7 17 7 18 2 18" />
4
- <path fill="none" stroke="#000" stroke-width="1.1" d="M11,9 L17,3" />
5
- <path fill="none" stroke="#000" stroke-width="1.1" d="M3,17 L9,11" />
6
- </svg>
2
+ <path fill="none" stroke="#000" stroke-width="1.1" d="M2.48,17.52l6.52-6.52" />
3
+ <polyline fill="none" stroke="#000" points="6.97 17.52 2.48 17.52 2.48 13.03" />
4
+ <path fill="none" stroke="#000" stroke-width="1.1" d="M17.52,2.48l-6.52,6.52" />
5
+ <polyline fill="none" stroke="#000" points="13.03 2.48 17.52 2.48 17.52 6.97" />
6
+ </svg>
@@ -1,5 +1,5 @@
1
1
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
- <polyline fill="none" stroke="#000" points="14.5 10.5 14.5 16.5 3.5 16.5 3.5 5.5 8.5 5.5"/>
3
- <polyline fill="none" stroke="#000" points="17.5 8.5 17.5 2.5 11.5 2.5"/>
4
- <line fill="none" stroke="#000" x1="6.5" y1="13.5" x2="17.5" y2="2.5"/>
5
- </svg>
2
+ <polyline fill="none" stroke="#000" points="15 10.5 15 17 3 17 3 5 9.5 5" />
3
+ <line fill="none" stroke="#000" x1="8.22" y1="11.79" x2="17.01" y2="2.99" />
4
+ <polyline fill="none" stroke="#000" points="12.5 3 17 3 17 7.5" />
5
+ </svg>
@@ -1,5 +1,5 @@
1
1
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
- <polygon points="6.85,8 9.5,10.6 12.15,8 12.85,8.7 9.5,12 6.15,8.7" />
3
- <line fill="none" stroke="#000" x1="9.5" y1="11" x2="9.5" y2="2" />
4
- <polyline fill="none" stroke="#000" points="6,5.5 3.5,5.5 3.5,18.5 15.5,18.5 15.5,5.5 13,5.5" />
5
- </svg>
2
+ <line fill="none" stroke="#000" x1="10" y1="11" x2="10" y2="2" />
3
+ <polyline fill="none" stroke="#000" points="6.5 5.5 4 5.5 4 18.5 16 18.5 16 5.5 13.5 5.5" />
4
+ <polyline fill="none" stroke="#000" points="13.18 8.2 10 11.38 6.83 8.21" />
5
+ </svg>
@@ -1,5 +1,5 @@
1
1
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
- <polygon points="12.15,4 9.5,1.4 6.85,4 6.15,3.3 9.5,0 12.85,3.3" />
3
- <line fill="none" stroke="#000" x1="9.5" y1="10" x2="9.5" y2="1" />
4
- <polyline fill="none" stroke="#000" points="6 5.5 3.5 5.5 3.5 18.5 15.5 18.5 15.5 5.5 13 5.5" />
2
+ <line fill="none" stroke="#000" x1="10" y1="11" x2="10" y2="1" />
3
+ <polyline fill="none" stroke="#000" points="6.5 6.5 4 6.5 4 19.5 16 19.5 16 6.5 13.5 6.5" />
4
+ <polyline fill="none" stroke="#000" points="6.82 3.88 10 .71 13.17 3.88" />
5
5
  </svg>
@@ -1,6 +1,6 @@
1
1
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
- <polygon points="11 4 12 4 12 8 16 8 16 9 11 9" />
3
- <polygon points="4 11 9 11 9 16 8 16 8 12 4 12" />
4
- <path fill="none" stroke="#000" stroke-width="1.1" d="M12,8 L18,2" />
5
- <path fill="none" stroke="#000" stroke-width="1.1" d="M2,18 L8,12" />
6
- </svg>
2
+ <path fill="none" stroke="#000" stroke-width="1.1" d="M2,18l6-6" />
3
+ <polyline fill="none" stroke="#000" points="4 11.5 8.49 11.5 8.49 15.99" />
4
+ <path fill="none" stroke="#000" stroke-width="1.1" d="M18,2l-6,6" />
5
+ <polyline fill="none" stroke="#000" points="15.99 8.49 11.5 8.49 11.5 4" />
6
+ </svg>
@@ -1,4 +1,5 @@
1
1
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
- <polygon points="7 2 17 2 17 17 7 17 7 16 16 16 16 3 7 3" />
3
- <polygon points="9.1 13.4 8.5 12.8 11.28 10 4 10 4 9 11.28 9 8.5 6.2 9.1 5.62 13 9.5" />
4
- </svg>
2
+ <polygon points="7 2 17 2 17 17 7 17 7 16 16 16 16 3 7 3 7 2" />
3
+ <line stroke="#000" x1="3" y1="9.5" x2="12" y2="9.5" />
4
+ <polyline fill="none" stroke="#000" points="9.2 6.33 12.37 9.5 9.2 12.67" />
5
+ </svg>
@@ -1,4 +1,5 @@
1
1
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
- <polygon points="13.1 13.4 12.5 12.8 15.28 10 8 10 8 9 15.28 9 12.5 6.2 13.1 5.62 17 9.5" />
3
- <polygon points="13 2 3 2 3 17 13 17 13 16 4 16 4 3 13 3" />
4
- </svg>
2
+ <polygon points="13 2 3 2 3 17 13 17 13 16 4 16 4 3 13 3 13 2" />
3
+ <line stroke="#000" x1="7.96" y1="9.49" x2="16.96" y2="9.49" />
4
+ <polyline fill="none" stroke="#000" points="14.17 6.31 17.35 9.48 14.17 12.66" />
5
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
+ <line fill="none" stroke="#000" x1="7" y1="3.38" x2="7" y2="15.38" />
3
+ <polyline fill="none" stroke="#000" points="10.18 12.75 7 15.93 3.83 12.76" />
4
+ <line fill="none" stroke="#000" x1="13" y1="16.62" x2="13" y2="4.62" />
5
+ <polyline fill="none" stroke="#000" points="9.82 7.25 13 4.07 16.17 7.24" />
6
+ </svg>
@@ -1,5 +1,5 @@
1
1
  <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
2
- <polyline fill="none" stroke="#000" points="5 8 9.5 3.5 14 8 " />
3
- <rect x="3" y="17" width="13" height="1" />
4
- <line fill="none" stroke="#000" x1="9.5" y1="15" x2="9.5" y2="4" />
5
- </svg>
2
+ <line fill="none" stroke="#000" x1="10" y1="15.17" x2="10" y2="3.17" />
3
+ <polyline fill="none" stroke="#000" points="13.84 6.63 10 2.8 6.16 6.64" />
4
+ <line fill="#fff" stroke="#000" x1="3.5" y1="17.5" x2="16.5" y2="17.5" />
5
+ </svg>
@@ -10,18 +10,20 @@ export default {
10
10
  date: String,
11
11
  clsWrapper: String,
12
12
  role: String,
13
+ reload: Boolean,
13
14
  },
14
15
 
15
16
  data: {
16
17
  date: '',
17
18
  clsWrapper: '.uk-countdown-%unit%',
18
19
  role: 'timer',
20
+ reload: false,
19
21
  },
20
22
 
21
23
  connected() {
22
24
  attr(this.$el, 'role', this.role);
23
25
  this.date = toFloat(Date.parse(this.$props.date));
24
- this.end = false;
26
+ this.started = this.end = false;
25
27
  this.start();
26
28
  },
27
29
 
@@ -47,10 +49,6 @@ export default {
47
49
  start() {
48
50
  this.stop();
49
51
  this.update();
50
- if (!this.timer) {
51
- trigger(this.$el, 'countdownstart');
52
- this.timer = setInterval(this.update, 1000);
53
- }
54
52
  },
55
53
 
56
54
  stop() {
@@ -69,7 +67,14 @@ export default {
69
67
  if (!this.end) {
70
68
  trigger(this.$el, 'countdownend');
71
69
  this.end = true;
70
+ if (this.reload && this.started) {
71
+ window.location.reload();
72
+ }
72
73
  }
74
+ } else if (!this.timer) {
75
+ this.started = true;
76
+ trigger(this.$el, 'countdownstart');
77
+ this.timer = setInterval(this.update, 1000);
73
78
  }
74
79
 
75
80
  for (const unit of units) {