@situaction/traq-ui-ste 1.2.43 → 1.2.45

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.
@@ -1,7 +1,7 @@
1
- import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
- import { useState as a, useRef as w, useEffect as H } from "react";
1
+ import { jsx as o, jsxs as a } from "react/jsx-runtime";
2
+ import { useState as d, useRef as w, useEffect as H } from "react";
3
3
  import { Button as E } from "../button/Button.js";
4
- import { IconButton as d } from "../icon-button/IconButton.js";
4
+ import { IconButton as r } from "../icon-button/IconButton.js";
5
5
  import "react-dom";
6
6
  import "../accordion/Accordion.js";
7
7
  import { Icon as L } from "../icon/Icon.js";
@@ -10,7 +10,7 @@ import "../carousel/Carousel.js";
10
10
  import "../carousel/FadeCarousel.js";
11
11
  import "../theme/ThemeContext.js";
12
12
  import '../../styles/Size.css';import '../../styles/Menu.css';/* empty css */
13
- const O = "_fullHeight_nmor3_15", j = "_fullWidth_nmor3_18", D = "_open_nmor3_21", q = "_close_nmor3_25", A = "_menuButton_nmor3_29", F = "_closeIcon_nmor3_37", G = "_textEllipsis_nmor3_47", J = "_pointer_nmor3_52", K = "_fullImg_nmor3_55", Q = "_menuParams_nmor3_61", T = "_line_nmor3_67", U = "_borderRadiusM_nmor3_74", X = "_menuItem_nmor3_78", Y = "_longLogo_nmor3_87", Z = "_bottomNav_nmor3_92", oo = "_bottomInner_nmor3_101", eo = "_bottomItems_nmor3_109", no = "_bottomParams_nmor3_117", lo = "_flexVerticalBetweenStart_nmor3_126", to = "_flexHorizontalCenter_nmor3_140", so = "_flexVerticalBetweenCenter_nmor3_155", n = {
13
+ const O = "_fullHeight_1nn1p_15", j = "_fullWidth_1nn1p_18", D = "_open_1nn1p_21", q = "_close_1nn1p_25", A = "_menuButton_1nn1p_29", F = "_closeIcon_1nn1p_37", G = "_textEllipsis_1nn1p_47", J = "_pointer_1nn1p_52", K = "_fullImg_1nn1p_55", Q = "_menuParams_1nn1p_61", T = "_line_1nn1p_67", U = "_borderRadiusM_1nn1p_74", X = "_menuItem_1nn1p_78", Y = "_longLogo_1nn1p_87", Z = "_bottomNav_1nn1p_92", nn = "_bottomInner_1nn1p_101", on = "_bottomItems_1nn1p_110", en = "_bottomParams_1nn1p_118", ln = "_flexVerticalBetweenStart_1nn1p_127", tn = "_flexHorizontalCenter_1nn1p_141", sn = "_flexVerticalBetweenCenter_1nn1p_156", e = {
14
14
  fullHeight: O,
15
15
  fullWidth: j,
16
16
  open: D,
@@ -26,117 +26,117 @@ const O = "_fullHeight_nmor3_15", j = "_fullWidth_nmor3_18", D = "_open_nmor3_21
26
26
  menuItem: X,
27
27
  longLogo: Y,
28
28
  bottomNav: Z,
29
- bottomInner: oo,
30
- bottomItems: eo,
31
- bottomParams: no,
32
- flexVerticalBetweenStart: lo,
33
- flexHorizontalCenter: to,
34
- flexVerticalBetweenCenter: so
35
- }, vo = ({ menuItems: s = [], menuParams: r = [], shortLogo: p, logo: g, isOpen: v, defaultOpen: z = !1, selectedId: m, mode: V = "left" }) => {
36
- const [i, C] = a(z ?? !1), [_, N] = a(m ?? (s.length > 0 ? s[0].id : null)), x = w(null), [P, f] = a(!1), [I, u] = a(!1), [M, S] = a(null), [$, W] = a({}), B = w(null);
29
+ bottomInner: nn,
30
+ bottomItems: on,
31
+ bottomParams: en,
32
+ flexVerticalBetweenStart: ln,
33
+ flexHorizontalCenter: tn,
34
+ flexVerticalBetweenCenter: sn
35
+ }, vn = ({ menuItems: s = [], menuParams: c = [], shortLogo: b, logo: g, isOpen: v, defaultOpen: z = !1, selectedId: p, mode: V = "left" }) => {
36
+ const [i, C] = d(z ?? !1), [_, N] = d(p ?? (s.length > 0 ? s[0].id : null)), x = w(null), [P, f] = d(!1), [I, m] = d(!1), [M, S] = d(null), [$, W] = d({}), B = w(null);
37
37
  H(() => {
38
- m != null && N(m);
39
- }, [m]);
40
- const h = (o, l) => {
41
- if (o.stopPropagation(), N(l), s) {
42
- const t = s.find((b) => b.id === l);
38
+ p != null && N(p);
39
+ }, [p]);
40
+ const u = (n, l) => {
41
+ if (n.stopPropagation(), N(l), s) {
42
+ const t = s.find((h) => h.id === l);
43
43
  t == null || t.onClick();
44
44
  }
45
45
  }, y = () => {
46
46
  C(!i), f(!1);
47
- }, k = (o) => {
47
+ }, k = (n) => {
48
48
  var l;
49
- if (r) {
50
- const t = r.find((b) => b.id === o);
49
+ if (c) {
50
+ const t = c.find((h) => h.id === n);
51
51
  if (!t) return;
52
- t.content ? (S(t.content), W(t.position), u(!0)) : (l = t.onClick) == null || l.call(t);
52
+ t.content ? (S(t.content), W(t.position), m(!0)) : (l = t.onClick) == null || l.call(t);
53
53
  }
54
54
  };
55
55
  return H(() => {
56
56
  v && v(i);
57
- }, [i]), V === "bottom" ? /* @__PURE__ */ e("nav", { ref: x, className: n.bottomNav, children: /* @__PURE__ */ c("div", { className: n.bottomInner, children: [
58
- /* @__PURE__ */ e("div", { className: n.bottomItems, children: s && s.map((o) => /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
59
- d,
57
+ }, [i]), V === "bottom" ? /* @__PURE__ */ o("nav", { ref: x, className: e.bottomNav, children: /* @__PURE__ */ a("div", { className: e.bottomInner, children: [
58
+ /* @__PURE__ */ o("div", { className: e.bottomItems, children: s && s.map((n) => /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
59
+ r,
60
60
  {
61
- mode: o.disabled ? "ghost" : _ === o.id ? "secondary" : "ghost",
62
- children: o.icon,
63
- disabled: o.disabled,
64
- onClick: (l) => h(l, o.id)
61
+ mode: n.disabled ? "ghost" : _ === n.id ? "secondary" : "ghost",
62
+ children: n.icon,
63
+ disabled: n.disabled,
64
+ onClick: (l) => u(l, n.id)
65
65
  }
66
- ) }, `icon-${o.id}`)) }),
67
- /* @__PURE__ */ c("div", { className: n.bottomParams, children: [
68
- r && r.map((o) => /* @__PURE__ */ e("div", { onClick: () => k(o.id), children: /* @__PURE__ */ e(d, { mode: "ghost", children: o.icon, disabled: o.disabled }) }, `param-icon-${o.id}`)),
69
- /* @__PURE__ */ e(
66
+ ) }, `icon-${n.id}`)) }),
67
+ /* @__PURE__ */ a("div", { className: e.bottomParams, children: [
68
+ c && c.map((n) => /* @__PURE__ */ o("div", { onClick: () => k(n.id), children: /* @__PURE__ */ o(r, { mode: "ghost", children: n.icon, disabled: n.disabled }) }, `param-icon-${n.id}`)),
69
+ /* @__PURE__ */ o(
70
70
  R,
71
71
  {
72
72
  ref: B,
73
- className: n.borderRadiusM,
73
+ className: e.borderRadiusM,
74
74
  open: I,
75
- onClose: () => u(!1),
75
+ onClose: () => m(!1),
76
76
  position: $,
77
77
  children: M
78
78
  }
79
79
  )
80
80
  ] })
81
- ] }) }) : /* @__PURE__ */ e("nav", { ref: x, children: /* @__PURE__ */ c("div", { className: `${n.flexVerticalBetweenStart} ${n.fullHeight} ${i ? n.open : n.close}`, children: [
82
- /* @__PURE__ */ c("div", { className: n.fullWidth, children: [
83
- /* @__PURE__ */ e(
81
+ ] }) }) : /* @__PURE__ */ o("nav", { ref: x, children: /* @__PURE__ */ a("div", { className: `${e.flexVerticalBetweenStart} ${e.fullHeight} ${i ? e.open : e.close}`, children: [
82
+ /* @__PURE__ */ a("div", { className: e.fullWidth, children: [
83
+ /* @__PURE__ */ o(
84
84
  "div",
85
85
  {
86
- className: `${n.flexHorizontalCenter} ${n.pointer} ${n.textEllipsis}`,
86
+ className: `${e.flexHorizontalCenter} ${e.pointer} ${e.textEllipsis}`,
87
87
  onClick: () => y(),
88
- children: i ? /* @__PURE__ */ c("div", { className: n.fullImg, children: [
89
- g && /* @__PURE__ */ e("img", { className: n.longLogo, src: g, alt: "Logo situaction" }),
90
- /* @__PURE__ */ e(d, { mode: "ghost", size: "menu", children: /* @__PURE__ */ e(L, { icon: "CaretDoubleLeft", size: 16, weight: "duotone" }) })
91
- ] }) : /* @__PURE__ */ e(
88
+ children: i ? /* @__PURE__ */ a("div", { className: e.fullImg, children: [
89
+ g && /* @__PURE__ */ o("img", { className: e.longLogo, src: g, alt: "Logo situaction" }),
90
+ /* @__PURE__ */ o(r, { mode: "ghost", size: "menu", children: /* @__PURE__ */ o(L, { icon: "CaretDoubleLeft", size: 16, weight: "duotone" }) })
91
+ ] }) : /* @__PURE__ */ o(
92
92
  "div",
93
93
  {
94
- className: n.closeIcon,
94
+ className: e.closeIcon,
95
95
  onMouseEnter: () => f(!0),
96
96
  onMouseLeave: () => f(!1),
97
97
  onClick: () => C(!i),
98
- children: P || !p ? /* @__PURE__ */ e(d, { mode: "ghost", size: "menu", children: /* @__PURE__ */ e(L, { icon: "CaretDoubleRight", size: 22, weight: "duotone" }) }) : /* @__PURE__ */ e("img", { src: p, alt: "Logo situaction" })
98
+ children: P || !b ? /* @__PURE__ */ o(r, { mode: "ghost", size: "menu", children: /* @__PURE__ */ o(L, { icon: "CaretDoubleRight", size: 22, weight: "duotone" }) }) : /* @__PURE__ */ o("img", { src: b, alt: "Logo situaction" })
99
99
  }
100
100
  )
101
101
  }
102
102
  ),
103
- /* @__PURE__ */ e("div", { className: n.menuItem, children: s && s.map((o) => i ? /* @__PURE__ */ e("div", { className: `${n.textEllipsis} ${n.menuButton}`, children: /* @__PURE__ */ e(
103
+ /* @__PURE__ */ o("div", { className: e.menuItem, children: s && s.map((n) => i ? /* @__PURE__ */ o("div", { className: `${e.textEllipsis} ${e.menuButton}`, children: /* @__PURE__ */ o(
104
104
  E,
105
105
  {
106
- mode: o.disabled ? "ghost" : _ === o.id ? "secondary" : "ghost",
107
- label: o.label,
108
- disabled: o.disabled,
109
- onClick: (l) => h(l, o.id),
110
- childrenLeft: o.icon
106
+ mode: n.disabled ? "ghost" : _ === n.id ? "secondary" : "ghost",
107
+ label: n.label,
108
+ disabled: n.disabled,
109
+ onClick: (l) => u(l, n.id),
110
+ childrenLeft: n.icon
111
111
  }
112
- ) }, `button-${o.id}`) : /* @__PURE__ */ e("div", { className: n.textEllipsis, children: /* @__PURE__ */ e(
113
- d,
112
+ ) }, `button-${n.id}`) : /* @__PURE__ */ o("div", { className: e.textEllipsis, children: /* @__PURE__ */ o(
113
+ r,
114
114
  {
115
- mode: o.disabled ? "ghost" : _ === o.id ? "secondary" : "ghost",
116
- children: o.icon,
117
- disabled: o.disabled,
118
- onClick: (l) => h(l, o.id)
115
+ mode: n.disabled ? "ghost" : _ === n.id ? "secondary" : "ghost",
116
+ children: n.icon,
117
+ disabled: n.disabled,
118
+ onClick: (l) => u(l, n.id)
119
119
  }
120
- ) }, `icon-${o.id}`)) }),
121
- /* @__PURE__ */ e("div", { className: n.line })
120
+ ) }, `icon-${n.id}`)) }),
121
+ /* @__PURE__ */ o("div", { className: e.line })
122
122
  ] }),
123
- /* @__PURE__ */ c("div", { className: `${n.menuParams} ${n.flexVerticalBetweenCenter}`, children: [
124
- r && r.map((o) => /* @__PURE__ */ e(
123
+ /* @__PURE__ */ a("div", { className: `${e.menuParams} ${e.flexVerticalBetweenCenter}`, children: [
124
+ c && c.map((n) => /* @__PURE__ */ o(
125
125
  "div",
126
126
  {
127
- className: `${n.fullWidth} ${n.textEllipsis}`,
128
- onClick: () => k(o.id),
129
- children: i ? /* @__PURE__ */ e("div", { className: n.menuButton, children: /* @__PURE__ */ e(E, { mode: "ghost", label: o.label, disabled: o.disabled, childrenLeft: o.icon }, o.id) }) : /* @__PURE__ */ e(d, { mode: "ghost", children: o.icon, disabled: o.disabled })
127
+ className: `${e.fullWidth} ${e.textEllipsis}`,
128
+ onClick: () => k(n.id),
129
+ children: i ? /* @__PURE__ */ o("div", { className: e.menuButton, children: /* @__PURE__ */ o(E, { mode: "ghost", label: n.label, disabled: n.disabled, childrenLeft: n.icon }, n.id) }) : /* @__PURE__ */ o(r, { mode: "ghost", children: n.icon, disabled: n.disabled })
130
130
  },
131
- `param-icon-${o.id}`
131
+ `param-icon-${n.id}`
132
132
  )),
133
- /* @__PURE__ */ e(
133
+ /* @__PURE__ */ o(
134
134
  R,
135
135
  {
136
136
  ref: B,
137
- className: n.borderRadiusM,
137
+ className: e.borderRadiusM,
138
138
  open: I,
139
- onClose: () => u(!1),
139
+ onClose: () => m(!1),
140
140
  position: $,
141
141
  children: M
142
142
  }
@@ -145,5 +145,5 @@ const O = "_fullHeight_nmor3_15", j = "_fullWidth_nmor3_18", D = "_open_nmor3_21
145
145
  ] }) });
146
146
  };
147
147
  export {
148
- vo as Menu
148
+ vn as Menu
149
149
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as s, jsx as o } from "react/jsx-runtime";
2
2
  import { useState as _, useRef as h } from "react";
3
- import { n as v, s as C, a as x } from "../../X.es-BEJ-zMPl.mjs";
3
+ import { n as v, s as C, a as x } from "../../X.es-agKqByBO.mjs";
4
4
  import { Button as M } from "../button/Button.js";
5
5
  import "../icon-button/IconButton.js";
6
6
  import { TagCounter as w } from "../tag-counter/TagCounter.js";
@@ -26,6 +26,8 @@ export interface StepperProps {
26
26
  disabledIds?: string[];
27
27
  /** If false, render only the dots/connectors (no item.content). */
28
28
  showContent?: boolean;
29
+ /** If true, completed dots display a check icon instead of a filled dot. */
30
+ showCompletedCheck?: boolean;
29
31
  /** Optional accessible label for each dot. */
30
32
  getDotAriaLabel?: (item: StepITem, index: number, status: StepStatus) => string;
31
33
  /** Dot button margin-top to align with the content on the right (px or CSS value). */
@@ -1,92 +1,95 @@
1
- import { jsx as _, jsxs as S } from "react/jsx-runtime";
2
- import { useMemo as f, useRef as E, useState as X, useLayoutEffect as Z } from "react";
3
- import '../../styles/Stepper.css';const L = "_wrapper_lh0wd_30", tt = "_steps_lh0wd_35", nt = "_row_lh0wd_42", et = "_connectorAbs_lh0wd_49", ot = "_connectorProgress_lh0wd_59", st = "_connectorGradient_lh0wd_63", rt = "_connectorDefault_lh0wd_68", ct = "_dotButton_lh0wd_74", dt = "_dotButtonDisabled_lh0wd_89", it = "_dotOuter_lh0wd_95", at = "_dotInner_lh0wd_103", lt = "_rowNoContent_lh0wd_165", ut = "_content_lh0wd_170", o = {
4
- wrapper: L,
5
- steps: tt,
6
- row: nt,
7
- connectorAbs: et,
8
- connectorProgress: ot,
9
- connectorGradient: st,
10
- connectorDefault: rt,
11
- dotButton: ct,
12
- dotButtonDisabled: dt,
13
- dotOuter: it,
14
- dotInner: at,
15
- "dotButton--upcoming": "_dotButton--upcoming_lh0wd_108",
16
- "dotButton--active": "_dotButton--active_lh0wd_120",
17
- "dotButton--completed": "_dotButton--completed_lh0wd_142",
18
- "dotButton--disabled": "_dotButton--disabled_lh0wd_153",
19
- rowNoContent: lt,
20
- content: ut
21
- }, pt = (e, d) => {
22
- if (e === d) return !0;
23
- if (e.length !== d.length) return !1;
24
- for (let i = 0; i < e.length; i++) {
25
- const p = e[i], a = d[i];
26
- if (p.key !== a.key || p.leftPx !== a.leftPx || p.topPx !== a.topPx || p.heightPx !== a.heightPx || p.variant !== a.variant)
1
+ import { jsx as _, jsxs as C } from "react/jsx-runtime";
2
+ import { useMemo as m, useRef as E, useState as Z, useLayoutEffect as L } from "react";
3
+ import { s as tt } from "../../CheckCircle.es-ILxE75_k.mjs";
4
+ import '../../styles/Stepper.css';const et = "_wrapper_c4wm6_30", nt = "_steps_c4wm6_35", ot = "_row_c4wm6_42", st = "_connectorAbs_c4wm6_49", ct = "_connectorProgress_c4wm6_59", rt = "_connectorGradient_c4wm6_63", dt = "_connectorDefault_c4wm6_68", it = "_dotButton_c4wm6_74", at = "_dotButtonDisabled_c4wm6_89", ut = "_dotOuter_c4wm6_95", lt = "_dotInner_c4wm6_103", pt = "_rowNoContent_c4wm6_172", _t = "_content_c4wm6_177", n = {
5
+ wrapper: et,
6
+ steps: nt,
7
+ row: ot,
8
+ connectorAbs: st,
9
+ connectorProgress: ct,
10
+ connectorGradient: rt,
11
+ connectorDefault: dt,
12
+ dotButton: it,
13
+ dotButtonDisabled: at,
14
+ dotOuter: ut,
15
+ dotInner: lt,
16
+ "dotButton--upcoming": "_dotButton--upcoming_c4wm6_108",
17
+ "dotButton--active": "_dotButton--active_c4wm6_120",
18
+ "dotButton--completed": "_dotButton--completed_c4wm6_142",
19
+ "dotButton--completedCheck": "_dotButton--completedCheck_c4wm6_153",
20
+ "dotButton--disabled": "_dotButton--disabled_c4wm6_160",
21
+ rowNoContent: pt,
22
+ content: _t
23
+ }, ft = (o, i) => {
24
+ if (o === i) return !0;
25
+ if (o.length !== i.length) return !1;
26
+ for (let a = 0; a < o.length; a++) {
27
+ const p = o[a], u = i[a];
28
+ if (p.key !== u.key || p.leftPx !== u.leftPx || p.topPx !== u.topPx || p.heightPx !== u.heightPx || p.variant !== u.variant)
27
29
  return !1;
28
30
  }
29
31
  return !0;
30
- }, ft = ({
31
- items: e,
32
- onDotClick: d,
33
- dotOffsetPx: i = 18,
32
+ }, gt = ({
33
+ items: o,
34
+ onDotClick: i,
35
+ dotOffsetPx: a = 18,
34
36
  dotsClickable: p = !0,
35
- activeId: a,
37
+ activeId: u,
36
38
  autoStatusFromActive: y = !0,
37
- disabledIds: x = [],
39
+ disabledIds: B = [],
38
40
  showContent: P = !0,
39
- getDotAriaLabel: m,
41
+ showCompletedCheck: N = !1,
42
+ getDotAriaLabel: x,
40
43
  dotButtonMarginTop: I = "10px"
41
44
  }) => {
42
- const C = f(
43
- () => ({ "--flowline-dot-offset": `${i}px` }),
44
- [i]
45
- ), Y = f(() => x.join("|"), [x]), g = f(() => {
46
- var u, r;
47
- const t = new Set(x), s = a ?? ((u = e.find((n) => n.status !== "disabled" && !t.has(n.id))) == null ? void 0 : u.id) ?? ((r = e[0]) == null ? void 0 : r.id), l = e.findIndex((n) => n.id === s);
48
- return e.map((n, h) => n.status === "disabled" || t.has(n.id) ? "disabled" : y ? h < l ? "completed" : h === l ? "active" : "upcoming" : n.status ?? "upcoming");
49
- }, [e, a, y, Y]), z = f(() => g.join("|"), [g]), K = f(() => e.map((t) => t.id).join("|"), [e]), N = E(null), B = E(/* @__PURE__ */ new Map()), q = f(() => (t) => (s) => {
50
- B.current.set(t, s);
51
- }, []), [D, k] = X([]);
52
- return Z(() => {
53
- const t = N.current;
45
+ const z = m(
46
+ () => ({ "--flowline-dot-offset": `${a}px` }),
47
+ [a]
48
+ ), Y = m(() => B.join("|"), [B]), w = m(() => {
49
+ var l, r;
50
+ const t = new Set(B), s = u ?? ((l = o.find((e) => e.status !== "disabled" && !t.has(e.id))) == null ? void 0 : l.id) ?? ((r = o[0]) == null ? void 0 : r.id), c = o.findIndex((e) => e.id === s);
51
+ return o.map((e, f) => e.status === "disabled" || t.has(e.id) ? "disabled" : y ? f < c ? "completed" : f === c ? "active" : "upcoming" : e.status ?? "upcoming");
52
+ }, [o, u, y, Y]), k = m(() => w.join("|"), [w]), K = m(() => o.map((t) => t.id).join("|"), [o]), R = E(null), g = E(/* @__PURE__ */ new Map()), q = m(() => (t) => (s) => {
53
+ g.current.set(t, s);
54
+ }, []), [D, F] = Z([]);
55
+ return L(() => {
56
+ const t = R.current;
54
57
  if (!t) return;
55
58
  let s = null;
56
- const l = () => {
57
- const n = t.getBoundingClientRect(), h = [], v = e.map((c) => c.id);
58
- for (let c = 0; c < v.length - 1; c++) {
59
- const R = v[c], $ = v[c + 1], j = B.current.get(R), A = B.current.get($);
60
- if (!j || !A) continue;
61
- const w = j.getBoundingClientRect(), b = A.getBoundingClientRect(), F = Math.round(w.left + w.width / 2 - n.left), T = w.top + w.height / 2 - n.top, H = b.top + b.height / 2 - n.top, J = w.height / 2, Q = b.height / 2, O = 2, G = Math.round(T + J + O), U = Math.round(H - Q - O), V = Math.max(0, U - G), M = g[c], W = M === "completed" ? "progress" : M === "active" ? "gradient" : "default";
62
- h.push({
63
- key: `${R}__${$}`,
64
- leftPx: F,
65
- topPx: G,
66
- heightPx: V,
67
- variant: W
59
+ const c = () => {
60
+ const e = t.getBoundingClientRect(), f = [], b = o.map((d) => d.id);
61
+ for (let d = 0; d < b.length - 1; d++) {
62
+ const $ = b[d], j = b[d + 1], A = g.current.get($), O = g.current.get(j);
63
+ if (!A || !O) continue;
64
+ const h = A.getBoundingClientRect(), v = O.getBoundingClientRect(), T = Math.round(h.left + h.width / 2 - e.left), H = h.top + h.height / 2 - e.top, J = v.top + v.height / 2 - e.top, Q = h.height / 2, U = v.height / 2, G = 2, M = Math.round(H + Q + G), V = Math.round(J - U - G), W = Math.max(0, V - M), S = w[d], X = S === "completed" ? "progress" : S === "active" ? "gradient" : "default";
65
+ f.push({
66
+ key: `${$}__${j}`,
67
+ leftPx: T,
68
+ topPx: M,
69
+ heightPx: W,
70
+ variant: X
68
71
  });
69
72
  }
70
- k((c) => pt(c, h) ? c : h);
71
- }, u = () => {
73
+ F((d) => ft(d, f) ? d : f);
74
+ }, l = () => {
72
75
  s == null && (s = requestAnimationFrame(() => {
73
- s = null, l();
76
+ s = null, c();
74
77
  }));
75
78
  };
76
- u();
77
- const r = new ResizeObserver(u);
78
- return r.observe(t), B.current.forEach((n) => {
79
- n && r.observe(n);
80
- }), window.addEventListener("resize", u), () => {
81
- s != null && cancelAnimationFrame(s), r.disconnect(), window.removeEventListener("resize", u);
79
+ l();
80
+ const r = new ResizeObserver(l);
81
+ return r.observe(t), g.current.forEach((e) => {
82
+ e && r.observe(e);
83
+ }), window.addEventListener("resize", l), () => {
84
+ s != null && cancelAnimationFrame(s), r.disconnect(), window.removeEventListener("resize", l);
82
85
  };
83
- }, [K, z]), /* @__PURE__ */ _("div", { className: o.wrapper, style: C, children: /* @__PURE__ */ S("div", { ref: N, className: o.steps, children: [
86
+ }, [K, k]), /* @__PURE__ */ _("div", { className: n.wrapper, style: z, children: /* @__PURE__ */ C("div", { ref: R, className: n.steps, children: [
84
87
  D.map((t) => /* @__PURE__ */ _(
85
88
  "span",
86
89
  {
87
90
  className: [
88
- o.connectorAbs,
89
- t.variant === "progress" ? o.connectorProgress : t.variant === "gradient" ? o.connectorGradient : o.connectorDefault
91
+ n.connectorAbs,
92
+ t.variant === "progress" ? n.connectorProgress : t.variant === "gradient" ? n.connectorGradient : n.connectorDefault
90
93
  ].join(" "),
91
94
  style: {
92
95
  left: `${t.leftPx}px`,
@@ -97,36 +100,37 @@ import '../../styles/Stepper.css';const L = "_wrapper_lh0wd_30", tt = "_steps_lh
97
100
  },
98
101
  t.key
99
102
  )),
100
- e.map((t, s) => {
101
- const l = g[s], r = p && !(l === "disabled") && !!d;
102
- return /* @__PURE__ */ S(
103
+ o.map((t, s) => {
104
+ const c = w[s], r = p && !(c === "disabled") && !!i;
105
+ return /* @__PURE__ */ C(
103
106
  "div",
104
107
  {
105
108
  className: [
106
- o.row,
107
- P ? "" : o.rowNoContent
109
+ n.row,
110
+ P ? "" : n.rowNoContent
108
111
  ].filter(Boolean).join(" "),
109
- style: { columnGap: `${i}px` },
112
+ style: { columnGap: `${a}px` },
110
113
  children: [
111
114
  /* @__PURE__ */ _(
112
115
  "button",
113
116
  {
114
117
  type: "button",
115
118
  className: [
116
- o.dotButton,
117
- o[`dotButton--${l}`],
118
- r ? "" : o.dotButtonDisabled
119
+ n.dotButton,
120
+ n[`dotButton--${c}`],
121
+ c === "completed" && N ? n["dotButton--completedCheck"] : "",
122
+ r ? "" : n.dotButtonDisabled
119
123
  ].filter(Boolean).join(" "),
120
124
  style: { marginTop: I ?? "0" },
121
125
  onClick: () => {
122
- r && (d == null || d(t.id));
126
+ r && (i == null || i(t.id));
123
127
  },
124
- "aria-label": (m == null ? void 0 : m(t, s, l)) ?? `Open step ${t.id}`,
128
+ "aria-label": (x == null ? void 0 : x(t, s, c)) ?? `Open step ${t.id}`,
125
129
  disabled: !r,
126
- children: /* @__PURE__ */ _("span", { ref: q(t.id), className: o.dotOuter, children: /* @__PURE__ */ _("span", { className: o.dotInner }) })
130
+ children: /* @__PURE__ */ _("span", { ref: q(t.id), className: n.dotOuter, children: c === "completed" && N ? /* @__PURE__ */ _(tt, { size: 14, weight: "bold" }) : /* @__PURE__ */ _("span", { className: n.dotInner }) })
127
131
  }
128
132
  ),
129
- P ? /* @__PURE__ */ _("div", { className: o.content, children: t.content }) : null
133
+ P ? /* @__PURE__ */ _("div", { className: n.content, children: t.content }) : null
130
134
  ]
131
135
  },
132
136
  t.id
@@ -135,5 +139,5 @@ import '../../styles/Stepper.css';const L = "_wrapper_lh0wd_30", tt = "_steps_lh
135
139
  ] }) });
136
140
  };
137
141
  export {
138
- ft as Stepper
142
+ gt as Stepper
139
143
  };
@@ -1 +1 @@
1
- nav{height:100vh;width:fit-content;padding:0 var(--spacing-xs-3) var(--spacing-xs-3);flex-shrink:1;transition:.3s;box-sizing:border-box;z-index:5}nav ._fullHeight_nmor3_15{height:100%}nav ._fullWidth_nmor3_18{width:100%}nav ._open_nmor3_21{width:200px;transition:all ease .3s}nav ._close_nmor3_25{width:40px;transition:all ease-out .3s}nav ._menuButton_nmor3_29{width:100%}nav ._menuButton_nmor3_29 button{padding:var(--spacing-xs-4);width:inherit!important;justify-content:flex-start!important}nav ._closeIcon_nmor3_37{height:30px;cursor:pointer;margin:.875rem 0;padding:1px 0}nav ._label_nmor3_43{letter-spacing:.72px;font-weight:600}nav ._textEllipsis_nmor3_47{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}nav ._pointer_nmor3_52{cursor:pointer}nav ._fullImg_nmor3_55{margin:.875rem 0;display:flex;justify-content:space-between;width:100%}nav ._menuParams_nmor3_61{gap:.125rem;position:relative;width:100%}._line_nmor3_67{height:1px;width:100%;background-color:var(--general-border-window);margin:var(--spacing-xs-3) 0}._borderRadiusM_nmor3_74{border-radius:6px}._menuItem_nmor3_78{gap:.25rem;width:100%;display:flex;justify-content:flex-start;align-items:stretch;flex-direction:column}._longLogo_nmor3_87{transition:transform .25s ease,opacity .25s ease;will-change:transform,opacity}._bottomNav_nmor3_92{width:100%;height:fit-content;padding:var(--spacing-xs-3);box-sizing:border-box;z-index:5;flex-shrink:0}._bottomInner_nmor3_101{display:flex;justify-content:center;align-items:center;flex-direction:row;width:100%}._bottomItems_nmor3_109{display:flex;justify-content:center;align-items:center;flex-direction:row;gap:var(--spacing-xs-6)}._bottomParams_nmor3_117{display:flex;justify-content:flex-end;align-items:center;flex-direction:row;gap:var(--spacing-xs-6);position:relative}._flexVerticalBetweenStart_nmor3_126{display:flex;justify-content:space-between;align-items:start;flex-direction:column}._flexHorizontalBetween_nmor3_133{display:flex;justify-content:space-between;align-items:center;flex-direction:row}._flexHorizontalCenter_nmor3_140{height:60px;display:flex;justify-content:center;align-items:center;flex-direction:row}._flexVertical_nmor3_126{display:flex;justify-content:flex-start;align-items:stretch;flex-direction:column}._flexVerticalBetweenCenter_nmor3_155{display:flex;justify-content:space-between;align-items:center;flex-direction:column}
1
+ nav{height:100vh;width:fit-content;padding:0 var(--spacing-xs-3) var(--spacing-xs-3);flex-shrink:1;transition:.3s;box-sizing:border-box;z-index:5}nav ._fullHeight_1nn1p_15{height:100%}nav ._fullWidth_1nn1p_18{width:100%}nav ._open_1nn1p_21{width:200px;transition:all ease .3s}nav ._close_1nn1p_25{width:40px;transition:all ease-out .3s}nav ._menuButton_1nn1p_29{width:100%}nav ._menuButton_1nn1p_29 button{padding:var(--spacing-xs-4);width:inherit!important;justify-content:flex-start!important}nav ._closeIcon_1nn1p_37{height:30px;cursor:pointer;margin:.875rem 0;padding:1px 0}nav ._label_1nn1p_43{letter-spacing:.72px;font-weight:600}nav ._textEllipsis_1nn1p_47{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}nav ._pointer_1nn1p_52{cursor:pointer}nav ._fullImg_1nn1p_55{margin:.875rem 0;display:flex;justify-content:space-between;width:100%}nav ._menuParams_1nn1p_61{gap:.125rem;position:relative;width:100%}._line_1nn1p_67{height:1px;width:100%;background-color:var(--general-border-window);margin:var(--spacing-xs-3) 0}._borderRadiusM_1nn1p_74{border-radius:6px}._menuItem_1nn1p_78{gap:.25rem;width:100%;display:flex;justify-content:flex-start;align-items:stretch;flex-direction:column}._longLogo_1nn1p_87{transition:transform .25s ease,opacity .25s ease;will-change:transform,opacity}._bottomNav_1nn1p_92{width:100%;height:fit-content;padding:var(--spacing-xs-3);box-sizing:border-box;z-index:5;flex-shrink:0}._bottomInner_1nn1p_101{display:flex;justify-content:center;align-items:center;flex-direction:row;width:100%;gap:var(--spacing-xs-6)}._bottomItems_1nn1p_110{display:flex;justify-content:center;align-items:center;flex-direction:row;gap:var(--spacing-xs-6)}._bottomParams_1nn1p_118{display:flex;justify-content:flex-end;align-items:center;flex-direction:row;gap:var(--spacing-xs-6);position:relative}._flexVerticalBetweenStart_1nn1p_127{display:flex;justify-content:space-between;align-items:start;flex-direction:column}._flexHorizontalBetween_1nn1p_134{display:flex;justify-content:space-between;align-items:center;flex-direction:row}._flexHorizontalCenter_1nn1p_141{height:60px;display:flex;justify-content:center;align-items:center;flex-direction:row}._flexVertical_1nn1p_127{display:flex;justify-content:flex-start;align-items:stretch;flex-direction:column}._flexVerticalBetweenCenter_1nn1p_156{display:flex;justify-content:space-between;align-items:center;flex-direction:column}
@@ -1 +1 @@
1
- ._wrapper_lh0wd_30{--stepper-left-col: 20px;--stepper-dot-button: 24px}._steps_lh0wd_35{position:relative;display:flex;flex-direction:column;gap:.625rem}._row_lh0wd_42{display:grid;grid-template-columns:var(--stepper-left-col) 1fr;align-items:start}._connectorAbs_lh0wd_49{position:absolute;width:1px;transform:translate(-50%);border-radius:999px;pointer-events:none;z-index:0}._connectorProgress_lh0wd_59{background:var(--flow-point-line-active)}._connectorGradient_lh0wd_63{background:linear-gradient(to bottom,var(--flow-point-line-active),var(--flow-point-line-inactive))}._connectorDefault_lh0wd_68{background-image:linear-gradient(to bottom,var(--flow-point-line-inactive) 50%,transparent 0);background-size:2px 8px;background-repeat:repeat-y}._dotButton_lh0wd_74{width:var(--stepper-dot-button);height:var(--stepper-dot-button);padding:0;border:0;background:transparent;display:flex;align-items:center;justify-content:center;cursor:pointer;transform:translateY(var(--stepper-dot-offset-y, 0px));position:relative;z-index:1}._dotButtonDisabled_lh0wd_89{cursor:default;opacity:.5}._dotOuter_lh0wd_95{display:flex;align-items:center;justify-content:center;border-radius:999px;transform:translateY(var(--stepper-dot-offset-y, 0px))}._dotInner_lh0wd_103{border-radius:999px}._dotButton--upcoming_lh0wd_108 ._dotOuter_lh0wd_95{width:10px;height:10px;border:none;background:var(--flow-point-line-inactive)}._dotButton--upcoming_lh0wd_108 ._dotInner_lh0wd_103{display:none}._dotButton--active_lh0wd_120 ._dotOuter_lh0wd_95{width:16px;height:16px;border-radius:999px;border:1px solid var(--flow-point-line-active);background:transparent;padding:1px;box-sizing:border-box;display:flex;align-items:center;justify-content:center}._dotButton--active_lh0wd_120 ._dotInner_lh0wd_103{width:10px;height:10px;border-radius:999px;background:var(--flow-point-line-active);display:block}._dotButton--completed_lh0wd_142 ._dotOuter_lh0wd_95{width:10px;height:10px;background:var(--flow-point-line-active)}._dotButton--completed_lh0wd_142 ._dotInner_lh0wd_103{display:none}._dotButton--disabled_lh0wd_153 ._dotOuter_lh0wd_95{width:10px;height:10px;border:none;background:var(--general-border-window);opacity:.6}._dotButton--disabled_lh0wd_153 ._dotInner_lh0wd_103{display:none}._rowNoContent_lh0wd_165{grid-template-columns:var(--stepper-left-col);column-gap:0}._rowNoContent_lh0wd_165 ._content_lh0wd_170{display:none}
1
+ ._wrapper_c4wm6_30{--stepper-left-col: 20px;--stepper-dot-button: 24px}._steps_c4wm6_35{position:relative;display:flex;flex-direction:column;gap:.625rem}._row_c4wm6_42{display:grid;grid-template-columns:var(--stepper-left-col) 1fr;align-items:start}._connectorAbs_c4wm6_49{position:absolute;width:1px;transform:translate(-50%);border-radius:999px;pointer-events:none;z-index:0}._connectorProgress_c4wm6_59{background:var(--flow-point-line-active)}._connectorGradient_c4wm6_63{background:linear-gradient(to bottom,var(--flow-point-line-active),var(--flow-point-line-inactive))}._connectorDefault_c4wm6_68{background-image:linear-gradient(to bottom,var(--flow-point-line-inactive) 50%,transparent 0);background-size:2px 8px;background-repeat:repeat-y}._dotButton_c4wm6_74{width:var(--stepper-dot-button);height:var(--stepper-dot-button);padding:0;border:0;background:transparent;display:flex;align-items:center;justify-content:center;cursor:pointer;transform:translateY(var(--stepper-dot-offset-y, 0px));position:relative;z-index:1}._dotButtonDisabled_c4wm6_89{cursor:default;opacity:.5}._dotOuter_c4wm6_95{display:flex;align-items:center;justify-content:center;border-radius:999px;transform:translateY(var(--stepper-dot-offset-y, 0px))}._dotInner_c4wm6_103{border-radius:999px}._dotButton--upcoming_c4wm6_108 ._dotOuter_c4wm6_95{width:10px;height:10px;border:none;background:var(--flow-point-line-inactive)}._dotButton--upcoming_c4wm6_108 ._dotInner_c4wm6_103{display:none}._dotButton--active_c4wm6_120 ._dotOuter_c4wm6_95{width:16px;height:16px;border-radius:999px;border:1px solid var(--flow-point-line-active);background:transparent;padding:1px;box-sizing:border-box;display:flex;align-items:center;justify-content:center}._dotButton--active_c4wm6_120 ._dotInner_c4wm6_103{width:10px;height:10px;border-radius:999px;background:var(--flow-point-line-active);display:block}._dotButton--completed_c4wm6_142 ._dotOuter_c4wm6_95{width:10px;height:10px;background:var(--flow-point-line-active)}._dotButton--completed_c4wm6_142 ._dotInner_c4wm6_103{display:none}._dotButton--completedCheck_c4wm6_153 ._dotOuter_c4wm6_95{width:16px;height:16px;color:#fff}._dotButton--disabled_c4wm6_160 ._dotOuter_c4wm6_95{width:10px;height:10px;border:none;background:var(--general-border-window);opacity:.6}._dotButton--disabled_c4wm6_160 ._dotInner_c4wm6_103{display:none}._rowNoContent_c4wm6_172{grid-template-columns:var(--stepper-left-col);column-gap:0}._rowNoContent_c4wm6_172 ._content_c4wm6_177{display:none}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@situaction/traq-ui-ste",
3
- "version": "1.2.43",
3
+ "version": "1.2.45",
4
4
  "description": "library react component Situaction",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",