funda-ui 4.7.108 → 4.7.115

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.
@@ -0,0 +1,475 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("react"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["react"], factory);
6
+ else if(typeof exports === 'object')
7
+ exports["RPB"] = factory(require("react"));
8
+ else
9
+ root["RPB"] = factory(root["React"]);
10
+ })(this, (__WEBPACK_EXTERNAL_MODULE__787__) => {
11
+ return /******/ (() => { // webpackBootstrap
12
+ /******/ "use strict";
13
+ /******/ var __webpack_modules__ = ({
14
+
15
+ /***/ 787:
16
+ /***/ ((module) => {
17
+
18
+ module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
19
+
20
+ /***/ })
21
+
22
+ /******/ });
23
+ /************************************************************************/
24
+ /******/ // The module cache
25
+ /******/ var __webpack_module_cache__ = {};
26
+ /******/
27
+ /******/ // The require function
28
+ /******/ function __webpack_require__(moduleId) {
29
+ /******/ // Check if module is in cache
30
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
31
+ /******/ if (cachedModule !== undefined) {
32
+ /******/ return cachedModule.exports;
33
+ /******/ }
34
+ /******/ // Create a new module (and put it into the cache)
35
+ /******/ var module = __webpack_module_cache__[moduleId] = {
36
+ /******/ // no module.id needed
37
+ /******/ // no module.loaded needed
38
+ /******/ exports: {}
39
+ /******/ };
40
+ /******/
41
+ /******/ // Execute the module function
42
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
43
+ /******/
44
+ /******/ // Return the exports of the module
45
+ /******/ return module.exports;
46
+ /******/ }
47
+ /******/
48
+ /************************************************************************/
49
+ /******/ /* webpack/runtime/compat get default export */
50
+ /******/ (() => {
51
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
52
+ /******/ __webpack_require__.n = (module) => {
53
+ /******/ var getter = module && module.__esModule ?
54
+ /******/ () => (module['default']) :
55
+ /******/ () => (module);
56
+ /******/ __webpack_require__.d(getter, { a: getter });
57
+ /******/ return getter;
58
+ /******/ };
59
+ /******/ })();
60
+ /******/
61
+ /******/ /* webpack/runtime/define property getters */
62
+ /******/ (() => {
63
+ /******/ // define getter functions for harmony exports
64
+ /******/ __webpack_require__.d = (exports, definition) => {
65
+ /******/ for(var key in definition) {
66
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
67
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
68
+ /******/ }
69
+ /******/ }
70
+ /******/ };
71
+ /******/ })();
72
+ /******/
73
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
74
+ /******/ (() => {
75
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
76
+ /******/ })();
77
+ /******/
78
+ /******/ /* webpack/runtime/make namespace object */
79
+ /******/ (() => {
80
+ /******/ // define __esModule on exports
81
+ /******/ __webpack_require__.r = (exports) => {
82
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
83
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
84
+ /******/ }
85
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
86
+ /******/ };
87
+ /******/ })();
88
+ /******/
89
+ /************************************************************************/
90
+ var __webpack_exports__ = {};
91
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
92
+ (() => {
93
+ __webpack_require__.r(__webpack_exports__);
94
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
95
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
96
+ /* harmony export */ });
97
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(787);
98
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
99
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
100
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
101
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
102
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
103
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
104
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
105
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
106
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
107
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
108
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
109
+ /**
110
+ * History Tracker
111
+ *
112
+ * @usage:
113
+
114
+ const App = () => {
115
+ const {
116
+ history,
117
+ forwardHistory,
118
+ currentUrl,
119
+ firstUrl,
120
+ clearHistory,
121
+ goBack
122
+ } = useHistoryTracker({
123
+ onChange: ({
124
+ isReady,
125
+ history,
126
+ forwardHistory,
127
+ currentUrl,
128
+ firstUrl,
129
+ canGoBack,
130
+ canGoForward
131
+ } : {
132
+ isReady: boolean;
133
+ history: string[];
134
+ forwardHistory: string[];
135
+ currentUrl: string;
136
+ firstUrl: string;
137
+ canGoBack: boolean;
138
+ canGoForward: boolean;
139
+ }) => {
140
+ console.log('--> onChange: ',
141
+ isReady,
142
+ history,
143
+ forwardHistory,
144
+ currentUrl,
145
+ firstUrl,
146
+ canGoBack,
147
+ canGoForward
148
+ );
149
+ }
150
+ });
151
+
152
+ return (
153
+ <div>
154
+
155
+ <div>
156
+ <h3>First URL:</h3>
157
+ <p>{firstUrl}</p>
158
+ </div>
159
+
160
+ <div>
161
+ <h3>Current URL:</h3>
162
+ <p>{currentUrl}</p>
163
+ </div>
164
+
165
+ <div>
166
+ <h3>History ({history.length}):</h3>
167
+ <ul>
168
+ {history.map((url, index) => (
169
+ <li key={index}>{url}</li>
170
+ ))}
171
+ </ul>
172
+ </div>
173
+
174
+ <div>
175
+ <h3>Forward History ({forwardHistory.length}):</h3>
176
+ <ul>
177
+ {forwardHistory.map((url, index) => (
178
+ <li key={index}>{url}</li>
179
+ ))}
180
+ </ul>
181
+ </div>
182
+
183
+
184
+
185
+ <button onClick={clearHistory}>
186
+ Clear History
187
+ </button>
188
+
189
+ <button onClick={async () => {
190
+ try {
191
+ const {
192
+ isReady,
193
+ history,
194
+ forwardHistory,
195
+ canGoBack,
196
+ canGoForward
197
+ } : {
198
+ isReady: boolean;
199
+ history: string[];
200
+ forwardHistory: string[];
201
+ canGoBack: boolean;
202
+ canGoForward: boolean;
203
+ } = await goBack();
204
+
205
+ console.log('--> goBack: ',
206
+ isReady,
207
+ history,
208
+ forwardHistory,
209
+ currentUrl,
210
+ firstUrl,
211
+ canGoBack,
212
+ canGoForward
213
+ );
214
+ } catch (error) {
215
+ console.error('Navigation failed', error);
216
+ }
217
+
218
+ }}>
219
+ Back
220
+ </button>
221
+
222
+ </div>
223
+ );
224
+ };
225
+
226
+ */
227
+
228
+ // Create a secure version of useLayoutEffect that is downgraded to useEffect when SSR
229
+ var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_0__.useEffect;
230
+ var useHistoryTracker = function useHistoryTracker(props) {
231
+ var onChange = props.onChange;
232
+ var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
233
+ _useState2 = _slicedToArray(_useState, 2),
234
+ isReady = _useState2[0],
235
+ setIsReady = _useState2[1];
236
+ var historyRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)([]);
237
+ var forwardHistoryRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)([]);
238
+ var firstUrlRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)('');
239
+ var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''),
240
+ _useState4 = _slicedToArray(_useState3, 2),
241
+ currentUrl = _useState4[0],
242
+ setCurrentUrl = _useState4[1];
243
+ var initialize = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
244
+ if (typeof window === 'undefined') return;
245
+ var currentLocation = window.location.href;
246
+
247
+ // If the history is empty, set the first record
248
+ if (historyRef.current.length === 0) {
249
+ firstUrlRef.current = currentLocation;
250
+ historyRef.current = [currentLocation];
251
+ setCurrentUrl(currentLocation);
252
+ onChange === null || onChange === void 0 ? void 0 : onChange({
253
+ isReady: false,
254
+ history: [currentLocation],
255
+ forwardHistory: [],
256
+ currentUrl: currentLocation,
257
+ firstUrl: currentLocation,
258
+ canGoBack: false,
259
+ canGoForward: false
260
+ });
261
+ }
262
+ setIsReady(true);
263
+ }, []);
264
+ useIsomorphicLayoutEffect(function () {
265
+ initialize();
266
+ }, [initialize]);
267
+ var clearHistory = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
268
+ if (typeof window === 'undefined') return;
269
+ historyRef.current = [];
270
+ forwardHistoryRef.current = [];
271
+ firstUrlRef.current = '';
272
+ setCurrentUrl('');
273
+ onChange === null || onChange === void 0 ? void 0 : onChange({
274
+ isReady: true,
275
+ history: [],
276
+ forwardHistory: [],
277
+ currentUrl: '',
278
+ firstUrl: '',
279
+ canGoBack: false,
280
+ canGoForward: false
281
+ });
282
+ }, [onChange]); // only "onChange"
283
+
284
+ var goToHistory = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (index) {
285
+ if (typeof window === 'undefined') return;
286
+ if (index < 0 || index >= historyRef.current.length) return;
287
+ var targetUrl = historyRef.current[index];
288
+ if (targetUrl && targetUrl !== window.location.href) {
289
+ window.location.href = targetUrl;
290
+ }
291
+ }, []);
292
+ var goBack = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
293
+ if (typeof window === 'undefined') return Promise.reject('Window is undefined');
294
+ if (historyRef.current.length <= 1) return Promise.reject('Cannot go back');
295
+ return new Promise(function (resolve) {
296
+ // Moves the current URL into the forward history
297
+ var removedUrl = historyRef.current.pop();
298
+ forwardHistoryRef.current.push(removedUrl);
299
+ var newCurrentUrl = historyRef.current[historyRef.current.length - 1];
300
+ setCurrentUrl(newCurrentUrl);
301
+
302
+ // Create initial data object
303
+ var data = {
304
+ isReady: true,
305
+ history: _toConsumableArray(historyRef.current),
306
+ forwardHistory: _toConsumableArray(forwardHistoryRef.current),
307
+ currentUrl: newCurrentUrl,
308
+ firstUrl: firstUrlRef.current,
309
+ canGoBack: canGoBack(),
310
+ canGoForward: canGoForward()
311
+ };
312
+
313
+ // Notify about the history change
314
+ onChange === null || onChange === void 0 ? void 0 : onChange(data);
315
+
316
+ // Create one-time listener for popstate
317
+ var handlePopState = function handlePopState() {
318
+ // Remove the listener after it's called
319
+ window.removeEventListener('popstate', handlePopState);
320
+
321
+ // Get the final data after URL has changed
322
+ var finalData = {
323
+ isReady: true,
324
+ history: _toConsumableArray(historyRef.current),
325
+ forwardHistory: _toConsumableArray(forwardHistoryRef.current),
326
+ currentUrl: window.location.href,
327
+ firstUrl: firstUrlRef.current,
328
+ canGoBack: canGoBack(),
329
+ canGoForward: canGoForward()
330
+ };
331
+ resolve(finalData);
332
+ };
333
+
334
+ // Add the listener
335
+ window.addEventListener('popstate', handlePopState);
336
+
337
+ // Trigger the navigation
338
+ window.history.go(-1);
339
+ });
340
+ }, [onChange]);
341
+ var goForward = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
342
+ if (typeof window === 'undefined') return Promise.reject('Window is undefined');
343
+ if (forwardHistoryRef.current.length === 0) return Promise.reject('Cannot go forward');
344
+ return new Promise(function (resolve) {
345
+ // Take the URL from the forward history and add it to the main history
346
+ var nextUrl = forwardHistoryRef.current.pop();
347
+ historyRef.current.push(nextUrl);
348
+ setCurrentUrl(nextUrl);
349
+
350
+ // Create initial data object
351
+ var data = {
352
+ isReady: true,
353
+ history: _toConsumableArray(historyRef.current),
354
+ forwardHistory: _toConsumableArray(forwardHistoryRef.current),
355
+ currentUrl: nextUrl,
356
+ firstUrl: firstUrlRef.current,
357
+ canGoBack: canGoBack(),
358
+ canGoForward: canGoForward()
359
+ };
360
+ onChange === null || onChange === void 0 ? void 0 : onChange(data);
361
+
362
+ // Create one-time listener for popstate
363
+ var handlePopState = function handlePopState() {
364
+ // Remove the listener after it's called
365
+ window.removeEventListener('popstate', handlePopState);
366
+
367
+ // Get the final data after URL has changed
368
+ var finalData = {
369
+ isReady: true,
370
+ history: _toConsumableArray(historyRef.current),
371
+ forwardHistory: _toConsumableArray(forwardHistoryRef.current),
372
+ currentUrl: window.location.href,
373
+ firstUrl: firstUrlRef.current,
374
+ canGoBack: canGoBack(),
375
+ canGoForward: canGoForward()
376
+ };
377
+ resolve(finalData);
378
+ };
379
+
380
+ // Add the listener
381
+ window.addEventListener('popstate', handlePopState);
382
+
383
+ // Trigger the navigation
384
+ window.history.go(1);
385
+ });
386
+ }, [onChange]);
387
+ var canGoBack = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
388
+ return historyRef.current.length > 1;
389
+ }, []);
390
+ var canGoForward = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
391
+ return forwardHistoryRef.current.length > 0;
392
+ }, []);
393
+ var handleUrlChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
394
+ if (typeof window === 'undefined') return;
395
+ var newUrl = window.location.href;
396
+
397
+ // If the history is empty, set to the first URL
398
+ if (historyRef.current.length === 0) {
399
+ firstUrlRef.current = newUrl;
400
+ }
401
+
402
+ // Avoid recording the same URL
403
+ if (historyRef.current[historyRef.current.length - 1] !== newUrl) {
404
+ historyRef.current.push(newUrl);
405
+
406
+ // Clear the advance history, as new navigation invalidates the advance history
407
+ forwardHistoryRef.current = [];
408
+ setCurrentUrl(newUrl);
409
+ onChange === null || onChange === void 0 ? void 0 : onChange({
410
+ isReady: true,
411
+ history: _toConsumableArray(historyRef.current),
412
+ forwardHistory: _toConsumableArray(forwardHistoryRef.current),
413
+ currentUrl: newUrl,
414
+ firstUrl: firstUrlRef.current || newUrl,
415
+ // Make sure there is always a value
416
+ canGoBack: canGoBack(),
417
+ canGoForward: canGoForward()
418
+ });
419
+ }
420
+ }, [onChange]); // only "onChange"
421
+
422
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
423
+ if (typeof window === 'undefined') return;
424
+
425
+ // Listen for popstate events (browser forward/back)
426
+ window.addEventListener('popstate', handleUrlChange);
427
+
428
+ // Listen for hashchange events
429
+ window.addEventListener('hashchange', handleUrlChange);
430
+
431
+ // Listen for DOM and property changes
432
+ var observer = new MutationObserver(function (mutations) {
433
+ mutations.forEach(function (mutation) {
434
+ if (mutation.type === 'childList' || mutation.type === 'attributes') {
435
+ handleUrlChange();
436
+ }
437
+ });
438
+ });
439
+ observer.observe(document.body, {
440
+ childList: true,
441
+ // monitor the addition and deletion of child nodes
442
+ subtree: true,
443
+ // monitor all descendant nodes
444
+ attributes: true,
445
+ // monitor attribute changes
446
+ attributeFilter: ['href'] // only monitor changes in the href attribute
447
+ });
448
+
449
+ return function () {
450
+ window.removeEventListener('popstate', handleUrlChange);
451
+ window.removeEventListener('hashchange', handleUrlChange);
452
+ observer.disconnect();
453
+ };
454
+ }, [handleUrlChange]);
455
+ return {
456
+ isReady: isReady,
457
+ history: historyRef.current,
458
+ forwardHistory: forwardHistoryRef.current,
459
+ currentUrl: currentUrl,
460
+ firstUrl: firstUrlRef.current,
461
+ clearHistory: clearHistory,
462
+ goToHistory: goToHistory,
463
+ goBack: goBack,
464
+ goForward: goForward,
465
+ canGoBack: canGoBack,
466
+ canGoForward: canGoForward
467
+ };
468
+ };
469
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useHistoryTracker);
470
+ })();
471
+
472
+ /******/ return __webpack_exports__;
473
+ /******/ })()
474
+ ;
475
+ });
@@ -14,9 +14,10 @@
14
14
  --stepper-line-default: #dfdfdf;
15
15
  --stepper-line-active: #2563eb;
16
16
  --stepper-line-complete: #22c55e;
17
- --stepper-indicator-size: 0.875rem;
18
- --stepper-indicator-offset: 100px;
17
+ --stepper-indicator-font-size: 0.875rem;
18
+ --stepper-indicator-offset: 60px;
19
19
  --stepper-title-size: 0.875rem;
20
+ --stepper-indicator-size: 32px;
20
21
  position: relative;
21
22
  /* Navigation Header (only horizontal) */
22
23
  /* Main Navigation - Each step item (with circle + title) */
@@ -32,24 +33,25 @@
32
33
  align-items: flex-start;
33
34
  flex-wrap: nowrap;
34
35
  position: relative;
36
+ max-width: calc(100% - var(--stepper-indicator-size));
35
37
  /* background line */
36
38
  }
37
39
  .stepper-container .stepper-header::before {
38
40
  content: "";
39
41
  position: absolute;
40
42
  top: 16px; /* Subtract the height of the title */
41
- left: 14px;
43
+ left: 0;
42
44
  right: 0;
43
45
  height: 2px;
44
46
  background-color: var(--stepper-line-default);
45
47
  z-index: 1;
46
- width: calc(100% - 32px);
48
+ width: 100%;
47
49
  }
48
50
  .stepper-container .stepper-header::after {
49
51
  content: "";
50
52
  position: absolute;
51
53
  top: 16px; /* Subtract the height of the title */
52
- left: 14px;
54
+ left: 0;
53
55
  height: 2px;
54
56
  background-color: var(--stepper-line-complete);
55
57
  z-index: 2;
@@ -58,14 +60,14 @@
58
60
  }
59
61
  .stepper-container .stepper-header::after {
60
62
  width: var(--stepper-progress-width, 0%);
61
- max-width: calc(100% - 32px);
63
+ max-width: 100%;
62
64
  }
63
65
  .stepper-container .step-item {
64
66
  flex: none;
65
67
  display: flex;
66
68
  flex-direction: column;
67
69
  align-items: center;
68
- max-width: var(--stepper-indicator-offset);
70
+ max-width: 0;
69
71
  position: relative;
70
72
  z-index: 3;
71
73
  }
@@ -105,15 +107,15 @@
105
107
  transform: scaleX(1);
106
108
  }
107
109
  .stepper-container .step-indicator {
108
- width: 32px;
109
- height: 32px;
110
+ width: var(--stepper-indicator-size);
111
+ height: var(--stepper-indicator-size);
110
112
  margin: 0 auto 0.25rem;
111
113
  border-radius: 9999px;
112
114
  display: flex;
113
115
  align-items: center;
114
116
  justify-content: center;
115
117
  border: 2px solid #ccc;
116
- font-size: var(--stepper-indicator-size);
118
+ font-size: var(--stepper-indicator-font-size);
117
119
  /* default */
118
120
  background-color: var(--stepper-indicator-default);
119
121
  color: var(--stepper-color-default);
@@ -130,12 +132,17 @@
130
132
  border-color: var(--stepper-border-complete);
131
133
  }
132
134
  .stepper-container .step-title {
135
+ white-space: nowrap;
133
136
  font-size: var(--stepper-title-size);
137
+ margin-left: calc(var(--stepper-indicator-offset) / 2);
134
138
  /* default */
135
139
  color: var(--stepper-color-default);
136
140
  }
137
141
  .stepper-container .step-title--active {
138
- font-weight: bold;
142
+ color: var(--stepper-indicator-active);
143
+ }
144
+ .stepper-container .step-title--complete {
145
+ color: var(--stepper-indicator-complete);
139
146
  }
140
147
  .stepper-container .stepper-buttons {
141
148
  display: flex;
@@ -157,10 +164,10 @@
157
164
 
158
165
  /*------ Verticle ------*/
159
166
  .stepper-container.stepper-container--vertical {
160
- --stepper-indicator-offset: 50px;
161
167
  display: flex;
162
168
  flex-direction: column;
163
- gap: 1rem; /* line length */
169
+ gap: 2.5rem; /* line length */
170
+ max-height: calc(100% - var(--stepper-indicator-size));
164
171
  /* background line */
165
172
  /* Layout */
166
173
  /* Title */
@@ -170,18 +177,18 @@
170
177
  .stepper-container.stepper-container--vertical::before {
171
178
  content: "";
172
179
  position: absolute;
173
- top: 20px;
174
- left: 24px;
180
+ top: 0;
181
+ left: calc(var(--stepper-indicator-size) / 2);
175
182
  width: 2px;
176
- height: calc(100% - 32px);
183
+ height: 100%;
177
184
  background-color: var(--stepper-line-default);
178
185
  z-index: 1;
179
186
  }
180
187
  .stepper-container.stepper-container--vertical::after {
181
188
  content: "";
182
189
  position: absolute;
183
- top: 20px;
184
- left: 24px;
190
+ top: 0;
191
+ left: calc(var(--stepper-indicator-size) / 2);
185
192
  width: 2px;
186
193
  background-color: var(--stepper-line-complete);
187
194
  z-index: 2;
@@ -190,7 +197,7 @@
190
197
  }
191
198
  .stepper-container.stepper-container--vertical::after {
192
199
  height: var(--stepper-progress-height, 0%);
193
- max-height: calc(100% - 32px);
200
+ max-height: 100%;
194
201
  }
195
202
  .stepper-container.stepper-container--vertical .vertical-step-row {
196
203
  display: flex;
@@ -198,13 +205,14 @@
198
205
  }
199
206
  .stepper-container.stepper-container--vertical .vertical-step-left {
200
207
  flex-shrink: 0;
201
- width: var(--stepper-indicator-offset);
208
+ width: var(--stepper-indicator-size);
209
+ height: var(--stepper-indicator-size);
202
210
  position: relative;
203
211
  /* Main Navigation - Each step item (with circle + title) */
204
212
  /* Line */
205
213
  }
206
214
  .stepper-container.stepper-container--vertical .vertical-step-left .step-item {
207
- margin-top: 20px;
215
+ margin-top: 0;
208
216
  }
209
217
  .stepper-container.stepper-container--vertical .vertical-step-left .step-line {
210
218
  position: absolute;
@@ -216,7 +224,7 @@
216
224
  left: 70px;
217
225
  width: calc(100% - 70px);
218
226
  position: absolute;
219
- top: 1.5rem;
227
+ top: 0; /* required */
220
228
  }
221
229
  .stepper-container.stepper-container--vertical .step-title {
222
230
  display: none;