@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.
- package/dist/assets/index.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index49.css +1 -1
- package/dist/assets/index52.css +1 -1
- package/dist/assets/index53.css +1 -1
- package/dist/assets/index55.css +1 -1
- package/dist/assets/index59.css +1 -1
- package/dist/components/app-link/index.cjs +1 -1
- package/dist/components/app-link/index.js +7 -7
- package/dist/components/badge/index.cjs +1 -1
- package/dist/components/badge/index.js +31 -31
- package/dist/components/banner/index.cjs +1 -1
- package/dist/components/banner/index.js +9 -9
- package/dist/components/button/index.cjs +1 -1
- package/dist/components/button/index.js +26 -26
- package/dist/components/dropdown/index.cjs +1 -1
- package/dist/components/dropdown/index.js +170 -177
- package/dist/components/editor/index.cjs +1 -1
- package/dist/components/editor/index.js +169 -169
- package/dist/components/form/index.cjs +1 -1
- package/dist/components/form/index.js +9 -9
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.js +22 -22
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.js +1 -1
- package/dist/components/link/index.cjs +1 -1
- package/dist/components/link/index.js +15 -15
- package/dist/components/nav/index.cjs +1 -1
- package/dist/components/nav/index.js +16 -16
- package/dist/components/search/index.cjs +1 -1
- package/dist/components/search/index.js +1 -1
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/widget/index.cjs +1 -1
- package/dist/components/widget/index.js +16 -16
- package/dist/index-CFMWBY53.cjs +1 -0
- package/dist/index-DBjIWUDE.cjs +1 -0
- package/dist/index-DJDY6iu6.js +48 -0
- package/dist/index-DO_phxRs.js +92 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/tokens.css +55 -55
- package/dist/tokens.json +258 -462
- package/package.json +1 -1
- package/dist/index-CWeknFzO.js +0 -74
- package/dist/index-Ct84TXGv.cjs +0 -1
- package/dist/index-D3gtJMYv.cjs +0 -1
- package/dist/index-DpkXKD1Z.js +0 -87
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index27.css');const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index27.css');const t=require("react/jsx-runtime"),o=require("classix"),b=require("../button/index.cjs"),i="_banner_1lo4j_13",u="_visible_1lo4j_32",r={banner:i,visible:u},d=({button:a,message:c,onClick:e,onDismiss:n,visible:l=!1})=>{const s=()=>{e==null||e(),n==null||n()};return t.jsxs("div",{"aria-live":"assertive",className:o(r.banner,l&&r.visible),"data-component":"banner",children:[c,t.jsx(b.Button,{onClick:s,children:a})]})};exports.Banner=d;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as b, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import i from "classix";
|
|
3
3
|
import { Button as s } from "../button/index.js";
|
|
4
|
-
import '../../assets/index27.css';const v = "
|
|
4
|
+
import '../../assets/index27.css';const v = "_banner_1lo4j_13", _ = "_visible_1lo4j_32", n = {
|
|
5
5
|
banner: v,
|
|
6
|
-
visible:
|
|
7
|
-
},
|
|
6
|
+
visible: _
|
|
7
|
+
}, j = ({
|
|
8
8
|
button: t,
|
|
9
9
|
message: a,
|
|
10
10
|
onClick: e,
|
|
11
11
|
onDismiss: r,
|
|
12
|
-
visible:
|
|
12
|
+
visible: l = !1
|
|
13
13
|
}) => {
|
|
14
|
-
const
|
|
14
|
+
const o = () => {
|
|
15
15
|
e == null || e(), r == null || r();
|
|
16
16
|
};
|
|
17
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ b("div", { "aria-live": "assertive", className: i(n.banner, l && n.visible), "data-component": "banner", children: [
|
|
18
18
|
a,
|
|
19
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */ c(s, { onClick: o, children: t })
|
|
20
20
|
] });
|
|
21
21
|
};
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
j as Banner
|
|
24
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index29.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index29.css');const t=require("react/jsx-runtime"),g=require("classix"),y=require("../loading/index.cjs"),p=require("../badge/index.cjs"),q=require("../icon/index.cjs"),v="_button_4mvsq_1",b="_large_4mvsq_20",x="_small_4mvsq_24",j="_danger_4mvsq_34",f="_simple_4mvsq_40",h="_primary_4mvsq_53",B="_secondary_4mvsq_64",S="_tertiary_4mvsq_91",e={button:v,large:b,small:x,danger:j,simple:f,primary:h,secondary:B,tertiary:S},z={primary:e.primary,secondary:e.secondary,simple:e.simple,tertiary:e.tertiary},I={large:e.large,medium:e.medium,small:e.small};function L({badge:a,children:o,className:m,disabled:i=!1,icon:n,intent:r="default",isLoading:l=!1,onClick:c,ref:d,size:s="medium",variant:_="secondary",...u}){return t.jsxs("button",{className:g(e.button,z[_],I[s],m,r==="danger"&&e.danger),"data-intent":r,disabled:i,onClick:c,ref:d,type:"button",...u,"data-component":"button",children:[l?t.jsx(y.Loading,{size:s==="large"?"medium":"small"}):n&&t.jsx(q.Icon,{name:n,size:s==="large"?"medium":"small"}),o,t.jsx(p.Badge,{variant:"highlight",children:a})]})}exports.Button=L;
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as y, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import g from "classix";
|
|
3
3
|
import { Loading as u } from "../loading/index.js";
|
|
4
|
-
import { Badge as
|
|
5
|
-
import { Icon as
|
|
6
|
-
import '../../assets/index29.css';const
|
|
7
|
-
button:
|
|
8
|
-
large:
|
|
9
|
-
small:
|
|
10
|
-
danger:
|
|
11
|
-
simple:
|
|
12
|
-
primary:
|
|
13
|
-
secondary:
|
|
14
|
-
tertiary:
|
|
15
|
-
},
|
|
4
|
+
import { Badge as v } from "../badge/index.js";
|
|
5
|
+
import { Icon as f } from "../icon/index.js";
|
|
6
|
+
import '../../assets/index29.css';const q = "_button_4mvsq_1", b = "_large_4mvsq_20", h = "_small_4mvsq_24", x = "_danger_4mvsq_34", j = "_simple_4mvsq_40", B = "_primary_4mvsq_53", z = "_secondary_4mvsq_64", I = "_tertiary_4mvsq_91", r = {
|
|
7
|
+
button: q,
|
|
8
|
+
large: b,
|
|
9
|
+
small: h,
|
|
10
|
+
danger: x,
|
|
11
|
+
simple: j,
|
|
12
|
+
primary: B,
|
|
13
|
+
secondary: z,
|
|
14
|
+
tertiary: I
|
|
15
|
+
}, L = {
|
|
16
16
|
primary: r.primary,
|
|
17
17
|
secondary: r.secondary,
|
|
18
18
|
simple: r.simple,
|
|
19
19
|
tertiary: r.tertiary
|
|
20
|
-
},
|
|
20
|
+
}, N = {
|
|
21
21
|
large: r.large,
|
|
22
22
|
medium: r.medium,
|
|
23
23
|
small: r.small
|
|
24
24
|
};
|
|
25
25
|
function E({
|
|
26
|
-
badge:
|
|
27
|
-
children:
|
|
26
|
+
badge: e,
|
|
27
|
+
children: n,
|
|
28
28
|
className: o,
|
|
29
29
|
disabled: l = !1,
|
|
30
|
-
icon:
|
|
31
|
-
intent:
|
|
30
|
+
icon: s,
|
|
31
|
+
intent: m = "default",
|
|
32
32
|
isLoading: i = !1,
|
|
33
|
-
onClick:
|
|
34
|
-
ref:
|
|
33
|
+
onClick: _,
|
|
34
|
+
ref: c,
|
|
35
35
|
size: t = "medium",
|
|
36
|
-
variant:
|
|
37
|
-
...
|
|
36
|
+
variant: d = "secondary",
|
|
37
|
+
...p
|
|
38
38
|
}) {
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
i ? /* @__PURE__ */ a(u, { size: t === "large" ? "medium" : "small" }) :
|
|
41
|
-
|
|
42
|
-
/* @__PURE__ */ a(
|
|
39
|
+
return /* @__PURE__ */ y("button", { className: g(r.button, L[d], N[t], o, m === "danger" && r.danger), "data-intent": m, disabled: l, onClick: _, ref: c, type: "button", ...p, "data-component": "button", children: [
|
|
40
|
+
i ? /* @__PURE__ */ a(u, { size: t === "large" ? "medium" : "small" }) : s && /* @__PURE__ */ a(f, { name: s, size: t === "large" ? "medium" : "small" }),
|
|
41
|
+
n,
|
|
42
|
+
/* @__PURE__ */ a(v, { variant: "highlight", children: e })
|
|
43
43
|
] });
|
|
44
44
|
}
|
|
45
45
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const n=require("react/jsx-runtime"),V=require("classix"),s=require("react")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const n=require("react/jsx-runtime"),V=require("classix"),s=require("react"),$=require("../button/index.cjs"),Je=require("../form/index.cjs"),Ue=require("../../icons-BSfBrPs3.cjs"),ge=require("../../index-DBjIWUDE.cjs"),Xe=require("../label/index.cjs"),Ye=require("../list/index.cjs"),Ee=require("../loading/index.cjs"),Se=require("../../index-CFMWBY53.cjs");function W(t){return typeof t=="string"||typeof t=="number"?String(t):Array.isArray(t)?t.map(W).join(" "):s.isValidElement(t)?W(t.props.children):""}function Ze(t){return s.isValidElement(t)&&t.type==="option"}function et(t){return s.isValidElement(t)&&t.type==="optgroup"}function tt(t){return s.isValidElement(t)&&t.type===s.Fragment}function nt(t){return s.isValidElement(t)&&t.type===Se.Select}function le(t,a,r=!1){const c=[];return s.Children.forEach(t,l=>{if(tt(l))c.push(...le(l.props.children,a,r));else if(Ze(l)){const j=W(l.props.children).trim(),k=l.props.value!=null?String(l.props.value):j;c.push({disabled:r||!!l.props.disabled,groupLabel:a,hidden:!!l.props.hidden,isPlaceholder:!!(l.props.hidden&&k===""),label:l.props.children,selected:!!l.props.selected,text:j,value:k})}else et(l)&&c.push(...le(l.props.children,l.props.label,r||!!l.props.disabled))}),c}function st(t){const a=t.trim();if(!a)return null;const c=[.../[*?]/.test(a)?a:`*${a}*`].map(l=>l==="*"?".*":l==="?"?".":l.replace(/[|\\{}()[\]^$+.,]/g,"\\$&")).join("");return new RegExp(`^${c}$`,"i")}function lt(t,a){const r=st(a),c=t.filter(l=>!l.hidden&&!l.isPlaceholder);return r?c.filter(l=>r.test([l.groupLabel,l.text,l.value].filter(Boolean).join(" "))):c}function it(t,a){return t.find(r=>r.value===a)??t.find(r=>r.isPlaceholder)??t[0]}function rt(t,a,r){var c,l;return a!=null?String(a):r!=null?String(r):((c=t.find(j=>j.selected))==null?void 0:c.value)??((l=t[0])==null?void 0:l.value)??""}function at(t){if(nt(t)){const{children:a,placeholder:r,...c}=t.props;return{children:n.jsxs(n.Fragment,{children:[r&&n.jsx("option",{hidden:!0,value:"",children:r}),a]}),props:c}}return{children:t.props.children,props:t.props}}const ct="_combobox_bnh5j_3",ot="_dropdown_bnh5j_21",ut="_empty_bnh5j_29",dt="_group_bnh5j_30",ft="_placeholder_bnh5j_31",pt="_filter_bnh5j_39",mt="_native_bnh5j_71",bt="_option_bnh5j_81",_t="_options_bnh5j_107",ht="_panel_bnh5j_117",vt="_selected_bnh5j_142",jt="_text_bnh5j_146",xt="_trigger_bnh5j_154",yt="_minimal_bnh5j_200",gt="_inline_bnh5j_264",Et="_field_bnh5j_298",St="_label_bnh5j_302",i={combobox:ct,"combobox-input":"_combobox-input_bnh5j_12",dropdown:ot,empty:ut,group:dt,placeholder:ft,filter:pt,"filter-controls":"_filter-controls_bnh5j_46","loading-status":"_loading-status_bnh5j_57",native:mt,option:bt,options:_t,panel:ht,selected:vt,text:jt,trigger:xt,minimal:yt,inline:gt,field:Et,label:St,"inline-field":"_inline-field_bnh5j_307"},wt=({children:t,className:a,combobox:r=!1,description:c,errorMessage:l,invalid:j=!1,searchable:k,createOption:x,emptyLabel:we="No matches found",errorLabel:m,onRetry:ie,retryLabel:Re="Retry",label:h,filterOptions:Ne=!0,hasNextPage:_=!1,loading:d=!1,loadingLabel:re="Loading",loadMoreLabel:qe="Load more",onLoadMore:R,onOpenChange:C,onSearchChange:D,searchValue:A,renderOption:G,searchPlaceholder:L="Filter",selectedItems:Be,variant:N="default",...ae})=>{const M=at(t),{defaultValue:Ie,onChange:O,value:T,...Ve}=M.props,o=Se.sanitizeSelectProps(Ve),{className:$e,...ke}=o,ce=s.useRef(null),oe=s.useRef(null),y=s.useId(),K=j&&l?`${y}-error`:void 0,ue=c?`${y}-description`:void 0,de=[o["aria-describedby"],ue,K].filter(Boolean).join(" ")||void 0,fe=j?!0:o["aria-invalid"],pe=s.useRef(null),g=s.useRef(null),H=s.useRef(null),me=s.useRef(null),P=s.useRef(!1),J=s.useRef(!1),U=s.useRef(R),be=!!R,E=le(M.children),q=T!=null,X=rt(E,T,Ie),[Y,Z]=s.useState(()=>X),[u,Ce]=s.useState(!1),[De,_e]=s.useState(!1),[Fe,ze]=s.useState(null),[Qe,We]=s.useState(""),v=A??Qe,ee=E.filter(e=>!e.hidden).length,Ae=Fe??(d||!!m||_||ee>8),S=k??(Ae||De||v.length>0),B=s.useCallback(e=>{A===void 0&&We(e),D==null||D(e)},[D,A]),b=s.useCallback(e=>{P.current===e||e&&o.disabled||(P.current=e,Ce(e),C==null||C(e),e||B(""))},[C,o.disabled,B]),F=q?String(T):Y,z=it(E,F),Ge={"--icon-svg":Ue.iconSVG("CaretDown")},te=lt(E,Ne?v:""),w=v.trim(),Q=!!(r&&x&&w&&x.isValid(w)),Le=h&&N==="inline"?ge.formatInlineLabel(h):h,he=e=>e?(G==null?void 0:G({groupLabel:e.groupLabel,isSelected:e.value===F,label:e.label,text:e.text,value:e.value}))??e.label:"Select an option";s.useEffect(()=>{u&&!v&&!d&&!m&&ze(_||ee>8)},[u,v,d,m,_,ee]),s.useEffect(()=>{!q&&!E.some(e=>e.value===Y)&&Z(X)},[X,Y,q,E]),s.useEffect(()=>{u?S&&_e(!0):_e(!1)},[u,S]),s.useEffect(()=>{var e,f,p;u&&(r||S?(e=g.current)==null||e.focus():(p=(f=H.current)==null?void 0:f.querySelector("button:not(:disabled)"))==null||p.focus())},[u,r,S]),s.useEffect(()=>{if(!u)return;const e=f=>{var p;(p=oe.current)!=null&&p.contains(f.target)||b(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[b,u]),s.useEffect(()=>{U.current=R},[R]),s.useEffect(()=>{o.disabled&&b(!1)},[b,o.disabled]);const ne=s.useCallback(()=>{!P.current||o.disabled||d||m||!_||!U.current||J.current||(J.current=!0,U.current())},[m,_,d,o.disabled]);s.useEffect(()=>{if(J.current=!1,!u||o.disabled||d||m||!_||!be)return;const e=me.current,f=H.current;if(!e||!f||typeof IntersectionObserver>"u")return;let p=!0;const I=new IntersectionObserver(He=>{p&&He.some(Pe=>Pe.isIntersecting)&&ne()},{root:f});return I.observe(e),()=>{p=!1,I.disconnect()}},[u,d,m,_,be,ne,te.length,v,o.disabled]);const Me=e=>{q||Z(e.target.value),O==null||O(e)},se=()=>{var e;b(!1),r||(e=ce.current)==null||e.focus()},ve=()=>{var e;B(""),b(!0),(e=g.current)==null||e.focus()},je=()=>{!x||!Q||(x.onCreate(w),ve())},Oe=e=>{var I;q||Z(e);const f=pe.current;if(!f){se();return}const p=(I=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value"))==null?void 0:I.set;p==null||p.call(f,e),f.dispatchEvent(new Event("change",{bubbles:!0})),r?ve():se()},Te=e=>{e.key==="Escape"&&se(),e.key==="Enter"&&e.target===g.current&&Q&&(e.preventDefault(),je())},xe=n.jsx("div",{"aria-hidden":!d,"aria-label":re,className:i["loading-status"],role:"status",children:d&&n.jsx(Ee.Loading,{size:"small"})}),ye=n.jsxs("div",{className:V(i.dropdown,N==="inline"&&i.inline,N==="minimal"&&i.minimal,a),onKeyDown:Te,ref:oe,...ae,children:[n.jsx("select",{...ke,"aria-hidden":"true",className:V(i.native,$e),onChange:Me,ref:pe,tabIndex:-1,value:F,children:M.children}),r?n.jsxs("div",{className:i.combobox,onClick:()=>{var e;return(e=g.current)==null?void 0:e.focus()},children:[Be,n.jsx("input",{"aria-describedby":de,"aria-invalid":fe,"aria-autocomplete":"list","aria-expanded":u,"aria-label":o["aria-label"]??h??L,className:i["combobox-input"],disabled:o.disabled,onChange:e=>{B(e.target.value),b(!0)},onClick:()=>b(!0),onFocus:()=>b(!0),placeholder:L||void 0,ref:g,role:"combobox",type:"text",value:v}),xe]}):n.jsx($.Button,{"aria-describedby":de,"aria-invalid":fe,"aria-label":h?void 0:o["aria-label"],"aria-expanded":u,"aria-haspopup":"dialog","aria-labelledby":h?`${y} ${y}-value`:void 0,className:V(i.trigger,(z==null?void 0:z.isPlaceholder)&&i.placeholder),"data-open":u?"true":void 0,disabled:o.disabled,onClick:()=>b(!u),ref:ce,style:Ge,variant:"simple",children:n.jsx("span",{className:i.text,id:`${y}-value`,children:he(z)})}),u&&n.jsxs("div",{className:i.panel,children:[!r&&S&&n.jsxs("div",{className:i["filter-controls"],children:[n.jsx(ge.Input,{"aria-label":"Filter",className:i.filter,icon:"MagnifyingGlass",onChange:e=>B(e.target.value),placeholder:L,ref:g,type:"search",value:v}),xe]}),n.jsxs(Ye.List,{"aria-label":"Dropdown","aria-busy":d||void 0,className:i.options,ref:H,children:[te.map(e=>{const f=e.value===F;return n.jsx("li",{"data-component":"dropdown",children:n.jsxs($.Button,{"aria-label":f?`${e.text}, selected`:e.text,className:V(i.option,f&&i.selected),disabled:e.disabled,onClick:()=>Oe(e.value),variant:"tertiary",children:[n.jsx("span",{className:i.text,children:he(e)}),e.groupLabel&&n.jsx("small",{className:i.group,children:e.groupLabel})]})},`${e.groupLabel??"root"}-${e.value}`)}),Q&&x&&n.jsx("li",{children:n.jsx($.Button,{"aria-label":W(x.render(w))||w,className:i.option,onClick:je,variant:"tertiary",children:n.jsx("span",{className:i.text,children:x.render(w)})})}),te.length===0&&!Q&&!d&&!m&&!_&&n.jsx("li",{className:i.empty,children:we}),m&&n.jsxs("li",{className:i.empty,children:[n.jsx("span",{role:"alert",children:m}),ie&&n.jsx($.Button,{disabled:d,onClick:ie,variant:"tertiary",children:Re})]}),d&&!r&&!S&&n.jsx("li",{"aria-label":re,className:i.empty,role:"status",children:n.jsx(Ee.Loading,{size:"small"})}),_&&R&&!m&&n.jsx("li",{ref:me,children:n.jsx($.Button,{className:i.option,disabled:d,onClick:ne,variant:"tertiary",children:qe})})]})]})]}),Ke=h||c?n.jsxs("div",{className:V(i.label,N==="inline"&&i["inline-field"]),children:[n.jsx(Xe.Label,{label:Le,labelId:h?y:void 0,description:c,descriptionId:ue,inline:N==="inline",required:ae.required}),ye]}):ye;return n.jsxs("div",{className:i.field,"data-component":"dropdown",children:[Ke,K&&n.jsx(Je.FieldError,{errorId:K,errorMessage:l})]})};exports.Dropdown=wt;
|