stone-kit
Version:
uikit for redesign
65 lines (64 loc) • 1.75 kB
JavaScript
import { jsx as e, jsxs as N } from "react/jsx-runtime";
import { c as T } from "../../../index-YnD2EP-S.js";
import { Text as k } from "../../Text/ui/Text.js";
import { useClientWidth as y } from "../../../shared/useClientWidth.js";
const z = "_root_pbslz_1", W = "_whiteFill_pbslz_29", D = "_text_pbslz_34", F = "_fullWhite_pbslz_48", P = "_whiteStroke_pbslz_67", C = "_withPadding_pbslz_105", I = "_grayDesign_pbslz_109", t = {
root: z,
whiteFill: W,
text: D,
fullWhite: F,
whiteStroke: P,
withPadding: C,
grayDesign: I
}, i = T.bind(t), B = {
whiteFill: "whiteFill",
whiteStroke: "whiteStroke",
grayDesign: "grayDesign",
fullWhite: "fullWhite"
}, L = ({
variant: s = "whiteFill",
classname: l,
children: a
}) => /* @__PURE__ */ e("div", { className: i(t.root, t[`${s}`], l), children: a }), c = (s) => {
const { isTablet: l, isDesktop: a } = y(), {
children: r,
className: h,
additionalClassName: d,
additionalLabelClass: _,
isLong: m,
checked: w,
withPadding: g = !1,
width: b,
width_m: o,
width_l: n,
ref: p,
...f
} = s, u = (S, x) => S && o ? o : x && n ? n : b;
return /* @__PURE__ */ N("label", { className: i(t.item, _, { [t.withPadding]: g }), children: [
/* @__PURE__ */ e(
"input",
{
ref: p,
type: "checkbox",
checked: w,
...f
}
),
/* @__PURE__ */ e(
"div",
{
className: i(h, d, { [t.isLong]: m }),
style: { width: u(l, a) },
children: /* @__PURE__ */ e(k, { className: i(t.text), children: r })
}
)
] });
};
c.displayName = "TabSelectItem";
const O = Object.assign(L, {
Item: c
});
export {
B as TAB_SELECT_VARIANTS,
O as TabSelect
};