@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.
Files changed (76) hide show
  1. package/dist/assets/index12.css +1 -1
  2. package/dist/assets/index15.css +1 -1
  3. package/dist/assets/index17.css +1 -1
  4. package/dist/assets/index20.css +1 -1
  5. package/dist/assets/index28.css +1 -1
  6. package/dist/assets/index34.css +1 -1
  7. package/dist/assets/index36.css +1 -1
  8. package/dist/assets/index39.css +1 -1
  9. package/dist/assets/index4.css +1 -1
  10. package/dist/assets/index41.css +1 -1
  11. package/dist/assets/index47.css +1 -1
  12. package/dist/assets/index9.css +1 -1
  13. package/dist/components/badge/index.cjs +1 -1
  14. package/dist/components/badge/index.js +37 -37
  15. package/dist/components/checkbox/index.cjs +1 -1
  16. package/dist/components/checkbox/index.cjs.map +1 -1
  17. package/dist/components/checkbox/index.js +1 -1
  18. package/dist/components/checkbox/index.js.map +1 -1
  19. package/dist/components/chip/index.cjs +1 -1
  20. package/dist/components/chip/index.js +7 -7
  21. package/dist/components/controls/index.cjs +1 -1
  22. package/dist/components/controls/index.cjs.map +1 -1
  23. package/dist/components/controls/index.js +20 -20
  24. package/dist/components/controls/index.js.map +1 -1
  25. package/dist/components/dropdown/index.cjs +1 -1
  26. package/dist/components/dropdown/index.js +65 -65
  27. package/dist/components/editor/index.cjs +16 -16
  28. package/dist/components/editor/index.js +4 -4
  29. package/dist/components/header/index.cjs +1 -1
  30. package/dist/components/header/index.js +9 -9
  31. package/dist/components/icon/index.cjs +1 -1
  32. package/dist/components/icon/index.js +1 -1
  33. package/dist/components/input/index.cjs +1 -1
  34. package/dist/components/input/index.js +2 -2
  35. package/dist/components/menu/index.cjs +1 -1
  36. package/dist/components/menu/index.cjs.map +1 -1
  37. package/dist/components/menu/index.js +67 -59
  38. package/dist/components/menu/index.js.map +1 -1
  39. package/dist/components/message/index.cjs +1 -1
  40. package/dist/components/message/index.js +21 -21
  41. package/dist/components/nav/index.cjs +1 -1
  42. package/dist/components/nav/index.js +19 -19
  43. package/dist/components/popover/index.cjs +1 -1
  44. package/dist/components/popover/index.cjs.map +1 -1
  45. package/dist/components/popover/index.js +78 -79
  46. package/dist/components/popover/index.js.map +1 -1
  47. package/dist/components/search/index.cjs +1 -1
  48. package/dist/components/search/index.cjs.map +1 -1
  49. package/dist/components/search/index.js +75 -45
  50. package/dist/components/search/index.js.map +1 -1
  51. package/dist/components/select/index.cjs +1 -1
  52. package/dist/components/select/index.js +2 -2
  53. package/dist/components/toasts/index.cjs +1 -1
  54. package/dist/components/toasts/index.js +4 -4
  55. package/dist/{icons-BFgf_lJN.js → icons-BIi_mYLy.js} +4 -1
  56. package/dist/icons-BIi_mYLy.js.map +1 -0
  57. package/dist/icons-CR-eUx2p.cjs +2 -0
  58. package/dist/icons-CR-eUx2p.cjs.map +1 -0
  59. package/dist/index-CWD8Jp0A.cjs +2 -0
  60. package/dist/{index-CEzqxRIu.cjs.map → index-CWD8Jp0A.cjs.map} +1 -1
  61. package/dist/{index-C_YiNpZP.js → index-Clex8VE6.js} +2 -2
  62. package/dist/{index-C_YiNpZP.js.map → index-Clex8VE6.js.map} +1 -1
  63. package/dist/{index-BPIK2dxs.cjs → index-DVXi-Ryi.cjs} +2 -2
  64. package/dist/{index-BPIK2dxs.cjs.map → index-DVXi-Ryi.cjs.map} +1 -1
  65. package/dist/index-yIe5PqD1.js +73 -0
  66. package/dist/{index-BHgGZxsR.js.map → index-yIe5PqD1.js.map} +1 -1
  67. package/dist/index.cjs +1 -1
  68. package/dist/index.d.ts +35 -12
  69. package/dist/index.js +2 -2
  70. package/dist/tokens.json +1 -1
  71. package/package.json +1 -1
  72. package/dist/icons-BFgf_lJN.js.map +0 -1
  73. package/dist/icons-Dx0NQYLH.cjs +0 -2
  74. package/dist/icons-Dx0NQYLH.cjs.map +0 -1
  75. package/dist/index-BHgGZxsR.js +0 -73
  76. package/dist/index-CEzqxRIu.cjs +0 -2
@@ -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
@@ -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