@alfalab/core-components-page-indicator 3.0.3 → 3.0.4-alfasans

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 (195) hide show
  1. package/components/bullet/Component.js +4 -4
  2. package/components/bullet/Component.js.map +1 -1
  3. package/components/bullet/default.css +2 -2
  4. package/components/bullet/default.module.css.js +1 -1
  5. package/components/bullet/index.css +7 -9
  6. package/components/bullet/index.module.css.js +1 -1
  7. package/components/bullet/index.module.css.js.map +1 -1
  8. package/components/bullet/inverted.css +2 -2
  9. package/components/bullet/inverted.module.css.js +1 -1
  10. package/components/bullet/static-inverted.css +2 -2
  11. package/components/bullet/static-inverted.module.css.js +1 -1
  12. package/components/bullet/static.css +2 -2
  13. package/components/bullet/static.module.css.js +1 -1
  14. package/components/dynamic/Component.js +3 -3
  15. package/components/dynamic/Component.js.map +1 -1
  16. package/components/dynamic/default.css +3 -3
  17. package/components/dynamic/default.module.css.js +1 -1
  18. package/components/dynamic/index.css +6 -8
  19. package/components/dynamic/index.module.css.js +1 -1
  20. package/components/dynamic/index.module.css.js.map +1 -1
  21. package/components/dynamic/inverted.css +3 -3
  22. package/components/dynamic/inverted.module.css.js +1 -1
  23. package/components/dynamic/static-inverted.css +3 -3
  24. package/components/dynamic/static-inverted.module.css.js +1 -1
  25. package/components/dynamic/static.css +3 -3
  26. package/components/dynamic/static.module.css.js +1 -1
  27. package/components/runner/Component.js +2 -2
  28. package/components/runner/Component.js.map +1 -1
  29. package/components/runner/default.css +2 -2
  30. package/components/runner/default.module.css.js +1 -1
  31. package/components/runner/index.css +4 -1
  32. package/components/runner/index.module.css.js +1 -1
  33. package/components/runner/index.module.css.js.map +1 -1
  34. package/components/runner/inverted.css +2 -2
  35. package/components/runner/inverted.module.css.js +1 -1
  36. package/components/runner/static-inverted.css +2 -2
  37. package/components/runner/static-inverted.module.css.js +1 -1
  38. package/components/runner/static.css +2 -2
  39. package/components/runner/static.module.css.js +1 -1
  40. package/components/step/Component.js +3 -3
  41. package/components/step/Component.js.map +1 -1
  42. package/components/step/default.css +2 -2
  43. package/components/step/default.module.css.js +1 -1
  44. package/components/step/index.css +3 -4
  45. package/components/step/index.module.css.js +1 -1
  46. package/components/step/index.module.css.js.map +1 -1
  47. package/components/step/inverted.css +2 -2
  48. package/components/step/inverted.module.css.js +1 -1
  49. package/components/step/static-inverted.css +2 -2
  50. package/components/step/static-inverted.module.css.js +1 -1
  51. package/components/step/static.css +2 -2
  52. package/components/step/static.module.css.js +1 -1
  53. package/cssm/components/bullet/Component.js +4 -4
  54. package/cssm/components/bullet/Component.js.map +1 -1
  55. package/cssm/components/bullet/index.module.css +0 -2
  56. package/cssm/components/dynamic/Component.js +3 -3
  57. package/cssm/components/dynamic/Component.js.map +1 -1
  58. package/cssm/components/dynamic/index.module.css +0 -2
  59. package/cssm/components/runner/Component.js +2 -2
  60. package/cssm/components/runner/Component.js.map +1 -1
  61. package/cssm/components/runner/index.module.css +3 -0
  62. package/cssm/components/step/Component.js +3 -3
  63. package/cssm/components/step/Component.js.map +1 -1
  64. package/cssm/components/step/index.module.css +1 -2
  65. package/cssm/types.d.ts +15 -35
  66. package/esm/components/bullet/Component.js +4 -4
  67. package/esm/components/bullet/Component.js.map +1 -1
  68. package/esm/components/bullet/default.css +2 -2
  69. package/esm/components/bullet/default.module.css.js +1 -1
  70. package/esm/components/bullet/index.css +7 -9
  71. package/esm/components/bullet/index.module.css.js +1 -1
  72. package/esm/components/bullet/index.module.css.js.map +1 -1
  73. package/esm/components/bullet/inverted.css +2 -2
  74. package/esm/components/bullet/inverted.module.css.js +1 -1
  75. package/esm/components/bullet/static-inverted.css +2 -2
  76. package/esm/components/bullet/static-inverted.module.css.js +1 -1
  77. package/esm/components/bullet/static.css +2 -2
  78. package/esm/components/bullet/static.module.css.js +1 -1
  79. package/esm/components/dynamic/Component.js +3 -3
  80. package/esm/components/dynamic/Component.js.map +1 -1
  81. package/esm/components/dynamic/default.css +3 -3
  82. package/esm/components/dynamic/default.module.css.js +1 -1
  83. package/esm/components/dynamic/index.css +6 -8
  84. package/esm/components/dynamic/index.module.css.js +1 -1
  85. package/esm/components/dynamic/index.module.css.js.map +1 -1
  86. package/esm/components/dynamic/inverted.css +3 -3
  87. package/esm/components/dynamic/inverted.module.css.js +1 -1
  88. package/esm/components/dynamic/static-inverted.css +3 -3
  89. package/esm/components/dynamic/static-inverted.module.css.js +1 -1
  90. package/esm/components/dynamic/static.css +3 -3
  91. package/esm/components/dynamic/static.module.css.js +1 -1
  92. package/esm/components/runner/Component.js +2 -2
  93. package/esm/components/runner/Component.js.map +1 -1
  94. package/esm/components/runner/default.css +2 -2
  95. package/esm/components/runner/default.module.css.js +1 -1
  96. package/esm/components/runner/index.css +4 -1
  97. package/esm/components/runner/index.module.css.js +1 -1
  98. package/esm/components/runner/index.module.css.js.map +1 -1
  99. package/esm/components/runner/inverted.css +2 -2
  100. package/esm/components/runner/inverted.module.css.js +1 -1
  101. package/esm/components/runner/static-inverted.css +2 -2
  102. package/esm/components/runner/static-inverted.module.css.js +1 -1
  103. package/esm/components/runner/static.css +2 -2
  104. package/esm/components/runner/static.module.css.js +1 -1
  105. package/esm/components/step/Component.js +3 -3
  106. package/esm/components/step/Component.js.map +1 -1
  107. package/esm/components/step/default.css +2 -2
  108. package/esm/components/step/default.module.css.js +1 -1
  109. package/esm/components/step/index.css +3 -4
  110. package/esm/components/step/index.module.css.js +1 -1
  111. package/esm/components/step/index.module.css.js.map +1 -1
  112. package/esm/components/step/inverted.css +2 -2
  113. package/esm/components/step/inverted.module.css.js +1 -1
  114. package/esm/components/step/static-inverted.css +2 -2
  115. package/esm/components/step/static-inverted.module.css.js +1 -1
  116. package/esm/components/step/static.css +2 -2
  117. package/esm/components/step/static.module.css.js +1 -1
  118. package/esm/types.d.ts +15 -35
  119. package/modern/components/bullet/Component.js +4 -4
  120. package/modern/components/bullet/Component.js.map +1 -1
  121. package/modern/components/bullet/default.css +2 -2
  122. package/modern/components/bullet/default.module.css.js +1 -1
  123. package/modern/components/bullet/index.css +7 -9
  124. package/modern/components/bullet/index.module.css.js +1 -1
  125. package/modern/components/bullet/index.module.css.js.map +1 -1
  126. package/modern/components/bullet/inverted.css +2 -2
  127. package/modern/components/bullet/inverted.module.css.js +1 -1
  128. package/modern/components/bullet/static-inverted.css +2 -2
  129. package/modern/components/bullet/static-inverted.module.css.js +1 -1
  130. package/modern/components/bullet/static.css +2 -2
  131. package/modern/components/bullet/static.module.css.js +1 -1
  132. package/modern/components/dynamic/Component.js +3 -3
  133. package/modern/components/dynamic/Component.js.map +1 -1
  134. package/modern/components/dynamic/default.css +3 -3
  135. package/modern/components/dynamic/default.module.css.js +1 -1
  136. package/modern/components/dynamic/index.css +6 -8
  137. package/modern/components/dynamic/index.module.css.js +1 -1
  138. package/modern/components/dynamic/index.module.css.js.map +1 -1
  139. package/modern/components/dynamic/inverted.css +3 -3
  140. package/modern/components/dynamic/inverted.module.css.js +1 -1
  141. package/modern/components/dynamic/static-inverted.css +3 -3
  142. package/modern/components/dynamic/static-inverted.module.css.js +1 -1
  143. package/modern/components/dynamic/static.css +3 -3
  144. package/modern/components/dynamic/static.module.css.js +1 -1
  145. package/modern/components/runner/Component.js +1 -1
  146. package/modern/components/runner/Component.js.map +1 -1
  147. package/modern/components/runner/default.css +2 -2
  148. package/modern/components/runner/default.module.css.js +1 -1
  149. package/modern/components/runner/index.css +4 -1
  150. package/modern/components/runner/index.module.css.js +1 -1
  151. package/modern/components/runner/index.module.css.js.map +1 -1
  152. package/modern/components/runner/inverted.css +2 -2
  153. package/modern/components/runner/inverted.module.css.js +1 -1
  154. package/modern/components/runner/static-inverted.css +2 -2
  155. package/modern/components/runner/static-inverted.module.css.js +1 -1
  156. package/modern/components/runner/static.css +2 -2
  157. package/modern/components/runner/static.module.css.js +1 -1
  158. package/modern/components/step/Component.js +1 -1
  159. package/modern/components/step/Component.js.map +1 -1
  160. package/modern/components/step/default.css +2 -2
  161. package/modern/components/step/default.module.css.js +1 -1
  162. package/modern/components/step/index.css +3 -4
  163. package/modern/components/step/index.module.css.js +1 -1
  164. package/modern/components/step/index.module.css.js.map +1 -1
  165. package/modern/components/step/inverted.css +2 -2
  166. package/modern/components/step/inverted.module.css.js +1 -1
  167. package/modern/components/step/static-inverted.css +2 -2
  168. package/modern/components/step/static-inverted.module.css.js +1 -1
  169. package/modern/components/step/static.css +2 -2
  170. package/modern/components/step/static.module.css.js +1 -1
  171. package/modern/types.d.ts +15 -35
  172. package/moderncssm/components/bullet/Component.js +4 -4
  173. package/moderncssm/components/bullet/Component.js.map +1 -1
  174. package/moderncssm/components/bullet/index.module.css +0 -2
  175. package/moderncssm/components/dynamic/Component.js +3 -3
  176. package/moderncssm/components/dynamic/Component.js.map +1 -1
  177. package/moderncssm/components/dynamic/index.module.css +0 -2
  178. package/moderncssm/components/runner/Component.js +1 -1
  179. package/moderncssm/components/runner/Component.js.map +1 -1
  180. package/moderncssm/components/runner/index.module.css +4 -0
  181. package/moderncssm/components/step/Component.js +1 -1
  182. package/moderncssm/components/step/Component.js.map +1 -1
  183. package/moderncssm/components/step/index.module.css +1 -2
  184. package/moderncssm/types.d.ts +15 -35
  185. package/package.json +7 -4
  186. package/src/components/bullet/Component.tsx +9 -5
  187. package/src/components/bullet/index.module.css +0 -2
  188. package/src/components/dynamic/Component.tsx +5 -4
  189. package/src/components/dynamic/index.module.css +0 -2
  190. package/src/components/runner/Component.tsx +2 -1
  191. package/src/components/runner/index.module.css +4 -0
  192. package/src/components/step/Component.tsx +4 -3
  193. package/src/components/step/index.module.css +1 -2
  194. package/src/types.ts +15 -35
  195. package/types.d.ts +15 -35
@@ -5,29 +5,27 @@
5
5
  --page-indicator-animation-duration: 0.2s;
6
6
  --page-indicator-animation-timing-function: ease-in-out;
7
7
  }
8
- .page-indicator__pageIndicator_1b9v5.page-indicator__bullet_1b9v5 {
8
+ .page-indicator__pageIndicator_wp2vf.page-indicator__bullet_wp2vf {
9
9
  overflow: hidden;
10
10
  }
11
- .page-indicator__elementsList_1b9v5 {
12
- margin: 0;
13
- padding: 0;
11
+ .page-indicator__elementsList_wp2vf {
14
12
  display: flex;
15
13
  align-items: center;
16
14
  will-change: transform;
17
15
  transition: transform var(--page-indicator-animation-duration)
18
16
  var(--page-indicator-animation-timing-function);
19
17
  }
20
- .page-indicator__element_1b9v5 {
18
+ .page-indicator__element_wp2vf {
21
19
  list-style-type: none;
22
20
  flex-shrink: 0;
23
21
  transition: background var(--page-indicator-animation-duration)
24
22
  var(--page-indicator-animation-timing-function);
25
23
  border-radius: var(--border-radius-circle);
26
24
  }
27
- .page-indicator__element_1b9v5.page-indicator__entering_1b9v5 {
25
+ .page-indicator__element_wp2vf.page-indicator__entering_wp2vf {
28
26
  opacity: 0;
29
27
  }
30
- .page-indicator__element_1b9v5.page-indicator__entered_1b9v5 {
28
+ .page-indicator__element_wp2vf.page-indicator__entered_wp2vf {
31
29
  opacity: 1;
32
30
  transition:
33
31
  background var(--page-indicator-animation-duration)
@@ -35,9 +33,9 @@
35
33
  opacity var(--page-indicator-animation-duration)
36
34
  var(--page-indicator-animation-timing-function);
37
35
  }
38
- .page-indicator__element_1b9v5.page-indicator__exiting_1b9v5 {
36
+ .page-indicator__element_wp2vf.page-indicator__exiting_wp2vf {
39
37
  opacity: 0;
40
38
  }
41
- .page-indicator__element_1b9v5.page-indicator__exited_1b9v5 {
39
+ .page-indicator__element_wp2vf.page-indicator__exited_wp2vf {
42
40
  opacity: 0;
43
41
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"pageIndicator":"page-indicator__pageIndicator_1b9v5","bullet":"page-indicator__bullet_1b9v5","elementsList":"page-indicator__elementsList_1b9v5","element":"page-indicator__element_1b9v5","entering":"page-indicator__entering_1b9v5","entered":"page-indicator__entered_1b9v5","exiting":"page-indicator__exiting_1b9v5","exited":"page-indicator__exited_1b9v5"};
3
+ var styles = {"pageIndicator":"page-indicator__pageIndicator_wp2vf","bullet":"page-indicator__bullet_wp2vf","elementsList":"page-indicator__elementsList_wp2vf","element":"page-indicator__element_wp2vf","entering":"page-indicator__entering_wp2vf","entered":"page-indicator__entered_wp2vf","exiting":"page-indicator__exiting_wp2vf","exited":"page-indicator__exited_wp2vf"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.css.js","sources":["../../src/components/bullet/index.module.css"],"sourcesContent":["@import '../../vars.css';\n\n.pageIndicator {\n &.bullet {\n overflow: hidden;\n }\n}\n\n.elementsList {\n margin: 0;\n padding: 0;\n display: flex;\n align-items: center;\n will-change: transform;\n transition: transform var(--page-indicator-animation-duration)\n var(--page-indicator-animation-timing-function);\n}\n\n.element {\n list-style-type: none;\n flex-shrink: 0;\n transition: background var(--page-indicator-animation-duration)\n var(--page-indicator-animation-timing-function);\n border-radius: var(--border-radius-circle);\n\n &.entering {\n opacity: 0;\n }\n &.entered {\n opacity: 1;\n transition:\n background var(--page-indicator-animation-duration)\n var(--page-indicator-animation-timing-function),\n opacity var(--page-indicator-animation-duration)\n var(--page-indicator-animation-timing-function);\n }\n &.exiting {\n opacity: 0;\n }\n &.exited {\n opacity: 0;\n }\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,eAAe,CAAC,qCAAqC,CAAC,QAAQ,CAAC,8BAA8B,CAAC,cAAc,CAAC,oCAAoC,CAAC,SAAS,CAAC,+BAA+B,CAAC,UAAU,CAAC,gCAAgC,CAAC,SAAS,CAAC,+BAA+B,CAAC,SAAS,CAAC,+BAA+B,CAAC,QAAQ,CAAC,8BAA8B,CAAC;;;;"}
1
+ {"version":3,"file":"index.module.css.js","sources":["../../src/components/bullet/index.module.css"],"sourcesContent":["@import '../../vars.css';\n\n.pageIndicator {\n &.bullet {\n overflow: hidden;\n }\n}\n\n.elementsList {\n display: flex;\n align-items: center;\n will-change: transform;\n transition: transform var(--page-indicator-animation-duration)\n var(--page-indicator-animation-timing-function);\n}\n\n.element {\n list-style-type: none;\n flex-shrink: 0;\n transition: background var(--page-indicator-animation-duration)\n var(--page-indicator-animation-timing-function);\n border-radius: var(--border-radius-circle);\n\n &.entering {\n opacity: 0;\n }\n &.entered {\n opacity: 1;\n transition:\n background var(--page-indicator-animation-duration)\n var(--page-indicator-animation-timing-function),\n opacity var(--page-indicator-animation-duration)\n var(--page-indicator-animation-timing-function);\n }\n &.exiting {\n opacity: 0;\n }\n &.exited {\n opacity: 0;\n }\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,eAAe,CAAC,qCAAqC,CAAC,QAAQ,CAAC,8BAA8B,CAAC,cAAc,CAAC,oCAAoC,CAAC,SAAS,CAAC,+BAA+B,CAAC,UAAU,CAAC,gCAAgC,CAAC,SAAS,CAAC,+BAA+B,CAAC,SAAS,CAAC,+BAA+B,CAAC,QAAQ,CAAC,8BAA8B,CAAC;;;;"}
@@ -6,9 +6,9 @@
6
6
  --page-indicator-color-inverted: var(--color-light-neutral-translucent-300-inverted);
7
7
  --page-indicator-active-color-inverted: var(--color-light-neutral-translucent-1300-inverted);
8
8
  }
9
- .page-indicator__element_psio5 {
9
+ .page-indicator__element_jrt7t {
10
10
  background: var(--page-indicator-color-inverted);
11
11
  }
12
- .page-indicator__element_psio5.page-indicator__active_psio5 {
12
+ .page-indicator__element_jrt7t.page-indicator__active_jrt7t {
13
13
  background: var(--page-indicator-active-color-inverted);
14
14
  }
@@ -1,6 +1,6 @@
1
1
  import './inverted.css';
2
2
 
3
- var invertedColors = {"element":"page-indicator__element_psio5","active":"page-indicator__active_psio5"};
3
+ var invertedColors = {"element":"page-indicator__element_jrt7t","active":"page-indicator__active_jrt7t"};
4
4
 
5
5
  export { invertedColors as default };
6
6
  //# sourceMappingURL=inverted.module.css.js.map
@@ -6,9 +6,9 @@
6
6
  --page-indicator-color-static-inverted: var(--color-static-neutral-translucent-300-inverted);
7
7
  --page-indicator-active-color-static-inverted: var(--color-static-neutral-1300-inverted);
8
8
  }
9
- .page-indicator__element_hggv9 {
9
+ .page-indicator__element_l4x8q {
10
10
  background: var(--page-indicator-color-static-inverted);
11
11
  }
12
- .page-indicator__element_hggv9.page-indicator__active_hggv9 {
12
+ .page-indicator__element_l4x8q.page-indicator__active_l4x8q {
13
13
  background: var(--page-indicator-active-color-static-inverted);
14
14
  }
@@ -1,6 +1,6 @@
1
1
  import './static-inverted.css';
2
2
 
3
- var staticInvertedColors = {"element":"page-indicator__element_hggv9","active":"page-indicator__active_hggv9"};
3
+ var staticInvertedColors = {"element":"page-indicator__element_l4x8q","active":"page-indicator__active_l4x8q"};
4
4
 
5
5
  export { staticInvertedColors as default };
6
6
  //# sourceMappingURL=static-inverted.module.css.js.map
@@ -6,9 +6,9 @@
6
6
  --page-indicator-color-static: var(--color-static-neutral-translucent-300);
7
7
  --page-indicator-active-color-static: var(--color-static-neutral-1300);
8
8
  }
9
- .page-indicator__element_2j1m7 {
9
+ .page-indicator__element_1fl6e {
10
10
  background: var(--page-indicator-color-static);
11
11
  }
12
- .page-indicator__element_2j1m7.page-indicator__active_2j1m7 {
12
+ .page-indicator__element_1fl6e.page-indicator__active_1fl6e {
13
13
  background: var(--page-indicator-active-color-static);
14
14
  }
@@ -1,6 +1,6 @@
1
1
  import './static.css';
2
2
 
3
- var staticColors = {"element":"page-indicator__element_2j1m7","active":"page-indicator__active_2j1m7"};
3
+ var staticColors = {"element":"page-indicator__element_1fl6e","active":"page-indicator__active_1fl6e"};
4
4
 
5
5
  export { staticColors as default };
6
6
  //# sourceMappingURL=static.module.css.js.map
@@ -15,7 +15,7 @@ var colorsStyle = {
15
15
  };
16
16
  var FULL_PROGRESS = 100;
17
17
  var PageIndicatorDynamic = function (props) {
18
- var _a = props.size, height = _a === void 0 ? 8 : _a, _b = props.gap, gap = _b === void 0 ? 8 : _b, _c = props.activeElementWidth, activeElementWidth = _c === void 0 ? height * 7 : _c, _d = props.elements, count = _d === void 0 ? 10 : _d, indexFromProps = props.activeElement, onActiveElementChange = props.onActiveElementChange, _e = props.defaultActiveElement, defaultIndex = _e === void 0 ? 0 : _e, _f = props.active, active = _f === void 0 ? true : _f, _g = props.duration, durationFromProps = _g === void 0 ? 3000 : _g, _h = props.cycle, cycle = _h === void 0 ? false : _h, _j = props.colors, colors = _j === void 0 ? 'default' : _j;
18
+ var _a = props.size, height = _a === void 0 ? 8 : _a, _b = props.gap, gap = _b === void 0 ? 8 : _b, _c = props.activeElementWidth, activeElementWidth = _c === void 0 ? height * 7 : _c, _d = props.elements, count = _d === void 0 ? 10 : _d, indexFromProps = props.activeElement, onActiveElementChange = props.onActiveElementChange, _e = props.defaultActiveElement, defaultIndex = _e === void 0 ? 0 : _e, _f = props.active, active = _f === void 0 ? true : _f, _g = props.duration, durationFromProps = _g === void 0 ? 3000 : _g, _h = props.cycle, cycle = _h === void 0 ? false : _h, _j = props.colors, colors = _j === void 0 ? 'default' : _j, className = props.className;
19
19
  var _k = useState(indexFromProps !== null && indexFromProps !== void 0 ? indexFromProps : defaultIndex), activeIndex = _k[0], setActiveIndex = _k[1];
20
20
  var _l = useState(0), progress = _l[0], setProgress = _l[1];
21
21
  var inProgress = progress < FULL_PROGRESS;
@@ -53,7 +53,7 @@ var PageIndicatorDynamic = function (props) {
53
53
  setActiveIndex(nextActiveIndex);
54
54
  setProgress(0);
55
55
  }, [activeIndex, activeIndexInProps, count, cycle, inProgress, onActiveElementChange]);
56
- return (React.createElement("ol", { className: styles.pageIndicator, style: { height: height, gap: gap } }, Array.from({ length: count }, function (_, index) {
56
+ return (React.createElement("div", { className: cn(styles.pageIndicator, className), style: { height: height, gap: gap } }, Array.from({ length: count }, function (_, index) {
57
57
  var _a;
58
58
  var isActive = index === activeIndex;
59
59
  var style = {
@@ -63,7 +63,7 @@ var PageIndicatorDynamic = function (props) {
63
63
  var progressStyle = isActive
64
64
  ? { transform: "translateX(".concat(progress - FULL_PROGRESS, "%)") }
65
65
  : undefined;
66
- return (React.createElement("li", { key: index, style: style, className: cn(styles.element, colorsStyle[colors].element, (_a = {},
66
+ return (React.createElement("div", { key: index, style: style, className: cn(styles.element, colorsStyle[colors].element, (_a = {},
67
67
  _a[styles.active] = isActive,
68
68
  _a[colorsStyle[colors].active] = isActive,
69
69
  _a)) },
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","sources":["../../../src/components/dynamic/Component.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport cn from 'classnames';\n\nimport {\n hasOwnProperty,\n isFn,\n isNonNullable,\n isNullable,\n noop,\n} from '@alfalab/core-components-shared';\n\nimport { type PageIndicatorDynamicProps } from '../../types';\n\nimport defaultColors from './default.module.css';\nimport styles from './index.module.css';\nimport invertedColors from './inverted.module.css';\nimport staticColors from './static.module.css';\nimport staticInvertedColors from './static-inverted.module.css';\n\nconst colorsStyle = {\n inverted: invertedColors,\n default: defaultColors,\n static: staticColors,\n 'static-inverted': staticInvertedColors,\n} as const;\n\nconst FULL_PROGRESS = 100;\n\nexport const PageIndicatorDynamic: React.FC<PageIndicatorDynamicProps> = (props) => {\n const {\n size: height = 8,\n gap = 8,\n activeElementWidth = height * 7,\n elements: count = 10,\n activeElement: indexFromProps,\n onActiveElementChange,\n defaultActiveElement: defaultIndex = 0,\n active = true,\n duration: durationFromProps = 3000,\n cycle = false,\n colors = 'default',\n } = props;\n const [activeIndex, setActiveIndex] = useState<number | undefined>(\n indexFromProps ?? defaultIndex,\n );\n const [progress, setProgress] = useState(0);\n const inProgress = progress < FULL_PROGRESS;\n const activeIndexInProps = hasOwnProperty(props, 'activeElement');\n let duration: number;\n\n if (active && isNonNullable(activeIndex) && inProgress) {\n duration = isFn(durationFromProps) ? durationFromProps(activeIndex) : durationFromProps;\n } else {\n duration = -1;\n }\n\n // getDerivedStateFromProps\n if (activeIndexInProps && !(activeIndex === indexFromProps)) {\n setActiveIndex(indexFromProps);\n setProgress(0);\n }\n\n useEffect(() => {\n if (duration === -1) {\n return noop;\n }\n\n const interval = duration / FULL_PROGRESS;\n const timer = setInterval(\n () => setProgress((prevProgress) => Math.min(prevProgress + 1, FULL_PROGRESS)),\n interval,\n );\n\n return () => clearInterval(timer);\n }, [duration]);\n\n useEffect(() => {\n const isLast = activeIndex === count - 1;\n\n if (inProgress || isNullable(activeIndex) || (isLast && !cycle)) {\n return;\n }\n\n const nextActiveIndex = isLast && cycle ? 0 : activeIndex + 1;\n\n onActiveElementChange?.(nextActiveIndex);\n\n if (activeIndexInProps) {\n return;\n }\n\n setActiveIndex(nextActiveIndex);\n setProgress(0);\n }, [activeIndex, activeIndexInProps, count, cycle, inProgress, onActiveElementChange]);\n\n return (\n <ol className={styles.pageIndicator} style={{ height, gap }}>\n {Array.from({ length: count }, (_, index) => {\n const isActive = index === activeIndex;\n const style: React.CSSProperties = {\n width: isActive ? activeElementWidth : height,\n borderRadius: height / 2,\n };\n const progressStyle: React.CSSProperties | undefined = isActive\n ? { transform: `translateX(${progress - FULL_PROGRESS}%)` }\n : undefined;\n\n return (\n <li\n key={index}\n style={style}\n className={cn(styles.element, colorsStyle[colors].element, {\n [styles.active]: isActive,\n [colorsStyle[colors].active]: isActive,\n })}\n >\n <div\n style={progressStyle}\n className={cn(styles.progress, colorsStyle[colors].progress)}\n />\n </li>\n );\n })}\n </ol>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAmBA,IAAM,WAAW,GAAG;AAChB,IAAA,QAAQ,EAAE,cAAc;AACxB,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,iBAAiB,EAAE,oBAAoB;CACjC;AAEV,IAAM,aAAa,GAAG,GAAG;AAElB,IAAM,oBAAoB,GAAwC,UAAC,KAAK,EAAA;IAEvE,IAAA,EAAA,GAWA,KAAK,CAXW,IAAA,EAAV,MAAM,GAAG,EAAA,KAAA,MAAA,GAAA,CAAC,KAAA,EAChB,EAAA,GAUA,KAAK,CAVE,GAAA,EAAP,GAAG,GAAG,EAAA,KAAA,MAAA,GAAA,CAAC,KAAA,EACP,EAAA,GASA,KAAK,CAT0B,kBAAA,EAA/B,kBA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tF,IAAA,QACI,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAE,MAAM,CAAC,aAAa,EAAE,KAAK,EAAE,EAAE,MAAM,QAAA,EAAE,GAAG,EAAA,GAAA,EAAE,EACtD,EAAA,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,UAAC,CAAC,EAAE,KAAK,EAAA;;AACpC,QAAA,IAAM,QAAQ,GAAG,KAAK,KAAK,WAAW;AACtC,QAAA,IAAM,KAAK,GAAwB;YAC/B,KAAK,EAAE,QAAQ,GAAG,kBAAkB,GAAG,MAAM;YAC7C,YAAY,EAAE,MAAM,GAAG,CAAC;SAC3B;QACD,IAAM,aAAa,GAAoC;cACjD,EAAE,SAAS,EAAE,qBAAc,QAAQ,GAAG,aAAa,EAAA,IAAA,CAAI;cACvD,SAAS;QAEf,QACI,4BACI,GAAG,EAAE,KAAK,EACV,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,OAAO,GAAA,EAAA,GAAA,EAAA;AACrD,gBAAA,EAAA,CAAC,MAAM,CAAC,MAAM,CAAA,GAAG,QAAQ;AACzB,gBAAA,EAAA,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,MAAM,IAAG,QAAQ;AACxC,gBAAA,EAAA,EAAA,EAAA;YAEF,KACI,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE,aAAa,EACpB,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,EAAA,CAC9D,CACD;KAEZ,CAAC,CACD;AAEb;;;;"}
1
+ {"version":3,"file":"Component.js","sources":["../../../src/components/dynamic/Component.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport cn from 'classnames';\n\nimport {\n hasOwnProperty,\n isFn,\n isNonNullable,\n isNullable,\n noop,\n} from '@alfalab/core-components-shared';\n\nimport { type PageIndicatorDynamicProps } from '../../types';\n\nimport defaultColors from './default.module.css';\nimport styles from './index.module.css';\nimport invertedColors from './inverted.module.css';\nimport staticColors from './static.module.css';\nimport staticInvertedColors from './static-inverted.module.css';\n\nconst colorsStyle = {\n inverted: invertedColors,\n default: defaultColors,\n static: staticColors,\n 'static-inverted': staticInvertedColors,\n} as const;\n\nconst FULL_PROGRESS = 100;\n\nexport const PageIndicatorDynamic: React.FC<PageIndicatorDynamicProps> = (props) => {\n const {\n size: height = 8,\n gap = 8,\n activeElementWidth = height * 7,\n elements: count = 10,\n activeElement: indexFromProps,\n onActiveElementChange,\n defaultActiveElement: defaultIndex = 0,\n active = true,\n duration: durationFromProps = 3000,\n cycle = false,\n colors = 'default',\n className,\n } = props;\n const [activeIndex, setActiveIndex] = useState<number | undefined>(\n indexFromProps ?? defaultIndex,\n );\n const [progress, setProgress] = useState(0);\n const inProgress = progress < FULL_PROGRESS;\n const activeIndexInProps = hasOwnProperty(props, 'activeElement');\n let duration: number;\n\n if (active && isNonNullable(activeIndex) && inProgress) {\n duration = isFn(durationFromProps) ? durationFromProps(activeIndex) : durationFromProps;\n } else {\n duration = -1;\n }\n\n // getDerivedStateFromProps\n if (activeIndexInProps && !(activeIndex === indexFromProps)) {\n setActiveIndex(indexFromProps);\n setProgress(0);\n }\n\n useEffect(() => {\n if (duration === -1) {\n return noop;\n }\n\n const interval = duration / FULL_PROGRESS;\n const timer = setInterval(\n () => setProgress((prevProgress) => Math.min(prevProgress + 1, FULL_PROGRESS)),\n interval,\n );\n\n return () => clearInterval(timer);\n }, [duration]);\n\n useEffect(() => {\n const isLast = activeIndex === count - 1;\n\n if (inProgress || isNullable(activeIndex) || (isLast && !cycle)) {\n return;\n }\n\n const nextActiveIndex = isLast && cycle ? 0 : activeIndex + 1;\n\n onActiveElementChange?.(nextActiveIndex);\n\n if (activeIndexInProps) {\n return;\n }\n\n setActiveIndex(nextActiveIndex);\n setProgress(0);\n }, [activeIndex, activeIndexInProps, count, cycle, inProgress, onActiveElementChange]);\n\n return (\n <div className={cn(styles.pageIndicator, className)} style={{ height, gap }}>\n {Array.from({ length: count }, (_, index) => {\n const isActive = index === activeIndex;\n const style: React.CSSProperties = {\n width: isActive ? activeElementWidth : height,\n borderRadius: height / 2,\n };\n const progressStyle: React.CSSProperties | undefined = isActive\n ? { transform: `translateX(${progress - FULL_PROGRESS}%)` }\n : undefined;\n\n return (\n <div\n key={index}\n style={style}\n className={cn(styles.element, colorsStyle[colors].element, {\n [styles.active]: isActive,\n [colorsStyle[colors].active]: isActive,\n })}\n >\n <div\n style={progressStyle}\n className={cn(styles.progress, colorsStyle[colors].progress)}\n />\n </div>\n );\n })}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAmBA,IAAM,WAAW,GAAG;AAChB,IAAA,QAAQ,EAAE,cAAc;AACxB,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,iBAAiB,EAAE,oBAAoB;CACjC;AAEV,IAAM,aAAa,GAAG,GAAG;AAElB,IAAM,oBAAoB,GAAwC,UAAC,KAAK,EAAA;IAEvE,IAAA,EAAA,GAYA,KAAK,CAZW,IAAA,EAAV,MAAM,GAAG,EAAA,KAAA,MAAA,GAAA,CAAC,KAAA,EAChB,EAAA,GAWA,KAAK,CAXE,GAAA,EAAP,GAAG,GAAG,EAAA,KAAA,MAAA,GAAA,CAAC,KAAA,EACP,EAAA,GAUA,KAAK,CAAA,kBAV0B,EAA/B,kBAAkB,mBAAG,MAAM,GAAG,CAAC,GAAA,EAAA,EAC/B,KASA,KAAK,CAAA,QATe,EAAV,KAAK,GAAA,EAAA,KAAA,MAAA,GAAG,EAAE,GAAA,EAAA,EACL,cAAc,GAQ7B,KAAK,cARwB,EAC7B,qBAAqB,GAOrB,KAAK,CAPgB,qBAAA,EACrB,KAMA,KAAK,CAAA,oBANiC,EAAhB,YAAY,GAAA,EAA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,EAAE,UAAC,CAAC,EAAE,KAAK,EAAA;;AACpC,QAAA,IAAM,QAAQ,GAAG,KAAK,KAAK,WAAW;AACtC,QAAA,IAAM,KAAK,GAAwB;YAC/B,KAAK,EAAE,QAAQ,GAAG,kBAAkB,GAAG,MAAM;YAC7C,YAAY,EAAE,MAAM,GAAG,CAAC;SAC3B;QACD,IAAM,aAAa,GAAoC;cACjD,EAAE,SAAS,EAAE,qBAAc,QAAQ,GAAG,aAAa,EAAA,IAAA,CAAI;cACvD,SAAS;QAEf,QACI,6BACI,GAAG,EAAE,KAAK,EACV,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,OAAO,GAAA,EAAA,GAAA,EAAA;AACrD,gBAAA,EAAA,CAAC,MAAM,CAAC,MAAM,CAAA,GAAG,QAAQ;AACzB,gBAAA,EAAA,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,MAAM,IAAG,QAAQ;AACxC,gBAAA,EAAA,EAAA,EAAA;YAEF,KACI,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE,aAAa,EACpB,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,EAAA,CAC9D,CACA;KAEb,CAAC,CACA;AAEd;;;;"}
@@ -6,11 +6,11 @@
6
6
  --page-indicator-color: var(--color-light-neutral-translucent-300);
7
7
  --page-indicator-active-color: var(--color-light-neutral-translucent-1300);
8
8
  }
9
- .page-indicator__element_k9ry7 {
9
+ .page-indicator__element_o4ub7 {
10
10
  background: var(--page-indicator-color);
11
11
  }
12
- .page-indicator__element_k9ry7.page-indicator__active_k9ry7 {
13
- .page-indicator__progress_k9ry7 {
12
+ .page-indicator__element_o4ub7.page-indicator__active_o4ub7 {
13
+ .page-indicator__progress_o4ub7 {
14
14
  background: var(--page-indicator-active-color);
15
15
  }
16
16
  }
@@ -1,6 +1,6 @@
1
1
  import './default.css';
2
2
 
3
- var defaultColors = {"element":"page-indicator__element_k9ry7","active":"page-indicator__active_k9ry7","progress":"page-indicator__progress_k9ry7"};
3
+ var defaultColors = {"element":"page-indicator__element_o4ub7","active":"page-indicator__active_o4ub7","progress":"page-indicator__progress_o4ub7"};
4
4
 
5
5
  export { defaultColors as default };
6
6
  //# sourceMappingURL=default.module.css.js.map
@@ -1,24 +1,22 @@
1
1
  :root {
2
2
  --page-indicator-animation-duration: 0.2s;
3
3
  }
4
- .page-indicator__pageIndicator_zobdi {
5
- margin: 0;
6
- padding: 0;
4
+ .page-indicator__pageIndicator_h7ekc {
7
5
  display: flex;
8
6
  }
9
- .page-indicator__element_zobdi {
7
+ .page-indicator__element_h7ekc {
10
8
  list-style-type: none;
11
9
  overflow: hidden;
12
10
  transition: width var(--page-indicator-animation-duration) linear;
13
11
  }
14
- .page-indicator__element_zobdi:not(.page-indicator__active_zobdi) {
15
- .page-indicator__progress_zobdi {
12
+ .page-indicator__element_h7ekc:not(.page-indicator__active_h7ekc) {
13
+ .page-indicator__progress_h7ekc {
16
14
  display: none;
17
15
  }
18
16
  }
19
- .page-indicator__element_zobdi {
17
+ .page-indicator__element_h7ekc {
20
18
 
21
- .page-indicator__progress_zobdi {
19
+ .page-indicator__progress_h7ekc {
22
20
  width: 100%;
23
21
  height: 100%;
24
22
  will-change: transform;
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"pageIndicator":"page-indicator__pageIndicator_zobdi","element":"page-indicator__element_zobdi","active":"page-indicator__active_zobdi","progress":"page-indicator__progress_zobdi"};
3
+ var styles = {"pageIndicator":"page-indicator__pageIndicator_h7ekc","element":"page-indicator__element_h7ekc","active":"page-indicator__active_h7ekc","progress":"page-indicator__progress_h7ekc"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.css.js","sources":["../../src/components/dynamic/index.module.css"],"sourcesContent":["@import '../../vars.css';\n\n.pageIndicator {\n margin: 0;\n padding: 0;\n display: flex;\n}\n\n.element {\n list-style-type: none;\n overflow: hidden;\n transition: width var(--page-indicator-animation-duration) linear;\n\n &:not(.active) {\n .progress {\n display: none;\n }\n }\n\n .progress {\n width: 100%;\n height: 100%;\n will-change: transform;\n }\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,eAAe,CAAC,qCAAqC,CAAC,SAAS,CAAC,+BAA+B,CAAC,QAAQ,CAAC,8BAA8B,CAAC,UAAU,CAAC,gCAAgC,CAAC;;;;"}
1
+ {"version":3,"file":"index.module.css.js","sources":["../../src/components/dynamic/index.module.css"],"sourcesContent":["@import '../../vars.css';\n\n.pageIndicator {\n display: flex;\n}\n\n.element {\n list-style-type: none;\n overflow: hidden;\n transition: width var(--page-indicator-animation-duration) linear;\n\n &:not(.active) {\n .progress {\n display: none;\n }\n }\n\n .progress {\n width: 100%;\n height: 100%;\n will-change: transform;\n }\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,eAAe,CAAC,qCAAqC,CAAC,SAAS,CAAC,+BAA+B,CAAC,QAAQ,CAAC,8BAA8B,CAAC,UAAU,CAAC,gCAAgC,CAAC;;;;"}
@@ -6,11 +6,11 @@
6
6
  --page-indicator-color-inverted: var(--color-light-neutral-translucent-300-inverted);
7
7
  --page-indicator-active-color-inverted: var(--color-light-neutral-translucent-1300-inverted);
8
8
  }
9
- .page-indicator__element_qpgvo {
9
+ .page-indicator__element_mqocy {
10
10
  background: var(--page-indicator-color-inverted);
11
11
  }
12
- .page-indicator__element_qpgvo.page-indicator__active_qpgvo {
13
- .page-indicator__progress_qpgvo {
12
+ .page-indicator__element_mqocy.page-indicator__active_mqocy {
13
+ .page-indicator__progress_mqocy {
14
14
  background: var(--page-indicator-active-color-inverted);
15
15
  }
16
16
  }
@@ -1,6 +1,6 @@
1
1
  import './inverted.css';
2
2
 
3
- var invertedColors = {"element":"page-indicator__element_qpgvo","active":"page-indicator__active_qpgvo","progress":"page-indicator__progress_qpgvo"};
3
+ var invertedColors = {"element":"page-indicator__element_mqocy","active":"page-indicator__active_mqocy","progress":"page-indicator__progress_mqocy"};
4
4
 
5
5
  export { invertedColors as default };
6
6
  //# sourceMappingURL=inverted.module.css.js.map
@@ -6,11 +6,11 @@
6
6
  --page-indicator-color-static-inverted: var(--color-static-neutral-translucent-300-inverted);
7
7
  --page-indicator-active-color-static-inverted: var(--color-static-neutral-1300-inverted);
8
8
  }
9
- .page-indicator__element_1umjl {
9
+ .page-indicator__element_6rxth {
10
10
  background: var(--page-indicator-color-static-inverted);
11
11
  }
12
- .page-indicator__element_1umjl.page-indicator__active_1umjl {
13
- .page-indicator__progress_1umjl {
12
+ .page-indicator__element_6rxth.page-indicator__active_6rxth {
13
+ .page-indicator__progress_6rxth {
14
14
  background: var(--page-indicator-active-color-static-inverted);
15
15
  }
16
16
  }
@@ -1,6 +1,6 @@
1
1
  import './static-inverted.css';
2
2
 
3
- var staticInvertedColors = {"element":"page-indicator__element_1umjl","active":"page-indicator__active_1umjl","progress":"page-indicator__progress_1umjl"};
3
+ var staticInvertedColors = {"element":"page-indicator__element_6rxth","active":"page-indicator__active_6rxth","progress":"page-indicator__progress_6rxth"};
4
4
 
5
5
  export { staticInvertedColors as default };
6
6
  //# sourceMappingURL=static-inverted.module.css.js.map
@@ -6,11 +6,11 @@
6
6
  --page-indicator-color-static: var(--color-static-neutral-translucent-300);
7
7
  --page-indicator-active-color-static: var(--color-static-neutral-1300);
8
8
  }
9
- .page-indicator__element_1196f {
9
+ .page-indicator__element_1u5rb {
10
10
  background: var(--page-indicator-color-static);
11
11
  }
12
- .page-indicator__element_1196f.page-indicator__active_1196f {
13
- .page-indicator__progress_1196f {
12
+ .page-indicator__element_1u5rb.page-indicator__active_1u5rb {
13
+ .page-indicator__progress_1u5rb {
14
14
  background: var(--page-indicator-active-color-static);
15
15
  }
16
16
  }
@@ -1,6 +1,6 @@
1
1
  import './static.css';
2
2
 
3
- var staticColors = {"element":"page-indicator__element_1196f","active":"page-indicator__active_1196f","progress":"page-indicator__progress_1196f"};
3
+ var staticColors = {"element":"page-indicator__element_1u5rb","active":"page-indicator__active_1u5rb","progress":"page-indicator__progress_1u5rb"};
4
4
 
5
5
  export { staticColors as default };
6
6
  //# sourceMappingURL=static.module.css.js.map
@@ -13,8 +13,8 @@ var colorsStyle = {
13
13
  'static-inverted': staticInvertedColors,
14
14
  };
15
15
  var PageIndicatorRunner = function (_a) {
16
- var activeElement = _a.activeElement, _b = _a.elements, count = _b === void 0 ? 10 : _b, _c = _a.size, size = _c === void 0 ? 4 : _c, _d = _a.colors, colors = _d === void 0 ? 'default' : _d;
17
- return (React.createElement("div", { className: cn(styles.pageIndicator, colorsStyle[colors].pageIndicator), style: { height: size, borderRadius: size / 2 } },
16
+ var activeElement = _a.activeElement, _b = _a.elements, count = _b === void 0 ? 10 : _b, _c = _a.size, size = _c === void 0 ? 4 : _c, _d = _a.colors, colors = _d === void 0 ? 'default' : _d, className = _a.className;
17
+ return (React.createElement("div", { className: cn(styles.pageIndicator, colorsStyle[colors].pageIndicator, className), style: { height: size, borderRadius: size / 2 } },
18
18
  React.createElement("div", { style: {
19
19
  transform: "translate(".concat(activeElement * 100, "%, 0)"),
20
20
  height: size,
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","sources":["../../../src/components/runner/Component.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nimport { type PageIndicatorRunnerProps } from '../../types';\n\nimport defaultColors from './default.module.css';\nimport styles from './index.module.css';\nimport invertedColors from './inverted.module.css';\nimport staticColors from './static.module.css';\nimport staticInvertedColors from './static-inverted.module.css';\n\nconst colorsStyle = {\n inverted: invertedColors,\n default: defaultColors,\n static: staticColors,\n 'static-inverted': staticInvertedColors,\n} as const;\n\nexport const PageIndicatorRunner: React.FC<PageIndicatorRunnerProps> = ({\n activeElement,\n elements: count = 10,\n size = 4,\n colors = 'default',\n}) => (\n <div\n className={cn(styles.pageIndicator, colorsStyle[colors].pageIndicator)}\n style={{ height: size, borderRadius: size / 2 }}\n >\n <div\n style={{\n transform: `translate(${activeElement * 100}%, 0)`,\n height: size,\n width: `${100 / count}%`,\n borderRadius: size / 2,\n }}\n className={cn(styles.element, colorsStyle[colors].element)}\n />\n </div>\n);\n"],"names":[],"mappings":";;;;;;;;AAWA,IAAM,WAAW,GAAG;AAChB,IAAA,QAAQ,EAAE,cAAc;AACxB,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,iBAAiB,EAAE,oBAAoB;CACjC;AAEH,IAAM,mBAAmB,GAAuC,UAAC,EAKvE,EAAA;QAJG,aAAa,GAAA,EAAA,CAAA,aAAA,EACb,EAAoB,GAAA,EAAA,CAAA,QAAA,EAAV,KAAK,GAAG,EAAA,KAAA,MAAA,GAAA,EAAE,KAAA,EACpB,EAAA,GAAA,EAAA,CAAA,IAAQ,EAAR,IAAI,GAAA,EAAA,KAAA,MAAA,GAAG,CAAC,GAAA,EAAA,EACR,cAAkB,EAAlB,MAAM,GAAG,EAAA,KAAA,MAAA,GAAA,SAAS,GAAA,EAAA;AAChB,IAAA,QACF,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACI,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,EACtE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,GAAG,CAAC,EAAE,EAAA;AAE/C,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACI,KAAK,EAAE;AACH,gBAAA,SAAS,EAAE,YAAA,CAAA,MAAA,CAAa,aAAa,GAAG,GAAG,EAAO,OAAA,CAAA;AAClD,gBAAA,MAAM,EAAE,IAAI;AACZ,gBAAA,KAAK,EAAE,EAAA,CAAA,MAAA,CAAG,GAAG,GAAG,KAAK,EAAG,GAAA,CAAA;gBACxB,YAAY,EAAE,IAAI,GAAG,CAAC;AACzB,aAAA,EACD,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAA,CAC5D,CACA;AAdJ;;;;"}
1
+ {"version":3,"file":"Component.js","sources":["../../../src/components/runner/Component.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nimport { type PageIndicatorRunnerProps } from '../../types';\n\nimport defaultColors from './default.module.css';\nimport styles from './index.module.css';\nimport invertedColors from './inverted.module.css';\nimport staticColors from './static.module.css';\nimport staticInvertedColors from './static-inverted.module.css';\n\nconst colorsStyle = {\n inverted: invertedColors,\n default: defaultColors,\n static: staticColors,\n 'static-inverted': staticInvertedColors,\n} as const;\n\nexport const PageIndicatorRunner: React.FC<PageIndicatorRunnerProps> = ({\n activeElement,\n elements: count = 10,\n size = 4,\n colors = 'default',\n className,\n}) => (\n <div\n className={cn(styles.pageIndicator, colorsStyle[colors].pageIndicator, className)}\n style={{ height: size, borderRadius: size / 2 }}\n >\n <div\n style={{\n transform: `translate(${activeElement * 100}%, 0)`,\n height: size,\n width: `${100 / count}%`,\n borderRadius: size / 2,\n }}\n className={cn(styles.element, colorsStyle[colors].element)}\n />\n </div>\n);\n"],"names":[],"mappings":";;;;;;;;AAWA,IAAM,WAAW,GAAG;AAChB,IAAA,QAAQ,EAAE,cAAc;AACxB,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,iBAAiB,EAAE,oBAAoB;CACjC;AAEH,IAAM,mBAAmB,GAAuC,UAAC,EAMvE,EAAA;QALG,aAAa,GAAA,EAAA,CAAA,aAAA,EACb,EAAA,GAAA,EAAA,CAAA,QAAoB,EAAV,KAAK,mBAAG,EAAE,GAAA,EAAA,EACpB,EAAA,GAAA,EAAA,CAAA,IAAQ,EAAR,IAAI,mBAAG,CAAC,GAAA,EAAA,EACR,EAAA,GAAA,EAAA,CAAA,MAAkB,EAAlB,MAAM,mBAAG,SAAS,GAAA,EAAA,EAClB,SAAS,GAAA,EAAA,CAAA,SAAA;AACP,IAAA,QACF,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACI,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,SAAS,CAAC,EACjF,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,GAAG,CAAC,EAAE,EAAA;AAE/C,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACI,KAAK,EAAE;AACH,gBAAA,SAAS,EAAE,YAAA,CAAA,MAAA,CAAa,aAAa,GAAG,GAAG,EAAO,OAAA,CAAA;AAClD,gBAAA,MAAM,EAAE,IAAI;AACZ,gBAAA,KAAK,EAAE,EAAA,CAAA,MAAA,CAAG,GAAG,GAAG,KAAK,EAAG,GAAA,CAAA;gBACxB,YAAY,EAAE,IAAI,GAAG,CAAC;AACzB,aAAA,EACD,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAA,CAC5D,CACA;AAdJ;;;;"}
@@ -6,9 +6,9 @@
6
6
  --page-indicator-color: var(--color-light-neutral-translucent-300);
7
7
  --page-indicator-active-color: var(--color-light-neutral-translucent-1300);
8
8
  }
9
- .page-indicator__pageIndicator_1ddtz {
9
+ .page-indicator__pageIndicator_wiz49 {
10
10
  background: var(--page-indicator-color);
11
11
  }
12
- .page-indicator__element_1ddtz {
12
+ .page-indicator__element_wiz49 {
13
13
  background: var(--page-indicator-active-color);
14
14
  }
@@ -1,6 +1,6 @@
1
1
  import './default.css';
2
2
 
3
- var defaultColors = {"pageIndicator":"page-indicator__pageIndicator_1ddtz","element":"page-indicator__element_1ddtz"};
3
+ var defaultColors = {"pageIndicator":"page-indicator__pageIndicator_wiz49","element":"page-indicator__element_wiz49"};
4
4
 
5
5
  export { defaultColors as default };
6
6
  //# sourceMappingURL=default.module.css.js.map
@@ -1,7 +1,10 @@
1
1
  :root {
2
2
  --page-indicator-animation-duration: 0.2s;
3
3
  }
4
- .page-indicator__element_qlc1d {
4
+ .page-indicator__element_1nev8 {
5
5
  transition: transform var(--page-indicator-animation-duration) linear;
6
6
  will-change: transition;
7
7
  }
8
+ .page-indicator__pageIndicator_1nev8 {
9
+ width: 100%;
10
+ }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"element":"page-indicator__element_qlc1d"};
3
+ var styles = {"element":"page-indicator__element_1nev8","pageIndicator":"page-indicator__pageIndicator_1nev8"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.css.js","sources":["../../src/components/runner/index.module.css"],"sourcesContent":["@import '../../vars.css';\n\n.element {\n transition: transform var(--page-indicator-animation-duration) linear;\n will-change: transition;\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,SAAS,CAAC,+BAA+B,CAAC;;;;"}
1
+ {"version":3,"file":"index.module.css.js","sources":["../../src/components/runner/index.module.css"],"sourcesContent":["@import '../../vars.css';\n\n.element {\n transition: transform var(--page-indicator-animation-duration) linear;\n will-change: transition;\n}\n\n.pageIndicator {\n width: 100%;\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,SAAS,CAAC,+BAA+B,CAAC,eAAe,CAAC,qCAAqC,CAAC;;;;"}
@@ -6,9 +6,9 @@
6
6
  --page-indicator-color-inverted: var(--color-light-neutral-translucent-300-inverted);
7
7
  --page-indicator-active-color-inverted: var(--color-light-neutral-translucent-1300-inverted);
8
8
  }
9
- .page-indicator__pageIndicator_1hqt5 {
9
+ .page-indicator__pageIndicator_7wz43 {
10
10
  background: var(--page-indicator-color-inverted);
11
11
  }
12
- .page-indicator__element_1hqt5 {
12
+ .page-indicator__element_7wz43 {
13
13
  background: var(--page-indicator-active-color-inverted);
14
14
  }
@@ -1,6 +1,6 @@
1
1
  import './inverted.css';
2
2
 
3
- var invertedColors = {"pageIndicator":"page-indicator__pageIndicator_1hqt5","element":"page-indicator__element_1hqt5"};
3
+ var invertedColors = {"pageIndicator":"page-indicator__pageIndicator_7wz43","element":"page-indicator__element_7wz43"};
4
4
 
5
5
  export { invertedColors as default };
6
6
  //# sourceMappingURL=inverted.module.css.js.map
@@ -6,9 +6,9 @@
6
6
  --page-indicator-color-static-inverted: var(--color-static-neutral-translucent-300-inverted);
7
7
  --page-indicator-active-color-static-inverted: var(--color-static-neutral-1300-inverted);
8
8
  }
9
- .page-indicator__pageIndicator_43pau {
9
+ .page-indicator__pageIndicator_3tgal {
10
10
  background: var(--page-indicator-color-static-inverted);
11
11
  }
12
- .page-indicator__element_43pau {
12
+ .page-indicator__element_3tgal {
13
13
  background: var(--page-indicator-active-color-static-inverted);
14
14
  }
@@ -1,6 +1,6 @@
1
1
  import './static-inverted.css';
2
2
 
3
- var staticInvertedColors = {"pageIndicator":"page-indicator__pageIndicator_43pau","element":"page-indicator__element_43pau"};
3
+ var staticInvertedColors = {"pageIndicator":"page-indicator__pageIndicator_3tgal","element":"page-indicator__element_3tgal"};
4
4
 
5
5
  export { staticInvertedColors as default };
6
6
  //# sourceMappingURL=static-inverted.module.css.js.map
@@ -6,9 +6,9 @@
6
6
  --page-indicator-color-static: var(--color-static-neutral-translucent-300);
7
7
  --page-indicator-active-color-static: var(--color-static-neutral-1300);
8
8
  }
9
- .page-indicator__pageIndicator_19jfy {
9
+ .page-indicator__pageIndicator_b9y6s {
10
10
  background: var(--page-indicator-color-static);
11
11
  }
12
- .page-indicator__element_19jfy {
12
+ .page-indicator__element_b9y6s {
13
13
  background: var(--page-indicator-active-color-static);
14
14
  }
@@ -1,6 +1,6 @@
1
1
  import './static.css';
2
2
 
3
- var staticColors = {"pageIndicator":"page-indicator__pageIndicator_19jfy","element":"page-indicator__element_19jfy"};
3
+ var staticColors = {"pageIndicator":"page-indicator__pageIndicator_b9y6s","element":"page-indicator__element_b9y6s"};
4
4
 
5
5
  export { staticColors as default };
6
6
  //# sourceMappingURL=static.module.css.js.map
@@ -13,10 +13,10 @@ var colorsStyle = {
13
13
  'static-inverted': staticInvertedColors,
14
14
  };
15
15
  var PageIndicatorStep = function (_a) {
16
- var activeElement = _a.activeElement, _b = _a.elements, count = _b === void 0 ? 10 : _b, _c = _a.size, size = _c === void 0 ? 4 : _c, _d = _a.gap, gap = _d === void 0 ? 4 : _d, _e = _a.colors, colors = _e === void 0 ? 'default' : _e;
17
- return (React.createElement("ol", { className: styles.pageIndicator, style: { height: size, gap: gap } }, Array.from({ length: count }, function (_, index) {
16
+ var activeElement = _a.activeElement, _b = _a.elements, count = _b === void 0 ? 10 : _b, _c = _a.size, size = _c === void 0 ? 4 : _c, _d = _a.gap, gap = _d === void 0 ? 4 : _d, _e = _a.colors, colors = _e === void 0 ? 'default' : _e, className = _a.className;
17
+ return (React.createElement("div", { className: cn(styles.pageIndicator, className), style: { height: size, gap: gap } }, Array.from({ length: count }, function (_, index) {
18
18
  var _a;
19
- return (React.createElement("li", { key: index, style: { height: size, borderRadius: size / 2 }, className: cn(styles.element, colorsStyle[colors].element, (_a = {},
19
+ return (React.createElement("div", { key: index, style: { height: size, borderRadius: size / 2 }, className: cn(styles.element, colorsStyle[colors].element, (_a = {},
20
20
  _a[colorsStyle[colors].active] = index === activeElement,
21
21
  _a)) }));
22
22
  })));
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","sources":["../../../src/components/step/Component.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nimport { type PageIndicatorStepProps } from '../../types';\n\nimport defaultColors from './default.module.css';\nimport styles from './index.module.css';\nimport invertedColors from './inverted.module.css';\nimport staticColors from './static.module.css';\nimport staticInvertedColors from './static-inverted.module.css';\n\nconst colorsStyle = {\n inverted: invertedColors,\n default: defaultColors,\n static: staticColors,\n 'static-inverted': staticInvertedColors,\n} as const;\n\nexport const PageIndicatorStep: React.FC<PageIndicatorStepProps> = ({\n activeElement,\n elements: count = 10,\n size = 4,\n gap = 4,\n colors = 'default',\n}) => (\n <ol className={styles.pageIndicator} style={{ height: size, gap }}>\n {Array.from({ length: count }, (_, index) => (\n <li\n key={index}\n style={{ height: size, borderRadius: size / 2 }}\n className={cn(styles.element, colorsStyle[colors].element, {\n [colorsStyle[colors].active]: index === activeElement,\n })}\n />\n ))}\n </ol>\n);\n"],"names":[],"mappings":";;;;;;;;AAWA,IAAM,WAAW,GAAG;AAChB,IAAA,QAAQ,EAAE,cAAc;AACxB,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,iBAAiB,EAAE,oBAAoB;CACjC;AAEH,IAAM,iBAAiB,GAAqC,UAAC,EAMnE,EAAA;AALG,IAAA,IAAA,aAAa,GAAA,EAAA,CAAA,aAAA,EACb,EAAoB,GAAA,EAAA,CAAA,QAAA,EAAV,KAAK,GAAA,EAAA,KAAA,MAAA,GAAG,EAAE,GAAA,EAAA,EACpB,EAAA,GAAA,EAAA,CAAA,IAAQ,EAAR,IAAI,GAAG,EAAA,KAAA,MAAA,GAAA,CAAC,GAAA,EAAA,EACR,EAAO,GAAA,EAAA,CAAA,GAAA,EAAP,GAAG,GAAA,EAAA,KAAA,MAAA,GAAG,CAAC,GAAA,EAAA,EACP,EAAA,GAAA,EAAA,CAAA,MAAkB,EAAlB,MAAM,GAAG,EAAA,KAAA,MAAA,GAAA,SAAS,GAAA,EAAA;AAChB,IAAA,QACF,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAE,MAAM,CAAC,aAAa,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAA,GAAA,EAAE,EAC5D,EAAA,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,UAAC,CAAC,EAAE,KAAK,EAAA;;AAAK,QAAA,QACzC,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EACI,GAAG,EAAE,KAAK,EACV,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,GAAG,CAAC,EAAE,EAC/C,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,OAAO,GAAA,EAAA,GAAA,EAAA;gBACrD,EAAC,CAAA,WAAW,CAAC,MAAM,CAAC,CAAC,MAAM,CAAA,GAAG,KAAK,KAAK,aAAa;AACvD,gBAAA,EAAA,EAAA,EAAA,CACJ;KACL,CAAC,CACD;AAXH;;;;"}
1
+ {"version":3,"file":"Component.js","sources":["../../../src/components/step/Component.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nimport { type PageIndicatorStepProps } from '../../types';\n\nimport defaultColors from './default.module.css';\nimport styles from './index.module.css';\nimport invertedColors from './inverted.module.css';\nimport staticColors from './static.module.css';\nimport staticInvertedColors from './static-inverted.module.css';\n\nconst colorsStyle = {\n inverted: invertedColors,\n default: defaultColors,\n static: staticColors,\n 'static-inverted': staticInvertedColors,\n} as const;\n\nexport const PageIndicatorStep: React.FC<PageIndicatorStepProps> = ({\n activeElement,\n elements: count = 10,\n size = 4,\n gap = 4,\n colors = 'default',\n className,\n}) => (\n <div className={cn(styles.pageIndicator, className)} style={{ height: size, gap }}>\n {Array.from({ length: count }, (_, index) => (\n <div\n key={index}\n style={{ height: size, borderRadius: size / 2 }}\n className={cn(styles.element, colorsStyle[colors].element, {\n [colorsStyle[colors].active]: index === activeElement,\n })}\n />\n ))}\n </div>\n);\n"],"names":[],"mappings":";;;;;;;;AAWA,IAAM,WAAW,GAAG;AAChB,IAAA,QAAQ,EAAE,cAAc;AACxB,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,iBAAiB,EAAE,oBAAoB;CACjC;AAEH,IAAM,iBAAiB,GAAqC,UAAC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300);
7
7
  --page-indicator-active-color: var(--color-light-neutral-translucent-1300);
8
8
  }
9
- .page-indicator__element_1ea0d {
9
+ .page-indicator__element_nqwqn {
10
10
  background: var(--page-indicator-color);
11
11
  }
12
- .page-indicator__element_1ea0d.page-indicator__active_1ea0d {
12
+ .page-indicator__element_nqwqn.page-indicator__active_nqwqn {
13
13
  background: var(--page-indicator-active-color);
14
14
  }
@@ -1,6 +1,6 @@
1
1
  import './default.css';
2
2
 
3
- var defaultColors = {"element":"page-indicator__element_1ea0d","active":"page-indicator__active_1ea0d"};
3
+ var defaultColors = {"element":"page-indicator__element_nqwqn","active":"page-indicator__active_nqwqn"};
4
4
 
5
5
  export { defaultColors as default };
6
6
  //# sourceMappingURL=default.module.css.js.map
@@ -2,12 +2,11 @@
2
2
  --page-indicator-animation-duration: 0.2s;
3
3
  --page-indicator-animation-timing-function: ease-in-out;
4
4
  }
5
- .page-indicator__pageIndicator_1n6uh {
6
- margin: 0;
7
- padding: 0;
5
+ .page-indicator__pageIndicator_yfjk6 {
8
6
  display: flex;
7
+ width: 100%;
9
8
  }
10
- .page-indicator__element_1n6uh {
9
+ .page-indicator__element_yfjk6 {
11
10
  list-style-type: none;
12
11
  flex-grow: 1;
13
12
  transition: backgroud var(--page-indicator-animation-duration)
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"pageIndicator":"page-indicator__pageIndicator_1n6uh","element":"page-indicator__element_1n6uh"};
3
+ var styles = {"pageIndicator":"page-indicator__pageIndicator_yfjk6","element":"page-indicator__element_yfjk6"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.css.js","sources":["../../src/components/step/index.module.css"],"sourcesContent":["@import '../../vars.css';\n\n.pageIndicator {\n margin: 0;\n padding: 0;\n display: flex;\n}\n\n.element {\n list-style-type: none;\n flex-grow: 1;\n transition: backgroud var(--page-indicator-animation-duration)\n var(--page-indicator-animation-timing-function);\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,eAAe,CAAC,qCAAqC,CAAC,SAAS,CAAC,+BAA+B,CAAC;;;;"}
1
+ {"version":3,"file":"index.module.css.js","sources":["../../src/components/step/index.module.css"],"sourcesContent":["@import '../../vars.css';\n\n.pageIndicator {\n display: flex;\n width: 100%;\n}\n\n.element {\n list-style-type: none;\n flex-grow: 1;\n transition: backgroud var(--page-indicator-animation-duration)\n var(--page-indicator-animation-timing-function);\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,eAAe,CAAC,qCAAqC,CAAC,SAAS,CAAC,+BAA+B,CAAC;;;;"}
@@ -6,9 +6,9 @@
6
6
  --page-indicator-color-inverted: var(--color-light-neutral-translucent-300-inverted);
7
7
  --page-indicator-active-color-inverted: var(--color-light-neutral-translucent-1300-inverted);
8
8
  }
9
- .page-indicator__element_1ebaj {
9
+ .page-indicator__element_7acin {
10
10
  background: var(--page-indicator-color-inverted);
11
11
  }
12
- .page-indicator__element_1ebaj.page-indicator__active_1ebaj {
12
+ .page-indicator__element_7acin.page-indicator__active_7acin {
13
13
  background: var(--page-indicator-active-color-inverted);
14
14
  }