@dimasbaguspm/versaur 0.0.55 → 0.0.57

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,4 +1,4 @@
1
- import { C as a, b as n, a as p, D as u, E as s, P as i, c as I, R as l, S as c, d as S, f as r, e as h, g as o, i as x, T as P, h as T, j as b } from "../time-picker-input-CYBfc7s_.js";
1
+ import { C as a, b as n, a as p, D as u, E as s, P as i, c as I, R as l, S as c, d as S, f as r, e as h, g as o, i as x, T as P, h as T, j as b } from "../time-picker-input-BgbyllDK.js";
2
2
  export {
3
3
  a as CheckboxInput,
4
4
  n as ChipMultipleInput,
package/dist/js/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { L as e, P as t, S as r } from "./skeleton-BNZyaRjo.js";
2
- import { A as n, a as u, B as p, b as i, F as c, e as l, c as I, P as B, d, S, T as m } from "./top-bar-Dqje-W3G.js";
3
- import { C as T, b, a as x, D as A, E as h, P, c as C, R as f, S as k, d as M, f as F, e as L, g as D, i as H, T as R, h as G, j } from "./time-picker-input-CYBfc7s_.js";
2
+ import { A as n, a as u, B as p, b as i, F as c, e as l, c as I, P as B, d, S, T as m } from "./top-bar-Do2JqSqe.js";
3
+ import { C as T, b, a as x, D as A, E as h, P, c as C, R as f, S as k, d as M, f as F, e as L, g as D, i as H, T as R, h as G, j } from "./time-picker-input-BgbyllDK.js";
4
4
  import { B as v, D as w, M as E, T as N } from "./tooltip-nZW9TUz3.js";
5
5
  import { A as z, a as J, b as K, c as O, d as Q, e as U, f as V, B as W, s as X, g as Y, h as Z, i as _, l as $, j as aa, k as sa, C as ea, F as ta, H as ra, m as oa, I as na, p as ua, r as pa, q as ia, M as ca, N as la, T as Ia, n as Ba, o as da } from "./image-rectangle-K9jmTTED.js";
6
6
  import { S as ma } from "./snackbar-DH8jCh2V.js";
7
- import { B as Ta, T as ba } from "./tabs-I4n6MLAv.js";
7
+ import { B as Ta, T as ba } from "./tabs-CmfJNCe6.js";
8
8
  import { S as Aa, u as ha } from "./use-snackbars-Cou8L41F.js";
9
9
  export {
10
10
  z as Accordion,
@@ -1,4 +1,4 @@
1
- import { A as r, a as e, B as s, b as t, F as p, e as B, c as d, P as u, d as g, S as P, T as i } from "../top-bar-Dqje-W3G.js";
1
+ import { A as r, a as e, B as s, b as t, F as p, e as B, c as d, P as u, d as g, S as P, T as i } from "../top-bar-Do2JqSqe.js";
2
2
  export {
3
3
  r as AppBar,
4
4
  e as BadgeGroup,
@@ -1,4 +1,4 @@
1
- import { B as s, T as b } from "../tabs-I4n6MLAv.js";
1
+ import { B as s, T as b } from "../tabs-CmfJNCe6.js";
2
2
  export {
3
3
  s as Breadcrumbs,
4
4
  b as Tabs
@@ -1,21 +1,21 @@
1
- import { c as l, j as t, a as b } from "./index-DOdDlCoL.js";
1
+ import { c as d, j as t, a as f } from "./index-DOdDlCoL.js";
2
2
  import { forwardRef as m, createContext as p, useContext as h, useState as g, useLayoutEffect as j, useRef as T } from "react";
3
3
  import { I as w } from "./image-rectangle-K9jmTTED.js";
4
4
  import "./snackbar-DH8jCh2V.js";
5
5
  import { ChevronRight as y } from "lucide-react";
6
- const I = l(
6
+ const I = d(
7
7
  "flex items-center gap-2 text-sm text-gray-500"
8
- ), C = l(
8
+ ), C = d(
9
9
  "inline-flex items-center gap-1 transition-colors hover:underline cursor-pointer"
10
- ), N = m(function({ children: s, icon: n, isCurrent: a, className: r, ...i }, o) {
10
+ ), N = m(function({ children: s, icon: n, isCurrent: a, className: r, ...o }, i) {
11
11
  return /* @__PURE__ */ t.jsx("li", { className: "flex items-center", children: /* @__PURE__ */ t.jsxs(
12
12
  "a",
13
13
  {
14
- ref: o,
14
+ ref: i,
15
15
  "aria-current": a ? "page" : void 0,
16
16
  tabIndex: a ? -1 : 0,
17
- className: b(C(), r),
18
- ...i,
17
+ className: f(C(), r),
18
+ ...o,
19
19
  children: [
20
20
  n && /* @__PURE__ */ t.jsx("span", { className: "mr-1 inline-flex", children: n }),
21
21
  s
@@ -30,20 +30,20 @@ const R = m(
30
30
  function({ children: s, "aria-label": n = "Breadcrumb", ...a }, r) {
31
31
  return /* @__PURE__ */ t.jsx("nav", { "aria-label": n, ...a, children: /* @__PURE__ */ t.jsx("ol", { ref: r, className: I(), children: s }) });
32
32
  }
33
- ), W = Object.assign(R, {
33
+ ), D = Object.assign(R, {
34
34
  Item: N,
35
35
  Separator: B
36
- }), f = p(null), S = () => {
37
- const e = h(f);
36
+ }), x = p(null), S = () => {
37
+ const e = h(x);
38
38
  if (!e)
39
39
  throw new Error("useTabsContext must be used within a TabsProvider");
40
40
  return e;
41
- }, E = l(
41
+ }, E = d(
42
42
  [
43
- "inline-flex items-center justify-center",
43
+ "flex items-center justify-center",
44
44
  "px-4 py-2",
45
45
  "text-sm font-normal",
46
- "text-foreground",
46
+ "text-foreground text-center",
47
47
  "transition-all duration-200",
48
48
  "border-b-2 border-transparent",
49
49
  "select-none",
@@ -63,20 +63,25 @@ const R = m(
63
63
  active: {
64
64
  true: "text-primary font-medium",
65
65
  false: "hover:text-primary"
66
+ },
67
+ fullWidth: {
68
+ true: "flex-1 w-full",
69
+ false: ""
66
70
  }
67
71
  },
68
72
  defaultVariants: {
69
- active: !1
73
+ active: !1,
74
+ fullWidth: !1
70
75
  }
71
76
  }
72
- ), L = l([
77
+ ), L = d([
73
78
  "flex flex-row w-full",
74
79
  "border-b border-border",
75
80
  "overflow-x-auto overflow-y-visible",
76
81
  "whitespace-nowrap",
77
82
  // Ensure focus rings with offset are not cropped (2px ring + 2px offset = 4px needed)
78
83
  "py-1"
79
- ]), V = l([
84
+ ]), V = d([
80
85
  "absolute bottom-0",
81
86
  "h-0.5 rounded",
82
87
  "bg-primary",
@@ -89,10 +94,10 @@ const R = m(
89
94
  onClick: a,
90
95
  ...r
91
96
  }) => {
92
- const { activeTab: i, setActiveTab: o } = S(), c = i === e, d = (u) => {
93
- u.preventDefault(), o(e), a?.(u);
97
+ const { activeTab: o, setActiveTab: i, fullWidth: l } = S(), c = o === e, b = (u) => {
98
+ u.preventDefault(), i(e), a?.(u);
94
99
  };
95
- return /* @__PURE__ */ t.jsx("li", { role: "presentation", children: /* @__PURE__ */ t.jsx(
100
+ return /* @__PURE__ */ t.jsx("li", { role: "presentation", className: l ? "flex-1" : void 0, children: /* @__PURE__ */ t.jsx(
96
101
  "a",
97
102
  {
98
103
  role: "tab",
@@ -101,13 +106,14 @@ const R = m(
101
106
  "aria-controls": `tabs-content-${e}`,
102
107
  "aria-current": c ? "page" : void 0,
103
108
  href: `#${e}`,
104
- className: b(
109
+ className: f(
105
110
  E({
106
- active: c
111
+ active: c,
112
+ fullWidth: l
107
113
  }),
108
114
  n
109
115
  ),
110
- onClick: d,
116
+ onClick: b,
111
117
  ...r,
112
118
  children: s
113
119
  }
@@ -121,7 +127,7 @@ const R = m(
121
127
  "div",
122
128
  {
123
129
  "aria-hidden": "true",
124
- className: b(V(), n),
130
+ className: f(V(), n),
125
131
  style: {
126
132
  left: e,
127
133
  width: s
@@ -129,7 +135,7 @@ const R = m(
129
135
  ...a
130
136
  }
131
137
  );
132
- function $(e, s) {
138
+ function W(e, s) {
133
139
  const [n, a] = g({
134
140
  left: 0,
135
141
  width: 0
@@ -137,57 +143,59 @@ function $(e, s) {
137
143
  return j(() => {
138
144
  const r = s.current;
139
145
  if (!r) return;
140
- const i = r.querySelector(
146
+ const o = r.querySelector(
141
147
  `a#tabs-trigger-${e}`
142
148
  );
143
- if (!i) return;
144
- const o = i.parentElement;
145
149
  if (!o) return;
146
- const c = () => {
147
- const x = o.offsetLeft - r.scrollLeft, v = o.offsetWidth;
148
- a({ left: x, width: v });
150
+ const i = o.parentElement;
151
+ if (!i) return;
152
+ const l = () => {
153
+ const u = i.offsetLeft - r.scrollLeft, v = i.offsetWidth;
154
+ a({ left: u, width: v });
149
155
  };
150
- c();
151
- const d = () => {
152
- c();
156
+ l();
157
+ const c = () => {
158
+ l();
153
159
  };
154
- r.addEventListener("scroll", d, { passive: !0 });
155
- const u = requestAnimationFrame(() => {
156
- i.scrollIntoView({
160
+ r.addEventListener("scroll", c, { passive: !0 });
161
+ const b = requestAnimationFrame(() => {
162
+ o.scrollIntoView({
157
163
  behavior: "smooth",
158
164
  inline: "center",
159
165
  block: "nearest"
160
166
  });
161
167
  });
162
168
  return () => {
163
- cancelAnimationFrame(u), r.removeEventListener("scroll", d);
169
+ cancelAnimationFrame(b), r.removeEventListener("scroll", c);
164
170
  };
165
171
  }, [e, s]), n;
166
172
  }
167
- const q = ({
173
+ const $ = ({
168
174
  value: e,
169
175
  onValueChange: s,
170
176
  children: n,
171
177
  className: a,
172
- ...r
178
+ fullWidth: r = !1,
179
+ ...o
173
180
  }) => {
174
181
  const i = {
175
182
  activeTab: e,
176
- setActiveTab: s
177
- }, o = T(null), c = $(e, o);
178
- return /* @__PURE__ */ t.jsx(f.Provider, { value: i, children: /* @__PURE__ */ t.jsx(
183
+ setActiveTab: s,
184
+ fullWidth: r
185
+ }, l = T(null), c = W(e, l);
186
+ return /* @__PURE__ */ t.jsx(x.Provider, { value: i, children: /* @__PURE__ */ t.jsx(
179
187
  "nav",
180
188
  {
181
- className: b("relative w-full", a),
189
+ className: f("relative w-full", a),
182
190
  "aria-label": "Tabs",
183
- ...r,
191
+ ...o,
184
192
  children: /* @__PURE__ */ t.jsxs("div", { className: "relative overflow-hidden", children: [
185
193
  /* @__PURE__ */ t.jsx(
186
194
  "ul",
187
195
  {
188
196
  role: "tablist",
189
197
  className: L(),
190
- ref: o,
198
+ ref: l,
191
199
  children: n
192
200
  }
193
201
  ),
@@ -201,10 +209,10 @@ const q = ({
201
209
  ] })
202
210
  }
203
211
  ) });
204
- }, G = Object.assign(q, {
212
+ }, G = Object.assign($, {
205
213
  Trigger: A
206
214
  });
207
215
  export {
208
- W as B,
216
+ D as B,
209
217
  G as T
210
218
  };