mimir-ui-kit 1.36.5 → 1.36.6
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/{Input-CxcCZOIp.js → Input-WnjLXNpw.js} +84 -82
- package/dist/{combobox-CDU06zJj.js → combobox-BpYucpxz.js} +1121 -1080
- package/dist/components/Accordion/Accordion.js +15 -15
- package/dist/components/CheckboxMimir/CheckboxMimir.js +4 -4
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputPassword/InputPassword.js +1 -1
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +22 -22
- package/dist/components/MultiSelectSearch/utils.js +1 -1
- package/dist/components/OtpInput/OtpInput.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +3 -3
- package/dist/components/SelectSearch/SelectSearch.js +27 -27
- package/dist/components/SelectSearch/utils.js +1 -1
- package/dist/components/Switcher/Switcher.js +4 -4
- package/dist/components/TabTrail/TabTrail.js +4 -4
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{field-FJ34aSs4.js → field-C1kt7aNM.js} +2 -2
- package/dist/{focus-management-XwV-9qkO.js → focus-management-DOYCPyGg.js} +1 -1
- package/dist/{hidden-DbgtYPOH.js → hidden-PvGXrYUY.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{keyboard-B0lm_zyn.js → keyboard-mgWkd2Vh.js} +114 -111
- package/dist/{label-y3ANLTNC.js → label-D4GFpe5F.js} +2 -2
- package/dist/open-closed-D2VjDhAN.js +86 -0
- package/dist/{use-active-press-86hajhdd.js → use-active-press-CqLGIFz7.js} +1 -1
- package/package.json +1 -1
- package/dist/open-closed-CdldUPoq.js +0 -86
| @@ -1,6 +1,6 @@ | |
| 1 | 
            -
            import { jsxs as B, jsx as  | 
| 2 | 
            -
            import { c as  | 
| 3 | 
            -
            import { memo as  | 
| 1 | 
            +
            import { jsxs as B, jsx as c, Fragment as Y } from "react/jsx-runtime";
         | 
| 2 | 
            +
            import { c as o } from "./index-DIxK0V-G.js";
         | 
| 3 | 
            +
            import { memo as Z, forwardRef as $, useState as R, useRef as ee, useEffect as z } from "react";
         | 
| 4 4 | 
             
            import { EInputVariant as te } from "./components/Input/constants.js";
         | 
| 5 5 | 
             
            import { useMergeRefs as se } from "./hooks/useMergeRefs/useMergeRefs.js";
         | 
| 6 6 | 
             
            import { Icon as ae } from "./icons/Icon.js";
         | 
| @@ -29,20 +29,20 @@ import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3", | |
| 29 29 | 
             
              success: pe,
         | 
| 30 30 | 
             
              alarm: me,
         | 
| 31 31 | 
             
              error: be
         | 
| 32 | 
            -
            },  | 
| 33 | 
            -
              var p,  | 
| 32 | 
            +
            }, L = (t) => {
         | 
| 33 | 
            +
              var p, a;
         | 
| 34 34 | 
             
              if (!t)
         | 
| 35 35 | 
             
                return null;
         | 
| 36 36 | 
             
              switch (t.addonType) {
         | 
| 37 37 | 
             
                case "icon": {
         | 
| 38 | 
            -
                  const m = (p = t.addonContent) == null ? void 0 : p.includes("16px"),  | 
| 39 | 
            -
                  return /* @__PURE__ */  | 
| 38 | 
            +
                  const m = (p = t.addonContent) == null ? void 0 : p.includes("16px"), g = (a = t.addonContent) == null ? void 0 : a.includes("24px");
         | 
| 39 | 
            +
                  return /* @__PURE__ */ c(
         | 
| 40 40 | 
             
                    ae,
         | 
| 41 41 | 
             
                    {
         | 
| 42 42 | 
             
                      style: {
         | 
| 43 | 
            -
                        "--icon-size":  | 
| 43 | 
            +
                        "--icon-size": o({
         | 
| 44 44 | 
             
                          "16px": m,
         | 
| 45 | 
            -
                          "24px":  | 
| 45 | 
            +
                          "24px": g
         | 
| 46 46 | 
             
                        })
         | 
| 47 47 | 
             
                      },
         | 
| 48 48 | 
             
                      className: e["addon-icon"],
         | 
| @@ -53,88 +53,90 @@ import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3", | |
| 53 53 | 
             
                case "text":
         | 
| 54 54 | 
             
                  return t.addonContent;
         | 
| 55 55 | 
             
                case "react-node":
         | 
| 56 | 
            -
                  return /* @__PURE__ */  | 
| 56 | 
            +
                  return /* @__PURE__ */ c(Y, { children: t.addonContent });
         | 
| 57 57 | 
             
                default:
         | 
| 58 58 | 
             
                  return null;
         | 
| 59 59 | 
             
              }
         | 
| 60 | 
            -
            }, fe =  | 
| 61 | 
            -
               | 
| 60 | 
            +
            }, fe = Z(
         | 
| 61 | 
            +
              $(
         | 
| 62 62 | 
             
                (t, p) => {
         | 
| 63 63 | 
             
                  const {
         | 
| 64 | 
            -
                    value:  | 
| 64 | 
            +
                    value: a,
         | 
| 65 65 | 
             
                    className: m,
         | 
| 66 | 
            -
                    wrapperClassName:  | 
| 67 | 
            -
                    rightSlotClassName:  | 
| 68 | 
            -
                    requiredMarkClassName:  | 
| 66 | 
            +
                    wrapperClassName: g,
         | 
| 67 | 
            +
                    rightSlotClassName: j,
         | 
| 68 | 
            +
                    requiredMarkClassName: D,
         | 
| 69 69 | 
             
                    variant: A = te.DefaultGray,
         | 
| 70 | 
            -
                    type:  | 
| 71 | 
            -
                    autofocus:  | 
| 72 | 
            -
                    readonly:  | 
| 70 | 
            +
                    type: E = "text",
         | 
| 71 | 
            +
                    autofocus: N,
         | 
| 72 | 
            +
                    readonly: n,
         | 
| 73 73 | 
             
                    id: F,
         | 
| 74 | 
            -
                    onFocus:  | 
| 75 | 
            -
                    onBlur:  | 
| 74 | 
            +
                    onFocus: x,
         | 
| 75 | 
            +
                    onBlur: y,
         | 
| 76 76 | 
             
                    label: u,
         | 
| 77 | 
            -
                    withClearButton:  | 
| 77 | 
            +
                    withClearButton: M,
         | 
| 78 78 | 
             
                    disabled: s,
         | 
| 79 79 | 
             
                    onChange: i,
         | 
| 80 | 
            -
                    rightAddon:  | 
| 80 | 
            +
                    rightAddon: O,
         | 
| 81 81 | 
             
                    status: V,
         | 
| 82 | 
            -
                    leftAddon:  | 
| 83 | 
            -
                    size:  | 
| 84 | 
            -
                    numbersOnly:  | 
| 85 | 
            -
                    required:  | 
| 86 | 
            -
                    maxLength:  | 
| 87 | 
            -
                    ... | 
| 88 | 
            -
                  } = t, [_,  | 
| 89 | 
            -
                   | 
| 90 | 
            -
                     | 
| 91 | 
            -
                  }, [ | 
| 92 | 
            -
             | 
| 93 | 
            -
             | 
| 94 | 
            -
             | 
| 95 | 
            -
             | 
| 96 | 
            -
                     | 
| 97 | 
            -
                  }, H = () => {
         | 
| 98 | 
            -
                     | 
| 82 | 
            +
                    leftAddon: S,
         | 
| 83 | 
            +
                    size: C = "m",
         | 
| 84 | 
            +
                    numbersOnly: T,
         | 
| 85 | 
            +
                    required: v,
         | 
| 86 | 
            +
                    maxLength: w,
         | 
| 87 | 
            +
                    ...G
         | 
| 88 | 
            +
                  } = t, [_, I] = R(N), [b, f] = R(!!a), d = ee(null), P = se(d, p);
         | 
| 89 | 
            +
                  z(() => {
         | 
| 90 | 
            +
                    N && I(!0);
         | 
| 91 | 
            +
                  }, [N]), z(() => {
         | 
| 92 | 
            +
                    f(!!a);
         | 
| 93 | 
            +
                  }, [a]);
         | 
| 94 | 
            +
                  const W = (l) => {
         | 
| 95 | 
            +
                    const r = l.currentTarget.value;
         | 
| 96 | 
            +
                    y == null || y(l), I(!1), f(!!r);
         | 
| 97 | 
            +
                  }, H = (l) => {
         | 
| 98 | 
            +
                    n || (I(!0), x == null || x(l));
         | 
| 99 | 
            +
                  }, J = () => {
         | 
| 100 | 
            +
                    d != null && d.current && (d.current.value = "", d.current.focus(), f(!1), i == null || i({
         | 
| 99 101 | 
             
                      target: { value: "" }
         | 
| 100 102 | 
             
                    }));
         | 
| 101 | 
            -
                  },  | 
| 102 | 
            -
                    let  | 
| 103 | 
            -
                     | 
| 104 | 
            -
                  },  | 
| 105 | 
            -
                    [e.readonly]: s ||  | 
| 103 | 
            +
                  }, K = (l) => {
         | 
| 104 | 
            +
                    let r = l.target.value;
         | 
| 105 | 
            +
                    T && (r = r.replace(/\D/g, "")), w !== void 0 && (r = r.slice(0, w)), l.target.value = r, i == null || i(l), f(!!r);
         | 
| 106 | 
            +
                  }, h = L(S), k = L(O), Q = {
         | 
| 107 | 
            +
                    [e.readonly]: s || n,
         | 
| 106 108 | 
             
                    [e.focused]: _,
         | 
| 107 | 
            -
                    [e.disabled]: s ||  | 
| 109 | 
            +
                    [e.disabled]: s || n,
         | 
| 108 110 | 
             
                    [e["has-label"]]: !!u,
         | 
| 109 | 
            -
                    [e["has-left-slot"]]: !! | 
| 111 | 
            +
                    [e["has-left-slot"]]: !!h,
         | 
| 110 112 | 
             
                    [e["has-right-slot"]]: !!k
         | 
| 111 | 
            -
                  }, q = _ || b || !! | 
| 113 | 
            +
                  }, q = _ || b || !!a, U = o(e.label, m, e[C], {
         | 
| 112 114 | 
             
                    [e["active-label"]]: q,
         | 
| 113 | 
            -
                    [e.disabled]: s ||  | 
| 114 | 
            -
                    [e["has-left-slot"]]: !! | 
| 115 | 
            -
                  }),  | 
| 115 | 
            +
                    [e.disabled]: s || n,
         | 
| 116 | 
            +
                    [e["has-left-slot"]]: !!h
         | 
| 117 | 
            +
                  }), X = o(e.input, Q, m, [
         | 
| 116 118 | 
             
                    e[A],
         | 
| 117 119 | 
             
                    e[V ?? ""],
         | 
| 118 | 
            -
                    e[ | 
| 120 | 
            +
                    e[C]
         | 
| 119 121 | 
             
                  ]);
         | 
| 120 122 | 
             
                  return /* @__PURE__ */ B(
         | 
| 121 123 | 
             
                    "div",
         | 
| 122 124 | 
             
                    {
         | 
| 123 | 
            -
                      className:  | 
| 125 | 
            +
                      className: o(
         | 
| 124 126 | 
             
                        e["input-wrapper"],
         | 
| 125 127 | 
             
                        e[A],
         | 
| 126 128 | 
             
                        e[V ?? ""],
         | 
| 127 | 
            -
                        e[ | 
| 129 | 
            +
                        e[C],
         | 
| 128 130 | 
             
                        {
         | 
| 129 | 
            -
                          [e.disabled]: s ||  | 
| 131 | 
            +
                          [e.disabled]: s || n,
         | 
| 130 132 | 
             
                          [e.focused]: _
         | 
| 131 133 | 
             
                        },
         | 
| 132 | 
            -
                         | 
| 134 | 
            +
                        g
         | 
| 133 135 | 
             
                      ),
         | 
| 134 136 | 
             
                      children: [
         | 
| 135 | 
            -
                        u && /* @__PURE__ */ B("label", { htmlFor: F, className:  | 
| 137 | 
            +
                        u && /* @__PURE__ */ B("label", { htmlFor: F, className: U, children: [
         | 
| 136 138 | 
             
                          u,
         | 
| 137 | 
            -
                           | 
| 139 | 
            +
                          v && (b || _) && /* @__PURE__ */ c(
         | 
| 138 140 | 
             
                            "span",
         | 
| 139 141 | 
             
                            {
         | 
| 140 142 | 
             
                              className: e["required-mark"],
         | 
| @@ -142,39 +144,39 @@ import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3", | |
| 142 144 | 
             
                            }
         | 
| 143 145 | 
             
                          )
         | 
| 144 146 | 
             
                        ] }),
         | 
| 145 | 
            -
                         | 
| 147 | 
            +
                        h && /* @__PURE__ */ c(
         | 
| 146 148 | 
             
                          "span",
         | 
| 147 149 | 
             
                          {
         | 
| 148 | 
            -
                            className:  | 
| 150 | 
            +
                            className: o(e["left-slot"], {
         | 
| 149 151 | 
             
                              [e.focused]: q,
         | 
| 150 152 | 
             
                              [e["has-label"]]: !!u,
         | 
| 151 153 | 
             
                              [e.disabled]: s
         | 
| 152 154 | 
             
                            }),
         | 
| 153 | 
            -
                            children:  | 
| 155 | 
            +
                            children: h
         | 
| 154 156 | 
             
                          }
         | 
| 155 157 | 
             
                        ),
         | 
| 156 | 
            -
                        /* @__PURE__ */  | 
| 158 | 
            +
                        /* @__PURE__ */ c(
         | 
| 157 159 | 
             
                          "input",
         | 
| 158 160 | 
             
                          {
         | 
| 159 | 
            -
                            ref:  | 
| 160 | 
            -
                            type:  | 
| 161 | 
            +
                            ref: P,
         | 
| 162 | 
            +
                            type: E,
         | 
| 161 163 | 
             
                            id: F,
         | 
| 162 | 
            -
                            className:  | 
| 163 | 
            -
                            onFocus:  | 
| 164 | 
            -
                            onBlur:  | 
| 165 | 
            -
                            readOnly:  | 
| 166 | 
            -
                            value:  | 
| 167 | 
            -
                            onChange:  | 
| 168 | 
            -
                            maxLength:  | 
| 164 | 
            +
                            className: X,
         | 
| 165 | 
            +
                            onFocus: H,
         | 
| 166 | 
            +
                            onBlur: W,
         | 
| 167 | 
            +
                            readOnly: n,
         | 
| 168 | 
            +
                            value: a,
         | 
| 169 | 
            +
                            onChange: K,
         | 
| 170 | 
            +
                            maxLength: w,
         | 
| 169 171 | 
             
                            disabled: s,
         | 
| 170 | 
            -
                            required:  | 
| 171 | 
            -
                            ... | 
| 172 | 
            +
                            required: v,
         | 
| 173 | 
            +
                            ...G
         | 
| 172 174 | 
             
                          }
         | 
| 173 175 | 
             
                        ),
         | 
| 174 | 
            -
                        k && /* @__PURE__ */  | 
| 176 | 
            +
                        k && /* @__PURE__ */ c(
         | 
| 175 177 | 
             
                          "span",
         | 
| 176 178 | 
             
                          {
         | 
| 177 | 
            -
                            className:  | 
| 179 | 
            +
                            className: o(e["right-slot"], j, {
         | 
| 178 180 | 
             
                              [e.focused]: q,
         | 
| 179 181 | 
             
                              [e["has-label"]]: !!u,
         | 
| 180 182 | 
             
                              [e.disabled]: s
         | 
| @@ -182,30 +184,30 @@ import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3", | |
| 182 184 | 
             
                            children: k
         | 
| 183 185 | 
             
                          }
         | 
| 184 186 | 
             
                        ),
         | 
| 185 | 
            -
                         | 
| 187 | 
            +
                        v && !b && !_ && /* @__PURE__ */ c(
         | 
| 186 188 | 
             
                          "span",
         | 
| 187 189 | 
             
                          {
         | 
| 188 | 
            -
                            className:  | 
| 190 | 
            +
                            className: o(
         | 
| 189 191 | 
             
                              e["required-mark"],
         | 
| 190 | 
            -
                               | 
| 192 | 
            +
                              D
         | 
| 191 193 | 
             
                            ),
         | 
| 192 194 | 
             
                            "data-testid": "required-mark"
         | 
| 193 195 | 
             
                          }
         | 
| 194 196 | 
             
                        ),
         | 
| 195 | 
            -
                         | 
| 197 | 
            +
                        M && b && /* @__PURE__ */ c(
         | 
| 196 198 | 
             
                          le,
         | 
| 197 199 | 
             
                          {
         | 
| 198 200 | 
             
                            tabIndex: -1,
         | 
| 199 | 
            -
                            className:  | 
| 201 | 
            +
                            className: o(e.clear, {
         | 
| 200 202 | 
             
                              [e.disabled]: s
         | 
| 201 203 | 
             
                            }),
         | 
| 202 204 | 
             
                            isIconButton: !0,
         | 
| 203 205 | 
             
                            iconName: "Close16px",
         | 
| 204 206 | 
             
                            size: "m-s",
         | 
| 205 207 | 
             
                            clear: !0,
         | 
| 206 | 
            -
                            disabled: s ||  | 
| 208 | 
            +
                            disabled: s || n,
         | 
| 207 209 | 
             
                            variant: "secondary-gray",
         | 
| 208 | 
            -
                            onClick:  | 
| 210 | 
            +
                            onClick: J,
         | 
| 209 211 | 
             
                            "data-testid": "clear-button"
         | 
| 210 212 | 
             
                          }
         | 
| 211 213 | 
             
                        )
         |