@solibo/solibo-ui 1.0.11 → 1.0.12
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/assets/index12.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index47.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/components/badge/index.cjs +1 -1
- package/dist/components/badge/index.js +37 -37
- package/dist/components/checkbox/index.cjs +1 -1
- package/dist/components/checkbox/index.cjs.map +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/chip/index.cjs +1 -1
- package/dist/components/chip/index.js +7 -7
- package/dist/components/controls/index.cjs +1 -1
- package/dist/components/controls/index.cjs.map +1 -1
- package/dist/components/controls/index.js +20 -20
- package/dist/components/controls/index.js.map +1 -1
- package/dist/components/dropdown/index.cjs +1 -1
- package/dist/components/dropdown/index.js +65 -65
- package/dist/components/editor/index.cjs +16 -16
- package/dist/components/editor/index.js +4 -4
- package/dist/components/header/index.cjs +1 -1
- package/dist/components/header/index.js +9 -9
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.js +2 -2
- package/dist/components/menu/index.cjs +1 -1
- package/dist/components/menu/index.cjs.map +1 -1
- package/dist/components/menu/index.js +67 -59
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/message/index.cjs +1 -1
- package/dist/components/message/index.js +21 -21
- package/dist/components/nav/index.cjs +1 -1
- package/dist/components/nav/index.js +19 -19
- package/dist/components/popover/index.cjs +1 -1
- package/dist/components/popover/index.cjs.map +1 -1
- package/dist/components/popover/index.js +78 -79
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/search/index.cjs +1 -1
- package/dist/components/search/index.cjs.map +1 -1
- package/dist/components/search/index.js +75 -45
- package/dist/components/search/index.js.map +1 -1
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +2 -2
- package/dist/components/toasts/index.cjs +1 -1
- package/dist/components/toasts/index.js +4 -4
- package/dist/{icons-BFgf_lJN.js → icons-BIi_mYLy.js} +4 -1
- package/dist/icons-BIi_mYLy.js.map +1 -0
- package/dist/icons-CR-eUx2p.cjs +2 -0
- package/dist/icons-CR-eUx2p.cjs.map +1 -0
- package/dist/index-CWD8Jp0A.cjs +2 -0
- package/dist/{index-CEzqxRIu.cjs.map → index-CWD8Jp0A.cjs.map} +1 -1
- package/dist/{index-C_YiNpZP.js → index-Clex8VE6.js} +2 -2
- package/dist/{index-C_YiNpZP.js.map → index-Clex8VE6.js.map} +1 -1
- package/dist/{index-BPIK2dxs.cjs → index-DVXi-Ryi.cjs} +2 -2
- package/dist/{index-BPIK2dxs.cjs.map → index-DVXi-Ryi.cjs.map} +1 -1
- package/dist/index-yIe5PqD1.js +73 -0
- package/dist/{index-BHgGZxsR.js.map → index-yIe5PqD1.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +35 -12
- package/dist/index.js +2 -2
- package/dist/tokens.json +1 -1
- package/package.json +1 -1
- package/dist/icons-BFgf_lJN.js.map +0 -1
- package/dist/icons-Dx0NQYLH.cjs +0 -2
- package/dist/icons-Dx0NQYLH.cjs.map +0 -1
- package/dist/index-BHgGZxsR.js +0 -73
- package/dist/index-CEzqxRIu.cjs +0 -2
package/dist/index-BHgGZxsR.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { jsxs as $, Fragment as w, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { t as p } from "./classix-DG18itHa.js";
|
|
3
|
-
import { useState as F, useEffect as P } from "react";
|
|
4
|
-
import { i as z } from "./icons-BFgf_lJN.js";
|
|
5
|
-
import { u as B } from "./use-touched-DXIJVVzz.js";
|
|
6
|
-
import './assets/index47.css';function E(n) {
|
|
7
|
-
return n && `${n[0].toLocaleUpperCase()}${n.slice(1)}`;
|
|
8
|
-
}
|
|
9
|
-
function G(n) {
|
|
10
|
-
const e = E(n);
|
|
11
|
-
return e && !e.endsWith(":") ? `${e}:` : e;
|
|
12
|
-
}
|
|
13
|
-
const U = "_input_antyf_3", W = "_touched_antyf_43", k = "_label_antyf_48", A = "_inline_antyf_57", D = "_code_antyf_81", o = {
|
|
14
|
-
input: U,
|
|
15
|
-
touched: W,
|
|
16
|
-
label: k,
|
|
17
|
-
inline: A,
|
|
18
|
-
code: D
|
|
19
|
-
};
|
|
20
|
-
function Q({
|
|
21
|
-
className: n,
|
|
22
|
-
defaultCountryCode: e = "+47",
|
|
23
|
-
disabled: c = !1,
|
|
24
|
-
icon: f,
|
|
25
|
-
label: d,
|
|
26
|
-
placeholder: _,
|
|
27
|
-
ref: g,
|
|
28
|
-
required: m,
|
|
29
|
-
type: t = "text",
|
|
30
|
-
variant: v = "default",
|
|
31
|
-
...x
|
|
32
|
-
}) {
|
|
33
|
-
const [h, L] = F(""), [s, N] = F(""), {
|
|
34
|
-
name: b,
|
|
35
|
-
onChange: l,
|
|
36
|
-
pattern: S,
|
|
37
|
-
value: u,
|
|
38
|
-
...T
|
|
39
|
-
} = x, {
|
|
40
|
-
touched: I,
|
|
41
|
-
onBlur: j
|
|
42
|
-
} = B(u === ""), r = f && t !== "radio" && t !== "datetime-local" ? f : void 0, y = d && v === "inline" ? G(d) : d, C = r ? {
|
|
43
|
-
"--icon-svg": z(r, !0)
|
|
44
|
-
} : void 0;
|
|
45
|
-
P(() => {
|
|
46
|
-
if (l && t === "tel") {
|
|
47
|
-
const i = {
|
|
48
|
-
name: b,
|
|
49
|
-
value: s ? (h || e).split(" ").join("") + s.split(" ").join("") : void 0
|
|
50
|
-
};
|
|
51
|
-
l({
|
|
52
|
-
target: i,
|
|
53
|
-
currentTarget: i
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}, [h, e, b, l, s, t]), P(() => {
|
|
57
|
-
t === "tel" && !u && (N(""), L(""));
|
|
58
|
-
}, [t, u]);
|
|
59
|
-
const V = /* @__PURE__ */ $(w, { children: [
|
|
60
|
-
/* @__PURE__ */ a("input", { disabled: c, hidden: !0, onChange: l, pattern: void 0, placeholder: _, ref: g, type: t, value: u }),
|
|
61
|
-
/* @__PURE__ */ a("input", { type: "text", className: p(o.code, o.input), disabled: c, maxLength: 5, onChange: (i) => L(i.target.value), placeholder: e, value: h }),
|
|
62
|
-
/* @__PURE__ */ a("input", { type: "tel", className: p(o.input, I && o.touched), "data-icon": r ? "true" : void 0, disabled: c, maxLength: 14, name: void 0, onChange: (i) => N(i.target.value), onBlur: j, pattern: S, required: m, style: C, value: s, ...T })
|
|
63
|
-
] });
|
|
64
|
-
return /* @__PURE__ */ $("label", { className: p(o.label, v === "inline" && o.inline), "data-component": "input", children: [
|
|
65
|
-
y && /* @__PURE__ */ a("span", { "data-required": m || void 0, children: y }),
|
|
66
|
-
t === "tel" ? V : /* @__PURE__ */ a("input", { ref: g, className: p(o.input, n, I && o.touched), "data-icon": r ? "true" : void 0, disabled: c, onBlur: j, placeholder: _, required: m, style: C, type: t, ...x })
|
|
67
|
-
] });
|
|
68
|
-
}
|
|
69
|
-
export {
|
|
70
|
-
Q as I,
|
|
71
|
-
G as f
|
|
72
|
-
};
|
|
73
|
-
//# sourceMappingURL=index-BHgGZxsR.js.map
|
package/dist/index-CEzqxRIu.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";require('./assets/index47.css');const o=require("react/jsx-runtime"),d=require("./classix-5H4IWnMA.cjs"),h=require("react"),F=require("./icons-Dx0NQYLH.cjs"),P=require("./use-touched-D_TJ8wDc.cjs");function R(e){return e&&`${e[0].toLocaleUpperCase()}${e.slice(1)}`}function S(e){const n=R(e);return n&&!n.endsWith(":")?`${n}:`:n}const V="_input_antyf_3",w="_touched_antyf_43",z="_label_antyf_48",B="_inline_antyf_57",G="_code_antyf_81",s={input:V,touched:w,label:z,inline:B,code:G};function U({className:e,defaultCountryCode:n="+47",disabled:c=!1,icon:_,label:p,placeholder:x,ref:g,required:m,type:t="text",variant:v="default",...j}){const[f,L]=h.useState(""),[a,b]=h.useState(""),{name:I,onChange:u,pattern:T,value:l,...$}=j,{touched:N,onBlur:q}=P.useTouched(l===""),r=_&&t!=="radio"&&t!=="datetime-local"?_:void 0,y=p&&v==="inline"?S(p):p,C=r?{"--icon-svg":F.iconSVG(r,!0)}:void 0;h.useEffect(()=>{if(u&&t==="tel"){const i={name:I,value:a?(f||n).split(" ").join("")+a.split(" ").join(""):void 0};u({target:i,currentTarget:i})}},[f,n,I,u,a,t]),h.useEffect(()=>{t==="tel"&&!l&&(b(""),L(""))},[t,l]);const E=o.jsxs(o.Fragment,{children:[o.jsx("input",{disabled:c,hidden:!0,onChange:u,pattern:void 0,placeholder:x,ref:g,type:t,value:l}),o.jsx("input",{type:"text",className:d.t(s.code,s.input),disabled:c,maxLength:5,onChange:i=>L(i.target.value),placeholder:n,value:f}),o.jsx("input",{type:"tel",className:d.t(s.input,N&&s.touched),"data-icon":r?"true":void 0,disabled:c,maxLength:14,name:void 0,onChange:i=>b(i.target.value),onBlur:q,pattern:T,required:m,style:C,value:a,...$})]});return o.jsxs("label",{className:d.t(s.label,v==="inline"&&s.inline),"data-component":"input",children:[y&&o.jsx("span",{"data-required":m||void 0,children:y}),t==="tel"?E:o.jsx("input",{ref:g,className:d.t(s.input,e,N&&s.touched),"data-icon":r?"true":void 0,disabled:c,onBlur:q,placeholder:x,required:m,style:C,type:t,...j})]})}exports.Input=U;exports.formatInlineLabel=S;
|
|
2
|
-
//# sourceMappingURL=index-CEzqxRIu.cjs.map
|