@solibo/solibo-ui 2.2.15 → 2.2.17
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/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index53.css +1 -1
- package/dist/assets/index54.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/components/card/index.cjs +1 -1
- package/dist/components/card/index.js +50 -50
- package/dist/components/checkbox/index.cjs +1 -1
- package/dist/components/checkbox/index.js +24 -23
- package/dist/components/dropdown/index.cjs +1 -1
- package/dist/components/dropdown/index.js +211 -190
- package/dist/components/dropzone/index.cjs +1 -1
- package/dist/components/dropzone/index.js +84 -56
- package/dist/components/editor/index.cjs +1 -1
- package/dist/components/editor/index.js +1 -1
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.js +1 -1
- package/dist/components/label/index.cjs +1 -1
- package/dist/components/label/index.js +16 -14
- package/dist/components/list/index.cjs +1 -1
- package/dist/components/list/index.js +20 -20
- package/dist/components/page-layout/index.cjs +1 -1
- package/dist/components/page-layout/index.js +13 -13
- package/dist/components/radio/index.cjs +1 -1
- package/dist/components/radio/index.js +13 -13
- package/dist/components/search/index.cjs +1 -1
- package/dist/components/search/index.js +78 -70
- package/dist/components/textarea/index.cjs +1 -1
- package/dist/components/textarea/index.js +39 -32
- package/dist/components/toggle/index.cjs +1 -1
- package/dist/components/toggle/index.js +10 -10
- package/dist/index-6TyCExT0.js +87 -0
- package/dist/index-DEQcFR32.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +34 -9
- package/dist/index.js +1 -1
- package/dist/tokens.json +1 -1
- package/package.json +1 -1
- package/dist/index-Bre56YYa.js +0 -90
- package/dist/index-CHJNMNDr.cjs +0 -1
package/dist/index-Bre56YYa.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { jsxs as x, Fragment as Y, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import m from "classix";
|
|
3
|
-
import { useId as Z, useState as b, useEffect as W } from "react";
|
|
4
|
-
import { FieldError as q } from "./components/form/index.js";
|
|
5
|
-
import { i as M } from "./icons-DVeBguFb.js";
|
|
6
|
-
import { Label as nn } from "./components/label/index.js";
|
|
7
|
-
import { u as tn, c as I } from "./use-touched-B999bBr8.js";
|
|
8
|
-
import './assets/index53.css';const en = (t) => t && t.charAt(0).toUpperCase() + t.slice(1).toLowerCase();
|
|
9
|
-
function on(t) {
|
|
10
|
-
const e = en(t);
|
|
11
|
-
return e && !e.endsWith(":") ? `${e}:` : e;
|
|
12
|
-
}
|
|
13
|
-
const an = "_field_11xgx_3", sn = "_input_11xgx_8", cn = "_label_11xgx_54", ln = "_inline_11xgx_69", rn = "_suffix_11xgx_84", dn = "_touched_11xgx_98", un = "_code_11xgx_136", n = {
|
|
14
|
-
field: an,
|
|
15
|
-
input: sn,
|
|
16
|
-
label: cn,
|
|
17
|
-
inline: ln,
|
|
18
|
-
suffix: rn,
|
|
19
|
-
touched: dn,
|
|
20
|
-
code: un,
|
|
21
|
-
"suffix-text": "_suffix-text_11xgx_162"
|
|
22
|
-
};
|
|
23
|
-
function vn({
|
|
24
|
-
className: t,
|
|
25
|
-
defaultCountryCode: e = "+47",
|
|
26
|
-
description: $,
|
|
27
|
-
disabled: c = !1,
|
|
28
|
-
errorMessage: N,
|
|
29
|
-
icon: B,
|
|
30
|
-
invalid: h = !1,
|
|
31
|
-
label: g,
|
|
32
|
-
onBlur: k,
|
|
33
|
-
placeholder: L,
|
|
34
|
-
ref: w,
|
|
35
|
-
required: _,
|
|
36
|
-
style: E,
|
|
37
|
-
suffix: P,
|
|
38
|
-
type: i = "text",
|
|
39
|
-
variant: l = "default",
|
|
40
|
-
...o
|
|
41
|
-
}) {
|
|
42
|
-
const J = Z(), [p, j] = b(""), [r, C] = b(""), [D, y] = b(!1), {
|
|
43
|
-
name: F,
|
|
44
|
-
onChange: d,
|
|
45
|
-
pattern: K,
|
|
46
|
-
value: u,
|
|
47
|
-
...Q
|
|
48
|
-
} = o, {
|
|
49
|
-
touched: S,
|
|
50
|
-
onBlur: R
|
|
51
|
-
} = tn(u === ""), f = B && i !== "datetime-local" ? B : void 0, T = g && l === "inline" ? on(g) : g, v = h && N ? J : void 0, V = [o["aria-describedby"], v].filter(Boolean).join(" ") || void 0, z = f ? {
|
|
52
|
-
...E,
|
|
53
|
-
"--icon-svg": M(f)
|
|
54
|
-
} : E, A = I(R, () => y(!1), k), G = () => {
|
|
55
|
-
!c && !o.readOnly && y(!0);
|
|
56
|
-
}, H = I(G, o.onInput), O = I(G, o.onPointerDown);
|
|
57
|
-
W(() => {
|
|
58
|
-
if (d && i === "tel") {
|
|
59
|
-
const s = {
|
|
60
|
-
name: F,
|
|
61
|
-
value: r ? (p || e).split(" ").join("") + r.split(" ").join("") : void 0
|
|
62
|
-
};
|
|
63
|
-
d({
|
|
64
|
-
target: s,
|
|
65
|
-
currentTarget: s
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
}, [p, e, F, d, r, i]), W(() => {
|
|
69
|
-
i === "tel" && !u && (C(""), j(""));
|
|
70
|
-
}, [i, u]);
|
|
71
|
-
const X = /* @__PURE__ */ x(Y, { children: [
|
|
72
|
-
/* @__PURE__ */ a("input", { disabled: c, hidden: !0, onChange: d, pattern: void 0, placeholder: L, ref: w, type: i, value: u }),
|
|
73
|
-
/* @__PURE__ */ a("input", { type: "text", className: m(n.code, n.input), disabled: c, maxLength: 5, onChange: (s) => j(s.target.value), placeholder: e, value: p }),
|
|
74
|
-
/* @__PURE__ */ a("input", { ...Q, "aria-describedby": V, "aria-invalid": h ? !0 : o["aria-invalid"], type: "tel", className: m(n.input, t, S && n.touched), "data-icon": f ? "true" : void 0, "data-editing": D || void 0, onInput: H, onPointerDown: O, disabled: c, maxLength: 14, name: void 0, onChange: (s) => C(s.target.value), onBlur: A, pattern: K, required: _, style: z, value: r })
|
|
75
|
-
] }), U = /* @__PURE__ */ a("input", { ...o, "aria-describedby": V, "aria-invalid": h ? !0 : o["aria-invalid"], ref: w, className: m(n.input, t, S && n.touched), "data-icon": f ? "true" : void 0, "data-editing": D || void 0, onInput: H, onPointerDown: O, disabled: c, onBlur: A, placeholder: L, required: _, style: z, type: i });
|
|
76
|
-
return /* @__PURE__ */ x("div", { className: n.field, "data-component": "input", children: [
|
|
77
|
-
/* @__PURE__ */ x("label", { className: m(n.label, l === "inline" && n.inline), children: [
|
|
78
|
-
T && /* @__PURE__ */ a(nn, { description: $, inline: l === "inline", label: T, required: _ && l !== "inline" }),
|
|
79
|
-
i === "tel" ? X : P ? /* @__PURE__ */ x("span", { className: n.suffix, children: [
|
|
80
|
-
U,
|
|
81
|
-
/* @__PURE__ */ a("span", { className: n["suffix-text"], children: P })
|
|
82
|
-
] }) : U
|
|
83
|
-
] }),
|
|
84
|
-
v && /* @__PURE__ */ a(q, { errorId: v, errorMessage: N })
|
|
85
|
-
] });
|
|
86
|
-
}
|
|
87
|
-
export {
|
|
88
|
-
vn as I,
|
|
89
|
-
on as f
|
|
90
|
-
};
|
package/dist/index-CHJNMNDr.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";require('./assets/index53.css');const e=require("react/jsx-runtime"),h=require("classix"),a=require("react"),Q=require("./components/form/index.cjs"),X=require("./icons-BIdcCH-v.cjs"),Y=require("./components/label/index.cjs"),_=require("./use-touched-Bq5Gjbpz.cjs"),Z=t=>t&&t.charAt(0).toUpperCase()+t.slice(1).toLowerCase();function G(t){const i=Z(t);return i&&!i.endsWith(":")?`${i}:`:i}const M="_field_11xgx_3",ee="_input_11xgx_8",ne="_label_11xgx_54",te="_inline_11xgx_69",ie="_suffix_11xgx_84",oe="_touched_11xgx_98",se="_code_11xgx_136",n={field:M,input:ee,label:ne,inline:te,suffix:ie,touched:oe,code:se,"suffix-text":"_suffix-text_11xgx_162"};function ce({className:t,defaultCountryCode:i="+47",description:O,disabled:l=!1,errorMessage:j,icon:I,invalid:g=!1,label:m,onBlur:U,placeholder:E,ref:L,required:p,style:N,suffix:B,type:o="text",variant:r="default",...s}){const W=a.useId(),[v,q]=a.useState(""),[u,w]=a.useState(""),[P,C]=a.useState(!1),{name:D,onChange:d,pattern:$,value:x,...k}=s,{touched:S,onBlur:J}=_.useTouched(x===""),f=I&&o!=="datetime-local"?I:void 0,y=m&&r==="inline"?G(m):m,b=g&&j?W:void 0,F=[s["aria-describedby"],b].filter(Boolean).join(" ")||void 0,H=f?{...N,"--icon-svg":X.iconSVG(f)}:N,T=_.composeEventHandlers(J,()=>C(!1),U),R=()=>{!l&&!s.readOnly&&C(!0)},V=_.composeEventHandlers(R,s.onInput),z=_.composeEventHandlers(R,s.onPointerDown);a.useEffect(()=>{if(d&&o==="tel"){const c={name:D,value:u?(v||i).split(" ").join("")+u.split(" ").join(""):void 0};d({target:c,currentTarget:c})}},[v,i,D,d,u,o]),a.useEffect(()=>{o==="tel"&&!x&&(w(""),q(""))},[o,x]);const K=e.jsxs(e.Fragment,{children:[e.jsx("input",{disabled:l,hidden:!0,onChange:d,pattern:void 0,placeholder:E,ref:L,type:o,value:x}),e.jsx("input",{type:"text",className:h(n.code,n.input),disabled:l,maxLength:5,onChange:c=>q(c.target.value),placeholder:i,value:v}),e.jsx("input",{...k,"aria-describedby":F,"aria-invalid":g?!0:s["aria-invalid"],type:"tel",className:h(n.input,t,S&&n.touched),"data-icon":f?"true":void 0,"data-editing":P||void 0,onInput:V,onPointerDown:z,disabled:l,maxLength:14,name:void 0,onChange:c=>w(c.target.value),onBlur:T,pattern:$,required:p,style:H,value:u})]}),A=e.jsx("input",{...s,"aria-describedby":F,"aria-invalid":g?!0:s["aria-invalid"],ref:L,className:h(n.input,t,S&&n.touched),"data-icon":f?"true":void 0,"data-editing":P||void 0,onInput:V,onPointerDown:z,disabled:l,onBlur:T,placeholder:E,required:p,style:H,type:o});return e.jsxs("div",{className:n.field,"data-component":"input",children:[e.jsxs("label",{className:h(n.label,r==="inline"&&n.inline),children:[y&&e.jsx(Y.Label,{description:O,inline:r==="inline",label:y,required:p&&r!=="inline"}),o==="tel"?K:B?e.jsxs("span",{className:n.suffix,children:[A,e.jsx("span",{className:n["suffix-text"],children:B})]}):A]}),b&&e.jsx(Q.FieldError,{errorId:b,errorMessage:j})]})}exports.Input=ce;exports.formatInlineLabel=G;
|