stone-kit
Version:
uikit for redesign
50 lines (49 loc) • 1.71 kB
JavaScript
import { jsxs as N, jsx as e } from "react/jsx-runtime";
import { forwardRef as T } from "react";
import { c as y } from "../../../index-rKuIKazb.js";
import { Text as u } from "../../Text/ui/Text.js";
import { useClientWidth as D } from "../../../shared/useClientWidth.js";
const F = "_root_1knhi_1", P = "_whiteFill_1knhi_29", C = "_text_1knhi_34", I = "_whiteStroke_1knhi_48", j = "_withPadding_1knhi_86", A = "_grayDesign_1knhi_90", t = {
root: F,
whiteFill: P,
text: C,
whiteStroke: I,
withPadding: j,
grayDesign: A
}, i = y.bind(t), O = {
whiteFill: "whiteFill",
whiteStroke: "whiteStroke",
grayDesign: "grayDesign"
}, L = ({ variant: s = "whiteFill", classname: a, children: n }) => /* @__PURE__ */ e("div", { className: i(t.root, t[`${s}`], a), children: n }), r = T((s, a) => {
const { isTablet: n, isDesktop: c } = D(), h = (f, x) => f && o ? o : x && l ? l : b, {
children: d,
className: m,
additionalClassName: _,
additionalLabelClass: w,
//TODO предлогаю засунуть в жопу isLong
isLong: g,
checked: k,
withPadding: S = !1,
width: b,
width_m: o,
width_l: l,
...p
} = s;
return /* @__PURE__ */ N("label", { className: i(t.item, w, { [t.withPadding]: S }), children: [
/* @__PURE__ */ e("input", { ref: a, type: "checkbox", checked: k, ...p }),
/* @__PURE__ */ e(
"div",
{
className: i(m, _, { isLong: g }),
style: { width: h(n, c) },
children: /* @__PURE__ */ e(u, { className: i(t.text), children: d })
}
)
] });
});
r.displayName = "TabSelectItem";
const V = Object.assign(L, { Item: r });
export {
O as TAB_SELECT_VARIANTS,
V as TabSelect
};