mbt-ui-kit 0.1.25 → 0.1.26

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.
@@ -61,6 +61,10 @@ const preloadFonts = [plexSansRegularUrl, plexSansMediumUrl, interVariableUrl];
61
61
  <Button>
62
62
  Some text <SearchIcon /> Search
63
63
  </Button>
64
+
65
+ const buttonRef = useRef<HTMLButtonElement>(null);
66
+
67
+ <Button ref={buttonRef}>Focus me</Button>
64
68
  ```
65
69
 
66
70
  ## Badges
@@ -34,6 +34,11 @@ This folder holds factual package reference for `mbt-ui-kit`.
34
34
  - `GraduationCapIcon`
35
35
  - `SearchIcon`
36
36
 
37
+ ## Ref Notes
38
+
39
+ - `Button` forwards refs to its underlying native `button` element.
40
+ - `Input` forwards refs to its underlying native `input` element.
41
+
37
42
  ## Typography Notes
38
43
 
39
44
  - `Heading`, `Text`, and `Metric` support a `contentGap` prop for consistent spacing between mixed inline children such as text and icons.
@@ -1,9 +1,9 @@
1
- import type { ButtonHTMLAttributes, ReactNode } from 'react';
1
+ import { type ButtonHTMLAttributes, type ReactNode } from 'react';
2
2
  export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
3
3
  children?: ReactNode;
4
4
  fullWidth?: boolean;
5
5
  loading?: boolean;
6
6
  variant?: 'primary' | 'secondary';
7
7
  }
8
- export declare function Button({ children, fullWidth, disabled, loading, variant, className, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
9
9
  //# sourceMappingURL=button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG7D,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC1E,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;CACnC;AAED,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAO,EACP,OAAmB,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,WAAW,2CAyBb"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,oBAAoB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG9E,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC1E,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;CACnC;AAED,eAAO,MAAM,MAAM,2GAuClB,CAAC"}
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./tokens-C8rDJFS5.cjs"),t=require("react/jsx-runtime"),p=require("react");function j({size:s="md",className:e,...n}){const o=["mbt-loader",`mbt-loader--${s}`,e].filter(Boolean).join(" ");return t.jsxs("span",{className:o,...n,children:[t.jsx("span",{className:"mbt-loader__dot"}),t.jsx("span",{className:"mbt-loader__dot"}),t.jsx("span",{className:"mbt-loader__dot"})]})}function L({children:s,fullWidth:e,disabled:n,loading:o,variant:i="primary",className:l,...r}){const c=n||o,a=["mbt-button",i&&`mbt-button--${i}`,e&&"mbt-button--full-width",n&&"mbt-button--disabled",o&&"mbt-button--loading",l].filter(Boolean).join(" ");return t.jsxs("button",{type:"button",className:a,disabled:c,...r,children:[t.jsx("span",{className:"mbt-button__content",children:s}),o&&t.jsx(j,{size:"md",className:"mbt-button__loader"})]})}function B({level:s,children:e,contentGap:n=!1,className:o,...i}){const l=`h${s}`,r=[`mbt-h${s}`,o].filter(Boolean).join(" "),c=n?t.jsx("span",{className:`mbt-h${s}__content`,children:p.Children.toArray(e).map(a=>typeof a=="string"?a.trim():a).filter(a=>a!=="")}):e;return t.jsx(l,{className:r,...i,children:c})}function v({children:s,large:e=!1,muted:n=!1,contentGap:o=!1,as:i="div",className:l,...r}){const c=i,a=["mbt-metric",e&&"mbt-metric--large",n&&"mbt-metric--muted",l].filter(Boolean).join(" "),b=o?t.jsx("span",{className:"mbt-metric__content",children:p.Children.toArray(s).map(m=>typeof m=="string"?m.trim():m).filter(m=>m!=="")}):s;return t.jsx(c,{className:a,...r,children:b})}function _({children:s,strong:e=!1,small:n=!1,label:o=!1,muted:i=!1,disableFontFeatures:l=!1,contentGap:r=!1,as:c="p",className:a,...b}){const m=c,h=["mbt-text",e&&"mbt-text--strong",n&&"mbt-text--small",o&&"mbt-text--label",i&&"mbt-text--muted",l&&"mbt-text--no-features",a].filter(Boolean).join(" "),x=r?t.jsx("span",{className:"mbt-text__content",children:p.Children.toArray(s).map(u=>typeof u=="string"?u.trim():u).filter(u=>u!=="")}):s;return t.jsx(m,{className:h,...b,children:x})}function C(){return t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[t.jsx("path",{d:"M12 4L19 10.5L16.5 12.5L12 8.5L7.5 12.5L5 10.5L12 4Z",fill:"currentColor"}),t.jsx("path",{d:"M12 9L19 15.5L16.5 17.5L12 13.5L7.5 17.5L5 15.5L12 9Z",fill:"currentColor"})]})}function I(){return t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[t.jsx("path",{d:"M8 3V13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),t.jsx("path",{d:"M3 8H13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function y({children:s,icon:e,purchasable:n=!1,boost:o=!1,className:i,...l}){const r=!!e,c=r&&n,a=["mbt-badge",r&&"mbt-badge--with-icon",n&&"mbt-badge--purchasable",o&&"mbt-badge--boost",i].filter(Boolean).join(" ");return t.jsxs("div",{className:a,...l,children:[r&&t.jsxs("span",{className:"mbt-badge__media",children:[t.jsx("span",{className:"mbt-badge__icon",children:e}),c&&t.jsx("span",{className:"mbt-badge__purchasable","aria-hidden":"true",children:t.jsx(I,{})})]}),t.jsx(_,{as:"span",disableFontFeatures:!0,strong:!0,className:"mbt-badge__content",children:s}),o&&t.jsx("span",{className:"mbt-badge__boost","aria-hidden":"true",children:t.jsx(C,{})})]})}function g({className:s,title:e="Search"}){return t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s,role:"img","aria-label":e,children:[t.jsx("title",{children:e}),t.jsx("circle",{cx:"11",cy:"11",r:"8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"m21 21-4.34-4.34",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}const N=p.forwardRef(({label:s,muted:e=!1,showSearchIcon:n=!1,icon:o,fullWidth:i=!1,className:l,...r},c)=>{const a=p.useId(),b=r.id??a,m=["mbt-input",i&&"mbt-input--full-width",l].filter(Boolean).join(" "),h=["mbt-input__label",e&&"mbt-input__label--muted"].filter(Boolean).join(" "),x=["mbt-input__wrapper",e&&"mbt-input__wrapper--muted"].filter(Boolean).join(" "),u=["mbt-input__field",e&&"mbt-input__field--muted"].filter(Boolean).join(" "),k=["mbt-input__icon",e&&"mbt-input__icon--muted"].filter(Boolean).join(" "),f=o||n&&t.jsx(g,{});return t.jsx("div",{className:m,children:t.jsxs("div",{className:"mbt-input__container",children:[s&&t.jsx("label",{htmlFor:b,className:h,children:s}),t.jsxs("div",{className:x,children:[t.jsx("input",{ref:c,id:b,type:"text",className:u,...r}),f&&t.jsx("div",{className:k,children:f})]})]})})});N.displayName="Input";function w({className:s,title:e="Graduation cap"}){return t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s,role:"img","aria-label":e,children:[t.jsx("title",{children:e}),t.jsx("path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M22 10v6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function M({children:s,icon:e,selected:n=!1,small:o=!1,disabled:i,className:l,...r}){const c=["mbt-menu-button",n&&"mbt-menu-button--selected",o&&"mbt-menu-button--small",l].filter(Boolean).join(" "),a=e??t.jsx(w,{});return t.jsxs("button",{type:"button",className:c,disabled:i,"aria-pressed":n,...r,children:[t.jsx("div",{className:"mbt-menu-button__icon",children:a}),t.jsx("span",{className:"mbt-menu-button__text",children:s})]})}exports.colors=d.colors;exports.fontFeatures=d.fontFeatures;exports.fontSizes=d.fontSizes;exports.fontWeights=d.fontWeights;exports.fonts=d.fonts;exports.radius=d.radius;exports.spacing=d.spacing;exports.tokens=d.tokens;exports.transitions=d.transitions;exports.zIndex=d.zIndex;exports.Badge=y;exports.Button=L;exports.GraduationCapIcon=w;exports.Heading=B;exports.Input=N;exports.Loader=j;exports.MenuButton=M;exports.Metric=v;exports.SearchIcon=g;exports.Text=_;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./tokens-C8rDJFS5.cjs"),t=require("react/jsx-runtime"),p=require("react");function j({size:s="md",className:e,...n}){const o=["mbt-loader",`mbt-loader--${s}`,e].filter(Boolean).join(" ");return t.jsxs("span",{className:o,...n,children:[t.jsx("span",{className:"mbt-loader__dot"}),t.jsx("span",{className:"mbt-loader__dot"}),t.jsx("span",{className:"mbt-loader__dot"})]})}const _=p.forwardRef(({children:s,fullWidth:e,disabled:n,loading:o,variant:i="primary",className:l,...r},c)=>{const a=n||o,u=["mbt-button",i&&`mbt-button--${i}`,e&&"mbt-button--full-width",n&&"mbt-button--disabled",o&&"mbt-button--loading",l].filter(Boolean).join(" ");return t.jsxs("button",{ref:c,type:"button",className:u,disabled:a,...r,children:[t.jsx("span",{className:"mbt-button__content",children:s}),o&&t.jsx(j,{size:"md",className:"mbt-button__loader"})]})});_.displayName="Button";function B({level:s,children:e,contentGap:n=!1,className:o,...i}){const l=`h${s}`,r=[`mbt-h${s}`,o].filter(Boolean).join(" "),c=n?t.jsx("span",{className:`mbt-h${s}__content`,children:p.Children.toArray(e).map(a=>typeof a=="string"?a.trim():a).filter(a=>a!=="")}):e;return t.jsx(l,{className:r,...i,children:c})}function v({children:s,large:e=!1,muted:n=!1,contentGap:o=!1,as:i="div",className:l,...r}){const c=i,a=["mbt-metric",e&&"mbt-metric--large",n&&"mbt-metric--muted",l].filter(Boolean).join(" "),u=o?t.jsx("span",{className:"mbt-metric__content",children:p.Children.toArray(s).map(m=>typeof m=="string"?m.trim():m).filter(m=>m!=="")}):s;return t.jsx(c,{className:a,...r,children:u})}function g({children:s,strong:e=!1,small:n=!1,label:o=!1,muted:i=!1,disableFontFeatures:l=!1,contentGap:r=!1,as:c="p",className:a,...u}){const m=c,h=["mbt-text",e&&"mbt-text--strong",n&&"mbt-text--small",o&&"mbt-text--label",i&&"mbt-text--muted",l&&"mbt-text--no-features",a].filter(Boolean).join(" "),f=r?t.jsx("span",{className:"mbt-text__content",children:p.Children.toArray(s).map(b=>typeof b=="string"?b.trim():b).filter(b=>b!=="")}):s;return t.jsx(m,{className:h,...u,children:f})}function C(){return t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[t.jsx("path",{d:"M12 4L19 10.5L16.5 12.5L12 8.5L7.5 12.5L5 10.5L12 4Z",fill:"currentColor"}),t.jsx("path",{d:"M12 9L19 15.5L16.5 17.5L12 13.5L7.5 17.5L5 15.5L12 9Z",fill:"currentColor"})]})}function y(){return t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[t.jsx("path",{d:"M8 3V13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),t.jsx("path",{d:"M3 8H13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function I({children:s,icon:e,purchasable:n=!1,boost:o=!1,className:i,...l}){const r=!!e,c=r&&n,a=["mbt-badge",r&&"mbt-badge--with-icon",n&&"mbt-badge--purchasable",o&&"mbt-badge--boost",i].filter(Boolean).join(" ");return t.jsxs("div",{className:a,...l,children:[r&&t.jsxs("span",{className:"mbt-badge__media",children:[t.jsx("span",{className:"mbt-badge__icon",children:e}),c&&t.jsx("span",{className:"mbt-badge__purchasable","aria-hidden":"true",children:t.jsx(y,{})})]}),t.jsx(g,{as:"span",disableFontFeatures:!0,strong:!0,className:"mbt-badge__content",children:s}),o&&t.jsx("span",{className:"mbt-badge__boost","aria-hidden":"true",children:t.jsx(C,{})})]})}function N({className:s,title:e="Search"}){return t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s,role:"img","aria-label":e,children:[t.jsx("title",{children:e}),t.jsx("circle",{cx:"11",cy:"11",r:"8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"m21 21-4.34-4.34",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}const w=p.forwardRef(({label:s,muted:e=!1,showSearchIcon:n=!1,icon:o,fullWidth:i=!1,className:l,...r},c)=>{const a=p.useId(),u=r.id??a,m=["mbt-input",i&&"mbt-input--full-width",l].filter(Boolean).join(" "),h=["mbt-input__label",e&&"mbt-input__label--muted"].filter(Boolean).join(" "),f=["mbt-input__wrapper",e&&"mbt-input__wrapper--muted"].filter(Boolean).join(" "),b=["mbt-input__field",e&&"mbt-input__field--muted"].filter(Boolean).join(" "),L=["mbt-input__icon",e&&"mbt-input__icon--muted"].filter(Boolean).join(" "),x=o||n&&t.jsx(N,{});return t.jsx("div",{className:m,children:t.jsxs("div",{className:"mbt-input__container",children:[s&&t.jsx("label",{htmlFor:u,className:h,children:s}),t.jsxs("div",{className:f,children:[t.jsx("input",{ref:c,id:u,type:"text",className:b,...r}),x&&t.jsx("div",{className:L,children:x})]})]})})});w.displayName="Input";function k({className:s,title:e="Graduation cap"}){return t.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s,role:"img","aria-label":e,children:[t.jsx("title",{children:e}),t.jsx("path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M22 10v6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function M({children:s,icon:e,selected:n=!1,small:o=!1,disabled:i,className:l,...r}){const c=["mbt-menu-button",n&&"mbt-menu-button--selected",o&&"mbt-menu-button--small",l].filter(Boolean).join(" "),a=e??t.jsx(k,{});return t.jsxs("button",{type:"button",className:c,disabled:i,"aria-pressed":n,...r,children:[t.jsx("div",{className:"mbt-menu-button__icon",children:a}),t.jsx("span",{className:"mbt-menu-button__text",children:s})]})}exports.colors=d.colors;exports.fontFeatures=d.fontFeatures;exports.fontSizes=d.fontSizes;exports.fontWeights=d.fontWeights;exports.fonts=d.fonts;exports.radius=d.radius;exports.spacing=d.spacing;exports.tokens=d.tokens;exports.transitions=d.transitions;exports.zIndex=d.zIndex;exports.Badge=I;exports.Button=_;exports.GraduationCapIcon=k;exports.Heading=B;exports.Input=w;exports.Loader=j;exports.MenuButton=M;exports.Metric=v;exports.SearchIcon=N;exports.Text=g;
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { c as S, f as G, a as H, b as P, d as V, r as Z, s as D, t as R, e as q, z as E } from "./tokens-C0g4TAJO.js";
2
2
  import { jsxs as m, jsx as t } from "react/jsx-runtime";
3
- import { Children as h, forwardRef as N, useId as w } from "react";
3
+ import { forwardRef as g, Children as f, useId as w } from "react";
4
4
  function k({ size: n = "md", className: e, ...s }) {
5
5
  const a = ["mbt-loader", `mbt-loader--${n}`, e].filter(Boolean).join(" ");
6
6
  return /* @__PURE__ */ m("span", { className: a, ...s, children: [
@@ -9,37 +9,41 @@ function k({ size: n = "md", className: e, ...s }) {
9
9
  /* @__PURE__ */ t("span", { className: "mbt-loader__dot" })
10
10
  ] });
11
11
  }
12
- function M({
13
- children: n,
14
- fullWidth: e,
15
- disabled: s,
16
- loading: a,
17
- variant: i = "primary",
18
- className: l,
19
- ...o
20
- }) {
21
- const c = s || a, r = [
22
- "mbt-button",
23
- i && `mbt-button--${i}`,
24
- e && "mbt-button--full-width",
25
- s && "mbt-button--disabled",
26
- a && "mbt-button--loading",
27
- l
28
- ].filter(Boolean).join(" ");
29
- return /* @__PURE__ */ m(
30
- "button",
31
- {
32
- type: "button",
33
- className: r,
34
- disabled: c,
35
- ...o,
36
- children: [
37
- /* @__PURE__ */ t("span", { className: "mbt-button__content", children: n }),
38
- a && /* @__PURE__ */ t(k, { size: "md", className: "mbt-button__loader" })
39
- ]
40
- }
41
- );
42
- }
12
+ const L = g(
13
+ ({
14
+ children: n,
15
+ fullWidth: e,
16
+ disabled: s,
17
+ loading: a,
18
+ variant: i = "primary",
19
+ className: l,
20
+ ...o
21
+ }, c) => {
22
+ const r = s || a, u = [
23
+ "mbt-button",
24
+ i && `mbt-button--${i}`,
25
+ e && "mbt-button--full-width",
26
+ s && "mbt-button--disabled",
27
+ a && "mbt-button--loading",
28
+ l
29
+ ].filter(Boolean).join(" ");
30
+ return /* @__PURE__ */ m(
31
+ "button",
32
+ {
33
+ ref: c,
34
+ type: "button",
35
+ className: u,
36
+ disabled: r,
37
+ ...o,
38
+ children: [
39
+ /* @__PURE__ */ t("span", { className: "mbt-button__content", children: n }),
40
+ a && /* @__PURE__ */ t(k, { size: "md", className: "mbt-button__loader" })
41
+ ]
42
+ }
43
+ );
44
+ }
45
+ );
46
+ L.displayName = "Button";
43
47
  function W({
44
48
  level: n,
45
49
  children: e,
@@ -47,7 +51,7 @@ function W({
47
51
  className: a,
48
52
  ...i
49
53
  }) {
50
- const l = `h${n}`, o = [`mbt-h${n}`, a].filter(Boolean).join(" "), c = s ? /* @__PURE__ */ t("span", { className: `mbt-h${n}__content`, children: h.toArray(e).map((r) => typeof r == "string" ? r.trim() : r).filter((r) => r !== "") }) : e;
54
+ const l = `h${n}`, o = [`mbt-h${n}`, a].filter(Boolean).join(" "), c = s ? /* @__PURE__ */ t("span", { className: `mbt-h${n}__content`, children: f.toArray(e).map((r) => typeof r == "string" ? r.trim() : r).filter((r) => r !== "") }) : e;
51
55
  return /* @__PURE__ */ t(l, { className: o, ...i, children: c });
52
56
  }
53
57
  function z({
@@ -64,10 +68,10 @@ function z({
64
68
  e && "mbt-metric--large",
65
69
  s && "mbt-metric--muted",
66
70
  l
67
- ].filter(Boolean).join(" "), b = a ? /* @__PURE__ */ t("span", { className: "mbt-metric__content", children: h.toArray(n).map((d) => typeof d == "string" ? d.trim() : d).filter((d) => d !== "") }) : n;
68
- return /* @__PURE__ */ t(c, { className: r, ...o, children: b });
71
+ ].filter(Boolean).join(" "), u = a ? /* @__PURE__ */ t("span", { className: "mbt-metric__content", children: f.toArray(n).map((d) => typeof d == "string" ? d.trim() : d).filter((d) => d !== "") }) : n;
72
+ return /* @__PURE__ */ t(c, { className: r, ...o, children: u });
69
73
  }
70
- function L({
74
+ function x({
71
75
  children: n,
72
76
  strong: e = !1,
73
77
  small: s = !1,
@@ -77,7 +81,7 @@ function L({
77
81
  contentGap: o = !1,
78
82
  as: c = "p",
79
83
  className: r,
80
- ...b
84
+ ...u
81
85
  }) {
82
86
  const d = c, p = [
83
87
  "mbt-text",
@@ -87,10 +91,10 @@ function L({
87
91
  i && "mbt-text--muted",
88
92
  l && "mbt-text--no-features",
89
93
  r
90
- ].filter(Boolean).join(" "), f = o ? /* @__PURE__ */ t("span", { className: "mbt-text__content", children: h.toArray(n).map((u) => typeof u == "string" ? u.trim() : u).filter((u) => u !== "") }) : n;
91
- return /* @__PURE__ */ t(d, { className: p, ...b, children: f });
94
+ ].filter(Boolean).join(" "), h = o ? /* @__PURE__ */ t("span", { className: "mbt-text__content", children: f.toArray(n).map((b) => typeof b == "string" ? b.trim() : b).filter((b) => b !== "") }) : n;
95
+ return /* @__PURE__ */ t(d, { className: p, ...u, children: h });
92
96
  }
93
- function x() {
97
+ function B() {
94
98
  return /* @__PURE__ */ m(
95
99
  "svg",
96
100
  {
@@ -119,7 +123,7 @@ function x() {
119
123
  }
120
124
  );
121
125
  }
122
- function B() {
126
+ function j() {
123
127
  return /* @__PURE__ */ m(
124
128
  "svg",
125
129
  {
@@ -170,13 +174,13 @@ function $({
170
174
  return /* @__PURE__ */ m("div", { className: r, ...l, children: [
171
175
  o && /* @__PURE__ */ m("span", { className: "mbt-badge__media", children: [
172
176
  /* @__PURE__ */ t("span", { className: "mbt-badge__icon", children: e }),
173
- c && /* @__PURE__ */ t("span", { className: "mbt-badge__purchasable", "aria-hidden": "true", children: /* @__PURE__ */ t(B, {}) })
177
+ c && /* @__PURE__ */ t("span", { className: "mbt-badge__purchasable", "aria-hidden": "true", children: /* @__PURE__ */ t(j, {}) })
174
178
  ] }),
175
- /* @__PURE__ */ t(L, { as: "span", disableFontFeatures: !0, strong: !0, className: "mbt-badge__content", children: n }),
176
- a && /* @__PURE__ */ t("span", { className: "mbt-badge__boost", "aria-hidden": "true", children: /* @__PURE__ */ t(x, {}) })
179
+ /* @__PURE__ */ t(x, { as: "span", disableFontFeatures: !0, strong: !0, className: "mbt-badge__content", children: n }),
180
+ a && /* @__PURE__ */ t("span", { className: "mbt-badge__boost", "aria-hidden": "true", children: /* @__PURE__ */ t(B, {}) })
177
181
  ] });
178
182
  }
179
- function j({ className: n, title: e = "Search" }) {
183
+ function v({ className: n, title: e = "Search" }) {
180
184
  return /* @__PURE__ */ m(
181
185
  "svg",
182
186
  {
@@ -216,7 +220,7 @@ function j({ className: n, title: e = "Search" }) {
216
220
  }
217
221
  );
218
222
  }
219
- const v = N(
223
+ const y = g(
220
224
  ({
221
225
  label: n,
222
226
  muted: e = !1,
@@ -226,39 +230,39 @@ const v = N(
226
230
  className: l,
227
231
  ...o
228
232
  }, c) => {
229
- const r = w(), b = o.id ?? r, d = [
233
+ const r = w(), u = o.id ?? r, d = [
230
234
  "mbt-input",
231
235
  i && "mbt-input--full-width",
232
236
  l
233
237
  ].filter(Boolean).join(" "), p = [
234
238
  "mbt-input__label",
235
239
  e && "mbt-input__label--muted"
236
- ].filter(Boolean).join(" "), f = [
240
+ ].filter(Boolean).join(" "), h = [
237
241
  "mbt-input__wrapper",
238
242
  e && "mbt-input__wrapper--muted"
239
- ].filter(Boolean).join(" "), u = [
243
+ ].filter(Boolean).join(" "), b = [
240
244
  "mbt-input__field",
241
245
  e && "mbt-input__field--muted"
242
- ].filter(Boolean).join(" "), g = ["mbt-input__icon", e && "mbt-input__icon--muted"].filter(Boolean).join(" "), _ = a || s && /* @__PURE__ */ t(j, {});
246
+ ].filter(Boolean).join(" "), N = ["mbt-input__icon", e && "mbt-input__icon--muted"].filter(Boolean).join(" "), _ = a || s && /* @__PURE__ */ t(v, {});
243
247
  return /* @__PURE__ */ t("div", { className: d, children: /* @__PURE__ */ m("div", { className: "mbt-input__container", children: [
244
- n && /* @__PURE__ */ t("label", { htmlFor: b, className: p, children: n }),
245
- /* @__PURE__ */ m("div", { className: f, children: [
248
+ n && /* @__PURE__ */ t("label", { htmlFor: u, className: p, children: n }),
249
+ /* @__PURE__ */ m("div", { className: h, children: [
246
250
  /* @__PURE__ */ t(
247
251
  "input",
248
252
  {
249
253
  ref: c,
250
- id: b,
254
+ id: u,
251
255
  type: "text",
252
- className: u,
256
+ className: b,
253
257
  ...o
254
258
  }
255
259
  ),
256
- _ && /* @__PURE__ */ t("div", { className: g, children: _ })
260
+ _ && /* @__PURE__ */ t("div", { className: N, children: _ })
257
261
  ] })
258
262
  ] }) });
259
263
  }
260
264
  );
261
- v.displayName = "Input";
265
+ y.displayName = "Input";
262
266
  function C({
263
267
  className: n,
264
268
  title: e = "Graduation cap"
@@ -342,15 +346,15 @@ function F({
342
346
  }
343
347
  export {
344
348
  $ as Badge,
345
- M as Button,
349
+ L as Button,
346
350
  C as GraduationCapIcon,
347
351
  W as Heading,
348
- v as Input,
352
+ y as Input,
349
353
  k as Loader,
350
354
  F as MenuButton,
351
355
  z as Metric,
352
- j as SearchIcon,
353
- L as Text,
356
+ v as SearchIcon,
357
+ x as Text,
354
358
  S as colors,
355
359
  G as fontFeatures,
356
360
  H as fontSizes,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mbt-ui-kit",
3
3
  "description": "React component library with SCSS",
4
- "version": "0.1.25",
4
+ "version": "0.1.26",
5
5
  "packageManager": "pnpm@10.28.0",
6
6
  "type": "module",
7
7
  "main": "dist/index.cjs",