@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
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index9.css');const a=require("react/jsx-runtime"),
|
|
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
|
|
2
|
-
import { useId as
|
|
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
|
|
5
|
-
import { Chip as
|
|
6
|
-
import { Collapsible as
|
|
7
|
-
import { C as
|
|
8
|
-
import { Dialog as
|
|
9
|
-
import { Header as
|
|
10
|
-
import { I as
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
"filter-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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:
|
|
30
|
-
resetLabel:
|
|
31
|
-
searchLabel:
|
|
32
|
-
searchPlaceholder:
|
|
33
|
-
selectedFilters:
|
|
34
|
-
showResultsLabel:
|
|
35
|
-
value:
|
|
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
|
|
38
|
-
var
|
|
39
|
-
return [...a.options, ...((
|
|
40
|
-
}).map((a) => [a.value, a])), [
|
|
41
|
-
const
|
|
42
|
-
return
|
|
43
|
-
}),
|
|
44
|
-
var
|
|
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
|
|
47
|
-
if (
|
|
48
|
-
e(
|
|
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(
|
|
52
|
-
},
|
|
53
|
-
var
|
|
54
|
-
return
|
|
55
|
-
},
|
|
56
|
-
/* @__PURE__ */ s("input", { checked:
|
|
57
|
-
/* @__PURE__ */
|
|
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(
|
|
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: (
|
|
65
|
-
return /* @__PURE__ */
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */ s(
|
|
68
|
-
|
|
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
|
-
|
|
71
|
-
|
|
72
|
-
/* @__PURE__ */ s(p, { onClick: () => e == null ? void 0 : e([]), variant: "tertiary", children:
|
|
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
|
-
|
|
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([]),
|
|
77
|
-
}, children:
|
|
78
|
-
/* @__PURE__ */ s(p, { onClick: () =>
|
|
79
|
-
] }), header: /* @__PURE__ */ s(
|
|
80
|
-
a.label && /* @__PURE__ */ s("h3", { id: `${
|
|
81
|
-
a.options.map((
|
|
82
|
-
a.collapsible && /* @__PURE__ */ s(
|
|
83
|
-
] }, a.label ??
|
|
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
|
-
|
|
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"),
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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:
|
|
24
|
-
onBlur:
|
|
25
|
-
} =
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
...
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
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"),
|
|
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
|
|
2
|
-
import { Label as
|
|
3
|
-
import '../../assets/index3.css';const
|
|
4
|
-
toggle:
|
|
5
|
-
thumb:
|
|
6
|
-
track:
|
|
7
|
-
},
|
|
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__ */
|
|
16
|
-
s && /* @__PURE__ */ t(
|
|
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
|
-
|
|
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-
|
|
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,
|
|
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
|
-
|
|
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?:
|
|
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.
|
|
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-
|
|
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