@solibo/solibo-ui 2.3.3 → 2.3.4

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 (55) hide show
  1. package/dist/assets/index.css +1 -1
  2. package/dist/assets/index15.css +1 -1
  3. package/dist/assets/index2.css +1 -1
  4. package/dist/assets/index23.css +1 -1
  5. package/dist/assets/index26.css +1 -1
  6. package/dist/assets/index27.css +1 -1
  7. package/dist/assets/index29.css +1 -1
  8. package/dist/assets/index41.css +1 -1
  9. package/dist/assets/index43.css +1 -1
  10. package/dist/assets/index49.css +1 -1
  11. package/dist/assets/index52.css +1 -1
  12. package/dist/assets/index53.css +1 -1
  13. package/dist/assets/index55.css +1 -1
  14. package/dist/assets/index59.css +1 -1
  15. package/dist/components/app-link/index.cjs +1 -1
  16. package/dist/components/app-link/index.js +7 -7
  17. package/dist/components/badge/index.cjs +1 -1
  18. package/dist/components/badge/index.js +31 -31
  19. package/dist/components/banner/index.cjs +1 -1
  20. package/dist/components/banner/index.js +9 -9
  21. package/dist/components/button/index.cjs +1 -1
  22. package/dist/components/button/index.js +26 -26
  23. package/dist/components/dropdown/index.cjs +1 -1
  24. package/dist/components/dropdown/index.js +170 -177
  25. package/dist/components/editor/index.cjs +1 -1
  26. package/dist/components/editor/index.js +169 -169
  27. package/dist/components/form/index.cjs +1 -1
  28. package/dist/components/form/index.js +9 -9
  29. package/dist/components/icon/index.cjs +1 -1
  30. package/dist/components/icon/index.js +22 -22
  31. package/dist/components/input/index.cjs +1 -1
  32. package/dist/components/input/index.js +1 -1
  33. package/dist/components/link/index.cjs +1 -1
  34. package/dist/components/link/index.js +15 -15
  35. package/dist/components/nav/index.cjs +1 -1
  36. package/dist/components/nav/index.js +16 -16
  37. package/dist/components/search/index.cjs +1 -1
  38. package/dist/components/search/index.js +1 -1
  39. package/dist/components/select/index.cjs +1 -1
  40. package/dist/components/select/index.js +1 -1
  41. package/dist/components/widget/index.cjs +1 -1
  42. package/dist/components/widget/index.js +16 -16
  43. package/dist/index-CFMWBY53.cjs +1 -0
  44. package/dist/index-DBjIWUDE.cjs +1 -0
  45. package/dist/index-DJDY6iu6.js +48 -0
  46. package/dist/index-DO_phxRs.js +92 -0
  47. package/dist/index.cjs +1 -1
  48. package/dist/index.js +2 -2
  49. package/dist/tokens.css +55 -55
  50. package/dist/tokens.json +258 -462
  51. package/package.json +1 -1
  52. package/dist/index-CWeknFzO.js +0 -74
  53. package/dist/index-Ct84TXGv.cjs +0 -1
  54. package/dist/index-D3gtJMYv.cjs +0 -1
  55. package/dist/index-DpkXKD1Z.js +0 -87
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solibo/solibo-ui",
3
- "version": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "./dist/index.js",
@@ -1,74 +0,0 @@
1
- import { jsxs as d, jsx as m } from "react/jsx-runtime";
2
- import w from "classix";
3
- import { i as C } from "./icons-DtAsxlep.js";
4
- import { Label as S } from "./components/label/index.js";
5
- import { u as P, c as V } from "./use-touched-B999bBr8.js";
6
- import './assets/index59.css';const g = /* @__PURE__ */ new Set(["aria-activedescendant", "aria-autocomplete", "aria-busy", "aria-controls", "aria-describedby", "aria-details", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-haspopup", "aria-hidden", "aria-invalid", "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", "aria-required", "aria-roledescription", "autoComplete", "autoFocus", "className", "defaultValue", "dir", "disabled", "form", "id", "multiple", "name", "onBlur", "onChange", "onClick", "onFocus", "onInput", "onInvalid", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", "required", "role", "size", "style", "tabIndex", "title", "value"]);
7
- function q(r) {
8
- return Object.fromEntries(Object.entries(r).filter(([e]) => e.startsWith("data-") || e.startsWith("aria-") || g.has(e)));
9
- }
10
- const x = /^--[\w-]+$/, E = /^var\(\s*(--[\w-]+)\s*(?:,\s*(.+))?\)$/, _ = /* @__PURE__ */ new Set(["currentcolor", "inherit", "initial", "revert", "revert-layer", "unset"]), i = typeof document < "u" ? document.createElement("span") : null;
11
- function p(r) {
12
- const e = r.trim();
13
- if (!e || !i || _.has(e.toLowerCase()))
14
- return e;
15
- const n = document.body ?? document.documentElement;
16
- if (!n || (i.style.color = e, !i.style.color))
17
- return e;
18
- n.appendChild(i);
19
- const s = getComputedStyle(i).color.trim();
20
- return i.remove(), s || e;
21
- }
22
- function B(r, e = "currentColor") {
23
- var l;
24
- if (typeof document > "u")
25
- return e;
26
- const n = getComputedStyle(document.documentElement), s = /* @__PURE__ */ new Set();
27
- let t = r.trim();
28
- for (; t; ) {
29
- const o = t.match(E), a = (o == null ? void 0 : o[1]) ?? (x.test(t) ? t : null), c = (l = o == null ? void 0 : o[2]) == null ? void 0 : l.trim();
30
- if (!a)
31
- return p(t);
32
- if (s.has(a)) {
33
- t = c ?? "";
34
- continue;
35
- }
36
- s.add(a), t = n.getPropertyValue(a).trim() || c || "";
37
- }
38
- return p(e);
39
- }
40
- const N = "_select_1qls2_3", j = "_touched_1qls2_24", f = {
41
- select: N,
42
- touched: j
43
- }, U = ({
44
- children: r,
45
- description: e,
46
- label: n,
47
- placeholder: s,
48
- ...t
49
- }) => {
50
- const {
51
- touched: l,
52
- onBlur: o
53
- } = P(t.value === ""), a = q(t), {
54
- className: c,
55
- onBlur: h,
56
- style: y,
57
- ...b
58
- } = a, v = {
59
- ...y,
60
- "--icon-svg": C("CaretDown", B("--colors-semantic-content-secondary"))
61
- }, u = /* @__PURE__ */ d("select", { className: w(f.select, c, l && f.touched), onBlur: V(o, h), style: v, ...b, "data-component": "select", children: [
62
- s && /* @__PURE__ */ m("option", { value: "", hidden: !0, children: s }, "placeholder"),
63
- r
64
- ] });
65
- return n ? /* @__PURE__ */ d("label", { "data-component": "select", children: [
66
- /* @__PURE__ */ m(S, { description: e, label: n, required: t.required }),
67
- u
68
- ] }) : u;
69
- };
70
- export {
71
- U as S,
72
- B as r,
73
- q as s
74
- };
@@ -1 +0,0 @@
1
- "use strict";require('./assets/index59.css');const u=require("react/jsx-runtime"),q=require("classix"),S=require("./icons-BSfBrPs3.cjs"),P=require("./components/label/index.cjs"),m=require("./use-touched-Bq5Gjbpz.cjs"),x=new Set(["aria-activedescendant","aria-autocomplete","aria-busy","aria-controls","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-required","aria-roledescription","autoComplete","autoFocus","className","defaultValue","dir","disabled","form","id","multiple","name","onBlur","onChange","onClick","onFocus","onInput","onInvalid","onKeyDown","onKeyUp","onMouseDown","onMouseUp","onPointerDown","onPointerUp","required","role","size","style","tabIndex","title","value"]);function y(o){return Object.fromEntries(Object.entries(o).filter(([e])=>e.startsWith("data-")||e.startsWith("aria-")||x.has(e)))}const _=/^--[\w-]+$/,j=/^var\(\s*(--[\w-]+)\s*(?:,\s*(.+))?\)$/,V=new Set(["currentcolor","inherit","initial","revert","revert-layer","unset"]),c=typeof document<"u"?document.createElement("span"):null;function p(o){const e=o.trim();if(!e||!c||V.has(e.toLowerCase()))return e;const r=document.body??document.documentElement;if(!r||(c.style.color=e,!c.style.color))return e;r.appendChild(c);const s=getComputedStyle(c).color.trim();return c.remove(),s||e}function b(o,e="currentColor"){var i;if(typeof document>"u")return e;const r=getComputedStyle(document.documentElement),s=new Set;let t=o.trim();for(;t;){const n=t.match(j),a=(n==null?void 0:n[1])??(_.test(t)?t:null),l=(i=n==null?void 0:n[2])==null?void 0:i.trim();if(!a)return p(t);if(s.has(a)){t=l??"";continue}s.add(a),t=r.getPropertyValue(a).trim()||l||""}return p(e)}const g="_select_1qls2_3",E="_touched_1qls2_24",h={select:g,touched:E},z=({children:o,description:e,label:r,placeholder:s,...t})=>{const{touched:i,onBlur:n}=m.useTouched(t.value===""),a=y(t),{className:l,onBlur:f,style:v,...w}=a,C={...v,"--icon-svg":S.iconSVG("CaretDown",b("--colors-semantic-content-secondary"))},d=u.jsxs("select",{className:q(h.select,l,i&&h.touched),onBlur:m.composeEventHandlers(n,f),style:C,...w,"data-component":"select",children:[s&&u.jsx("option",{value:"",hidden:!0,children:s},"placeholder"),o]});return r?u.jsxs("label",{"data-component":"select",children:[u.jsx(P.Label,{description:e,label:r,required:t.required}),d]}):d};exports.Select=z;exports.resolveColor=b;exports.sanitizeSelectProps=y;
@@ -1 +0,0 @@
1
- "use strict";require('./assets/index53.css');const e=require("react/jsx-runtime"),x=require("classix"),c=require("react"),k=require("./components/form/index.cjs"),D=require("./icons-BSfBrPs3.cjs"),J=require("./components/label/index.cjs"),R=require("./use-touched-Bq5Gjbpz.cjs"),K=n=>n&&n.charAt(0).toUpperCase()+n.slice(1).toLowerCase();function V(n){const i=K(n);return i&&!i.endsWith(":")?`${i}:`:i}const O="_field_1m40b_3",Q="_input_1m40b_8",X="_label_1m40b_30",Y="_suffix_1m40b_40",Z="_inline_1m40b_47",M="_code_1m40b_69",t={field:O,input:Q,label:X,suffix:Y,inline:Z,code:M,"suffix-text":"_suffix-text_1m40b_95"};function ee({className:n,defaultCountryCode:i="+47",description:z,disabled:l=!1,errorMessage:j,icon:g,invalid:_=!1,label:b,onBlur:A,placeholder:I,ref:L,required:h,style:N,suffix:B,type:s="text",variant:r="default",...a}){const G=c.useId(),[p,q]=c.useState(""),[u,E]=c.useState(""),{name:C,onChange:d,pattern:H,value:m,...U}=a,{touched:F,onBlur:W}=R.useTouched(m===""),f=g&&s!=="datetime-local"?g:void 0,S=b&&r==="inline"?V(b):b,v=_&&j?G:void 0,T=[a["aria-describedby"],v].filter(Boolean).join(" ")||void 0,w=f?{...N,"--icon-svg":D.iconSVG(f)}:N,y=R.composeEventHandlers(W,A);c.useEffect(()=>{if(d&&s==="tel"){const o={name:C,value:u?(p||i).split(" ").join("")+u.split(" ").join(""):void 0};d({target:o,currentTarget:o})}},[p,i,C,d,u,s]),c.useEffect(()=>{s==="tel"&&!m&&(E(""),q(""))},[s,m]);const $=e.jsxs(e.Fragment,{children:[e.jsx("input",{disabled:l,hidden:!0,onChange:d,pattern:void 0,placeholder:I,ref:L,type:s,value:m}),e.jsx("input",{type:"text",className:x(t.code,t.input),disabled:l,maxLength:5,onChange:o=>q(o.target.value),placeholder:i,value:p}),e.jsx("input",{...U,"aria-describedby":T,"aria-invalid":_?!0:a["aria-invalid"],type:"tel",className:x(t.input,n),"data-icon":f?"true":void 0,"data-touched":F||void 0,disabled:l,maxLength:14,name:void 0,onChange:o=>E(o.target.value),onBlur:y,pattern:H,required:h,style:w,value:u})]}),P=e.jsx("input",{...a,"aria-describedby":T,"aria-invalid":_?!0:a["aria-invalid"],ref:L,className:x(t.input,n),"data-icon":f?"true":void 0,"data-touched":F||void 0,disabled:l,onBlur:y,placeholder:I,required:h,style:w,type:s});return e.jsxs("div",{className:t.field,"data-component":"input",children:[e.jsxs("label",{className:x(t.label,r==="inline"&&t.inline),children:[S&&e.jsx(J.Label,{description:z,inline:r==="inline",label:S,required:h&&r!=="inline"}),s==="tel"?$:B?e.jsxs("span",{className:t.suffix,children:[P,e.jsx("span",{className:t["suffix-text"],children:B})]}):P]}),v&&e.jsx(k.FieldError,{errorId:v,errorMessage:j})]})}exports.Input=ee;exports.formatInlineLabel=V;
@@ -1,87 +0,0 @@
1
- import { jsxs as f, Fragment as J, jsx as o } from "react/jsx-runtime";
2
- import p from "classix";
3
- import { useId as K, useState as z, useEffect as A } from "react";
4
- import { FieldError as O } from "./components/form/index.js";
5
- import { i as Q } from "./icons-DtAsxlep.js";
6
- import { Label as R } from "./components/label/index.js";
7
- import { u as X, c as Y } from "./use-touched-B999bBr8.js";
8
- import './assets/index53.css';const Z = (e) => e && e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
9
- function q(e) {
10
- const n = Z(e);
11
- return n && !n.endsWith(":") ? `${n}:` : n;
12
- }
13
- const M = "_field_1m40b_3", ee = "_input_1m40b_8", te = "_label_1m40b_30", ne = "_suffix_1m40b_40", ie = "_inline_1m40b_47", oe = "_code_1m40b_69", t = {
14
- field: M,
15
- input: ee,
16
- label: te,
17
- suffix: ne,
18
- inline: ie,
19
- code: oe,
20
- "suffix-text": "_suffix-text_1m40b_95"
21
- };
22
- function me({
23
- className: e,
24
- defaultCountryCode: n = "+47",
25
- description: G,
26
- disabled: l = !1,
27
- errorMessage: g,
28
- icon: I,
29
- invalid: h = !1,
30
- label: b,
31
- onBlur: H,
32
- placeholder: N,
33
- ref: B,
34
- required: _,
35
- style: L,
36
- suffix: j,
37
- type: i = "text",
38
- variant: r = "default",
39
- ...s
40
- }) {
41
- const U = K(), [x, C] = z(""), [c, E] = z(""), {
42
- name: F,
43
- onChange: u,
44
- pattern: W,
45
- value: d,
46
- ...$
47
- } = s, {
48
- touched: w,
49
- onBlur: k
50
- } = X(d === ""), m = I && i !== "datetime-local" ? I : void 0, y = b && r === "inline" ? q(b) : b, v = h && g ? U : void 0, P = [s["aria-describedby"], v].filter(Boolean).join(" ") || void 0, S = m ? {
51
- ...L,
52
- "--icon-svg": Q(m)
53
- } : L, T = Y(k, H);
54
- A(() => {
55
- if (u && i === "tel") {
56
- const a = {
57
- name: F,
58
- value: c ? (x || n).split(" ").join("") + c.split(" ").join("") : void 0
59
- };
60
- u({
61
- target: a,
62
- currentTarget: a
63
- });
64
- }
65
- }, [x, n, F, u, c, i]), A(() => {
66
- i === "tel" && !d && (E(""), C(""));
67
- }, [i, d]);
68
- const D = /* @__PURE__ */ f(J, { children: [
69
- /* @__PURE__ */ o("input", { disabled: l, hidden: !0, onChange: u, pattern: void 0, placeholder: N, ref: B, type: i, value: d }),
70
- /* @__PURE__ */ o("input", { type: "text", className: p(t.code, t.input), disabled: l, maxLength: 5, onChange: (a) => C(a.target.value), placeholder: n, value: x }),
71
- /* @__PURE__ */ o("input", { ...$, "aria-describedby": P, "aria-invalid": h ? !0 : s["aria-invalid"], type: "tel", className: p(t.input, e), "data-icon": m ? "true" : void 0, "data-touched": w || void 0, disabled: l, maxLength: 14, name: void 0, onChange: (a) => E(a.target.value), onBlur: T, pattern: W, required: _, style: S, value: c })
72
- ] }), V = /* @__PURE__ */ o("input", { ...s, "aria-describedby": P, "aria-invalid": h ? !0 : s["aria-invalid"], ref: B, className: p(t.input, e), "data-icon": m ? "true" : void 0, "data-touched": w || void 0, disabled: l, onBlur: T, placeholder: N, required: _, style: S, type: i });
73
- return /* @__PURE__ */ f("div", { className: t.field, "data-component": "input", children: [
74
- /* @__PURE__ */ f("label", { className: p(t.label, r === "inline" && t.inline), children: [
75
- y && /* @__PURE__ */ o(R, { description: G, inline: r === "inline", label: y, required: _ && r !== "inline" }),
76
- i === "tel" ? D : j ? /* @__PURE__ */ f("span", { className: t.suffix, children: [
77
- V,
78
- /* @__PURE__ */ o("span", { className: t["suffix-text"], children: j })
79
- ] }) : V
80
- ] }),
81
- v && /* @__PURE__ */ o(O, { errorId: v, errorMessage: g })
82
- ] });
83
- }
84
- export {
85
- me as I,
86
- q as f
87
- };