@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.
Files changed (46) hide show
  1. package/dist/assets/index.css +1 -1
  2. package/dist/assets/index10.css +1 -1
  3. package/dist/assets/index13.css +1 -1
  4. package/dist/assets/index3.css +1 -1
  5. package/dist/assets/index30.css +1 -1
  6. package/dist/assets/index41.css +1 -1
  7. package/dist/assets/index42.css +1 -1
  8. package/dist/assets/index53.css +1 -1
  9. package/dist/assets/index54.css +1 -1
  10. package/dist/assets/index6.css +1 -1
  11. package/dist/assets/index9.css +1 -1
  12. package/dist/components/card/index.cjs +1 -1
  13. package/dist/components/card/index.js +50 -50
  14. package/dist/components/checkbox/index.cjs +1 -1
  15. package/dist/components/checkbox/index.js +24 -23
  16. package/dist/components/dropdown/index.cjs +1 -1
  17. package/dist/components/dropdown/index.js +211 -190
  18. package/dist/components/dropzone/index.cjs +1 -1
  19. package/dist/components/dropzone/index.js +84 -56
  20. package/dist/components/editor/index.cjs +1 -1
  21. package/dist/components/editor/index.js +1 -1
  22. package/dist/components/input/index.cjs +1 -1
  23. package/dist/components/input/index.js +1 -1
  24. package/dist/components/label/index.cjs +1 -1
  25. package/dist/components/label/index.js +16 -14
  26. package/dist/components/list/index.cjs +1 -1
  27. package/dist/components/list/index.js +20 -20
  28. package/dist/components/page-layout/index.cjs +1 -1
  29. package/dist/components/page-layout/index.js +13 -13
  30. package/dist/components/radio/index.cjs +1 -1
  31. package/dist/components/radio/index.js +13 -13
  32. package/dist/components/search/index.cjs +1 -1
  33. package/dist/components/search/index.js +78 -70
  34. package/dist/components/textarea/index.cjs +1 -1
  35. package/dist/components/textarea/index.js +39 -32
  36. package/dist/components/toggle/index.cjs +1 -1
  37. package/dist/components/toggle/index.js +10 -10
  38. package/dist/index-6TyCExT0.js +87 -0
  39. package/dist/index-DEQcFR32.cjs +1 -0
  40. package/dist/index.cjs +1 -1
  41. package/dist/index.d.ts +34 -9
  42. package/dist/index.js +1 -1
  43. package/dist/tokens.json +1 -1
  44. package/package.json +1 -1
  45. package/dist/index-Bre56YYa.js +0 -90
  46. package/dist/index-CHJNMNDr.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index9.css');const a=require("react/jsx-runtime"),m=require("react"),b=require("../button/index.cjs"),I=require("../checkbox/index.cjs"),T=require("../chip/index.cjs"),H=require("../collapsible/index.cjs"),P=require("../../index-BwfsmdF6.cjs"),z=require("../dialog/index.cjs"),A=require("../header/index.cjs"),E=require("../../index-CHJNMNDr.cjs"),J="_search_wsuwb_3",K="_controls_wsuwb_15",Q="_chips_wsuwb_35",S="_radio_wsuwb_101",l={search:J,controls:K,chips:Q,"filter-dialog":"_filter-dialog_wsuwb_42","filter-groups":"_filter-groups_wsuwb_47","filter-group":"_filter-group_wsuwb_47","filter-option":"_filter-option_wsuwb_83","option-copy":"_option-copy_wsuwb_89",radio:S,"collapsible-options":"_collapsible-options_wsuwb_124"},U=({filterButtonLabel:x="Filters",filterDialogColumns:f=1,filterDialogTitle:k="Filters",filterGroups:d=[],onChange:q,onSelectedFiltersChange:i,removeFilterLabel:M=c=>`Remove ${c.label} filter`,resetLabel:u="Reset",searchLabel:$="Search",searchPlaceholder:O="Search",selectedFilters:t=[],showResultsLabel:B="Show results",value:D=""})=>{const c=m.useId(),[j,r]=m.useState(!1),R=m.useMemo(()=>new Map(d.flatMap(s=>{var n;return[...s.options,...((n=s.collapsible)==null?void 0:n.options)??[]]}).map(s=>[s.value,s])),[d]),h=t.flatMap(s=>{const n=R.get(s);return n?[n]:[]}),p=(s,n,e)=>{var N;if(!i)return;const _=new Set([...(e==null?void 0:e.options.map(o=>o.value))??[],...((N=e==null?void 0:e.collapsible)==null?void 0:N.options.map(o=>o.value))??[]]),y=t.filter(o=>!_.has(o));if(n&&(e==null?void 0:e.defaultValue)===s){i(y);return}i(n?(e==null?void 0:e.control)==="radio"||(e==null?void 0:e.selectionMode)==="single"?[...y,s]:[...new Set([...t,s])]:t.filter(o=>o!==s))},v=(s,n)=>{var e;return t.includes(s)||n.defaultValue===s&&![...n.options,...((e=n.collapsible)==null?void 0:e.options)??[]].some(_=>t.includes(_.value))},w=(s,n)=>a.jsx("div",{className:l["filter-option"],"data-component":"renderfilter",children:n.control==="radio"?a.jsxs("label",{className:l.radio,children:[a.jsx("input",{checked:v(s.value,n),name:`${c}-filter-${n.label??"group"}`,onChange:e=>p(s.value,e.target.checked,n),type:"radio"}),a.jsxs("span",{className:l["option-copy"],children:[s.label,s.description&&a.jsx("sub",{children:s.description})]})]}):a.jsx(I.Checkbox,{checked:v(s.value,n),label:a.jsxs("span",{className:l["option-copy"],children:[s.label,s.description&&a.jsx("sub",{children:s.description})]}),onChange:e=>p(s.value,e.target.checked,n)})},s.value);return a.jsxs("div",{className:l.search,"data-component":"search",children:[a.jsxs("div",{className:l.controls,children:[a.jsx(E.Input,{"aria-label":$,icon:"MagnifyingGlass",onChange:s=>q(s.target.value),placeholder:O,type:"search",value:D}),d.length>0&&a.jsx(b.Button,{"aria-expanded":j,"aria-haspopup":"dialog",badge:h.length,icon:"Funnel",onClick:()=>r(!0),variant:"tertiary",children:x})]}),h.length>0&&a.jsxs("div",{"aria-label":x,className:l.chips,children:[h.map(s=>a.jsx(T.Chip,{accessibleLabel:M(s),label:s.label,onDelete:()=>p(s.value,!1)},s.value)),a.jsx(b.Button,{onClick:()=>i==null?void 0:i([]),variant:"tertiary",children:u})]}),j&&a.jsx(z.Dialog,{"aria-labelledby":c,className:l["filter-dialog"],controls:a.jsxs(P.Controls,{children:[a.jsx(b.Button,{onClick:()=>{i==null||i([]),r(!1)},children:u}),a.jsx(b.Button,{onClick:()=>r(!1),variant:"primary",children:B})]}),header:a.jsx(A.Header,{children:a.jsx("h2",{id:c,children:k})}),open:!0,setOpen:r,children:a.jsx("div",{className:l["filter-groups"],"data-columns":f,children:d.map((s,n)=>a.jsxs("section",{"aria-labelledby":s.label?`${c}-${n}`:void 0,className:l["filter-group"],"data-column-span":s.columnSpan??1,role:s.control==="radio"?"radiogroup":"group",children:[s.label&&a.jsx("h3",{id:`${c}-${n}`,children:s.label}),s.options.map(e=>w(e,s)),s.collapsible&&a.jsx(H.Collapsible,{summary:s.collapsible.label,children:a.jsx("div",{className:l["collapsible-options"],children:s.collapsible.options.map(e=>w(e,s))})})]},s.label??n))})})]})};exports.Search=U;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index9.css');const a=require("react/jsx-runtime"),b=require("react"),h=require("../button/index.cjs"),z=require("../checkbox/index.cjs"),H=require("../chip/index.cjs"),P=require("../collapsible/index.cjs"),A=require("../../index-BwfsmdF6.cjs"),E=require("../dialog/index.cjs"),J=require("../header/index.cjs"),K=require("../../index-DEQcFR32.cjs"),Q=require("../loading/index.cjs"),S="_search_1r1ik_3",U="_controls_1r1ik_15",V="_actions_1r1ik_36",W="_chips_1r1ik_56",X="_radio_1r1ik_122",n={search:S,controls:U,actions:V,"loading-status":"_loading-status_1r1ik_46",chips:W,"filter-dialog":"_filter-dialog_1r1ik_63","filter-groups":"_filter-groups_1r1ik_68","filter-group":"_filter-group_1r1ik_68","filter-option":"_filter-option_1r1ik_104","option-copy":"_option-copy_1r1ik_110",radio:X,"collapsible-options":"_collapsible-options_1r1ik_145"},Y=({filterButtonLabel:j="Filters",filterDialogColumns:f=1,filterDialogTitle:M="Filters",filterGroups:t=[],isLoading:d,loadingLabel:$="Loading results",onChange:w,onSelectedFiltersChange:l,removeFilterLabel:O=o=>`Remove ${o.label} filter`,resetLabel:v="Reset",searchLabel:B="Search",searchPlaceholder:D="Search",selectedFilters:r=[],showResultsLabel:R="Show results",value:I=""})=>{const o=b.useId(),[u,_]=b.useState(!1),T=b.useMemo(()=>new Map(t.flatMap(s=>{var i;return[...s.options,...((i=s.collapsible)==null?void 0:i.options)??[]]}).map(s=>[s.value,s])),[t]),p=r.flatMap(s=>{const i=T.get(s);return i?[i]:[]}),m=(s,i,e)=>{var q;if(!l)return;const x=new Set([...(e==null?void 0:e.options.map(c=>c.value))??[],...((q=e==null?void 0:e.collapsible)==null?void 0:q.options.map(c=>c.value))??[]]),N=r.filter(c=>!x.has(c));if(i&&(e==null?void 0:e.defaultValue)===s){l(N);return}l(i?(e==null?void 0:e.control)==="radio"||(e==null?void 0:e.selectionMode)==="single"?[...N,s]:[...new Set([...r,s])]:r.filter(c=>c!==s))},k=(s,i)=>{var e;return r.includes(s)||i.defaultValue===s&&![...i.options,...((e=i.collapsible)==null?void 0:e.options)??[]].some(x=>r.includes(x.value))},y=(s,i)=>a.jsx("div",{className:n["filter-option"],"data-component":"renderfilter",children:i.control==="radio"?a.jsxs("label",{className:n.radio,children:[a.jsx("input",{checked:k(s.value,i),name:`${o}-filter-${i.label??"group"}`,onChange:e=>m(s.value,e.target.checked,i),type:"radio"}),a.jsxs("span",{className:n["option-copy"],children:[s.label,s.description&&a.jsx("sub",{children:s.description})]})]}):a.jsx(z.Checkbox,{checked:k(s.value,i),label:a.jsxs("span",{className:n["option-copy"],children:[s.label,s.description&&a.jsx("sub",{children:s.description})]}),onChange:e=>m(s.value,e.target.checked,i)})},s.value);return a.jsxs("div",{className:n.search,"data-component":"search",children:[a.jsxs("div",{className:n.controls,"data-with-filters":t.length>0||void 0,children:[a.jsx(K.Input,{"aria-label":B,icon:"MagnifyingGlass",onChange:s=>w(s.target.value),placeholder:D,type:"search",value:I}),(t.length>0||d!==void 0)&&a.jsxs("div",{className:n.actions,children:[t.length>0&&a.jsx(h.Button,{"aria-expanded":u,"aria-haspopup":"dialog",badge:p.length,icon:"Funnel",onClick:()=>_(!0),variant:"tertiary",children:j}),d!==void 0&&a.jsx("div",{"aria-hidden":!d,"aria-label":$,className:n["loading-status"],role:"status",children:d&&a.jsx(Q.Loading,{size:"small"})})]})]}),p.length>0&&a.jsxs("div",{"aria-label":j,className:n.chips,children:[p.map(s=>a.jsx(H.Chip,{accessibleLabel:O(s),label:s.label,onDelete:()=>m(s.value,!1)},s.value)),a.jsx(h.Button,{onClick:()=>l==null?void 0:l([]),variant:"tertiary",children:v})]}),u&&a.jsx(E.Dialog,{"aria-labelledby":o,className:n["filter-dialog"],controls:a.jsxs(A.Controls,{children:[a.jsx(h.Button,{onClick:()=>{l==null||l([]),_(!1)},children:v}),a.jsx(h.Button,{onClick:()=>_(!1),variant:"primary",children:R})]}),header:a.jsx(J.Header,{children:a.jsx("h2",{id:o,children:M})}),open:!0,setOpen:_,children:a.jsx("div",{className:n["filter-groups"],"data-columns":f,children:t.map((s,i)=>a.jsxs("section",{"aria-labelledby":s.label?`${o}-${i}`:void 0,className:n["filter-group"],"data-column-span":s.columnSpan??1,role:s.control==="radio"?"radiogroup":"group",children:[s.label&&a.jsx("h3",{id:`${o}-${i}`,children:s.label}),s.options.map(e=>y(e,s)),s.collapsible&&a.jsx(P.Collapsible,{summary:s.collapsible.label,children:a.jsx("div",{className:n["collapsible-options"],children:s.collapsible.options.map(e=>y(e,s))})})]},s.label??i))})})]})};exports.Search=Y;
@@ -1,88 +1,96 @@
1
- import { jsxs as c, jsx as s } from "react/jsx-runtime";
2
- import { useId as H, useState as T, useMemo as q } from "react";
1
+ import { jsxs as n, jsx as s } from "react/jsx-runtime";
2
+ import { useId as T, useState as q, useMemo as A } from "react";
3
3
  import { Button as p } from "../button/index.js";
4
- import { Checkbox as z } from "../checkbox/index.js";
5
- import { Chip as A } from "../chip/index.js";
6
- import { Collapsible as C } from "../collapsible/index.js";
7
- import { C as E } from "../../index-acMNM3VJ.js";
8
- import { Dialog as J } from "../dialog/index.js";
9
- import { Header as K } from "../header/index.js";
10
- import { I as P } from "../../index-Bre56YYa.js";
11
- import '../../assets/index9.css';const Q = "_search_wsuwb_3", U = "_controls_wsuwb_15", V = "_chips_wsuwb_35", W = "_radio_wsuwb_101", o = {
12
- search: Q,
13
- controls: U,
14
- chips: V,
15
- "filter-dialog": "_filter-dialog_wsuwb_42",
16
- "filter-groups": "_filter-groups_wsuwb_47",
17
- "filter-group": "_filter-group_wsuwb_47",
18
- "filter-option": "_filter-option_wsuwb_83",
19
- "option-copy": "_option-copy_wsuwb_89",
20
- radio: W,
21
- "collapsible-options": "_collapsible-options_wsuwb_124"
22
- }, ia = ({
23
- filterButtonLabel: v = "Filters",
24
- filterDialogColumns: $ = 1,
25
- filterDialogTitle: M = "Filters",
26
- filterGroups: d = [],
27
- onChange: D,
4
+ import { Checkbox as C } from "../checkbox/index.js";
5
+ import { Chip as E } from "../chip/index.js";
6
+ import { Collapsible as J } from "../collapsible/index.js";
7
+ import { C as K } from "../../index-acMNM3VJ.js";
8
+ import { Dialog as P } from "../dialog/index.js";
9
+ import { Header as Q } from "../header/index.js";
10
+ import { I as U } from "../../index-6TyCExT0.js";
11
+ import { Loading as V } from "../loading/index.js";
12
+ import '../../assets/index9.css';const W = "_search_1r1ik_3", X = "_controls_1r1ik_15", Y = "_actions_1r1ik_36", Z = "_chips_1r1ik_56", L = "_radio_1r1ik_122", o = {
13
+ search: W,
14
+ controls: X,
15
+ actions: Y,
16
+ "loading-status": "_loading-status_1r1ik_46",
17
+ chips: Z,
18
+ "filter-dialog": "_filter-dialog_1r1ik_63",
19
+ "filter-groups": "_filter-groups_1r1ik_68",
20
+ "filter-group": "_filter-group_1r1ik_68",
21
+ "filter-option": "_filter-option_1r1ik_104",
22
+ "option-copy": "_option-copy_1r1ik_110",
23
+ radio: L,
24
+ "collapsible-options": "_collapsible-options_1r1ik_145"
25
+ }, ca = ({
26
+ filterButtonLabel: k = "Filters",
27
+ filterDialogColumns: D = 1,
28
+ filterDialogTitle: O = "Filters",
29
+ filterGroups: r = [],
30
+ isLoading: m,
31
+ loadingLabel: u = "Loading results",
32
+ onChange: x,
28
33
  onSelectedFiltersChange: e,
29
- removeFilterLabel: O = (n) => `Remove ${n.label} filter`,
30
- resetLabel: w = "Reset",
31
- searchLabel: x = "Search",
32
- searchPlaceholder: I = "Search",
33
- selectedFilters: r = [],
34
- showResultsLabel: j = "Show results",
35
- value: R = ""
34
+ removeFilterLabel: I = (c) => `Remove ${c.label} filter`,
35
+ resetLabel: f = "Reset",
36
+ searchLabel: j = "Search",
37
+ searchPlaceholder: R = "Search",
38
+ selectedFilters: d = [],
39
+ showResultsLabel: z = "Show results",
40
+ value: B = ""
36
41
  }) => {
37
- const n = H(), [f, m] = T(!1), B = q(() => new Map(d.flatMap((a) => {
38
- var i;
39
- return [...a.options, ...((i = a.collapsible) == null ? void 0 : i.options) ?? []];
40
- }).map((a) => [a.value, a])), [d]), b = r.flatMap((a) => {
41
- const i = B.get(a);
42
- return i ? [i] : [];
43
- }), h = (a, i, l) => {
44
- var k;
42
+ const c = T(), [y, h] = q(!1), H = A(() => new Map(r.flatMap((a) => {
43
+ var l;
44
+ return [...a.options, ...((l = a.collapsible) == null ? void 0 : l.options) ?? []];
45
+ }).map((a) => [a.value, a])), [r]), _ = d.flatMap((a) => {
46
+ const l = H.get(a);
47
+ return l ? [l] : [];
48
+ }), b = (a, l, i) => {
49
+ var w;
45
50
  if (!e) return;
46
- const _ = /* @__PURE__ */ new Set([...(l == null ? void 0 : l.options.map((t) => t.value)) ?? [], ...((k = l == null ? void 0 : l.collapsible) == null ? void 0 : k.options.map((t) => t.value)) ?? []]), u = r.filter((t) => !_.has(t));
47
- if (i && (l == null ? void 0 : l.defaultValue) === a) {
48
- e(u);
51
+ const v = /* @__PURE__ */ new Set([...(i == null ? void 0 : i.options.map((t) => t.value)) ?? [], ...((w = i == null ? void 0 : i.collapsible) == null ? void 0 : w.options.map((t) => t.value)) ?? []]), M = d.filter((t) => !v.has(t));
52
+ if (l && (i == null ? void 0 : i.defaultValue) === a) {
53
+ e(M);
49
54
  return;
50
55
  }
51
- e(i ? (l == null ? void 0 : l.control) === "radio" || (l == null ? void 0 : l.selectionMode) === "single" ? [...u, a] : [.../* @__PURE__ */ new Set([...r, a])] : r.filter((t) => t !== a));
52
- }, y = (a, i) => {
53
- var l;
54
- return r.includes(a) || i.defaultValue === a && ![...i.options, ...((l = i.collapsible) == null ? void 0 : l.options) ?? []].some((_) => r.includes(_.value));
55
- }, N = (a, i) => /* @__PURE__ */ s("div", { className: o["filter-option"], "data-component": "renderfilter", children: i.control === "radio" ? /* @__PURE__ */ c("label", { className: o.radio, children: [
56
- /* @__PURE__ */ s("input", { checked: y(a.value, i), name: `${n}-filter-${i.label ?? "group"}`, onChange: (l) => h(a.value, l.target.checked, i), type: "radio" }),
57
- /* @__PURE__ */ c("span", { className: o["option-copy"], children: [
56
+ e(l ? (i == null ? void 0 : i.control) === "radio" || (i == null ? void 0 : i.selectionMode) === "single" ? [...M, a] : [.../* @__PURE__ */ new Set([...d, a])] : d.filter((t) => t !== a));
57
+ }, N = (a, l) => {
58
+ var i;
59
+ return d.includes(a) || l.defaultValue === a && ![...l.options, ...((i = l.collapsible) == null ? void 0 : i.options) ?? []].some((v) => d.includes(v.value));
60
+ }, $ = (a, l) => /* @__PURE__ */ s("div", { className: o["filter-option"], "data-component": "renderfilter", children: l.control === "radio" ? /* @__PURE__ */ n("label", { className: o.radio, children: [
61
+ /* @__PURE__ */ s("input", { checked: N(a.value, l), name: `${c}-filter-${l.label ?? "group"}`, onChange: (i) => b(a.value, i.target.checked, l), type: "radio" }),
62
+ /* @__PURE__ */ n("span", { className: o["option-copy"], children: [
58
63
  a.label,
59
64
  a.description && /* @__PURE__ */ s("sub", { children: a.description })
60
65
  ] })
61
- ] }) : /* @__PURE__ */ s(z, { checked: y(a.value, i), label: /* @__PURE__ */ c("span", { className: o["option-copy"], children: [
66
+ ] }) : /* @__PURE__ */ s(C, { checked: N(a.value, l), label: /* @__PURE__ */ n("span", { className: o["option-copy"], children: [
62
67
  a.label,
63
68
  a.description && /* @__PURE__ */ s("sub", { children: a.description })
64
- ] }), onChange: (l) => h(a.value, l.target.checked, i) }) }, a.value);
65
- return /* @__PURE__ */ c("div", { className: o.search, "data-component": "search", children: [
66
- /* @__PURE__ */ c("div", { className: o.controls, children: [
67
- /* @__PURE__ */ s(P, { "aria-label": x, icon: "MagnifyingGlass", onChange: (a) => D(a.target.value), placeholder: I, type: "search", value: R }),
68
- d.length > 0 && /* @__PURE__ */ s(p, { "aria-expanded": f, "aria-haspopup": "dialog", badge: b.length, icon: "Funnel", onClick: () => m(!0), variant: "tertiary", children: v })
69
+ ] }), onChange: (i) => b(a.value, i.target.checked, l) }) }, a.value);
70
+ return /* @__PURE__ */ n("div", { className: o.search, "data-component": "search", children: [
71
+ /* @__PURE__ */ n("div", { className: o.controls, "data-with-filters": r.length > 0 || void 0, children: [
72
+ /* @__PURE__ */ s(U, { "aria-label": j, icon: "MagnifyingGlass", onChange: (a) => x(a.target.value), placeholder: R, type: "search", value: B }),
73
+ (r.length > 0 || m !== void 0) && /* @__PURE__ */ n("div", { className: o.actions, children: [
74
+ r.length > 0 && /* @__PURE__ */ s(p, { "aria-expanded": y, "aria-haspopup": "dialog", badge: _.length, icon: "Funnel", onClick: () => h(!0), variant: "tertiary", children: k }),
75
+ m !== void 0 && /* @__PURE__ */ s("div", { "aria-hidden": !m, "aria-label": u, className: o["loading-status"], role: "status", children: m && /* @__PURE__ */ s(V, { size: "small" }) })
76
+ ] })
69
77
  ] }),
70
- b.length > 0 && /* @__PURE__ */ c("div", { "aria-label": v, className: o.chips, children: [
71
- b.map((a) => /* @__PURE__ */ s(A, { accessibleLabel: O(a), label: a.label, onDelete: () => h(a.value, !1) }, a.value)),
72
- /* @__PURE__ */ s(p, { onClick: () => e == null ? void 0 : e([]), variant: "tertiary", children: w })
78
+ _.length > 0 && /* @__PURE__ */ n("div", { "aria-label": k, className: o.chips, children: [
79
+ _.map((a) => /* @__PURE__ */ s(E, { accessibleLabel: I(a), label: a.label, onDelete: () => b(a.value, !1) }, a.value)),
80
+ /* @__PURE__ */ s(p, { onClick: () => e == null ? void 0 : e([]), variant: "tertiary", children: f })
73
81
  ] }),
74
- f && /* @__PURE__ */ s(J, { "aria-labelledby": n, className: o["filter-dialog"], controls: /* @__PURE__ */ c(E, { children: [
82
+ y && /* @__PURE__ */ s(P, { "aria-labelledby": c, className: o["filter-dialog"], controls: /* @__PURE__ */ n(K, { children: [
75
83
  /* @__PURE__ */ s(p, { onClick: () => {
76
- e == null || e([]), m(!1);
77
- }, children: w }),
78
- /* @__PURE__ */ s(p, { onClick: () => m(!1), variant: "primary", children: j })
79
- ] }), header: /* @__PURE__ */ s(K, { children: /* @__PURE__ */ s("h2", { id: n, children: M }) }), open: !0, setOpen: m, children: /* @__PURE__ */ s("div", { className: o["filter-groups"], "data-columns": $, children: d.map((a, i) => /* @__PURE__ */ c("section", { "aria-labelledby": a.label ? `${n}-${i}` : void 0, className: o["filter-group"], "data-column-span": a.columnSpan ?? 1, role: a.control === "radio" ? "radiogroup" : "group", children: [
80
- a.label && /* @__PURE__ */ s("h3", { id: `${n}-${i}`, children: a.label }),
81
- a.options.map((l) => N(l, a)),
82
- a.collapsible && /* @__PURE__ */ s(C, { summary: a.collapsible.label, children: /* @__PURE__ */ s("div", { className: o["collapsible-options"], children: a.collapsible.options.map((l) => N(l, a)) }) })
83
- ] }, a.label ?? i)) }) })
84
+ e == null || e([]), h(!1);
85
+ }, children: f }),
86
+ /* @__PURE__ */ s(p, { onClick: () => h(!1), variant: "primary", children: z })
87
+ ] }), header: /* @__PURE__ */ s(Q, { children: /* @__PURE__ */ s("h2", { id: c, children: O }) }), open: !0, setOpen: h, children: /* @__PURE__ */ s("div", { className: o["filter-groups"], "data-columns": D, children: r.map((a, l) => /* @__PURE__ */ n("section", { "aria-labelledby": a.label ? `${c}-${l}` : void 0, className: o["filter-group"], "data-column-span": a.columnSpan ?? 1, role: a.control === "radio" ? "radiogroup" : "group", children: [
88
+ a.label && /* @__PURE__ */ s("h3", { id: `${c}-${l}`, children: a.label }),
89
+ a.options.map((i) => $(i, a)),
90
+ a.collapsible && /* @__PURE__ */ s(J, { summary: a.collapsible.label, children: /* @__PURE__ */ s("div", { className: o["collapsible-options"], children: a.collapsible.options.map((i) => $(i, a)) }) })
91
+ ] }, a.label ?? l)) }) })
84
92
  ] });
85
93
  };
86
94
  export {
87
- ia as Search
95
+ ca as Search
88
96
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index6.css');const e=require("react/jsx-runtime"),h=require("classix"),b=require("../label/index.cjs"),c=require("../../use-touched-Bq5Gjbpz.cjs"),j="_label_1so4k_3",p="_control_1so4k_7",T="_textarea_1so4k_17",k="_touched_1so4k_41",t={label:j,control:p,textarea:T,touched:k},y=({className:n,description:r,label:o,maxRows:l=12,minRows:u=3,onBlur:x,required:s,style:_,value:a,...d})=>{const{touched:i,onBlur:m}=c.useTouched(a==="");return e.jsxs("label",{className:t.label,"data-component":"textarea",children:[o&&e.jsx(b.Label,{label:o,description:r,required:s}),e.jsx("span",{className:t.control,children:e.jsx("textarea",{...d,className:h(t.textarea,n,i&&t.touched),onBlur:c.composeEventHandlers(m,x),required:s,style:{..._,"--min-rows":u,"--max-rows":l},value:a})})]})};exports.Textarea=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index6.css');const e=require("react/jsx-runtime"),v=require("classix"),q=require("react"),B=require("../form/index.cjs"),T=require("../label/index.cjs"),i=require("../../use-touched-Bq5Gjbpz.cjs"),N="_field_1fxe1_3",E="_label_1fxe1_8",I="_control_1fxe1_19",g="_textarea_1fxe1_29",t={field:N,label:E,control:I,textarea:g},p=({className:d,description:x,errorMessage:a,invalid:s=!1,label:n,maxRows:u=12,minRows:_=3,onBlur:b,required:c,style:m,value:l,...o})=>{const f=q.useId(),r=s&&a?f:void 0,j=[o["aria-describedby"],r].filter(Boolean).join(" ")||void 0,{touched:h,onBlur:y}=i.useTouched(l==="");return e.jsxs("div",{className:t.field,"data-component":"textarea",children:[e.jsxs("label",{className:t.label,children:[n&&e.jsx(T.Label,{label:n,description:x,required:c}),e.jsx("span",{className:t.control,children:e.jsx("textarea",{...o,"aria-describedby":j,"aria-invalid":s?!0:o["aria-invalid"],"data-touched":h||void 0,className:v(t.textarea,d),onBlur:i.composeEventHandlers(y,b),required:c,style:{...m,"--min-rows":_,"--max-rows":u},value:l})})]}),r&&e.jsx(B.FieldError,{errorId:r,errorMessage:a})]})};exports.Textarea=p;
@@ -1,37 +1,44 @@
1
- import { jsxs as h, jsx as t } from "react/jsx-runtime";
2
- import p from "classix";
3
- import { Label as i } from "../label/index.js";
4
- import { u as b, c as f } from "../../use-touched-B999bBr8.js";
5
- import '../../assets/index6.css';const k = "_label_1so4k_3", B = "_control_1so4k_7", N = "_textarea_1so4k_17", j = "_touched_1so4k_41", o = {
6
- label: k,
7
- control: B,
8
- textarea: N,
9
- touched: j
10
- }, H = ({
11
- className: r,
12
- description: c,
13
- label: e,
14
- maxRows: l = 12,
15
- minRows: n = 3,
16
- onBlur: m,
17
- required: a,
18
- style: x,
19
- value: s,
20
- ..._
1
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
+ import y from "classix";
3
+ import { useId as B } from "react";
4
+ import { FieldError as N } from "../form/index.js";
5
+ import { Label as j } from "../label/index.js";
6
+ import { u as E, c as I } from "../../use-touched-B999bBr8.js";
7
+ import '../../assets/index6.css';const w = "_field_1fxe1_3", T = "_label_1fxe1_8", F = "_control_1fxe1_19", H = "_textarea_1fxe1_29", o = {
8
+ field: w,
9
+ label: T,
10
+ control: F,
11
+ textarea: H
12
+ }, D = ({
13
+ className: d,
14
+ description: m,
15
+ errorMessage: t,
16
+ invalid: l = !1,
17
+ label: s,
18
+ maxRows: f = 12,
19
+ minRows: x = 3,
20
+ onBlur: _,
21
+ required: c,
22
+ style: b,
23
+ value: n,
24
+ ...r
21
25
  }) => {
22
- const {
23
- touched: u,
24
- onBlur: d
25
- } = b(s === "");
26
- return /* @__PURE__ */ h("label", { className: o.label, "data-component": "textarea", children: [
27
- e && /* @__PURE__ */ t(i, { label: e, description: c, required: a }),
28
- /* @__PURE__ */ t("span", { className: o.control, children: /* @__PURE__ */ t("textarea", { ..._, className: p(o.textarea, r, u && o.touched), onBlur: f(d, m), required: a, style: {
29
- ...x,
30
- "--min-rows": n,
31
- "--max-rows": l
32
- }, value: s }) })
26
+ const u = B(), a = l && t ? u : void 0, h = [r["aria-describedby"], a].filter(Boolean).join(" ") || void 0, {
27
+ touched: p,
28
+ onBlur: v
29
+ } = E(n === "");
30
+ return /* @__PURE__ */ i("div", { className: o.field, "data-component": "textarea", children: [
31
+ /* @__PURE__ */ i("label", { className: o.label, children: [
32
+ s && /* @__PURE__ */ e(j, { label: s, description: m, required: c }),
33
+ /* @__PURE__ */ e("span", { className: o.control, children: /* @__PURE__ */ e("textarea", { ...r, "aria-describedby": h, "aria-invalid": l ? !0 : r["aria-invalid"], "data-touched": p || void 0, className: y(o.textarea, d), onBlur: I(v, _), required: c, style: {
34
+ ...b,
35
+ "--min-rows": x,
36
+ "--max-rows": f
37
+ }, value: n }) })
38
+ ] }),
39
+ a && /* @__PURE__ */ e(N, { errorId: a, errorMessage: t })
33
40
  ] });
34
41
  };
35
42
  export {
36
- H as Textarea
43
+ D as Textarea
37
44
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index3.css');const t=require("react/jsx-runtime"),r=require("../label/index.cjs"),g="_toggle_1id87_3",d="_thumb_1id87_18",u="_track_1id87_31",e={toggle:g,thumb:d,track:u},m=({checked:s,description:a,disabled:l,label:o,onChange:n})=>{const c=s!==void 0&&n===void 0;return t.jsxs("label",{className:e.toggle,onClick:i=>i.stopPropagation(),"data-component":"toggle",children:[o&&t.jsx(r.Label,{description:a,inline:!0,label:o}),t.jsx("input",{checked:s,disabled:l,onChange:n,readOnly:c,type:"checkbox"}),t.jsx("span",{"aria-hidden":"true",className:e.track,children:t.jsx("span",{className:e.thumb})})]})};exports.Toggle=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index3.css');const t=require("react/jsx-runtime"),g=require("../label/index.cjs"),i="_toggle_zmvgb_3",m="_thumb_zmvgb_14",u="_track_zmvgb_27",e={toggle:i,thumb:m,track:u},b=({checked:s,description:a,disabled:l,label:o,onChange:n})=>{const c=s!==void 0&&n===void 0;return t.jsxs("label",{className:e.toggle,onClick:r=>r.stopPropagation(),"data-component":"toggle",children:[o&&t.jsx(g.Label,{description:a,inline:!0,label:o}),t.jsx("input",{checked:s,disabled:l,onChange:n,readOnly:c,type:"checkbox"}),t.jsx("span",{"aria-hidden":"true",className:e.track,children:t.jsx("span",{className:e.thumb})})]})};exports.Toggle=b;
@@ -1,10 +1,10 @@
1
- import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
- import { Label as g } from "../label/index.js";
3
- import '../../assets/index3.css';const m = "_toggle_1id87_3", d = "_thumb_1id87_18", p = "_track_1id87_31", o = {
4
- toggle: m,
5
- thumb: d,
6
- track: p
7
- }, b = ({
1
+ import { jsxs as g, jsx as t } from "react/jsx-runtime";
2
+ import { Label as m } from "../label/index.js";
3
+ import '../../assets/index3.css';const i = "_toggle_zmvgb_3", p = "_thumb_zmvgb_14", b = "_track_zmvgb_27", o = {
4
+ toggle: i,
5
+ thumb: p,
6
+ track: b
7
+ }, u = ({
8
8
  checked: e,
9
9
  description: n,
10
10
  disabled: r,
@@ -12,12 +12,12 @@ import '../../assets/index3.css';const m = "_toggle_1id87_3", d = "_thumb_1id87_
12
12
  onChange: a
13
13
  }) => {
14
14
  const c = e !== void 0 && a === void 0;
15
- return /* @__PURE__ */ l("label", { className: o.toggle, onClick: (i) => i.stopPropagation(), "data-component": "toggle", children: [
16
- s && /* @__PURE__ */ t(g, { description: n, inline: !0, label: s }),
15
+ return /* @__PURE__ */ g("label", { className: o.toggle, onClick: (l) => l.stopPropagation(), "data-component": "toggle", children: [
16
+ s && /* @__PURE__ */ t(m, { description: n, inline: !0, label: s }),
17
17
  /* @__PURE__ */ t("input", { checked: e, disabled: r, onChange: a, readOnly: c, type: "checkbox" }),
18
18
  /* @__PURE__ */ t("span", { "aria-hidden": "true", className: o.track, children: /* @__PURE__ */ t("span", { className: o.thumb }) })
19
19
  ] });
20
20
  };
21
21
  export {
22
- b as Toggle
22
+ u as Toggle
23
23
  };
@@ -0,0 +1,87 @@
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-DVeBguFb.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
+ };
@@ -0,0 +1 @@
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-BIdcCH-v.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;
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./assets/index.css');const t=require("./components/app-link/index.cjs"),r=require("./components/app-shell/index.cjs"),i=require("./components/aside/index.cjs"),s=require("./components/avatar/index.cjs"),c=require("./components/badge/index.cjs"),_=require("./components/banner/index.cjs"),p=require("./components/branding/index.cjs"),a=require("./components/button/index.cjs"),d=require("./components/card/index.cjs"),m=require("./components/checkbox/index.cjs"),u=require("./components/chip/index.cjs"),l=require("./components/clipboard/index.cjs"),x=require("./components/collapsible/index.cjs"),q=require("./index-B4dFheLl.cjs"),g=require("./components/comments/index.cjs"),b=require("./index-BwfsmdF6.cjs"),C=require("./components/croppable/index.cjs"),h=require("./components/dialog/index.cjs"),L=require("./components/divider/index.cjs"),v=require("./components/dropdown/index.cjs"),S=require("./components/dropzone/index.cjs"),T=require("./components/editor/index.cjs"),I=require("./content-i-MRPlxK.cjs"),k=require("./components/empty-state/index.cjs"),F=require("./components/fieldset/index.cjs"),f=require("./components/figure/index.cjs"),P=require("./components/file/index.cjs"),y=require("./components/footer/index.cjs"),A=require("./components/form/index.cjs"),B=require("./components/graph/index.cjs"),D=require("./components/group/index.cjs"),M=require("./components/header/index.cjs"),E=require("./components/icon/index.cjs"),N=require("./components/iframe/index.cjs"),O=require("./components/image/index.cjs"),j=require("./index-CHJNMNDr.cjs"),w=require("./components/label/index.cjs"),n=require("./components/link/index.cjs"),G=require("./components/list/index.cjs"),z=require("./components/loading/index.cjs"),H=require("./components/menu/index.cjs"),R=require("./components/message/index.cjs"),W=require("./components/messages/index.cjs"),e=require("./components/nav/index.cjs"),J=require("./components/object/index.cjs"),K=require("./components/page-layout/index.cjs"),Q=require("./components/panel/index.cjs"),U=require("./components/popover/index.cjs"),V=require("./components/portal/index.cjs"),X=require("./components/radio/index.cjs"),Y=require("./components/search/index.cjs"),Z=require("./index-BQoXmNo3.cjs"),o=require("./components/sortable/index.cjs"),$=require("./components/table/index.cjs"),ee=require("./components/textarea/index.cjs"),ne=require("./components/toast/index.cjs"),oe=require("./components/toasts/index.cjs"),te=require("./components/toggle/index.cjs"),re=require("./components/toolbar/index.cjs"),ie=require("./components/tooltip/index.cjs"),se=require("./components/widget/index.cjs");exports.AppLink=t.AppLink;exports.AppShell=r.AppShell;exports.Aside=i.Aside;exports.Avatar=s.Avatar;exports.Badge=c.Badge;exports.Banner=_.Banner;exports.Branding=p.Branding;exports.Button=a.Button;exports.Card=d.Card;exports.Checkbox=m.Checkbox;exports.Chip=u.Chip;exports.Clipboard=l.Clipboard;exports.Collapsible=x.Collapsible;exports.Comment=q.Comment;exports.Comments=g.Comments;exports.Controls=b.Controls;exports.Croppable=C.Croppable;exports.Dialog=h.Dialog;exports.Divider=L.Divider;exports.Dropdown=v.Dropdown;exports.Dropzone=S.Dropzone;exports.Editor=T.Editor;exports.hasEditorContent=I.hasEditorContent;exports.EmptyState=k.EmptyState;exports.Fieldset=F.Fieldset;exports.Figure=f.Figure;exports.File=P.File;exports.Footer=y.Footer;exports.Form=A.Form;exports.Graph=B.Graph;exports.Group=D.Group;exports.Header=M.Header;exports.Icon=E.Icon;exports.Iframe=N.Iframe;exports.Image=O.Image;exports.Input=j.Input;exports.Label=w.Label;exports.Link=n.Link;exports.LinkContent=n.LinkContent;exports.List=G.List;exports.Loading=z.Loading;exports.Menu=H.Menu;exports.Message=R.Message;exports.Messages=W.Messages;exports.Nav=e.Nav;exports.NavItem=e.NavItem;exports.NavLabel=e.NavLabel;exports.Object=J.Object;exports.PageLayout=K.PageLayout;exports.Panel=Q.Panel;exports.Popover=U.Popover;exports.Portal=V.Portal;exports.Radio=X.Radio;exports.Search=Y.Search;exports.Select=Z.Select;exports.Sortable=o.Sortable;exports.useOptionalSortableItem=o.useOptionalSortableItem;exports.Table=$.Table;exports.Textarea=ee.Textarea;exports.Toast=ne.Toast;exports.Toasts=oe.Toasts;exports.Toggle=te.Toggle;exports.Toolbar=re.Toolbar;exports.Tooltip=ie.Tooltip;exports.Widget=se.Widget;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./assets/index.css');const t=require("./components/app-link/index.cjs"),r=require("./components/app-shell/index.cjs"),i=require("./components/aside/index.cjs"),s=require("./components/avatar/index.cjs"),c=require("./components/badge/index.cjs"),_=require("./components/banner/index.cjs"),p=require("./components/branding/index.cjs"),a=require("./components/button/index.cjs"),d=require("./components/card/index.cjs"),m=require("./components/checkbox/index.cjs"),u=require("./components/chip/index.cjs"),l=require("./components/clipboard/index.cjs"),x=require("./components/collapsible/index.cjs"),q=require("./index-B4dFheLl.cjs"),g=require("./components/comments/index.cjs"),b=require("./index-BwfsmdF6.cjs"),C=require("./components/croppable/index.cjs"),h=require("./components/dialog/index.cjs"),L=require("./components/divider/index.cjs"),v=require("./components/dropdown/index.cjs"),S=require("./components/dropzone/index.cjs"),T=require("./components/editor/index.cjs"),I=require("./content-i-MRPlxK.cjs"),k=require("./components/empty-state/index.cjs"),F=require("./components/fieldset/index.cjs"),f=require("./components/figure/index.cjs"),P=require("./components/file/index.cjs"),y=require("./components/footer/index.cjs"),A=require("./components/form/index.cjs"),B=require("./components/graph/index.cjs"),D=require("./components/group/index.cjs"),M=require("./components/header/index.cjs"),E=require("./components/icon/index.cjs"),N=require("./components/iframe/index.cjs"),O=require("./components/image/index.cjs"),j=require("./index-DEQcFR32.cjs"),w=require("./components/label/index.cjs"),n=require("./components/link/index.cjs"),G=require("./components/list/index.cjs"),z=require("./components/loading/index.cjs"),H=require("./components/menu/index.cjs"),R=require("./components/message/index.cjs"),W=require("./components/messages/index.cjs"),e=require("./components/nav/index.cjs"),J=require("./components/object/index.cjs"),K=require("./components/page-layout/index.cjs"),Q=require("./components/panel/index.cjs"),U=require("./components/popover/index.cjs"),V=require("./components/portal/index.cjs"),X=require("./components/radio/index.cjs"),Y=require("./components/search/index.cjs"),Z=require("./index-BQoXmNo3.cjs"),o=require("./components/sortable/index.cjs"),$=require("./components/table/index.cjs"),ee=require("./components/textarea/index.cjs"),ne=require("./components/toast/index.cjs"),oe=require("./components/toasts/index.cjs"),te=require("./components/toggle/index.cjs"),re=require("./components/toolbar/index.cjs"),ie=require("./components/tooltip/index.cjs"),se=require("./components/widget/index.cjs");exports.AppLink=t.AppLink;exports.AppShell=r.AppShell;exports.Aside=i.Aside;exports.Avatar=s.Avatar;exports.Badge=c.Badge;exports.Banner=_.Banner;exports.Branding=p.Branding;exports.Button=a.Button;exports.Card=d.Card;exports.Checkbox=m.Checkbox;exports.Chip=u.Chip;exports.Clipboard=l.Clipboard;exports.Collapsible=x.Collapsible;exports.Comment=q.Comment;exports.Comments=g.Comments;exports.Controls=b.Controls;exports.Croppable=C.Croppable;exports.Dialog=h.Dialog;exports.Divider=L.Divider;exports.Dropdown=v.Dropdown;exports.Dropzone=S.Dropzone;exports.Editor=T.Editor;exports.hasEditorContent=I.hasEditorContent;exports.EmptyState=k.EmptyState;exports.Fieldset=F.Fieldset;exports.Figure=f.Figure;exports.File=P.File;exports.Footer=y.Footer;exports.Form=A.Form;exports.Graph=B.Graph;exports.Group=D.Group;exports.Header=M.Header;exports.Icon=E.Icon;exports.Iframe=N.Iframe;exports.Image=O.Image;exports.Input=j.Input;exports.Label=w.Label;exports.Link=n.Link;exports.LinkContent=n.LinkContent;exports.List=G.List;exports.Loading=z.Loading;exports.Menu=H.Menu;exports.Message=R.Message;exports.Messages=W.Messages;exports.Nav=e.Nav;exports.NavItem=e.NavItem;exports.NavLabel=e.NavLabel;exports.Object=J.Object;exports.PageLayout=K.PageLayout;exports.Panel=Q.Panel;exports.Popover=U.Popover;exports.Portal=V.Portal;exports.Radio=X.Radio;exports.Search=Y.Search;exports.Select=Z.Select;exports.Sortable=o.Sortable;exports.useOptionalSortableItem=o.useOptionalSortableItem;exports.Table=$.Table;exports.Textarea=ee.Textarea;exports.Toast=ne.Toast;exports.Toasts=oe.Toasts;exports.Toggle=te.Toggle;exports.Toolbar=re.Toolbar;exports.Tooltip=ie.Tooltip;exports.Widget=se.Widget;
package/dist/index.d.ts CHANGED
@@ -290,7 +290,7 @@ export declare const Divider: ({ className, ...props }: DividerProps) => JSX.Ele
290
290
 
291
291
  export declare type DividerProps = React.ComponentPropsWithoutRef<'hr'>;
292
292
 
293
- export declare const Dropdown: ({ children: selectElement, className, combobox, createOption, emptyLabel, errorLabel, onRetry, retryLabel, label, filterOptions, hasNextPage, loading, loadMoreLabel, onLoadMore, onOpenChange, onSearchChange, searchValue, renderOption, searchPlaceholder, selectedItems, variant, ...props }: DropdownProps) => JSX.Element;
293
+ export declare const Dropdown: ({ children: selectElement, className, combobox, description, errorMessage, invalid, searchable: searchableProp, createOption, emptyLabel, errorLabel, onRetry, retryLabel, label, filterOptions, hasNextPage, loading, loadingLabel, loadMoreLabel, onLoadMore, onOpenChange, onSearchChange, searchValue, renderOption, searchPlaceholder, selectedItems, variant, ...props }: DropdownProps) => JSX.Element;
294
294
 
295
295
  export declare type DropdownCreateOption = {
296
296
  isValid: (value: string) => boolean;
@@ -312,6 +312,10 @@ declare type DropdownOption = {
312
312
  declare type DropdownProps = Omit<default_2.ComponentPropsWithoutRef<'div'>, 'children'> & {
313
313
  children: DropdownSelectElement;
314
314
  combobox?: boolean;
315
+ description?: string;
316
+ errorMessage?: default_2.ReactNode;
317
+ invalid?: boolean;
318
+ searchable?: boolean;
315
319
  createOption?: DropdownCreateOption;
316
320
  emptyLabel?: string;
317
321
  errorLabel?: string;
@@ -322,6 +326,7 @@ declare type DropdownProps = Omit<default_2.ComponentPropsWithoutRef<'div'>, 'ch
322
326
  filterOptions?: boolean;
323
327
  hasNextPage?: boolean;
324
328
  loading?: boolean;
329
+ loadingLabel?: string;
325
330
  loadMoreLabel?: string;
326
331
  onLoadMore?: () => void;
327
332
  onOpenChange?: (open: boolean) => void;
@@ -339,15 +344,29 @@ export declare type DropdownRenderOption = Pick<DropdownOption, 'groupLabel' | '
339
344
 
340
345
  declare type DropdownSelectElement = NativeSelectElement | WrappedSelectElement;
341
346
 
342
- export declare const Dropzone: ({ accepts, label, maxFileSize, multiple, onChange, onValidation, variant, ...props }: DropzoneProps) => JSX.Element;
347
+ export declare const Dropzone: ({ "aria-describedby": externalDescription, accepts, children, className, description, disabled, dropLabel, errorMessage, id, invalid, label, maxFileSize, multiple, name, onChange, onValidation, required, uploadLabel, variant, }: DropzoneProps) => JSX.Element;
343
348
 
344
- declare type DropzoneProps = {
349
+ export declare type DropzoneProps = {
350
+ 'aria-describedby'?: string;
345
351
  accepts?: string;
346
- label: string;
352
+ /** Selected files, typically rendered with the File component. */
353
+ children?: React.ReactNode;
354
+ className?: string;
355
+ description?: string;
356
+ disabled?: boolean;
357
+ dropLabel?: string;
358
+ errorMessage?: React.ReactNode;
359
+ id?: string;
360
+ invalid?: boolean;
361
+ /** Field label. Also used as the upload button text unless uploadLabel is supplied. */
362
+ label?: string;
347
363
  maxFileSize?: number;
348
364
  multiple?: boolean;
365
+ name?: string;
349
366
  onChange?: React.ChangeEventHandler<HTMLInputElement>;
350
367
  onValidation?: (empty: File[], oversized: File[]) => void;
368
+ required?: boolean;
369
+ uploadLabel?: string;
351
370
  variant?: 'default' | 'minimal';
352
371
  };
353
372
 
@@ -787,12 +806,14 @@ export declare type InputProps = React.ComponentPropsWithRef<'input'> & {
787
806
  type?: 'date' | 'datetime-local' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text';
788
807
  };
789
808
 
790
- export declare const Label: ({ description, inline, label, required }: LabelProps) => JSX.Element;
809
+ export declare const Label: ({ description, descriptionId, inline, label, labelId, required, }: LabelProps) => JSX.Element;
791
810
 
792
811
  declare type LabelProps = {
793
812
  description?: string;
813
+ descriptionId?: string;
794
814
  inline?: boolean;
795
- label?: string;
815
+ label?: React.ReactNode;
816
+ labelId?: string;
796
817
  required?: boolean;
797
818
  };
798
819
 
@@ -1336,7 +1357,7 @@ export declare type RadioProps = Omit<React.ComponentPropsWithRef<'input'>, 'typ
1336
1357
  label?: string;
1337
1358
  };
1338
1359
 
1339
- export declare const Search: ({ filterButtonLabel, filterDialogColumns, filterDialogTitle, filterGroups, onChange, onSelectedFiltersChange, removeFilterLabel, resetLabel, searchLabel, searchPlaceholder, selectedFilters, showResultsLabel, value, }: SearchProps) => JSX.Element;
1360
+ export declare const Search: ({ filterButtonLabel, filterDialogColumns, filterDialogTitle, filterGroups, isLoading, loadingLabel, onChange, onSelectedFiltersChange, removeFilterLabel, resetLabel, searchLabel, searchPlaceholder, selectedFilters, showResultsLabel, value, }: SearchProps) => JSX.Element;
1340
1361
 
1341
1362
  export declare type SearchFilter = {
1342
1363
  description?: string;
@@ -1362,6 +1383,8 @@ export declare type SearchProps = {
1362
1383
  filterDialogColumns?: 1 | 2;
1363
1384
  filterDialogTitle?: string;
1364
1385
  filterGroups?: readonly SearchFilterGroup[];
1386
+ isLoading?: boolean;
1387
+ loadingLabel?: string;
1365
1388
  onChange: (value: string) => void;
1366
1389
  onSelectedFiltersChange?: (selectedFilters: string[]) => void;
1367
1390
  removeFilterLabel?: (filter: SearchFilter) => string;
@@ -1438,10 +1461,12 @@ declare type TableProps = React.TableHTMLAttributes<HTMLTableElement> & {
1438
1461
  locale?: string | string[];
1439
1462
  };
1440
1463
 
1441
- export declare const Textarea: ({ className, description, label, maxRows, minRows, onBlur: onBlurProp, required, style, value, ...props }: TextareaProps) => JSX.Element;
1464
+ export declare const Textarea: ({ className, description, errorMessage, invalid, label, maxRows, minRows, onBlur: onBlurProp, required, style, value, ...props }: TextareaProps) => JSX.Element;
1442
1465
 
1443
- declare type TextareaProps = Omit<React.ComponentPropsWithoutRef<'textarea'>, 'children'> & {
1466
+ export declare type TextareaProps = Omit<React.ComponentPropsWithRef<'textarea'>, 'children'> & {
1444
1467
  description?: string;
1468
+ errorMessage?: React.ReactNode;
1469
+ invalid?: boolean;
1445
1470
  label?: string;
1446
1471
  maxRows?: number;
1447
1472
  minRows?: number;
package/dist/index.js CHANGED
@@ -33,7 +33,7 @@ import { Header as no } from "./components/header/index.js";
33
33
  import { Icon as so } from "./components/icon/index.js";
34
34
  import { Iframe as go } from "./components/iframe/index.js";
35
35
  import { Image as Lo } from "./components/image/index.js";
36
- import { I as uo } from "./index-Bre56YYa.js";
36
+ import { I as uo } from "./index-6TyCExT0.js";
37
37
  import { Label as So } from "./components/label/index.js";
38
38
  import { Link as vo, LinkContent as co } from "./components/link/index.js";
39
39
  import { List as ko } from "./components/list/index.js";
package/dist/tokens.json CHANGED
@@ -379,7 +379,7 @@
379
379
  },
380
380
  "com.solibo": {
381
381
  "packageName": "@solibo/solibo-ui",
382
- "packageVersion": "2.2.15"
382
+ "packageVersion": "2.2.17"
383
383
  }
384
384
  },
385
385
  "$name": "SUI: Design Tokens",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solibo/solibo-ui",
3
- "version": "2.2.15",
3
+ "version": "2.2.17",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "./dist/index.js",