@solibo/solibo-ui 2.2.13 → 2.2.15
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/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index47.css +1 -1
- package/dist/assets/index48.css +1 -1
- package/dist/assets/index49.css +1 -1
- package/dist/assets/index50.css +1 -1
- package/dist/assets/index51.css +1 -1
- package/dist/assets/index52.css +1 -1
- package/dist/assets/index53.css +1 -1
- package/dist/assets/index54.css +1 -1
- package/dist/assets/index55.css +1 -1
- package/dist/assets/index56.css +1 -1
- package/dist/assets/index57.css +1 -1
- package/dist/assets/index58.css +1 -1
- package/dist/assets/index59.css +1 -0
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index60.css +1 -0
- package/dist/components/app-link/index.cjs +1 -1
- package/dist/components/app-link/index.js +9 -9
- package/dist/components/app-shell/index.cjs +1 -1
- package/dist/components/app-shell/index.js +1 -1
- package/dist/components/aside/index.cjs +1 -1
- package/dist/components/aside/index.js +1 -1
- package/dist/components/avatar/index.cjs +1 -1
- package/dist/components/avatar/index.js +38 -39
- package/dist/components/badge/index.cjs +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/banner/index.cjs +1 -1
- package/dist/components/banner/index.js +1 -1
- package/dist/components/branding/index.cjs +1 -1
- package/dist/components/branding/index.js +1 -1
- package/dist/components/button/index.cjs +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/card/index.cjs +1 -1
- package/dist/components/card/index.js +49 -49
- package/dist/components/checkbox/index.cjs +1 -1
- package/dist/components/checkbox/index.js +23 -17
- package/dist/components/chip/index.cjs +1 -1
- package/dist/components/chip/index.js +1 -1
- package/dist/components/clipboard/index.cjs +1 -1
- package/dist/components/clipboard/index.js +1 -1
- package/dist/components/collapsible/index.cjs +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/comment/index.cjs +1 -1
- package/dist/components/comment/index.js +1 -1
- package/dist/components/comments/index.cjs +1 -1
- package/dist/components/comments/index.js +2 -2
- package/dist/components/controls/index.cjs +1 -1
- package/dist/components/controls/index.js +1 -1
- package/dist/components/croppable/index.cjs +1 -1
- package/dist/components/croppable/index.js +152 -152
- package/dist/components/dialog/index.cjs +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/divider/index.cjs +1 -1
- package/dist/components/divider/index.js +1 -1
- package/dist/components/dropdown/index.cjs +1 -1
- package/dist/components/dropdown/index.js +3 -3
- package/dist/components/dropzone/index.cjs +1 -1
- package/dist/components/dropzone/index.js +1 -1
- package/dist/components/editor/index.cjs +1 -1
- package/dist/components/editor/index.js +237 -234
- package/dist/components/empty-state/index.cjs +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/fieldset/index.cjs +1 -1
- package/dist/components/fieldset/index.js +1 -1
- package/dist/components/figure/index.cjs +1 -1
- package/dist/components/figure/index.js +1 -1
- package/dist/components/file/index.cjs +1 -1
- package/dist/components/file/index.js +1 -1
- package/dist/components/footer/index.cjs +1 -1
- package/dist/components/footer/index.js +1 -1
- package/dist/components/form/index.cjs +1 -1
- package/dist/components/form/index.js +21 -12
- package/dist/components/graph/index.cjs +1 -1
- package/dist/components/graph/index.js +1 -1
- package/dist/components/group/index.cjs +1 -1
- package/dist/components/group/index.js +1 -1
- package/dist/components/header/index.cjs +1 -1
- package/dist/components/header/index.js +1 -1
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/iframe/index.cjs +1 -1
- package/dist/components/iframe/index.js +2 -2
- package/dist/components/image/index.cjs +1 -1
- package/dist/components/image/index.js +1 -1
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.js +4 -2
- package/dist/components/label/index.cjs +1 -0
- package/dist/components/label/index.js +18 -0
- package/dist/components/link/index.cjs +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/list/index.cjs +1 -1
- package/dist/components/list/index.js +1 -1
- package/dist/components/loading/index.cjs +1 -1
- package/dist/components/loading/index.js +1 -1
- package/dist/components/message/index.cjs +1 -1
- package/dist/components/message/index.js +2 -2
- package/dist/components/messages/index.cjs +1 -1
- package/dist/components/messages/index.js +2 -2
- package/dist/components/nav/index.cjs +1 -1
- package/dist/components/nav/index.js +1 -1
- package/dist/components/object/index.cjs +1 -1
- package/dist/components/object/index.js +1 -1
- package/dist/components/page-layout/index.cjs +1 -1
- package/dist/components/page-layout/index.js +27 -27
- package/dist/components/panel/index.cjs +1 -1
- package/dist/components/panel/index.js +1 -1
- package/dist/components/popover/index.cjs +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/portal/index.cjs +1 -1
- package/dist/components/portal/index.js +1 -1
- package/dist/components/radio/index.cjs +1 -0
- package/dist/components/radio/index.js +35 -0
- package/dist/components/search/index.cjs +1 -1
- package/dist/components/search/index.js +2 -2
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +3 -2
- package/dist/components/textarea/index.cjs +1 -1
- package/dist/components/textarea/index.js +30 -29
- package/dist/components/toggle/index.cjs +1 -1
- package/dist/components/toggle/index.js +16 -16
- package/dist/components/toolbar/index.cjs +1 -1
- package/dist/components/toolbar/index.js +8 -9
- package/dist/components/tooltip/index.cjs +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/{index-DqZSdMHT.cjs → index-B4dFheLl.cjs} +1 -1
- package/dist/{index-KGoXYG8u.js → index-BJiUk1q2.js} +2 -2
- package/dist/index-BQoXmNo3.cjs +1 -0
- package/dist/index-Bre56YYa.js +90 -0
- package/dist/{index-Bl5EEYDv.cjs → index-BwfsmdF6.cjs} +1 -1
- package/dist/index-CHJNMNDr.cjs +1 -0
- package/dist/index-GPsHvb4d.js +74 -0
- package/dist/{index-DQuc_Zkg.js → index-acMNM3VJ.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +30 -7
- package/dist/index.js +74 -70
- package/dist/tokens.css +79 -38
- package/dist/tokens.json +627 -257
- package/package.json +1 -1
- package/dist/index-FSKjg3Z8.js +0 -82
- package/dist/index-HVXauXrX.js +0 -73
- package/dist/index-S1XsOUKE.cjs +0 -1
- package/dist/index-riaH5c_S.cjs +0 -1
|
@@ -2,7 +2,7 @@ import { jsx as l } from "react/jsx-runtime";
|
|
|
2
2
|
import p from "classix";
|
|
3
3
|
import { createElement as f } from "react";
|
|
4
4
|
import { Loading as m } from "../loading/index.js";
|
|
5
|
-
import '../../assets/
|
|
5
|
+
import '../../assets/index12.css';const u = "_panel_1c69h_1", h = "_none_1c69h_15", b = "_page_1c69h_19", g = "_scrollable_1c69h_27", x = "_surface_1c69h_32", y = "_loading_1c69h_36", a = {
|
|
6
6
|
panel: u,
|
|
7
7
|
default: "_default_1c69h_11",
|
|
8
8
|
none: h,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index58.css');const h=require("react/jsx-runtime"),T=require("classix"),t=require("react"),K=require("react-dom"),N=require("../button/index.cjs"),O="_popover_12bds_1",H="_inline_12bds_6",W="_below_12bds_47",M="_above_12bds_52",U="_trigger_12bds_62",a={popover:O,inline:H,"popover-panel":"_popover-panel_12bds_26",below:W,above:M,"floating-panel":"_floating-panel_12bds_57",trigger:U,"inline-trigger":"_inline-trigger_12bds_66"},X=({children:v,inline:m=!1,triggerAccessibleLabel:k,triggerAriaHasPopup:C,triggerButtonContent:z})=>{const y=t.useRef(null),P=t.useRef(void 0),c=t.useRef(null),R=t.useId(),d=t.useRef(null),[n,D]=t.useState(!1),[F,x]=t.useState(!1),[u,B]=t.useState(),[f,E]=t.useState(!1),[w,S]=t.useState("right"),b=({initialFocus:e}={})=>{var r;P.current=e,B((r=d.current)==null?void 0:r.getBoundingClientRect()),x(!1),E(!1),S("right"),D(!0)},l=t.useCallback(({restoreFocus:e=!0}={})=>{var r;D(!1),e&&((r=d.current)==null||r.focus({preventScroll:!0}))},[]),L=e=>{n&&e.key==="Escape"&&l()},j=e=>{if(!n){if(e.key==="ArrowDown"){e.preventDefault(),b({initialFocus:"first"});return}e.key==="ArrowUp"&&(e.preventDefault(),b({initialFocus:"last"}))}};t.useEffect(()=>{if(!n)return;const e=s=>{var i,p;const o=s.target;(i=y.current)!=null&&i.contains(o)||(p=c.current)!=null&&p.contains(o)||l({restoreFocus:!1})},r=s=>{var o,i;s.target instanceof Node&&((o=c.current)!=null&&o.contains(s.target))||l({restoreFocus:((i=c.current)==null?void 0:i.contains(document.activeElement))??!1})};return document.addEventListener("mousedown",e),window.addEventListener("scroll",r,!0),()=>{document.removeEventListener("mousedown",e),window.removeEventListener("scroll",r,!0)}},[l,n]);const g=t.useCallback(()=>{const e=c.current,r=d.current;if(!e||!r)return;const s=e.getBoundingClientRect(),o=r.getBoundingClientRect();B(o),x(!0);const i=o.top,p=window.innerHeight-o.bottom;E(s.height>p&&i>p),S(s.width>window.innerWidth-o.left&&o.right>window.innerWidth-o.left?"left":"right")},[]);t.useLayoutEffect(()=>{if(n)return g(),window.addEventListener("resize",g),()=>{window.removeEventListener("resize",g)}},[n,g]);const q=e=>{e.preventDefault(),e.stopPropagation(),n?l({restoreFocus:!1}):b()},A={"aria-controls":n?R:void 0,"aria-expanded":n,"aria-haspopup":C,"aria-label":k,className:m?a["inline-trigger"]:a.trigger,onClick:q,onKeyDown:j},I=[w==="left"?"translateX(-100%)":"",f?"translateY(calc(-100% - var(--shape-spacing-2xs)))":""].filter(Boolean).join(" "),_=n?h.jsx("div",{className:T(a["popover-panel"],a[f?"above":"below"],a["floating-panel"]),"data-horizontal-placement":w,"data-placement":f?"above":"below",id:R,ref:c,style:u?{left:w==="left"?u.right:u.left,position:"fixed",top:f?u.top:u.bottom,transform:I||void 0}:{position:"fixed",left:0,top:0},children:typeof v=="function"?v({close:l,initialFocus:P.current,isOpen:n,isPositioned:F}):v}):null;return h.jsxs("div",{className:T(a.popover,m&&a.inline),"data-open":n,onKeyDown:L,onClick:e=>{e.preventDefault(),e.stopPropagation()},ref:y,"data-component":"popover",children:[h.jsx(N.Button,{...A,ref:d,variant:m?"simple":"tertiary",children:z}),_&&typeof document<"u"?K.createPortal(_,document.body):_]})};exports.Popover=X;
|
|
@@ -3,7 +3,7 @@ import z from "classix";
|
|
|
3
3
|
import { useRef as m, useId as W, useState as f, useCallback as C, useEffect as U, useLayoutEffect as X } from "react";
|
|
4
4
|
import { createPortal as Y } from "react-dom";
|
|
5
5
|
import { Button as q } from "../button/index.js";
|
|
6
|
-
import '../../assets/
|
|
6
|
+
import '../../assets/index58.css';const G = "_popover_12bds_1", J = "_inline_12bds_6", M = "_below_12bds_47", Q = "_above_12bds_52", V = "_trigger_12bds_62", i = {
|
|
7
7
|
popover: G,
|
|
8
8
|
inline: J,
|
|
9
9
|
"popover-panel": "_popover-panel_12bds_26",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index11.css');const e=require("react/jsx-runtime"),c=require("classix"),i=require("../button/index.cjs"),a=require("../icon/index.cjs"),l=require("../aside/index.cjs"),_=require("../branding/index.cjs"),d=require("../figure/index.cjs"),u=require("../nav/index.cjs"),p="_portal_1wzqh_23",x="_content_1wzqh_279",g="_toggle_1wzqh_286",m="_open_1wzqh_337",n={portal:p,content:x,toggle:g,open:m},q=({children:t,portals:o,open:s,setOpen:r})=>e.jsxs(l.Aside,{className:c(n.portal,s&&n.open),sticky:!0,"data-component":"portal",children:[e.jsx(i.Button,{className:n.toggle,onClick:()=>r(!s),variant:"tertiary",children:e.jsx(a.Icon,{name:"SidebarSimple"})}),e.jsx(d.Figure,{children:e.jsx(_.Branding,{})}),e.jsxs("div",{className:n.content,children:[o&&e.jsx(u.Nav,{horizontal:!0,children:o}),t&&t]})]});exports.Portal=q;
|
|
@@ -6,7 +6,7 @@ import { Aside as p } from "../aside/index.js";
|
|
|
6
6
|
import { Branding as s } from "../branding/index.js";
|
|
7
7
|
import { Figure as _ } from "../figure/index.js";
|
|
8
8
|
import { Nav as g } from "../nav/index.js";
|
|
9
|
-
import '../../assets/
|
|
9
|
+
import '../../assets/index11.css';const d = "_portal_1wzqh_23", h = "_content_1wzqh_279", f = "_toggle_1wzqh_286", z = "_open_1wzqh_337", t = {
|
|
10
10
|
portal: d,
|
|
11
11
|
content: h,
|
|
12
12
|
toggle: f,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index10.css');const e=require("react/jsx-runtime"),x=require("classix"),j=require("react"),y=require("../form/index.cjs"),v=require("../label/index.cjs"),s=require("../../use-touched-Bq5Gjbpz.cjs"),g="_label_14rhg_3",q="_radio_14rhg_21",B="_touched_14rhg_38",n={label:g,radio:q,touched:B},f=({className:a,description:l,errorMessage:t,invalid:c=!1,label:i,onBlur:u,required:d,...o})=>{const b=j.useId(),{touched:h,onBlur:_}=s.useTouched(o.checked),r=c&&t?b:void 0,m=[o["aria-describedby"],r].filter(Boolean).join(" ")||void 0;return e.jsxs("div",{"data-component":"radio",children:[e.jsxs("label",{className:n.label,children:[e.jsx("input",{...o,type:"radio",className:x(n.radio,a,h&&n.touched),"aria-describedby":m,"aria-invalid":c?!0:o["aria-invalid"],onBlur:s.composeEventHandlers(_,u),required:d}),i&&e.jsx(v.Label,{description:l,inline:!0,label:i,required:d})]}),r&&e.jsx(y.FieldError,{errorId:r,errorMessage:t})]})};exports.Radio=f;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import f from "classix";
|
|
3
|
+
import { useId as p } from "react";
|
|
4
|
+
import { FieldError as v } from "../form/index.js";
|
|
5
|
+
import { Label as y } from "../label/index.js";
|
|
6
|
+
import { u as B, c as x } from "../../use-touched-B999bBr8.js";
|
|
7
|
+
import '../../assets/index10.css';const g = "_label_14rhg_3", j = "_radio_14rhg_21", E = "_touched_14rhg_38", a = {
|
|
8
|
+
label: g,
|
|
9
|
+
radio: j,
|
|
10
|
+
touched: E
|
|
11
|
+
}, R = ({
|
|
12
|
+
className: l,
|
|
13
|
+
description: s,
|
|
14
|
+
errorMessage: d,
|
|
15
|
+
invalid: i = !1,
|
|
16
|
+
label: t,
|
|
17
|
+
onBlur: m,
|
|
18
|
+
required: c,
|
|
19
|
+
...o
|
|
20
|
+
}) => {
|
|
21
|
+
const u = p(), {
|
|
22
|
+
touched: h,
|
|
23
|
+
onBlur: b
|
|
24
|
+
} = B(o.checked), r = i && d ? u : void 0, _ = [o["aria-describedby"], r].filter(Boolean).join(" ") || void 0;
|
|
25
|
+
return /* @__PURE__ */ n("div", { "data-component": "radio", children: [
|
|
26
|
+
/* @__PURE__ */ n("label", { className: a.label, children: [
|
|
27
|
+
/* @__PURE__ */ e("input", { ...o, type: "radio", className: f(a.radio, l, h && a.touched), "aria-describedby": _, "aria-invalid": i ? !0 : o["aria-invalid"], onBlur: x(b, m), required: c }),
|
|
28
|
+
t && /* @__PURE__ */ e(y, { description: s, inline: !0, label: t, required: c })
|
|
29
|
+
] }),
|
|
30
|
+
r && /* @__PURE__ */ e(v, { errorId: r, errorMessage: d })
|
|
31
|
+
] });
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
R as Radio
|
|
35
|
+
};
|
|
@@ -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-
|
|
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;
|
|
@@ -4,10 +4,10 @@ import { Button as p } from "../button/index.js";
|
|
|
4
4
|
import { Checkbox as z } from "../checkbox/index.js";
|
|
5
5
|
import { Chip as A } from "../chip/index.js";
|
|
6
6
|
import { Collapsible as C } from "../collapsible/index.js";
|
|
7
|
-
import { C as E } from "../../index-
|
|
7
|
+
import { C as E } from "../../index-acMNM3VJ.js";
|
|
8
8
|
import { Dialog as J } from "../dialog/index.js";
|
|
9
9
|
import { Header as K } from "../header/index.js";
|
|
10
|
-
import { I as P } from "../../index-
|
|
10
|
+
import { I as P } from "../../index-Bre56YYa.js";
|
|
11
11
|
import '../../assets/index9.css';const Q = "_search_wsuwb_3", U = "_controls_wsuwb_15", V = "_chips_wsuwb_35", W = "_radio_wsuwb_101", o = {
|
|
12
12
|
search: Q,
|
|
13
13
|
controls: U,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("classix");require("../../icons-BIdcCH-v.cjs");const e=require("../../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("classix");require("../../icons-BIdcCH-v.cjs");require("../label/index.cjs");const e=require("../../index-BQoXmNo3.cjs");require("../../use-touched-Bq5Gjbpz.cjs");exports.Select=e.Select;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "classix";
|
|
3
3
|
import "../../icons-DVeBguFb.js";
|
|
4
|
-
import
|
|
4
|
+
import "../label/index.js";
|
|
5
|
+
import { S } from "../../index-GPsHvb4d.js";
|
|
5
6
|
import "../../use-touched-B999bBr8.js";
|
|
6
7
|
export {
|
|
7
|
-
|
|
8
|
+
S as Select
|
|
8
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index6.css');const
|
|
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,36 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
control:
|
|
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
8
|
textarea: N,
|
|
9
|
-
touched:
|
|
10
|
-
},
|
|
11
|
-
className:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
+
..._
|
|
20
21
|
}) => {
|
|
21
22
|
const {
|
|
22
|
-
touched:
|
|
23
|
-
onBlur:
|
|
24
|
-
} =
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
...
|
|
29
|
-
"--min-rows":
|
|
30
|
-
"--max-rows":
|
|
31
|
-
}, value:
|
|
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 }) })
|
|
32
33
|
] });
|
|
33
34
|
};
|
|
34
35
|
export {
|
|
35
|
-
|
|
36
|
+
H as Textarea
|
|
36
37
|
};
|
|
@@ -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"),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,23 +1,23 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import '../../assets/index3.css';const
|
|
4
|
-
toggle:
|
|
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
5
|
thumb: d,
|
|
6
6
|
track: p
|
|
7
|
-
},
|
|
8
|
-
checked:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
label:
|
|
12
|
-
onChange:
|
|
7
|
+
}, b = ({
|
|
8
|
+
checked: e,
|
|
9
|
+
description: n,
|
|
10
|
+
disabled: r,
|
|
11
|
+
label: s,
|
|
12
|
+
onChange: a
|
|
13
13
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */ t(
|
|
17
|
-
/* @__PURE__ */ t("
|
|
18
|
-
|
|
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 }),
|
|
17
|
+
/* @__PURE__ */ t("input", { checked: e, disabled: r, onChange: a, readOnly: c, type: "checkbox" }),
|
|
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
|
+
b as Toggle
|
|
23
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index60.css');const a=require("react/jsx-runtime"),s=require("classix"),c="_toolbar_e1wcf_1",l="_editor_e1wcf_32",o={toolbar:c,editor:l},n=({children:t,variant:e="default"})=>a.jsx("div",{className:s(o.toolbar,o[e]),onClick:r=>r.stopPropagation(),"data-component":"toolbar",children:t});exports.Toolbar=n;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import '../../assets/
|
|
4
|
-
toolbar:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}, d = ({
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import c from "classix";
|
|
3
|
+
import '../../assets/index60.css';const l = "_toolbar_e1wcf_1", s = "_editor_e1wcf_32", o = {
|
|
4
|
+
toolbar: l,
|
|
5
|
+
editor: s
|
|
6
|
+
}, b = ({
|
|
8
7
|
children: t,
|
|
9
8
|
variant: r = "default"
|
|
10
|
-
}) => /* @__PURE__ */
|
|
9
|
+
}) => /* @__PURE__ */ e("div", { className: c(o.toolbar, o[r]), onClick: (a) => a.stopPropagation(), "data-component": "toolbar", children: t });
|
|
11
10
|
export {
|
|
12
|
-
|
|
11
|
+
b as Toolbar
|
|
13
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index17.css');const i=require("react/jsx-runtime"),l=require("classix"),a=require("../icon/index.cjs"),o={static:"_static_r8l1k_1"},r={default:o.default,static:o.static},u=({variant:t="default",children:s,iconName:c,...n})=>{const e=t==="static"?"Info":c;return i.jsxs("div",{className:l(o.tooltip,r[t]),...n,"data-component":"tooltip",children:[e&&i.jsx(a.Icon,{gap:"right",name:e,weight:t==="static"?"fill":void 0}),s]})};exports.Tooltip=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import n from "classix";
|
|
3
3
|
import { Icon as r } from "../icon/index.js";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index17.css';const o = {
|
|
5
5
|
static: "_static_r8l1k_1"
|
|
6
6
|
}, m = {
|
|
7
7
|
default: o.default,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./assets/
|
|
1
|
+
"use strict";require('./assets/index35.css');const e=require("react/jsx-runtime"),a=require("react"),A=require("./components/avatar/index.cjs"),N=require("./components/button/index.cjs"),O=require("./components/group/index.cjs"),L=require("./components/icon/index.cjs"),U=require("./index-BwfsmdF6.cjs"),G=require("./components/editor/index.cjs"),H=require("./content-i-MRPlxK.cjs"),K="_comment_1mvf0_1",T="_meta_1mvf0_12",V="_body_1mvf0_23",$="_notice_1mvf0_30",F="_toggle_1mvf0_46",J="_composer_1mvf0_51",M="_replies_1mvf0_73",Q="_text_1mvf0_82",s={comment:K,meta:T,body:V,notice:$,toggle:F,composer:J,replies:M,text:Q},I=({author:d,label:_,placeholder:j,submitLabel:h,cancelLabel:p,initialContent:v="",autofocus:y=!1,sending:b=!1,onCancel:o,onSubmit:w,onPublished:i})=>{const[c,n]=a.useState(v),[u,f]=a.useState(!1),l=H.hasEditorContent(c,{allowImages:!1}),r=b||u,g=async()=>{if(!(!l||r)){f(!0);try{const t=await w(c);t!==!1&&(n(""),typeof t=="string"&&(i==null||i(t)))}catch{return}finally{f(!1)}}};return e.jsxs("div",{"aria-label":_,className:s.composer,"data-active":l,role:"group","data-component":"commentcomposer",children:[d&&e.jsx("header",{children:e.jsx(A.Avatar,{...d})}),e.jsx(G.Editor,{autofocus:y,content:c,isSubmitting:r,maxRows:10,minRows:1,onChange:n,placeholder:j,variant:"embedded"}),e.jsx("footer",{children:e.jsxs(U.Controls,{variant:"inline",children:[(l||o)&&e.jsx(N.Button,{disabled:r,onClick:()=>{n(""),o==null||o()},variant:"secondary",children:p}),e.jsx(N.Button,{disabled:!l||r,isLoading:r,onClick:()=>void g(),variant:"primary",children:h})]})})]})},B=({id:d,author:_,authorImageUrl:j,authorColor:h="3",timestamp:p,timestampText:v,content:y,actions:b,notice:o,locked:w,reactions:i,editor:c,replies:n=[],replyComposer:u,replyLabel:f="Reply",showRepliesLabel:l="Show replies",hideRepliesLabel:r="Hide replies",onPublished:g})=>{const[t,z]=a.useState(!1),[S,D]=a.useState(!1),R=a.useId(),q=a.useRef(null);a.useEffect(()=>{var x,k,E;t&&S&&((x=q.current)==null||x.scrollIntoView({behavior:"smooth",block:"center"}),(E=(k=q.current)==null?void 0:k.querySelector('[contenteditable="true"]'))==null||E.focus({preventScroll:!0}))},[t,S]);const m=p?new Date(p):void 0,C=n.length>0||!!u;return e.jsxs("div",{"data-comment-id":d,"data-component":"comment",children:[e.jsxs("article",{className:s.comment,children:[e.jsxs("header",{children:[e.jsxs(O.Group,{className:s.meta,gap:"small",justify:"between",layout:"row",children:[e.jsx(A.Avatar,{accessibleLabel:_,color:h,imageUrl:j,name:_}),e.jsxs("sub",{children:[w&&e.jsx(L.Icon,{gap:"right",name:"LockKey",size:"small"}),e.jsx("time",{dateTime:m==null?void 0:m.toISOString(),children:v??(m==null?void 0:m.toLocaleString())})]})]}),b]}),e.jsxs("div",{className:s.body,children:[o&&e.jsx("p",{className:s.notice,children:o}),c?e.jsx(I,{...c}):e.jsx("div",{className:s.text,"data-content":"user-generated",children:y})]}),!c&&(i||C)&&e.jsxs("footer",{children:[i,C&&e.jsxs(N.Button,{"aria-controls":R,"aria-expanded":t,className:s.toggle,onClick:()=>{z(!t),D(!t&&n.length===0)},variant:"tertiary",children:[t?r:n.length?l:f,(t||n.length>0)&&e.jsx(L.Icon,{name:t?"CaretUp":"CaretDown",size:"small"})]})]})]}),t&&C&&e.jsxs("ul",{className:s.replies,id:R,children:[n.map(x=>e.jsx("li",{children:e.jsx(B,{...x,onPublished:g})},x.id)),u&&e.jsx("li",{"data-reply-composer":d,ref:q,children:e.jsx(I,{...u,autofocus:S,onPublished:g})})]})]})};exports.Comment=B;exports.CommentComposer=I;
|
|
@@ -4,10 +4,10 @@ import { Avatar as D } from "./components/avatar/index.js";
|
|
|
4
4
|
import { Button as R } from "./components/button/index.js";
|
|
5
5
|
import { Group as H } from "./components/group/index.js";
|
|
6
6
|
import { Icon as z } from "./components/icon/index.js";
|
|
7
|
-
import { C as K } from "./index-
|
|
7
|
+
import { C as K } from "./index-acMNM3VJ.js";
|
|
8
8
|
import { Editor as T } from "./components/editor/index.js";
|
|
9
9
|
import { h as V } from "./content-Duav5qcc.js";
|
|
10
|
-
import './assets/
|
|
10
|
+
import './assets/index35.css';const F = "_comment_1mvf0_1", J = "_meta_1mvf0_12", M = "_body_1mvf0_23", Q = "_notice_1mvf0_30", W = "_toggle_1mvf0_46", X = "_composer_1mvf0_51", Y = "_replies_1mvf0_73", Z = "_text_1mvf0_82", r = {
|
|
11
11
|
comment: F,
|
|
12
12
|
meta: J,
|
|
13
13
|
body: M,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('./assets/index59.css');const u=require("react/jsx-runtime"),q=require("classix"),S=require("./icons-BIdcCH-v.cjs"),P=require("./components/label/index.cjs"),m=require("./use-touched-Bq5Gjbpz.cjs"),x=new Set(["aria-activedescendant","aria-autocomplete","aria-busy","aria-controls","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-required","aria-roledescription","autoComplete","autoFocus","className","defaultValue","dir","disabled","form","id","multiple","name","onBlur","onChange","onClick","onFocus","onInput","onInvalid","onKeyDown","onKeyUp","onMouseDown","onMouseUp","onPointerDown","onPointerUp","required","role","size","style","tabIndex","title","value"]);function y(o){return Object.fromEntries(Object.entries(o).filter(([e])=>e.startsWith("data-")||e.startsWith("aria-")||x.has(e)))}const _=/^--[\w-]+$/,j=/^var\(\s*(--[\w-]+)\s*(?:,\s*(.+))?\)$/,V=new Set(["currentcolor","inherit","initial","revert","revert-layer","unset"]),c=typeof document<"u"?document.createElement("span"):null;function p(o){const e=o.trim();if(!e||!c||V.has(e.toLowerCase()))return e;const r=document.body??document.documentElement;if(!r||(c.style.color=e,!c.style.color))return e;r.appendChild(c);const s=getComputedStyle(c).color.trim();return c.remove(),s||e}function b(o,e="currentColor"){var i;if(typeof document>"u")return e;const r=getComputedStyle(document.documentElement),s=new Set;let t=o.trim();for(;t;){const n=t.match(j),a=(n==null?void 0:n[1])??(_.test(t)?t:null),l=(i=n==null?void 0:n[2])==null?void 0:i.trim();if(!a)return p(t);if(s.has(a)){t=l??"";continue}s.add(a),t=r.getPropertyValue(a).trim()||l||""}return p(e)}const g="_select_1qls2_3",E="_touched_1qls2_24",h={select:g,touched:E},z=({children:o,description:e,label:r,placeholder:s,...t})=>{const{touched:i,onBlur:n}=m.useTouched(t.value===""),a=y(t),{className:l,onBlur:f,style:v,...w}=a,C={...v,"--icon-svg":S.iconSVG("CaretDown",b("--colors-semantic-content-secondary"))},d=u.jsxs("select",{className:q(h.select,l,i&&h.touched),onBlur:m.composeEventHandlers(n,f),style:C,...w,"data-component":"select",children:[s&&u.jsx("option",{value:"",hidden:!0,children:s},"placeholder"),o]});return r?u.jsxs("label",{"data-component":"select",children:[u.jsx(P.Label,{description:e,label:r,required:t.required}),d]}):d};exports.Select=z;exports.resolveColor=b;exports.sanitizeSelectProps=y;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsxs as x, Fragment as Y, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import m from "classix";
|
|
3
|
+
import { useId as Z, useState as b, useEffect as W } from "react";
|
|
4
|
+
import { FieldError as q } from "./components/form/index.js";
|
|
5
|
+
import { i as M } from "./icons-DVeBguFb.js";
|
|
6
|
+
import { Label as nn } from "./components/label/index.js";
|
|
7
|
+
import { u as tn, c as I } from "./use-touched-B999bBr8.js";
|
|
8
|
+
import './assets/index53.css';const en = (t) => t && t.charAt(0).toUpperCase() + t.slice(1).toLowerCase();
|
|
9
|
+
function on(t) {
|
|
10
|
+
const e = en(t);
|
|
11
|
+
return e && !e.endsWith(":") ? `${e}:` : e;
|
|
12
|
+
}
|
|
13
|
+
const an = "_field_11xgx_3", sn = "_input_11xgx_8", cn = "_label_11xgx_54", ln = "_inline_11xgx_69", rn = "_suffix_11xgx_84", dn = "_touched_11xgx_98", un = "_code_11xgx_136", n = {
|
|
14
|
+
field: an,
|
|
15
|
+
input: sn,
|
|
16
|
+
label: cn,
|
|
17
|
+
inline: ln,
|
|
18
|
+
suffix: rn,
|
|
19
|
+
touched: dn,
|
|
20
|
+
code: un,
|
|
21
|
+
"suffix-text": "_suffix-text_11xgx_162"
|
|
22
|
+
};
|
|
23
|
+
function vn({
|
|
24
|
+
className: t,
|
|
25
|
+
defaultCountryCode: e = "+47",
|
|
26
|
+
description: $,
|
|
27
|
+
disabled: c = !1,
|
|
28
|
+
errorMessage: N,
|
|
29
|
+
icon: B,
|
|
30
|
+
invalid: h = !1,
|
|
31
|
+
label: g,
|
|
32
|
+
onBlur: k,
|
|
33
|
+
placeholder: L,
|
|
34
|
+
ref: w,
|
|
35
|
+
required: _,
|
|
36
|
+
style: E,
|
|
37
|
+
suffix: P,
|
|
38
|
+
type: i = "text",
|
|
39
|
+
variant: l = "default",
|
|
40
|
+
...o
|
|
41
|
+
}) {
|
|
42
|
+
const J = Z(), [p, j] = b(""), [r, C] = b(""), [D, y] = b(!1), {
|
|
43
|
+
name: F,
|
|
44
|
+
onChange: d,
|
|
45
|
+
pattern: K,
|
|
46
|
+
value: u,
|
|
47
|
+
...Q
|
|
48
|
+
} = o, {
|
|
49
|
+
touched: S,
|
|
50
|
+
onBlur: R
|
|
51
|
+
} = tn(u === ""), f = B && i !== "datetime-local" ? B : void 0, T = g && l === "inline" ? on(g) : g, v = h && N ? J : void 0, V = [o["aria-describedby"], v].filter(Boolean).join(" ") || void 0, z = f ? {
|
|
52
|
+
...E,
|
|
53
|
+
"--icon-svg": M(f)
|
|
54
|
+
} : E, A = I(R, () => y(!1), k), G = () => {
|
|
55
|
+
!c && !o.readOnly && y(!0);
|
|
56
|
+
}, H = I(G, o.onInput), O = I(G, o.onPointerDown);
|
|
57
|
+
W(() => {
|
|
58
|
+
if (d && i === "tel") {
|
|
59
|
+
const s = {
|
|
60
|
+
name: F,
|
|
61
|
+
value: r ? (p || e).split(" ").join("") + r.split(" ").join("") : void 0
|
|
62
|
+
};
|
|
63
|
+
d({
|
|
64
|
+
target: s,
|
|
65
|
+
currentTarget: s
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}, [p, e, F, d, r, i]), W(() => {
|
|
69
|
+
i === "tel" && !u && (C(""), j(""));
|
|
70
|
+
}, [i, u]);
|
|
71
|
+
const X = /* @__PURE__ */ x(Y, { children: [
|
|
72
|
+
/* @__PURE__ */ a("input", { disabled: c, hidden: !0, onChange: d, pattern: void 0, placeholder: L, ref: w, type: i, value: u }),
|
|
73
|
+
/* @__PURE__ */ a("input", { type: "text", className: m(n.code, n.input), disabled: c, maxLength: 5, onChange: (s) => j(s.target.value), placeholder: e, value: p }),
|
|
74
|
+
/* @__PURE__ */ a("input", { ...Q, "aria-describedby": V, "aria-invalid": h ? !0 : o["aria-invalid"], type: "tel", className: m(n.input, t, S && n.touched), "data-icon": f ? "true" : void 0, "data-editing": D || void 0, onInput: H, onPointerDown: O, disabled: c, maxLength: 14, name: void 0, onChange: (s) => C(s.target.value), onBlur: A, pattern: K, required: _, style: z, value: r })
|
|
75
|
+
] }), U = /* @__PURE__ */ a("input", { ...o, "aria-describedby": V, "aria-invalid": h ? !0 : o["aria-invalid"], ref: w, className: m(n.input, t, S && n.touched), "data-icon": f ? "true" : void 0, "data-editing": D || void 0, onInput: H, onPointerDown: O, disabled: c, onBlur: A, placeholder: L, required: _, style: z, type: i });
|
|
76
|
+
return /* @__PURE__ */ x("div", { className: n.field, "data-component": "input", children: [
|
|
77
|
+
/* @__PURE__ */ x("label", { className: m(n.label, l === "inline" && n.inline), children: [
|
|
78
|
+
T && /* @__PURE__ */ a(nn, { description: $, inline: l === "inline", label: T, required: _ && l !== "inline" }),
|
|
79
|
+
i === "tel" ? X : P ? /* @__PURE__ */ x("span", { className: n.suffix, children: [
|
|
80
|
+
U,
|
|
81
|
+
/* @__PURE__ */ a("span", { className: n["suffix-text"], children: P })
|
|
82
|
+
] }) : U
|
|
83
|
+
] }),
|
|
84
|
+
v && /* @__PURE__ */ a(q, { errorId: v, errorMessage: N })
|
|
85
|
+
] });
|
|
86
|
+
}
|
|
87
|
+
export {
|
|
88
|
+
vn as I,
|
|
89
|
+
on as f
|
|
90
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require('./assets/
|
|
1
|
+
"use strict";require('./assets/index37.css');const x=require("react/jsx-runtime"),te=require("classix"),d=require("react"),N=require("./menu-popover-bqblnK6P.cjs"),ne=require("./components/button/index.cjs"),j=(n,r="")=>d.Children.toArray(n).flatMap((t,g)=>{if(!d.isValidElement(t))return[t];const o=`${r}${t.key??g}`;return t.type===d.Fragment?j(t.props.children,`${o}/`):[d.cloneElement(t,{key:o})]}),G=n=>d.isValidElement(n)&&n.type===ne.Button,ie="_controls_cgtg8_13",re="_inline_cgtg8_43",oe="_embedded_cgtg8_48",se="_fixed_cgtg8_49",de="_adaptive_cgtg8_60",ce="_measurement_cgtg8_65",h={controls:ie,default:"_default_cgtg8_28",inline:re,embedded:oe,fixed:se,adaptive:de,measurement:ce,"non-button-content":"_non-button-content_cgtg8_103","overflow-trigger":"_overflow-trigger_cgtg8_132"},ae={primary:2,secondary:1,tertiary:0,simple:0},le={default:h.default,embedded:h.embedded,fixed:h.fixed,inline:h.inline},ue=n=>ae[n.props.variant??"secondary"];function me({buttons:n,menuAccessibleLabel:r,triggerAccessibleLabel:t}){const g=n.map(o=>({button:o,isDanger:o.props.intent==="danger",value:o}));return x.jsx(N.MenuPopover,{triggerAccessibleLabel:t,"data-component":"overflowmenu",children:({close:o,initialFocus:s})=>x.jsx(N.MenuActionList,{actions:g,initialFocus:s,menuAccessibleLabel:r,onSelect:()=>o(),usesMenuSemantics:!0})})}const p=(n,r)=>{const t=Number.parseFloat(String(n[r]));return Number.isFinite(t)?t:0},fe=n=>{if(!n.trim().endsWith("px"))return;const r=Number.parseFloat(n);return Number.isFinite(r)?r:void 0},ge=(n,r)=>{const t=n.parentElement;if(!t)return;const g=t.getBoundingClientRect(),o=getComputedStyle(t),s=g.width||t.clientWidth,k=g.left+p(o,"borderLeftWidth")+p(o,"paddingLeft"),C=g.left+s-p(o,"borderRightWidth")-p(o,"paddingRight"),_=Array.from(t.children).slice(0,Array.from(t.children).indexOf(n)),y=_.reduce((f,u)=>Math.max(f,u.getBoundingClientRect().right),k),a=_.length>0?p(o,"columnGap"):0,l=Math.max(0,C-y-a),R=(r==null?void 0:r.parent)===t?Math.max(0,s-r.parentWidth):0;return{availableWidth:R>0?Math.max(l,((r==null?void 0:r.availableWidth)??0)+R):l,parent:t,parentWidth:s}},he=({children:n,className:r,maxVisibleButtons:t,overflow:g,overflowAccessibleLabel:o="More actions",variant:s="default",...k})=>{const C=j(n),_=[],y=[];C.forEach(e=>{G(e)?_.push(e):y.push(e)});const a=_.map((e,c)=>({button:e,index:c,rank:ue(e)})).sort((e,c)=>e.rank-c.rank||e.index-c.index).map(({button:e,index:c})=>d.cloneElement(e,{key:e.key??c})),l=s==="embedded"||s==="fixed"&&g==="menu",R=typeof t=="number"&&Number.isFinite(t)?Math.floor(t):0,f=s==="embedded"&&R>0?Math.min(a.length,R):a.length,u=d.useRef(null),z=d.useRef(void 0),F=d.useRef(null),E=d.useRef(null),[V,M]=d.useState(f),S=a.map(e=>String(e.key)).join(`
|
|
2
2
|
`),[T,H]=d.useState(S);T!==S&&(H(S),M(f));const b=d.useCallback(()=>{var P,I,D;if(!l){M(f);return}const e=u.current,c=F.current;if(!e||!c)return;const W=Array.from(c.querySelectorAll('[data-component="button"]')),w=W.at(-1);if(!w)return;const v=W.slice(0,a.length).map(i=>i.getBoundingClientRect().width);if(v.length!==a.length)return;const m=getComputedStyle(e),Q=p(m,"paddingLeft")+p(m,"paddingRight")+p(m,"borderLeftWidth")+p(m,"borderRightWidth"),U=fe(m.maxWidth),B=s==="embedded"?ge(e,z.current):void 0;B&&(z.current=B);const X=(B==null?void 0:B.availableWidth)??((P=e.parentElement)==null?void 0:P.clientWidth)??0,Y=((I=window.visualViewport)==null?void 0:I.width)??document.documentElement.clientWidth,O=Math.min(...[U,X,Y].filter(i=>typeof i=="number"&&Number.isFinite(i)&&i>0));if(!Number.isFinite(O))return;const $=Math.max(0,O-Q),K=((D=E.current)==null?void 0:D.getBoundingClientRect().width)??0,Z=v.reduce((i,ee)=>i+ee,0);if(f===a.length&&K+Z<=$){M(i=>i===f?i:f);return}let L=K+w.getBoundingClientRect().width,A=0;for(let i=0;i<f&&!(L+v[i]>$);i+=1)L+=v[i],A=i+1;M(i=>i===A?i:A)},[l,a.length,s,f]);if(d.useLayoutEffect(()=>{var c,W,w,v;if(b(),!l)return;const e=typeof ResizeObserver>"u"?void 0:new ResizeObserver(b);return u.current&&(e==null||e.observe(u.current)),(c=u.current)!=null&&c.parentElement&&(e==null||e.observe(u.current.parentElement)),s==="embedded"&&((W=u.current)!=null&&W.parentElement)&&Array.from(u.current.parentElement.children).forEach(m=>{m!==u.current&&(e==null||e.observe(m))}),E.current&&(e==null||e.observe(E.current)),window.addEventListener("resize",b),(w=window.visualViewport)==null||w.addEventListener("resize",b),(v=document.fonts)==null||v.ready.then(b),()=>{var m;e==null||e.disconnect(),window.removeEventListener("resize",b),(m=window.visualViewport)==null||m.removeEventListener("resize",b)}},[l,n,b,s]),C.length===0)return null;const J=l?a.slice(0,V):a,q=l?a.slice(V):[];return x.jsxs("div",{"data-dynamic-position":s==="fixed"?!0:void 0,"data-adaptive":l?!0:void 0,className:te(h.controls,le[s],l&&h.adaptive,r),ref:u,...k,"data-component":"controls",children:[l&&x.jsxs("div",{"aria-hidden":"true",className:h.measurement,ref:F,children:[a.map((e,c)=>d.cloneElement(e,{"aria-hidden":!0,id:void 0,key:`measure-${String(e.key??c)}`,onClick:void 0,ref:void 0,tabIndex:-1})),x.jsx(N.MenuPopover,{triggerAccessibleLabel:o,children:null})]}),s!=="embedded"&&y.length>0&&x.jsx("span",{className:h["non-button-content"],ref:E,children:y}),J,q.length>0&&x.jsx("span",{className:h["overflow-trigger"],children:x.jsx(me,{buttons:q,menuAccessibleLabel:o,triggerAccessibleLabel:o})})]})};exports.Controls=he;exports.controlChildren=j;exports.isControlButton=G;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('./assets/index53.css');const e=require("react/jsx-runtime"),h=require("classix"),a=require("react"),Q=require("./components/form/index.cjs"),X=require("./icons-BIdcCH-v.cjs"),Y=require("./components/label/index.cjs"),_=require("./use-touched-Bq5Gjbpz.cjs"),Z=t=>t&&t.charAt(0).toUpperCase()+t.slice(1).toLowerCase();function G(t){const i=Z(t);return i&&!i.endsWith(":")?`${i}:`:i}const M="_field_11xgx_3",ee="_input_11xgx_8",ne="_label_11xgx_54",te="_inline_11xgx_69",ie="_suffix_11xgx_84",oe="_touched_11xgx_98",se="_code_11xgx_136",n={field:M,input:ee,label:ne,inline:te,suffix:ie,touched:oe,code:se,"suffix-text":"_suffix-text_11xgx_162"};function ce({className:t,defaultCountryCode:i="+47",description:O,disabled:l=!1,errorMessage:j,icon:I,invalid:g=!1,label:m,onBlur:U,placeholder:E,ref:L,required:p,style:N,suffix:B,type:o="text",variant:r="default",...s}){const W=a.useId(),[v,q]=a.useState(""),[u,w]=a.useState(""),[P,C]=a.useState(!1),{name:D,onChange:d,pattern:$,value:x,...k}=s,{touched:S,onBlur:J}=_.useTouched(x===""),f=I&&o!=="datetime-local"?I:void 0,y=m&&r==="inline"?G(m):m,b=g&&j?W:void 0,F=[s["aria-describedby"],b].filter(Boolean).join(" ")||void 0,H=f?{...N,"--icon-svg":X.iconSVG(f)}:N,T=_.composeEventHandlers(J,()=>C(!1),U),R=()=>{!l&&!s.readOnly&&C(!0)},V=_.composeEventHandlers(R,s.onInput),z=_.composeEventHandlers(R,s.onPointerDown);a.useEffect(()=>{if(d&&o==="tel"){const c={name:D,value:u?(v||i).split(" ").join("")+u.split(" ").join(""):void 0};d({target:c,currentTarget:c})}},[v,i,D,d,u,o]),a.useEffect(()=>{o==="tel"&&!x&&(w(""),q(""))},[o,x]);const K=e.jsxs(e.Fragment,{children:[e.jsx("input",{disabled:l,hidden:!0,onChange:d,pattern:void 0,placeholder:E,ref:L,type:o,value:x}),e.jsx("input",{type:"text",className:h(n.code,n.input),disabled:l,maxLength:5,onChange:c=>q(c.target.value),placeholder:i,value:v}),e.jsx("input",{...k,"aria-describedby":F,"aria-invalid":g?!0:s["aria-invalid"],type:"tel",className:h(n.input,t,S&&n.touched),"data-icon":f?"true":void 0,"data-editing":P||void 0,onInput:V,onPointerDown:z,disabled:l,maxLength:14,name:void 0,onChange:c=>w(c.target.value),onBlur:T,pattern:$,required:p,style:H,value:u})]}),A=e.jsx("input",{...s,"aria-describedby":F,"aria-invalid":g?!0:s["aria-invalid"],ref:L,className:h(n.input,t,S&&n.touched),"data-icon":f?"true":void 0,"data-editing":P||void 0,onInput:V,onPointerDown:z,disabled:l,onBlur:T,placeholder:E,required:p,style:H,type:o});return e.jsxs("div",{className:n.field,"data-component":"input",children:[e.jsxs("label",{className:h(n.label,r==="inline"&&n.inline),children:[y&&e.jsx(Y.Label,{description:O,inline:r==="inline",label:y,required:p&&r!=="inline"}),o==="tel"?K:B?e.jsxs("span",{className:n.suffix,children:[A,e.jsx("span",{className:n["suffix-text"],children:B})]}):A]}),b&&e.jsx(Q.FieldError,{errorId:b,errorMessage:j})]})}exports.Input=ce;exports.formatInlineLabel=G;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsxs as d, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import w from "classix";
|
|
3
|
+
import { i as C } from "./icons-DVeBguFb.js";
|
|
4
|
+
import { Label as S } from "./components/label/index.js";
|
|
5
|
+
import { u as P, c as V } from "./use-touched-B999bBr8.js";
|
|
6
|
+
import './assets/index59.css';const g = /* @__PURE__ */ new Set(["aria-activedescendant", "aria-autocomplete", "aria-busy", "aria-controls", "aria-describedby", "aria-details", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-haspopup", "aria-hidden", "aria-invalid", "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", "aria-required", "aria-roledescription", "autoComplete", "autoFocus", "className", "defaultValue", "dir", "disabled", "form", "id", "multiple", "name", "onBlur", "onChange", "onClick", "onFocus", "onInput", "onInvalid", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", "required", "role", "size", "style", "tabIndex", "title", "value"]);
|
|
7
|
+
function q(r) {
|
|
8
|
+
return Object.fromEntries(Object.entries(r).filter(([e]) => e.startsWith("data-") || e.startsWith("aria-") || g.has(e)));
|
|
9
|
+
}
|
|
10
|
+
const x = /^--[\w-]+$/, E = /^var\(\s*(--[\w-]+)\s*(?:,\s*(.+))?\)$/, _ = /* @__PURE__ */ new Set(["currentcolor", "inherit", "initial", "revert", "revert-layer", "unset"]), i = typeof document < "u" ? document.createElement("span") : null;
|
|
11
|
+
function p(r) {
|
|
12
|
+
const e = r.trim();
|
|
13
|
+
if (!e || !i || _.has(e.toLowerCase()))
|
|
14
|
+
return e;
|
|
15
|
+
const n = document.body ?? document.documentElement;
|
|
16
|
+
if (!n || (i.style.color = e, !i.style.color))
|
|
17
|
+
return e;
|
|
18
|
+
n.appendChild(i);
|
|
19
|
+
const s = getComputedStyle(i).color.trim();
|
|
20
|
+
return i.remove(), s || e;
|
|
21
|
+
}
|
|
22
|
+
function B(r, e = "currentColor") {
|
|
23
|
+
var l;
|
|
24
|
+
if (typeof document > "u")
|
|
25
|
+
return e;
|
|
26
|
+
const n = getComputedStyle(document.documentElement), s = /* @__PURE__ */ new Set();
|
|
27
|
+
let t = r.trim();
|
|
28
|
+
for (; t; ) {
|
|
29
|
+
const o = t.match(E), a = (o == null ? void 0 : o[1]) ?? (x.test(t) ? t : null), c = (l = o == null ? void 0 : o[2]) == null ? void 0 : l.trim();
|
|
30
|
+
if (!a)
|
|
31
|
+
return p(t);
|
|
32
|
+
if (s.has(a)) {
|
|
33
|
+
t = c ?? "";
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
s.add(a), t = n.getPropertyValue(a).trim() || c || "";
|
|
37
|
+
}
|
|
38
|
+
return p(e);
|
|
39
|
+
}
|
|
40
|
+
const N = "_select_1qls2_3", j = "_touched_1qls2_24", f = {
|
|
41
|
+
select: N,
|
|
42
|
+
touched: j
|
|
43
|
+
}, U = ({
|
|
44
|
+
children: r,
|
|
45
|
+
description: e,
|
|
46
|
+
label: n,
|
|
47
|
+
placeholder: s,
|
|
48
|
+
...t
|
|
49
|
+
}) => {
|
|
50
|
+
const {
|
|
51
|
+
touched: l,
|
|
52
|
+
onBlur: o
|
|
53
|
+
} = P(t.value === ""), a = q(t), {
|
|
54
|
+
className: c,
|
|
55
|
+
onBlur: h,
|
|
56
|
+
style: y,
|
|
57
|
+
...b
|
|
58
|
+
} = a, v = {
|
|
59
|
+
...y,
|
|
60
|
+
"--icon-svg": C("CaretDown", B("--colors-semantic-content-secondary"))
|
|
61
|
+
}, u = /* @__PURE__ */ d("select", { className: w(f.select, c, l && f.touched), onBlur: V(o, h), style: v, ...b, "data-component": "select", children: [
|
|
62
|
+
s && /* @__PURE__ */ m("option", { value: "", hidden: !0, children: s }, "placeholder"),
|
|
63
|
+
r
|
|
64
|
+
] });
|
|
65
|
+
return n ? /* @__PURE__ */ d("label", { "data-component": "select", children: [
|
|
66
|
+
/* @__PURE__ */ m(S, { description: e, label: n, required: t.required }),
|
|
67
|
+
u
|
|
68
|
+
] }) : u;
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
U as S,
|
|
72
|
+
B as r,
|
|
73
|
+
q as s
|
|
74
|
+
};
|
|
@@ -3,7 +3,7 @@ import re from "classix";
|
|
|
3
3
|
import { Children as oe, isValidElement as T, Fragment as de, cloneElement as N, useRef as E, useState as P, useCallback as se, useLayoutEffect as ce } from "react";
|
|
4
4
|
import { a as H, M as ae } from "./menu-popover-Ceb_9V67.js";
|
|
5
5
|
import { Button as le } from "./components/button/index.js";
|
|
6
|
-
import './assets/
|
|
6
|
+
import './assets/index37.css';const J = (n, r = "") => oe.toArray(n).flatMap((t, f) => {
|
|
7
7
|
if (!T(t)) return [t];
|
|
8
8
|
const o = `${r}${t.key ?? f}`;
|
|
9
9
|
return t.type === de ? J(t.props.children, `${o}/`) : [N(t, {
|