@voxel51/voodo 0.0.36 → 0.0.37

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.
package/dist/index.js CHANGED
@@ -21103,58 +21103,68 @@ const jw = {
21103
21103
  tabs: e,
21104
21104
  variant: r = "default",
21105
21105
  defaultIndex: n = 0,
21106
- onChange: t,
21107
- size: o = H.Sm,
21108
- fullWidth: a,
21109
- tabListClassName: i,
21110
- tabPanelClassName: s,
21111
- ...l
21112
- }) => /* @__PURE__ */ ie(T5, { defaultIndex: n, onChange: t, ...l, children: [
21113
- /* @__PURE__ */ x(
21114
- P5,
21115
- {
21116
- className: z(
21117
- "toggle-switch-tab-list",
21118
- "flex flex-nowrap items-center",
21119
- "rounded-md",
21120
- a ? "w-full" : "w-fit",
21121
- ...Qw(r),
21122
- i
21106
+ index: t,
21107
+ onChange: o,
21108
+ size: a = H.Sm,
21109
+ fullWidth: i,
21110
+ tabListClassName: s,
21111
+ tabPanelClassName: l,
21112
+ ...c
21113
+ }) => /* @__PURE__ */ ie(
21114
+ T5,
21115
+ {
21116
+ selectedIndex: t,
21117
+ defaultIndex: n,
21118
+ onChange: o,
21119
+ ...c,
21120
+ children: [
21121
+ /* @__PURE__ */ x(
21122
+ P5,
21123
+ {
21124
+ className: z(
21125
+ "toggle-switch-tab-list",
21126
+ "flex flex-nowrap items-center",
21127
+ "rounded-md",
21128
+ i ? "w-full" : "w-fit",
21129
+ ...Qw(r),
21130
+ s
21131
+ ),
21132
+ children: e.map(({ id: u, data: d }, p) => {
21133
+ const f = p === 0, h = p === e.length - 1, g = ({ selected: v }) => z(
21134
+ "cursor-pointer",
21135
+ "flex-1",
21136
+ "flex items-center justify-center",
21137
+ "whitespace-nowrap",
21138
+ "font-medium",
21139
+ "outline-none",
21140
+ "transition-colors",
21141
+ "bg-transparent",
21142
+ ce(Ce.CardElevated, fe.Selected),
21143
+ qw(v),
21144
+ d.disabled && "hover:!text-content-text-secondary",
21145
+ "data-[focus]:outline-none",
21146
+ "data-[disabled]:opacity-50",
21147
+ "data-[disabled]:cursor-not-allowed",
21148
+ Gw(r, f, h),
21149
+ Xw(r, a)
21150
+ ), m = /* @__PURE__ */ x(v9, { disabled: d.disabled, className: g, children: d.label });
21151
+ return d.tooltip ? /* @__PURE__ */ x(
21152
+ e3,
21153
+ {
21154
+ content: d.tooltip,
21155
+ wrapperClassName: "flex-1 flex",
21156
+ portal: !0,
21157
+ children: m
21158
+ },
21159
+ u
21160
+ ) : /* @__PURE__ */ x("div", { className: "flex-1 flex", children: m }, u);
21161
+ })
21162
+ }
21123
21163
  ),
21124
- children: e.map(({ id: c, data: u }, d) => {
21125
- const p = d === 0, f = d === e.length - 1, h = ({ selected: m }) => z(
21126
- "cursor-pointer",
21127
- "flex-1",
21128
- "flex items-center justify-center",
21129
- "whitespace-nowrap",
21130
- "font-medium",
21131
- "outline-none",
21132
- "transition-colors",
21133
- "bg-transparent",
21134
- ce(Ce.CardElevated, fe.Selected),
21135
- qw(m),
21136
- u.disabled && "hover:!text-content-text-secondary",
21137
- "data-[focus]:outline-none",
21138
- "data-[disabled]:opacity-50",
21139
- "data-[disabled]:cursor-not-allowed",
21140
- Gw(r, p, f),
21141
- Xw(r, o)
21142
- ), g = /* @__PURE__ */ x(v9, { disabled: u.disabled, className: h, children: u.label });
21143
- return u.tooltip ? /* @__PURE__ */ x(
21144
- e3,
21145
- {
21146
- content: u.tooltip,
21147
- wrapperClassName: "flex-1 flex",
21148
- portal: !0,
21149
- children: g
21150
- },
21151
- c
21152
- ) : /* @__PURE__ */ x("div", { className: "flex-1 flex", children: g }, c);
21153
- })
21154
- }
21155
- ),
21156
- /* @__PURE__ */ x(O5, { className: z(s), children: e.map(({ id: c, data: u }) => /* @__PURE__ */ x(_5, { className: z("focus:outline-none"), children: u.content }, c)) })
21157
- ] });
21164
+ /* @__PURE__ */ x(O5, { className: z(l), children: e.map(({ id: u, data: d }) => /* @__PURE__ */ x(_5, { className: z("focus:outline-none"), children: d.content }, u)) })
21165
+ ]
21166
+ }
21167
+ );
21158
21168
  Jw.displayName = "ToggleSwitch";
21159
21169
  const yu = (e, r, n, t) => e ? r : Math.max(0, Math.min(t, r + n)), ey = ({
21160
21170
  initialX: e = 0,