efficient-shell 8.23.1 → 8.25.0
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/README.md +34 -0
- package/dist/{Browser-NSOMITHS.js → Browser-RJEKM63G.js} +14 -14
- package/dist/Calculator-OFKUHJMM.js +29 -0
- package/dist/{CurrencyConverter-BX5HDEX6.js → CurrencyConverter-LUDRYE35.js} +8 -8
- package/dist/{Documents-LEB2ZSZD.js → Documents-JBPK256V.js} +16 -16
- package/dist/Files-CWO6JJRY.js +87 -0
- package/dist/{Notepad-UNPC3Q4F.js → Notepad-P32DNQV3.js} +10 -10
- package/dist/{PomodoroTimer-LBFYGZHA.js → PomodoroTimer-773FYTGF.js} +68 -68
- package/dist/{Preview-3FABZUXV.js → Preview-C56RWJL7.js} +20 -20
- package/dist/{Sidebar-OIWVKYUU.js → Sidebar-3HM646LN.js} +1 -1
- package/dist/{Spreadsheet-AADGH3IX.js → Spreadsheet-F3UZ7I6T.js} +11 -11
- package/dist/{Stock-5TKATE4I.js → Stock-US3UN5TD.js} +3 -3
- package/dist/{Weather-NQJCUUUN.js → Weather-TOY4CXLT.js} +17 -17
- package/dist/{WorldClock-QYZF2JCO.js → WorldClock-6JV67SYH.js} +6 -6
- package/dist/ai/index.d.ts +33 -2
- package/dist/ai/index.js +36 -37
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/charts/SpecChart.d.ts +15 -0
- package/dist/charts/SpecChart.js +1 -0
- package/dist/charts/chartSpec.d.ts +48 -0
- package/dist/charts/chartSpec.js +1 -0
- package/dist/{chunk-OFOLUFNB.js → chunk-2NMT3Y5H.js} +7 -7
- package/dist/{chunk-TXS6JKFV.js → chunk-35YON46D.js} +1 -1
- package/dist/chunk-4DAN4Q6P.js +21 -0
- package/dist/{chunk-MTXTJLFK.js → chunk-4SQNLU2Q.js} +1 -1
- package/dist/{chunk-QFA5COE6.js → chunk-6YH7JKRE.js} +2 -2
- package/dist/{chunk-FLQIF7HC.js → chunk-7FI6NVC7.js} +3 -3
- package/dist/{chunk-OHVAD3NO.js → chunk-7IMJJT2K.js} +1 -1
- package/dist/{chunk-JWIKHVF4.js → chunk-ATX4N3L4.js} +9 -9
- package/dist/{chunk-XHBQPVNG.js → chunk-BDCMFW5N.js} +1 -1
- package/dist/chunk-BF7NTCLU.js +1 -0
- package/dist/{chunk-NHCRQ7SW.js → chunk-BGLKEWVR.js} +1 -1
- package/dist/chunk-BKZGI76S.js +7 -0
- package/dist/chunk-CR7T435F.js +1 -0
- package/dist/chunk-DJCC3WBR.js +14 -0
- package/dist/{chunk-255BENW2.js → chunk-EMXR74QM.js} +4 -4
- package/dist/{chunk-GWIPZKZJ.js → chunk-ETNNJUAX.js} +3 -3
- package/dist/{chunk-BMZSMXE6.js → chunk-EZGY6CFN.js} +1 -1
- package/dist/{chunk-R6DGLGB3.js → chunk-F4GLNQIX.js} +10 -10
- package/dist/{chunk-JYLVX2FW.js → chunk-FOLZVO2Z.js} +7 -7
- package/dist/{chunk-3GHBY2FP.js → chunk-G433MKIN.js} +9 -9
- package/dist/{chunk-LLLAIPFX.js → chunk-GECH6THP.js} +1 -1
- package/dist/chunk-HJH4WIBC.js +19 -0
- package/dist/{chunk-JNDBRSYZ.js → chunk-IFLIGOSU.js} +2 -2
- package/dist/{chunk-EJUR35JG.js → chunk-IYZO6ADE.js} +1 -1
- package/dist/{chunk-3XQGEILM.js → chunk-K4BEWZBI.js} +1 -1
- package/dist/{chunk-ZSRRV44J.js → chunk-KAWMOFSI.js} +1 -1
- package/dist/chunk-KBGC53FI.js +1 -0
- package/dist/{chunk-ZEKM6HAA.js → chunk-M2AIC7IK.js} +2 -2
- package/dist/{chunk-GQACKEKW.js → chunk-MSQB2OE2.js} +2 -2
- package/dist/{chunk-SXORVKIZ.js → chunk-MXVJHVVI.js} +4 -4
- package/dist/{chunk-XFBXKKOB.js → chunk-Q2YDR6GF.js} +1 -1
- package/dist/{chunk-3PNKI44X.js → chunk-Q4TGK2K6.js} +4 -4
- package/dist/{chunk-QEV346OG.js → chunk-QR6V44P5.js} +1 -1
- package/dist/chunk-REOSJZED.js +29 -0
- package/dist/{chunk-KKSW5IZ7.js → chunk-TFMOGKW2.js} +10 -10
- package/dist/chunk-U6BEF6GQ.js +5 -0
- package/dist/{chunk-NVE6L27I.js → chunk-V4KQUOUP.js} +9 -9
- package/dist/{chunk-UX6HNRFV.js → chunk-VP3CMJTT.js} +7 -7
- package/dist/{chunk-64FIE4SX.js → chunk-VUCJ53H4.js} +8 -8
- package/dist/{chunk-DISSJYKV.js → chunk-VV37BGSY.js} +11 -11
- package/dist/{chunk-SG2MTCA2.js → chunk-WISGY2OI.js} +52 -52
- package/dist/chunk-XEKPJGVZ.js +1 -0
- package/dist/{chunk-BY2OWWKC.js → chunk-XWLWG4HS.js} +2 -2
- package/dist/{chunk-GIM2422N.js → chunk-YRWRA7MW.js} +1 -1
- package/dist/{chunk-4YUCXIRP.js → chunk-ZZNOQQWE.js} +3 -3
- package/dist/data/DataTable.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.d.ts +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Select.d.ts +16 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient-meanings.d.ts +9 -9
- package/dist/icons/efficient-meanings.js +1 -1
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +230 -230
- package/dist/map/index.js +1 -1
- package/dist/page-tabs/index.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.d.ts +18 -2
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.d.ts +2 -2
- package/dist/shell/Tree.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +3 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-WZIBSVDK.js +0 -29
- package/dist/Files-4P5YEYDE.js +0 -87
- package/dist/chunk-3EKWDVBV.js +0 -29
- package/dist/chunk-6CRERVSV.js +0 -1
- package/dist/chunk-6WSTN5A3.js +0 -14
- package/dist/chunk-B5VOHZCD.js +0 -1
- package/dist/chunk-HXJZ46JT.js +0 -1
- package/dist/chunk-NT26CWMZ.js +0 -5
- package/dist/chunk-UKB2I3UK.js +0 -21
- package/dist/chunk-VTVOQS5L.js +0 -20
- /package/dist/{chunk-276AUQNN.js → chunk-A5ALFLWZ.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-VU6VPKM3.js";import{Radio_default as a}from"./chunk-NI5FXWK5.js";import{Select_default as l}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-VU6VPKM3.js";import{Radio_default as a}from"./chunk-NI5FXWK5.js";import{Select_default as l}from"./chunk-HJH4WIBC.js";import{Input_default as r}from"./chunk-UNEJ2ABD.js";import{FormField as n}from"./chunk-MVQBVPWP.js";import{Checkbox_default as i}from"./chunk-CGZBDI6C.js";import{Textarea_default as c}from"./chunk-AWY3F6PV.js";import{Button_default as o}from"./chunk-4IU5BSVE.js";import{useState as t}from"react";import{jsx as m,jsxs as d}from"react/jsx-runtime";function s(){const[s,h]=t("pro"),[u,p]=t(!0),[f,g]=t("us");/* @__PURE__ */
|
|
2
2
|
return m("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */d("form",{className:"mx-auto max-w-2xl space-y-5",onSubmit:e=>e.preventDefault(),children:[
|
|
3
3
|
/* @__PURE__ */d("div",{children:[
|
|
4
4
|
/* @__PURE__ */m("h1",{className:"text-xl font-semibold text-gray-900",children:"Account settings"}),
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{formatMoney as e}from"./chunk-X2S2XDZI.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-WSPO4N72.js";import{ChartFrame as a}from"./chunk-BRHIRE4D.js";import{ColumnChart as l}from"./chunk-ETF7LAYZ.js";import{TH_ONE_LINE as s}from"./chunk-6KO5VTL7.js";import{jsxs as o,jsx as i}from"react/jsx-runtime";function n({spec:n,height:c=200,width:m,animate:d=!0,className:h}){const u=function(r){if(r.currency)return t=>e(t,r.currency);const t=r.unit?` ${r.unit}`:"";return e=>`${e.toLocaleString("en-US",{maximumFractionDigits:2})}${t}`}(n),p=n.currency?r=>e(r,n.currency,{whole:!0}):u,b=n.series.map((e,r)=>({key:`s${r}`,label:e.name,data:e.values})),y=n.title??n.series.map(e=>e.name).join(", "),f=/* @__PURE__ */o("table",{className:"w-full border-collapse text-sm",children:[
|
|
2
|
+
/* @__PURE__ */i("thead",{children:/* @__PURE__ */o("tr",{children:[
|
|
3
|
+
/* @__PURE__ */i("td",{className:"border-b border-gray-200"}),n.series.map((e,r)=>/* @__PURE__ */i("th",{scope:"col",className:`${s} border-b border-gray-200 px-2 py-1 text-right font-semibold text-gray-700`,children:e.name},r))]})}),
|
|
4
|
+
/* @__PURE__ */i("tbody",{children:n.x.map((e,t)=>/* @__PURE__ */o("tr",{children:[
|
|
5
|
+
/* @__PURE__ */i("th",{scope:"row",className:`${s} border-t border-gray-100 px-2 py-1 text-left font-normal text-gray-700`,children:e}),n.series.map((e,a)=>{const l=e.values[t];/* @__PURE__ */
|
|
6
|
+
return i("td",{className:"border-t border-gray-100 px-2 py-1 text-right tabular-nums text-gray-700",children:null===l?r:u(l)},a)})]},t))})]});/* @__PURE__ */
|
|
7
|
+
return i(a,{title:y,legend:b.map(e=>({key:e.key,label:e.label,swatch:"line"===n.type?"bar":"square"})),table:f,className:h,children:"line"===n.type?/* @__PURE__ */i(t,{series:b,labels:n.x,height:c,width:m,animate:d,dots:"all",formatValue:p,formatTooltipValue:u}):/* @__PURE__ */i(l,{series:b,labels:n.x,stacked:n.stacked,height:c,width:m,animate:d,formatValue:p,formatTooltipValue:u})})}export{n as SpecChart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={points:60,series:8,label:80},r=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),t=r=>"string"==typeof r&&""!==r.trim()&&r.length<=e.label?r.trim():void 0;function n(e){return null===e?null:"number"==typeof e?Number.isFinite(e)?e:void 0:"string"==typeof e&&/^-?\d+(\.\d+)?$/.test(e.trim())?Number(e):void 0}function u(e,u){if(!r(e))return null;const l=t(e.name);if(!l||!Array.isArray(e.values)||e.values.length!==u)return null;const s=[];for(const r of e.values){const e=n(r);if(void 0===e)return null;s.push(e)}return{name:l,values:s}}function l(n){let l;try{l=JSON.parse(n)}catch{return null}if(!r(l))return null;if("line"!==l.type&&"bar"!==l.type)return null;if(!Array.isArray(l.x)||0===l.x.length||l.x.length>e.points)return null;const s=[];for(const e of l.x){const r="number"==typeof e&&Number.isFinite(e)?String(e):t(e);if(void 0===r)return null;s.push(r)}if(!Array.isArray(l.series)||0===l.series.length||l.series.length>e.series)return null;const i=[];for(const e of l.series){const r=u(e,s.length);if(!r)return null;i.push(r)}if(i.every(e=>e.values.every(e=>null===e)))return null;const o={type:l.type,x:s,series:i},c=t(l.title);c&&(o.title=c),"string"==typeof l.currency&&/^[A-Za-z]{3}$/.test(l.currency)&&(o.currency=l.currency.toUpperCase());const y=t(l.unit);return y&&!o.currency&&(o.unit=y),"bar"===l.type&&!0===l.stacked&&i.length>1&&(o.stacked=!0),o}export{e as CHART_SPEC_LIMITS,l as parseChartSpec};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{SearchableSelect as e}from"./chunk-NMK4UQXZ.js";import{labelClasses as a}from"./chunk-EQKUFYX6.js";import{Select_default as l}from"./chunk-HJH4WIBC.js";import{Input_default as t}from"./chunk-UNEJ2ABD.js";import{isSafeLinkHref as r}from"./chunk-PJPK2ADX.js";import{INPUT_SIZES as n}from"./chunk-JFSYWEHD.js";import{Button_default as i}from"./chunk-4IU5BSVE.js";import{Icon as o}from"./chunk-KIBL6M3T.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-E6UCGCOC.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},y=e=>r(e.trim());function k(r){const{value:n,kinds:o,rules:k=x,filtersFor:w,label:C,readOnly:N,placeholder:j,className:F=""}=r,O=void 0!==r.onApply,E=u().link,U=k.isSafe??y,$=d(),z=c(null),D=c(null),[A,K]=p({url:n}),P=O?A.url:n,[W,B]=p(!1),[H,J]=p(null),[M,S]=p(null),T=c(()=>{});T.current=O?r.onCancel:()=>{},m(()=>{if(O)return s(e=>{const a=z.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(T.current(),!0)},()=>z.current)},[O]),m(()=>{if(!O)return;const e=D.current;e?(e.focus(),e.select()):z.current?.querySelector("button, input")?.focus()},[]);const I=o??[{value:b,label:E.address,target:{type:"text"}}],L=H&&H.against===P?H.kind:k.kindOf(P),Q=I.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===L),X=Q.find(e=>"text"===e.target.type),R=Q.find(e=>e.value===L)??X??Q[0];if(!R)return null;const V="text"!==R.target.type,Y=V?k.targetOf(P):P,q=h(R.target),G=q.find(e=>e.value===Y),Z=e=>({value:e,label:E.unavailable(e)}),_="select"===R.target.type&&Y&&w?w(Y):null,ee=_?k.readFilter(P):null,ae=ee?_?.find(e=>e.param===ee.param):void 0,le=M&&M.against===P?M.text:P,te=!V&&""!==le.trim()&&!U(le),re=te&&(!O||W),ne=(e,a)=>{O?K({url:e,name:a}):void 0===a?r.onChange(e):r.onChange(e,a)},ie=(e,a)=>{J(a=>a?{...a,against:e}:a),ne(e,a)},oe=e=>{if(!e)return ie("");const a=q.find(a=>a.value===e);ie(e,a?.label)},se=V?P:le.trim(),ue=()=>{if(!O||!se)return;if(!V&&te)return void B(!0);const e=V&&A.url===se?A.name:void 0,a=r.onApply;void 0===e?a(se):a(se,e)},de=(e,a)=>a&&!e.some(e=>e.value===a)?[Z(a),...e]:[...e],ce=(a,t,r,n,i)=>{const o=[];for(const e of r){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const l=r.some(e=>""===e.value);/* @__PURE__ */
|
|
2
|
+
return f(e,{"aria-label":a,value:t,options:o,disabled:N,clearable:l,placeholder:r.find(e=>""===e.value)?.label,onChange:n})}/* @__PURE__ */
|
|
3
|
+
return f(l,{size:"sm","aria-label":a,value:t,options:o,readOnly:N,onChange:n})};let pe;if("text"===R.target.type)pe=/* @__PURE__ */f(t,{ref:D,id:`${$}-address`,size:"sm",type:"text",invalid:re,"aria-label":E.address,"aria-describedby":re?`${$}-why`:void 0,placeholder:j??E.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:le,readOnly:N,onChange:e=>(e=>{B(!1);const a=e.trim();a?U(e)?(S({text:e,against:a}),ie(a)):S({text:e,against:P}):(S({text:e,against:""}),ie(""))})(e.target.value)});else{const e="groups"===R.target.type?R.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):R.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:R.target.placeholder},...de(e,Y)];pe=ce(R.label,Y,a,oe,e.length>10)}const me=/* @__PURE__ */v(g,{children:[o&&ce(E.linkType,R.value,Q.map(e=>({value:e.value,label:e.label})),e=>{S(null),B(!1);const a=Q.find(a=>a.value===e);if(!a||"text"===a.target.type)return void J({kind:e,against:P});const l=h(a.target)[0];J({kind:e,against:l?l.value:""}),l?ne(l.value,l.label):ne("")},!1),pe,_&&ce(E.filter,ee?.param??"",[{value:"",label:E.noFilter},...ee&&!ae?[Z(ee.param)]:[],..._.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return ie(Y,G?.label);const a=_?.find(a=>a.param===e),l=a?.values[0];l&&ie(k.withFilter(Y,{param:e,value:l.value}),l.label)},!1),_&&ee&&ce(E.value,ee.value,de((ae?.values??[]).map(e=>({value:e.value,label:e.label})),ee.value),e=>{if(!ee)return;const a=ae?.values.find(a=>a.value===e);ie(k.withFilter(Y,{param:ee.param,value:e}),a?.label)},(ae?.values.length??0)>10),re&&/* @__PURE__ */f("p",{id:`${$}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:E.unsafe}),R.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-gray-400",children:R.hint}),_&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-gray-400",children:E.filterHint})]});if(!O)/* @__PURE__ */
|
|
4
|
+
return f("div",{ref:z,className:`flex min-w-0 flex-auto flex-col gap-2 ${F}`.trim(),role:C?"group":void 0,"aria-label":C,children:me});const fe=r.onRemove;/* @__PURE__ */
|
|
5
|
+
return v("div",{ref:z,role:"dialog","aria-label":C??E.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-gray-200 bg-white p-3 shadow-lg ${F}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),ue())},children:[V?/* @__PURE__ */f("span",{className:a({inline:!0}),children:E.title}):/* @__PURE__ */f("label",{htmlFor:`${$}-address`,className:a({inline:!0}),children:E.title}),me,
|
|
6
|
+
/* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[fe?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:fe,children:E.remove}):null,
|
|
7
|
+
/* @__PURE__ */v("span",{className:"ml-auto flex gap-1",children:[
|
|
8
|
+
/* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>T.current(),children:E.cancel}),
|
|
9
|
+
/* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:ue,disabled:N||""===se,children:E.apply})]})]})]})}function w({label:e,text:a,onTextChange:l,link:r,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const y=u().link,[w,C]=p(!1),N=c(null),j=d(),F=()=>{C(!1),N.current?.focus()};/* @__PURE__ */
|
|
10
|
+
return v("div",{className:`flex min-w-0 flex-auto flex-col ${x}`.trim(),children:[
|
|
11
|
+
/* @__PURE__ */f(t,{size:"sm",type:"text",className:"rounded-b-none","aria-label":y.text(e),placeholder:h,value:a,readOnly:b,onChange:e=>l(e.target.value)}),
|
|
12
|
+
/* @__PURE__ */v("button",{ref:N,type:"button","aria-label":y.linkOf(e,r),"aria-expanded":w,"aria-controls":w?j:void 0,disabled:b,onClick:()=>C(e=>!e),className:`flex w-full min-w-0 items-center gap-2 rounded-b-(--radius-control) border border-t-0 border-gray-300 bg-gray-50 ${n.sm} text-left hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60`,children:[
|
|
13
|
+
/* @__PURE__ */f(o,{name:"link",strokeWidth:1.5,className:"h-4 w-4 shrink-0 "+(r?"text-blue-600":"text-gray-400")}),
|
|
14
|
+
/* @__PURE__ */f("span",{className:"min-w-0 truncate "+(r?"text-blue-600":"text-gray-400"),children:r||y.addLink})]}),w&&/* @__PURE__ */f("div",{id:j,className:"mt-2",children:/* @__PURE__ */f(k,{value:r,label:y.linkOf(e,r),kinds:s,rules:m,filtersFor:g,onApply:(e,a)=>{void 0===a?i(e):i(e,a),F()},onRemove:r?()=>{i(""),F()}:void 0,onCancel:F})})]})}export{k as LinkPicker,w as TextLinkField};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{isFocusableEntry as e,menuStatusIds as t,renderMenuEntries as r}from"./chunk-53ROHXAV.js";import{
|
|
1
|
+
import{isFocusableEntry as e,menuStatusIds as t,renderMenuEntries as r}from"./chunk-53ROHXAV.js";import{useTabLayer as n,focusableIn as o}from"./chunk-CDAJKLGL.js";import{PopupMenu as i,PopupMenuDivider as a}from"./chunk-O6JX6RDX.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{placeMenu as d,popupBounds as c,followAnchor as u}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as p}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useState as m,useRef as h,useId as g,useCallback as v,useEffect as b}from"react";import{jsxs as y,jsx as x}from"react/jsx-runtime";var k=/(^|[\s:])!?z-/,w={paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:"0.25rem",paddingBottom:"0.25rem"};function D({trigger:D,items:L,align:j="end",side:A="bottom","aria-label":C,className:E="",triggerClassName:K,menuClassName:S="",minWidth:W=180,linkAs:H,disabled:$,id:N,"aria-describedby":T,"aria-disabled":U=!1,onOpenChange:J,footer:B,footerLabel:I}){const[R,q]=m(!1),[G,M]=m(-1),O=h(null),X=h(null),z=h(null),P=h(null),V=h(null),Q=null!=B&&!1!==B,Y=h({text:"",at:0}),F=g(),Z=g(),_=N??Z,ee=h(J);ee.current=J;const te=h(R);te.current=R;const re=v(e=>{q(!1),te.current&&(te.current=!1,ee.current?.(!1)),e&&X.current?.focus()},[]),ne=(t,r)=>{const n=L.length;for(let o=0;o<n;o+=1){const i=((t+r*o)%n+n)%n;if(e(L[i]))return i}return-1},oe=()=>z.current?.closest("[data-popup-menu-tree]")??null;b(()=>{if(!R)return;const e=e=>{const t=e.target;if(O.current?.contains(t)||oe()?.contains(t))return;const r=oe()?.getAttribute("data-popup-menu-tree"),n=t.closest?.("[data-popup-menu-tree]");r&&n?.getAttribute("data-popup-menu-tree")===r||re(!1)};document.addEventListener("pointerdown",e,!0);const t=l(()=>re(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[R,re]);const ie=v(()=>{const e=oe(),t=X.current;if(!e||!t)return;const r=e.style;r.left="0px",r.top="0px",r.maxWidth="none",r.maxHeight="none";const n={width:e.offsetWidth,height:e.offsetHeight},o=d({trigger:t.getBoundingClientRect(),menu:n,bounds:c(t),align:j,side:A});r.left=`${o.left}px`,r.top=`${o.top}px`,r.maxWidth=`${o.maxWidth}px`,r.maxHeight=`${o.maxHeight}px`,r.overflowY=n.height>o.maxHeight?"auto":"",e.dataset.side=o.side,e.dataset.align=j},[j,A]);p(()=>{R&&ie()}),b(()=>{if(R)return u(()=>X.current,ie)},[R,ie]),b(()=>{if(!R)return;const t=z.current,r=e(L[G])?t?.querySelector(`[data-dropdown-index="${G}"]`):null;(r??t)?.focus({preventScroll:!0})},[R,G]),b(()=>{if(R)return f(e=>"Escape"===e.key&&(re(!0),!0),()=>P.current)},[R,re]),n(P,R&&Q);const ae=h(null),le=e=>"first"===e?ne(0,1):ne(L.length-1,-1),se=e=>{M(le(e)),q(!0),te.current||(te.current=!0,ae.current=e,J?.(!0))};p(()=>{const e=ae.current;if(!R||!e)return;ae.current=null;const t=le(e);t!==G&&M(t)});const de=t(L,F),ce="function"==typeof B?B({close:()=>re(!0)}):B,ue={...k.test(S)?{}:{zIndex:s.popup},minWidth:W};/* @__PURE__ */
|
|
2
2
|
return y("div",{ref:O,className:`relative inline-flex ${E}`.trim(),children:[
|
|
3
3
|
/* @__PURE__ */x("button",{ref:X,id:_,type:"button","aria-haspopup":"menu","aria-expanded":R,"aria-controls":R?F:void 0,"aria-label":C,"aria-describedby":T,"aria-disabled":U||void 0,disabled:$,onClick:()=>{U||(R?re(!1):se("first"))},onKeyDown:e=>{U||("ArrowDown"===e.key||"Enter"===e.key||" "===e.key?(e.preventDefault(),se("first")):"ArrowUp"===e.key&&(e.preventDefault(),se("last")))},className:K??"inline-flex items-center justify-center rounded-(--radius-control) text-gray-600 transition-colors not-disabled:not-aria-disabled:hover:bg-gray-100 not-disabled:not-aria-disabled:hover:text-gray-900 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] disabled:cursor-not-allowed disabled:opacity-60 "+(C?"h-8 min-w-8 px-0":"h-8 min-w-8 gap-2 px-3"),children:D}),R&&
|
|
4
|
-
/* @__PURE__ */x(
|
|
5
|
-
/* @__PURE__ */x("div",{ref:z,id:F,role:"menu","aria-orientation":"vertical","aria-label":C,"aria-labelledby":C?void 0:_,"aria-describedby":de,tabIndex:-1,onKeyDown:t=>{if(!t.target.closest?.("[data-popup-submenu-panel]")||"Tab"===t.key)if("ArrowDown"===t.key)t.preventDefault(),M(ne(G+1,1));else if("ArrowUp"===t.key)t.preventDefault(),M(ne(G-1,-1));else if("Home"===t.key)t.preventDefault(),M(ne(0,1));else if("End"===t.key)t.preventDefault(),M(ne(L.length-1,-1));else if("Tab"===t.key){t.preventDefault();const e=!t.shiftKey&&V.current?
|
|
6
|
-
/* @__PURE__ */x("div",{"aria-hidden":"true",children:/* @__PURE__ */x(
|
|
4
|
+
/* @__PURE__ */x(i,{portal:!0,className:S,style:ue,children:/* @__PURE__ */y("div",{ref:P,children:[
|
|
5
|
+
/* @__PURE__ */x("div",{ref:z,id:F,role:"menu","aria-orientation":"vertical","aria-label":C,"aria-labelledby":C?void 0:_,"aria-describedby":de,tabIndex:-1,onKeyDown:t=>{if(!t.target.closest?.("[data-popup-submenu-panel]")||"Tab"===t.key)if("ArrowDown"===t.key)t.preventDefault(),M(ne(G+1,1));else if("ArrowUp"===t.key)t.preventDefault(),M(ne(G-1,-1));else if("Home"===t.key)t.preventDefault(),M(ne(0,1));else if("End"===t.key)t.preventDefault(),M(ne(L.length-1,-1));else if("Tab"===t.key){t.preventDefault();const e=!t.shiftKey&&V.current?o(V.current)[0]:void 0;e?e.focus({preventScroll:!0}):re(!0)}else if(" "===t.key){const e=t.target;e.matches?.("a[href]")&&(t.preventDefault(),e.click())}else 1!==t.key.length||t.ctrlKey||t.metaKey||t.altKey||(t=>{const r=Date.now(),n=t.key.toLowerCase(),o=r-Y.current.at<500?Y.current.text+n:n;Y.current={text:o,at:r};const i=[...o].every(e=>e===o[0]),a=i?o[0]:o,l=i?G+1:Math.max(G,0),s=z.current,d=L.length;for(let r=0;r<d;r+=1){const n=((l+r)%d+d)%d;if(e(L[n])&&(s?.querySelector(`[data-dropdown-index="${n}"]`)?.textContent?.trim().toLowerCase()??"").startsWith(a))return t.preventDefault(),void M(n)}})(t)},children:r(L,{menuId:F,choose:e=>{e.disabled||(re(!0),e.onSelect())},toggle:e=>{e.disabled||e.onSelect()},followLink:()=>re(!0),rowProps:(e,t)=>({"data-dropdown-index":e,tabIndex:e===G?0:-1,onMouseEnter:()=>{t.disabled||V.current?.contains(document.activeElement)||M(e)}}),linkAs:H})}),Q&&/* @__PURE__ */y("div",{ref:V,role:"group","aria-label":I,"data-dropdown-footer":"",onKeyDown:e=>{const t=V.current;if("Tab"!==e.key||!t||!t.contains(e.target))return;const r=o(t),n=document.activeElement;if(e.shiftKey){if(r.length>0&&n!==r[0])return;e.preventDefault();const t=z.current?.querySelector(`[data-dropdown-index="${G}"]`);return void(t??z.current)?.focus({preventScroll:!0})}r.length>0&&n!==r[r.length-1]||(e.preventDefault(),re(!0))},children:[
|
|
6
|
+
/* @__PURE__ */x("div",{"aria-hidden":"true",children:/* @__PURE__ */x(a,{})}),
|
|
7
7
|
/* @__PURE__ */x("div",{style:w,children:ce})]})]})})]})}export{D as DropdownMenu};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{InputNumber_default as e}from"./chunk-
|
|
1
|
+
import{InputNumber_default as e}from"./chunk-4SQNLU2Q.js";import{IconButton_default as r}from"./chunk-4CANQ3B3.js";import{Icon as a}from"./chunk-KIBL6M3T.js";import{Tooltip as i}from"./chunk-22S6LG6D.js";import{useShellStrings as n}from"./chunk-E6UCGCOC.js";import{useState as l,useRef as o}from"react";import{jsxs as t,jsx as s}from"react/jsx-runtime";var d={tl:"",tr:"rotate-90",br:"rotate-180",bl:"-rotate-90"},c=["tl","tr","bl","br"];function u({label:u,value:m,corners:f,onChange:p,radius:h=null,onRadiusChange:v,radiusLabel:b,radiusMin:k=0,radiusMax:g,radiusStep:x=1,radiusPlaceholder:w,disabled:y=!1,disabledReason:C,id:j,className:A=""}){const N=n(),K=function(e){const r=c.map(r=>e.find(e=>e.value===r));for(const a of e){if(c.includes(a.value))continue;const e=r.findIndex(e=>void 0===e);-1===e?r.push(a):r[e]=a}return r.filter(e=>void 0!==e)}(f),[L,M]=l(0),D=o(null);/* @__PURE__ */
|
|
2
2
|
return t("div",{id:j,role:"group","aria-label":u,className:`flex min-w-0 flex-wrap items-center gap-2 ${A}`.trim(),children:[v&&
|
|
3
|
-
/* @__PURE__ */s("div",{className:"w-30 shrink-0",children:/* @__PURE__ */s(e,{value:h,onChange:v,min:k,max:g,step:x,precision:0,placeholder:w,prefix:/* @__PURE__ */s("span",{"data-radius-mark":"","aria-hidden":"true",children:
|
|
4
|
-
/* @__PURE__ */s("div",{ref:D,"data-corners-grid":"",className:"grid shrink-0 grid-cols-2 gap-1",onKeyDown:e=>{if(e.altKey||e.ctrlKey||e.metaKey)return;const r=Array.from(D.current?.querySelectorAll("button[data-corner]")??[]),a=r.indexOf(document.activeElement);if(-1===a)return;const i=a%2,n=Math.floor(a/2),l="ArrowRight"===e.key?2*n+1:"ArrowLeft"===e.key?2*n:"ArrowDown"===e.key?2+i:"ArrowUp"===e.key?i:null;null!==l&&(e.preventDefault(),l<r.length&&r[l].focus())},children:
|
|
3
|
+
/* @__PURE__ */s("div",{className:"w-30 shrink-0",children:/* @__PURE__ */s(e,{value:h,onChange:v,min:k,max:g,step:x,precision:0,placeholder:w,prefix:/* @__PURE__ */s("span",{"data-radius-mark":"","aria-hidden":"true",children:N.corners.radiusMark}),suffix:N.corners.unit,steppers:"compact",disabled:y,"aria-label":b??N.corners.radius})}),
|
|
4
|
+
/* @__PURE__ */s("div",{ref:D,"data-corners-grid":"",className:"grid shrink-0 grid-cols-2 gap-1",onKeyDown:e=>{if(e.altKey||e.ctrlKey||e.metaKey)return;const r=Array.from(D.current?.querySelectorAll("button[data-corner]")??[]),a=r.indexOf(document.activeElement);if(-1===a)return;const i=a%2,n=Math.floor(a/2),l="ArrowRight"===e.key?2*n+1:"ArrowLeft"===e.key?2*n:"ArrowDown"===e.key?2+i:"ArrowUp"===e.key?i:null;null!==l&&(e.preventDefault(),l<r.length&&r[l].focus())},children:K.map((e,n)=>{const l=m.includes(e.value),o=y||!0===e.disabled,t=o&&(!0===e.disabled&&e.title||(y?C:void 0))||void 0,c=/* @__PURE__ */s(r,{"aria-pressed":l,"aria-label":e.label,"aria-disabled":o||void 0,disabledReason:t,"data-corner":e.value,size:"sm",tabIndex:n===L?0:-1,onFocus:()=>M(n),onClick:()=>{o||p(l?m.filter(r=>r!==e.value):[...m,e.value])},children:/* @__PURE__ */s(a,{name:"corner",strokeWidth:2,className:["h-4 w-4",d[e.value]??""].filter(Boolean).join(" ")})},e.value);return t?c:/* @__PURE__ */s(i,{content:e.title??e.label,children:c},e.value)})})]})}export{u as CornersInput};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{ColoredBadge as e}from"./chunk-
|
|
1
|
+
import{ColoredBadge as e}from"./chunk-XWLWG4HS.js";import{Button_default as n}from"./chunk-4IU5BSVE.js";import{useShellStrings as t}from"./chunk-E6UCGCOC.js";import{useId as a}from"react";import{jsx as m,jsxs as i}from"react/jsx-runtime";function s({items:s,heading:l,emptyText:r,className:c=""}){const o=t().media,d=a();return s.length?/* @__PURE__ */i("div",{className:c||void 0,children:[
|
|
2
2
|
/* @__PURE__ */m("p",{id:d,className:"text-xs font-medium text-gray-500",children:l??o.usedIn(s.length)}),
|
|
3
3
|
/* @__PURE__ */m("ul",{"aria-labelledby":d,className:"mt-2 flex flex-col gap-1",children:s.map(t=>/* @__PURE__ */i("li",{className:"flex min-w-0 items-center gap-2 text-sm",children:[null!=t.kind&&/* @__PURE__ */m(e,{size:"xs",className:"flex-none",children:t.kind}),t.onOpen?/* @__PURE__ */m(n,{variant:"link",size:"sm",onClick:t.onOpen,className:"min-w-0 text-left",children:t.name}):/* @__PURE__ */m("span",{className:"min-w-0 break-words text-gray-700",children:t.name})]},t.key))})]}):/* @__PURE__ */m("p",{className:`text-sm text-gray-500 ${c}`.trim(),children:r??o.notUsed})}export{s as MediaUsedInList};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-VU6VPKM3.js";import{Select_default as a}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-VU6VPKM3.js";import{Select_default as a}from"./chunk-HJH4WIBC.js";import{Input_default as r}from"./chunk-UNEJ2ABD.js";import{Pagination as t}from"./chunk-M5P6A7KS.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-D323R2FT.js";import{Button_default as l}from"./chunk-4IU5BSVE.js";import{Icon as c}from"./chunk-KIBL6M3T.js";import{TH_ONE_LINE as m}from"./chunk-6KO5VTL7.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[c,u]=n(1),[g,f]=n(""),[y,v]=n("");/* @__PURE__ */
|
|
2
2
|
return d(i,{groups:h,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */o("div",{className:"mx-auto max-w-5xl space-y-4",children:[
|
|
3
3
|
/* @__PURE__ */o("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Members"}),
|
|
5
|
-
/* @__PURE__ */d(
|
|
5
|
+
/* @__PURE__ */d(l,{size:"sm",children:"Invite member"})]}),
|
|
6
6
|
/* @__PURE__ */o(e,{padded:!1,children:[
|
|
7
7
|
/* @__PURE__ */o("div",{className:"flex flex-wrap items-center gap-2 border-b border-gray-100 p-3",children:[
|
|
8
8
|
/* @__PURE__ */d("div",{className:"min-w-48 flex-1",children:/* @__PURE__ */d(r,{value:y,onChange:e=>v(e.target.value),placeholder:"Search members…",leftIcon:/* @__PURE__ */d(x,{})})}),
|
|
9
9
|
/* @__PURE__ */d("div",{className:"w-40",children:/* @__PURE__ */d(a,{value:g,onChange:f,placeholder:"All roles",options:[{value:"admin",label:"Admin"},{value:"editor",label:"Editor"},{value:"viewer",label:"Viewer"}]})}),
|
|
10
|
-
/* @__PURE__ */d(
|
|
10
|
+
/* @__PURE__ */d(l,{variant:"secondary",size:"sm",children:"Filter"})]}),
|
|
11
11
|
/* @__PURE__ */o("table",{className:"w-full text-sm",children:[
|
|
12
12
|
/* @__PURE__ */d("thead",{children:/* @__PURE__ */o("tr",{className:"border-b border-gray-100 text-left text-xs uppercase tracking-wide text-gray-400",children:[
|
|
13
|
-
/* @__PURE__ */d("th",{className:`${
|
|
14
|
-
/* @__PURE__ */d("th",{className:`${
|
|
15
|
-
/* @__PURE__ */d("th",{className:`${
|
|
16
|
-
/* @__PURE__ */d("th",{className:`${
|
|
13
|
+
/* @__PURE__ */d("th",{className:`${m} px-4 py-2 font-medium`,children:"Name"}),
|
|
14
|
+
/* @__PURE__ */d("th",{className:`${m} px-4 py-2 font-medium`,children:"Role"}),
|
|
15
|
+
/* @__PURE__ */d("th",{className:`${m} px-4 py-2 font-medium`,children:"Status"}),
|
|
16
|
+
/* @__PURE__ */d("th",{className:`${m} px-4 py-2 font-medium text-right`,children:"Actions"})]})}),
|
|
17
17
|
/* @__PURE__ */d("tbody",{className:"divide-y divide-gray-100",children:p.map(e=>/* @__PURE__ */o("tr",{className:"text-gray-700 hover:bg-gray-50",children:[
|
|
18
18
|
/* @__PURE__ */o("td",{className:"px-4 py-3",children:[
|
|
19
19
|
/* @__PURE__ */d("div",{className:"font-medium text-gray-900",children:e.name}),
|
|
20
20
|
/* @__PURE__ */d("div",{className:"text-xs text-gray-400",children:e.email})]}),
|
|
21
21
|
/* @__PURE__ */d("td",{className:"px-4 py-3",children:e.role}),
|
|
22
22
|
/* @__PURE__ */d("td",{className:"px-4 py-3",children:/* @__PURE__ */d(s,{status:e.status})}),
|
|
23
|
-
/* @__PURE__ */d("td",{className:"px-4 py-3 text-right",children:/* @__PURE__ */d(
|
|
23
|
+
/* @__PURE__ */d("td",{className:"px-4 py-3 text-right",children:/* @__PURE__ */d(l,{variant:"ghost",size:"sm",children:"Edit"})})]},e.email))})]}),
|
|
24
24
|
/* @__PURE__ */o("div",{className:"flex items-center justify-between border-t border-gray-100 p-3",children:[
|
|
25
25
|
/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:"Showing 1–6 of 48"}),
|
|
26
|
-
/* @__PURE__ */d(t,{page:
|
|
27
|
-
return d(
|
|
26
|
+
/* @__PURE__ */d(t,{page:c,pageCount:8,onPageChange:u,showEdges:!0})]})]})]})})})}function x(){/* @__PURE__ */
|
|
27
|
+
return d(c,{name:"search",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})}export{u as DataTablePage};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{StatCard as e,Card as a}from"./chunk-VU6VPKM3.js";import{Avatar as t}from"./chunk-MMFJBWJC.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-NID6MGGC.js";import{ColumnChart as l}from"./chunk-ETF7LAYZ.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-D323R2FT.js";import{
|
|
1
|
+
import{StatCard as e,Card as a}from"./chunk-VU6VPKM3.js";import{Avatar as t}from"./chunk-MMFJBWJC.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-NID6MGGC.js";import{ColumnChart as l}from"./chunk-ETF7LAYZ.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-D323R2FT.js";import{Button_default as c}from"./chunk-4IU5BSVE.js";import{TH_ONE_LINE as n}from"./chunk-6KO5VTL7.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
|
|
2
2
|
return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */m("div",{className:"mx-auto max-w-6xl space-y-6",children:[
|
|
3
3
|
/* @__PURE__ */m("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */m("div",{children:[
|
|
5
5
|
/* @__PURE__ */o("h1",{className:"text-xl font-semibold text-gray-900",children:"Dashboard"}),
|
|
6
6
|
/* @__PURE__ */o("p",{className:"text-sm text-gray-500",children:"Overview of your store this month"})]}),
|
|
7
7
|
/* @__PURE__ */m("div",{className:"flex items-center gap-2",children:[
|
|
8
|
-
/* @__PURE__ */o(
|
|
9
|
-
/* @__PURE__ */o(
|
|
8
|
+
/* @__PURE__ */o(c,{variant:"secondary",size:"sm",children:"Export"}),
|
|
9
|
+
/* @__PURE__ */o(c,{size:"sm",children:"New report"})]})]}),
|
|
10
10
|
/* @__PURE__ */m("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[
|
|
11
11
|
/* @__PURE__ */o(e,{label:"Revenue",value:"$38.2k",delta:{value:"12%",direction:"up"}}),
|
|
12
12
|
/* @__PURE__ */o(e,{label:"Orders",value:"1,204",delta:{value:"4%",direction:"up"}}),
|
|
@@ -17,10 +17,10 @@ return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow
|
|
|
17
17
|
/* @__PURE__ */o(a,{header:"Traffic sources",children:/* @__PURE__ */o(s,{variant:"ring",size:180,segments:g,centerLabel:"100%"})})]}),
|
|
18
18
|
/* @__PURE__ */o(a,{header:"Recent orders",padded:!1,children:/* @__PURE__ */m("table",{className:"w-full text-sm",children:[
|
|
19
19
|
/* @__PURE__ */o("thead",{children:/* @__PURE__ */m("tr",{className:"border-b border-gray-100 text-left text-xs uppercase tracking-wide text-gray-400",children:[
|
|
20
|
-
/* @__PURE__ */o("th",{className:`${
|
|
21
|
-
/* @__PURE__ */o("th",{className:`${
|
|
22
|
-
/* @__PURE__ */o("th",{className:`${
|
|
23
|
-
/* @__PURE__ */o("th",{className:`${
|
|
20
|
+
/* @__PURE__ */o("th",{className:`${n} px-4 py-2 font-medium`,children:"Order"}),
|
|
21
|
+
/* @__PURE__ */o("th",{className:`${n} px-4 py-2 font-medium`,children:"Customer"}),
|
|
22
|
+
/* @__PURE__ */o("th",{className:`${n} px-4 py-2 font-medium`,children:"Total"}),
|
|
23
|
+
/* @__PURE__ */o("th",{className:`${n} px-4 py-2 font-medium`,children:"Status"})]})}),
|
|
24
24
|
/* @__PURE__ */o("tbody",{className:"divide-y divide-gray-100",children:x.map(e=>/* @__PURE__ */m("tr",{className:"text-gray-700",children:[
|
|
25
25
|
/* @__PURE__ */o("td",{className:"px-4 py-2 font-mono text-xs text-gray-500",children:e.id}),
|
|
26
26
|
/* @__PURE__ */o("td",{className:"px-4 py-2",children:/* @__PURE__ */m("span",{className:"flex items-center gap-2",children:[
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{MOVE_KEYS as e,MoveGrip as r,MoveHint as t,moveFromKey as a}from"./chunk-3PGK3VFS.js";import{GROUP_COLORS as n}from"./chunk-D323R2FT.js";import{
|
|
1
|
+
import{MOVE_KEYS as e,MoveGrip as r,MoveHint as t,moveFromKey as a}from"./chunk-3PGK3VFS.js";import{GROUP_COLORS as n}from"./chunk-D323R2FT.js";import{Icon as o}from"./chunk-KIBL6M3T.js";import{OneLineLabel as i}from"./chunk-6KO5VTL7.js";import{Tooltip as s}from"./chunk-22S6LG6D.js";import{useBrowserLayoutEffect as l}from"./chunk-D65T4H6J.js";import{useShellStrings as c}from"./chunk-E6UCGCOC.js";import{useRef as d,useCallback as u,useId as p,isValidElement as m}from"react";import{jsx as g,jsxs as h}from"react/jsx-runtime";var f='[role="treeitem"]';function b(e){return[...e.querySelectorAll(f)].filter(r=>{for(let t=r.parentElement?.closest('[role="group"]');t&&e.contains(t);t=t.parentElement?.closest('[role="group"]')??null)if(t.hasAttribute("hidden"))return!1;return!0})}function y({"aria-label":e,"aria-labelledby":r,children:t,className:a="",rootProps:n}){const o=d(null);l(()=>{const e=o.current;if(!e)return;const r=[...e.querySelectorAll(f)];if(0===r.length)return;const t=r.find(e=>e===document.activeElement)??r.find(e=>"true"===e.getAttribute("aria-selected"))??b(e)[0]??r[0];for(const e of r)e.tabIndex=e===t?0:-1});const i=u(e=>{n?.onKeyDown?.(e);const r=o.current,t=e.target.closest?.(f);if(!r||!t||e.target!==t||e.defaultPrevented)return;if(e.altKey||e.ctrlKey||e.metaKey)return;const a=b(r),i=a.indexOf(t),s=Number(t.getAttribute("aria-level")??"1"),l=t=>{e.preventDefault(),function(e,r){if(r){for(const t of e.querySelectorAll(f))t.tabIndex=t===r?0:-1;r.focus()}}(r,t)};switch(e.key){case"ArrowDown":l(a[i+1]);break;case"ArrowUp":l(a[i-1]);break;case"Home":l(a[0]);break;case"End":l(a[a.length-1]);break;case"ArrowRight":if("true"===t.getAttribute("aria-expanded")){const r=a[i+1];r&&Number(r.getAttribute("aria-level")??"1")>s?l(r):e.preventDefault()}break;case"ArrowLeft":if("true"!==t.getAttribute("aria-expanded"))for(let e=i-1;e>=0;e--)if(Number(a[e].getAttribute("aria-level")??"1")<s){l(a[e]);break}}},[n]);/* @__PURE__ */
|
|
2
2
|
return g("div",{...n,ref:o,role:"tree","aria-label":r?void 0:e,"aria-labelledby":r,onKeyDown:i,className:`flex flex-col gap-1 ${a}`.trim(),children:t})}function v({children:e,hidden:r,className:t=""}){/* @__PURE__ */
|
|
3
|
-
return g("div",{role:"group",hidden:r,className:`ml-4 flex flex-col gap-1 border-l border-gray-200 pl-2 ${t}`.trim(),children:e})}var x=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full px-2","text-2xs font-medium normal-case tabular-nums tracking-normal"].join(" "),k=`${x} bg-[color:color-mix(in_srgb,var(--ink-faint)_12%,transparent)] text-gray-600`;function w(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&!m(e)&&"label"in e}function N(e){if(null==e||!1===e)return null;const r=Array.isArray(e)&&e.length>0&&e.every(w)?e:w(e)?[e]:null;return r?r.map((e,r)=>/* @__PURE__ */g("span",{"data-tree-count":"","data-tone":e.tone,className:e.tone?`${x} ${n[e.tone]}`:k,children:e.label},r)):/* @__PURE__ */g("span",{"data-tree-count":"",className:k,children:e})}function A({children:e,count:r,expanded:t,onToggle:a}){const n=void 0!==t,
|
|
4
|
-
/* @__PURE__ */g("span",{"data-tree-label-text":"",className:"flex min-w-0 flex-1 text-left",children:/* @__PURE__ */g(
|
|
5
|
-
/* @__PURE__ */g("span",{"aria-hidden":"true","data-tree-caret":"",className:"flex h-4 w-4 shrink-0 items-center justify-center",children:j(!!t)}),
|
|
6
|
-
/* @__PURE__ */g("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
7
|
-
return h("div",{...I,role:"treeitem","aria-level":
|
|
3
|
+
return g("div",{role:"group",hidden:r,className:`ml-4 flex flex-col gap-1 border-l border-gray-200 pl-2 ${t}`.trim(),children:e})}var x=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full px-2","text-2xs font-medium normal-case tabular-nums tracking-normal"].join(" "),k=`${x} bg-[color:color-mix(in_srgb,var(--ink-faint)_12%,transparent)] text-gray-600`;function w(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&!m(e)&&"label"in e}function N(e){if(null==e||!1===e)return null;const r=Array.isArray(e)&&e.length>0&&e.every(w)?e:w(e)?[e]:null;return r?r.map((e,r)=>/* @__PURE__ */g("span",{"data-tree-count":"","data-tone":e.tone,className:e.tone?`${x} ${n[e.tone]}`:k,children:e.label},r)):/* @__PURE__ */g("span",{"data-tree-count":"",className:k,children:e})}function A({children:e,count:r,expanded:t,onToggle:a}){const n=void 0!==t,o=
|
|
4
|
+
/* @__PURE__ */g("span",{"data-tree-label-text":"",className:"flex min-w-0 flex-1 text-left",children:/* @__PURE__ */g(i,{children:e})}),s=null!=r&&!1!==r&&/* @__PURE__ */g("span",{"data-tree-count":"",className:k,children:r}),l="text-xs font-semibold uppercase tracking-wide text-gray-500";return n?/* @__PURE__ */g("div",{role:"presentation",className:"pb-1 pt-3",children:/* @__PURE__ */h("button",{type:"button","aria-expanded":t,onClick:a,className:["flex w-full items-center gap-2 rounded-md px-2 hover:text-gray-900","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",l].join(" "),children:[
|
|
5
|
+
/* @__PURE__ */g("span",{"aria-hidden":"true","data-tree-caret":"",className:"flex h-4 w-4 shrink-0 items-center justify-center",children:j(!!t)}),o,s]})}):/* @__PURE__ */h("div",{role:"presentation",className:`flex items-center gap-2 px-2 pb-1 pt-3 ${l}`,children:[
|
|
6
|
+
/* @__PURE__ */g("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),o,s]})}var j=e=>/* @__PURE__ */g(o,{name:"chevron-right","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3 transition-transform "+(e?"rotate-90":"")}),D={backgroundColor:"inherit",maskImage:"linear-gradient(to right, transparent, black 12px)",WebkitMaskImage:"linear-gradient(to right, transparent, black 12px)"};function C({label:n,level:o=1,icon:s,preview:l,selected:c=!1,tone:d,expanded:u,onToggle:m,onSelect:f,muted:b=!1,badge:y,actions:v,actionsPinned:x=!1,actionsOverlay:k=!0,rename:w,drop:A,dragging:C=!1,draggable:P=!1,dragHint:$,onMove:K,rowProps:I,className:T=""}){const E=void 0!==u,S=p(),H=[I?.["aria-describedby"],K?S:void 0].filter(Boolean).join(" ")||void 0,L="shared"===d?"text-[color:var(--status-success-soft-ink)]":null,O=c?L?`bg-[var(--status-success-soft)] ${L}`:"bg-blue-50 text-blue-700":"into"===A?`bg-blue-50 ${L??"text-gray-900"}`:`${L??"text-gray-700"} hover:bg-gray-100`;/* @__PURE__ */
|
|
7
|
+
return h("div",{...I,role:"treeitem","aria-level":o,"aria-selected":c,"aria-expanded":E?u:void 0,"data-tone":d,tabIndex:c?0:-1,"aria-keyshortcuts":I?.["aria-keyshortcuts"]??(K?e:void 0),"aria-describedby":H,"data-drop":A,"data-draggable":P||void 0,onKeyDown:e=>{if(I?.onKeyDown?.(e),e.target!==e.currentTarget||e.defaultPrevented)return;const r=a(e);r&&K?(e.preventDefault(),K(r)):"Enter"!==e.key&&" "!==e.key||!f?("ArrowRight"===e.key&&E&&!u&&m||"ArrowLeft"===e.key&&E&&u&&m)&&(e.preventDefault(),m()):(e.preventDefault(),f())},onClick:e=>{I?.onClick?.(e),e.defaultPrevented||f?.()},className:["group/treerow relative flex h-8 shrink-0 select-none items-center gap-2 rounded-md px-2 text-sm",P?"cursor-grab active:cursor-grabbing":"cursor-pointer","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",O,"into"===A?"ring-2 ring-inset ring-[color:var(--rosh-drop-ring)]":"",C?"opacity-40":"",T].filter(Boolean).join(" "),children:["before"===A&&/* @__PURE__ */g("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -top-0.5 h-0.5 rounded-full bg-blue-500"}),"after"===A&&/* @__PURE__ */g("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -bottom-0.5 h-0.5 rounded-full bg-blue-500"}),P&&
|
|
8
8
|
/* @__PURE__ */g(r,{marker:"tree",hint:$,dragging:C,revealClassName:"group-hover/treerow:opacity-100"}),
|
|
9
9
|
/* @__PURE__ */g("span",E?{"aria-hidden":"true","data-tree-caret":"",onClick:e=>{e.stopPropagation(),m?.()},className:"flex h-4 w-4 shrink-0 items-center justify-center rounded text-gray-500 hover:bg-gray-200 hover:text-gray-900",children:j(!!u)}:{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),null!=s&&/* @__PURE__ */g("span",{"aria-hidden":"true",className:"flex h-4 w-4 shrink-0 items-center justify-center "+(b?"text-gray-400":""),children:s}),
|
|
10
10
|
/* @__PURE__ */h("span",{className:"relative flex min-w-0 flex-1 items-center gap-2",children:[w??
|
|
11
|
-
/* @__PURE__ */g("span",{className:`flex min-w-0 ${c?"font-semibold":"font-medium"} ${b?"text-gray-400 line-through":""}`,children:/* @__PURE__ */h(
|
|
11
|
+
/* @__PURE__ */g("span",{className:`flex min-w-0 ${c?"font-semibold":"font-medium"} ${b?"text-gray-400 line-through":""}`,children:/* @__PURE__ */h(i,{children:[n,null!=l&&/* @__PURE__ */g("span",{className:"ml-2 font-normal text-gray-500",children:l})]})}),N(y),null!=v&&!k&&/* @__PURE__ */g("span",{"data-tree-actions":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),className:"ml-auto flex shrink-0 items-center gap-0.5 transition-opacity "+(x||b?"opacity-100":"opacity-0 group-hover/treerow:opacity-100 group-focus-within/treerow:opacity-100"),children:v})]}),null!=v&&k&&
|
|
12
12
|
/* @__PURE__ */h("span",{"data-tree-actions":"","data-tree-actions-overlay":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),style:D,className:"absolute inset-y-0 right-0 grid rounded-r-md transition-opacity "+(x||b||c?"opacity-100":"pointer-events-none opacity-0 group-hover/treerow:pointer-events-auto group-hover/treerow:opacity-100 group-focus-within/treerow:pointer-events-auto group-focus-within/treerow:opacity-100"),children:[
|
|
13
13
|
/* @__PURE__ */g("span",{"aria-hidden":"true","data-tree-actions-scrim":"",className:"col-start-1 row-start-1",style:{background:"var(--rosh-tree-ground, var(--surface))"}}),
|
|
14
14
|
/* @__PURE__ */g("span",{"aria-hidden":"true",className:"col-start-1 row-start-1",style:{backgroundColor:"inherit"}}),
|
|
15
15
|
/* @__PURE__ */g("span",{className:"col-start-1 row-start-1 flex items-center gap-0.5 pl-4 pr-2",children:v})]}),K&&/* @__PURE__ */g(t,{id:S})]})}function P({onAdd:e,label:r,drop:t=!1,slotProps:a}){const n=c().tree,o=t?n.dropHere:r??n.empty,i="flex min-h-8 w-full items-center gap-2 rounded-md border border-dashed px-3 text-sm "+(t?"border-blue-500 bg-blue-50 text-blue-700":"border-gray-300 text-gray-500");/* @__PURE__ */
|
|
16
16
|
return g("div",{...a,role:"presentation","data-drop":t||void 0,children:e?/* @__PURE__ */h("button",{type:"button",onClick:e,className:`${i} text-left hover:bg-gray-100 hover:text-gray-900 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]`,children:[
|
|
17
|
-
/* @__PURE__ */g("span",{"aria-hidden":"true",children:"+"}),o]}):/* @__PURE__ */g("span",{className:i,children:o})})}function $({onInsert:e,label:r,drop:t=!1,seamProps:a}){const n=c().tree,
|
|
17
|
+
/* @__PURE__ */g("span",{"aria-hidden":"true",children:"+"}),o]}):/* @__PURE__ */g("span",{className:i,children:o})})}function $({onInsert:e,label:r,drop:t=!1,seamProps:a}){const n=c().tree,i=r??n.insertHere,l=t?"opacity-100":e?"opacity-0 group-hover/seam:opacity-100 group-focus-within/seam:opacity-100":"opacity-0";/* @__PURE__ */
|
|
18
18
|
return h("div",{...a,role:"presentation","data-tree-seam":"","data-drop":t||void 0,className:`group/seam relative z-10 -my-1 h-1 shrink-0 ${a?.className??""}`.trim(),children:[
|
|
19
19
|
/* @__PURE__ */g("span",{"aria-hidden":"true",className:"absolute inset-x-0 -bottom-1 -top-1"}),
|
|
20
|
-
/* @__PURE__ */g("span",{"aria-hidden":"true","data-tree-seam-line":"",className:`pointer-events-none absolute inset-x-2 top-1/2 h-0.5 -translate-y-1/2 rounded-full bg-blue-500 transition-opacity ${l}`}),e&&/* @__PURE__ */g(s,{content:
|
|
20
|
+
/* @__PURE__ */g("span",{"aria-hidden":"true","data-tree-seam-line":"",className:`pointer-events-none absolute inset-x-2 top-1/2 h-0.5 -translate-y-1/2 rounded-full bg-blue-500 transition-opacity ${l}`}),e&&/* @__PURE__ */g(s,{content:i,className:"absolute left-1/2 top-1/2 inline-flex -translate-x-1/2 -translate-y-1/2",children:/* @__PURE__ */g("button",{type:"button","aria-label":i,onClick:e,className:"flex h-5 w-5 items-center justify-center rounded-full bg-blue-600 text-white transition rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(t?"scale-75 opacity-0":"scale-75 opacity-0 group-hover/seam:scale-100 group-hover/seam:opacity-100 focus-visible:scale-100 focus-visible:opacity-100"),children:/* @__PURE__ */g(o,{name:"add","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3"})})})]})}export{y as Tree,P as TreeEmptySlot,v as TreeGroup,A as TreeGroupLabel,C as TreeRow,$ as TreeSeam};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{InputNumber_default as a}from"./chunk-
|
|
1
|
+
import{InputNumber_default as a}from"./chunk-4SQNLU2Q.js";import{Icon as e}from"./chunk-KIBL6M3T.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";var n="h-3.5 w-3.5",l={x:/* @__PURE__ */i(e,{name:"nudge-x","aria-hidden":"true",className:n}),y:/* @__PURE__ */i(e,{name:"nudge-y","aria-hidden":"true",className:n})};function s({label:e,value:n,onChange:s,words:m,placeholder:o,min:d=-200,max:c=200,step:t=1,readOnly:p}){const u=e=>/* @__PURE__ */i("div",{"data-axis":e,className:"min-w-0",children:/* @__PURE__ */i(a,{value:n[e],onChange:a=>s({...n,[e]:a}),min:d,max:c,step:t,precision:0,steppers:"compact",readOnly:p,placeholder:o[e],prefix:l[e],suffix:m.unit,"aria-label":m[e]})});/* @__PURE__ */
|
|
2
2
|
return r("div",{role:"group","aria-label":e,className:"grid min-w-0 grid-cols-2 gap-2",children:[u("x"),u("y")]})}export{s as PositionInput};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as i}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as n,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-UQBPKZUR.js";import{useSettingAuto as d}from"./chunk-E4Z5OXBI.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-JFSYWEHD.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-QR4RM7PO.js";import{Icon as m}from"./chunk-KIBL6M3T.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as h}from"./chunk-62LW225J.js";import{useDropdownPosition as f,MENU_MAX_HEIGHT as b}from"./chunk-GLUJS42B.js";import{solidSurfaceStyle as g}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as x}from"./chunk-E6UCGCOC.js";import{forwardRef as w,useId as k,useState as N,useRef as $,useMemo as D,useCallback as j,useEffect as S,useLayoutEffect as E}from"react";import{createPortal as T}from"react-dom";import{jsxs as C,jsx as I,Fragment as O}from"react/jsx-runtime";var H=e=>e.labelStyle?{lineHeight:1.25,...e.labelStyle}:void 0,R=w(function({value:e,onChange:t,options:r,placeholder:i,invalid:n,className:a="",size:l,touchSize:o,renderOption:c,renderValue:u,valueText:p,readOnly:m,footer:v,changed:h,auto:f,multiple:b,"aria-describedby":g,...y},w){const N=t,$=x(),D=d(),j=f??D,S=k(),E=/* @__PURE__ */C("select",{ref:w,value:e,multiple:b||void 0,onChange:e=>N(b?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":n||void 0,"aria-describedby":[g,j?S:void 0].filter(Boolean).join(" ")||void 0,className:s({invalid:n,size:l,auto:j,className:`pr-8 ${a}`.trim()}),...y,children:[void 0!==i&&!b&&/* @__PURE__ */I("option",{value:"",disabled:!0,children:i}),
|
|
2
|
+
/* @__PURE__ */I(z,{items:r})]});return j?/* @__PURE__ */C(O,{children:[E,
|
|
3
|
+
/* @__PURE__ */I("span",{id:S,hidden:!0,children:$.settingView.auto})]}):E});function z({items:e}){const t=e=>/* @__PURE__ */I("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
|
|
4
|
+
return I(O,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */I("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var B=w(function({value:l,onChange:u,options:w,placeholder:R,invalid:B,className:U="",id:K,disabled:A,size:P,touchSize:V,title:W,multiple:F,renderOption:L,renderValue:M,valueText:G,readOnly:J=!1,footer:Q,changed:q=!1,auto:X,"aria-describedby":Y,"aria-label":Z,"aria-labelledby":_,...ee},te){const[re,ie]=N(!1),[ne,ae]=N(-1),le=$(null),oe=$(null),de=$(null),se=$(null),ce=$([]),ue=()=>se.current??de.current,pe=!!Q?.length,me="sm"===P,ve=me?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",he=p(me),[fe,be]=N(null),ge=x(),ye=$(re);ye.current=re;const xe=$({buffer:"",timer:null}),we=k(),ke=`${we}-listbox`,Ne=K??`${we}-trigger`,$e=e=>`${we}-opt-${e}`,De=`${we}-changed`,je=d(),Se=X??je,Ee=`${we}-auto`,Te=[Y,q?De:void 0,Se?Ee:void 0].filter(Boolean).join(" ")||void 0,Ce=D(()=>n(w),[w]),Ie=F?l:[],Oe=u,He=f(oe,re,{matchTriggerWidth:!0,...Q?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),Re="undefined"==typeof window?S:E,ze=`${re}|${He?.top}|${He?.bottom}|${He?.maxHeight}|${w.length}`;Re(()=>{be(null)},[ze]),Re(()=>{const e=de.current;if(!re||!e||null!==fe)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const i=e.getBoundingClientRect().top;let n=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-i+e.scrollTop;if(!(r<=e.clientHeight+.5))break;n=r}n>r&&be(Math.floor(n))},[re,fe,ze]);const Be=F?Ce.findIndex(e=>Ie.includes(e.value)):Ce.findIndex(e=>e.value===l),Ue=F?Ce.filter(e=>Ie.includes(e.value)).map(e=>e.label).join(", ")||void 0:Be>=0?Ce[Be].label:void 0,Ke=!F&&Be>=0?Ce[Be].lang:void 0,Ae=F?Ce.filter(e=>Ie.includes(e.value)):Be>=0?[Ce[Be]]:[],Pe=M&&Ae.length?M(Ae):void 0,Ve=void 0!==Pe&&G?G(Ae):void 0,We=j((e=!0)=>{ie(!1),ae(-1),e&&oe.current?.focus()},[]),Fe=j(()=>{A||J||(ae(Be>=0?Be:e(Ce)),ie(!0))},[A,J,Ce,Be]),Le=j(e=>{const t=Ce[e];if(t&&!t.disabled){if(F){const r=l;return Oe(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ae(e)}Oe(t.value),We()}},[Ce,F,l,Oe,We]);S(()=>{if(!re)return;return y(e=>!("Escape"!==e.key||!ye.current)&&(We(),!0),ue)},[re,We]),S(()=>{if(!re)return;const e=e=>{const t=e.target;le.current?.contains(t)||ue()?.contains(t)||We(!1)};document.addEventListener("pointerdown",e);const t=v(()=>We(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[re,We]),S(()=>{!re||ne<0||de.current?.querySelector(`#${CSS.escape($e(ne))}`)?.scrollIntoView({block:"nearest"})},[re,ne]);const Me=j(e=>{const r=xe.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const i=re?ne:Be,n=t(Ce,r.buffer,i);n<0||(re?ae(n):F?(ae(n),ie(!0)):Le(n))},[re,ne,Be,Ce,Le,F]),Ge=re?a(w,(e,t)=>{const r=(i=e.value,F?Ie.includes(i):l===i);var i;const n=t===ne;/* @__PURE__ */
|
|
5
|
+
return C("div",{id:$e(t),role:"option",lang:e.description||e.labelStyle||L?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||ae(t)},onClick:()=>Le(t),className:`mx-1 cursor-pointer truncate rounded-lg ${ve}${F?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":n?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[F&&/* @__PURE__ */I(o,{selected:r}),L?/* @__PURE__ */I("span",{className:"block min-w-0 flex-1 truncate",children:L(e,{selected:r,active:n})}):F?/* @__PURE__ */C("span",{className:"block min-w-0 flex-1",children:[
|
|
6
|
+
/* @__PURE__ */I("span",{lang:e.lang,className:"block truncate",style:H(e),children:e.label}),e.description&&/* @__PURE__ */I("span",{className:he,children:e.description})]}):e.description||e.labelStyle?
|
|
7
|
+
/* @__PURE__ */C(O,{children:[
|
|
8
|
+
/* @__PURE__ */I("span",{lang:e.lang,className:"block truncate",style:H(e),children:e.label}),e.description&&/* @__PURE__ */I("span",{className:he,children:e.description})]}):e.label]},e.value)},we,"mx-1"):null,Je=void 0!==Pe?
|
|
9
|
+
/* @__PURE__ */C("span",{className:"relative block min-w-0 truncate",children:[
|
|
10
|
+
/* @__PURE__ */I("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Pe}),
|
|
11
|
+
/* @__PURE__ */I("span",{lang:void 0===Ve?Ke:void 0,className:"sr-only",children:Ve??Ue})]}):/* @__PURE__ */I("span",{lang:Ke,className:"block truncate "+(void 0===Ue?"text-gray-400":""),children:Ue??R??" "}),Qe={zIndex:h.popup,left:He?.left,top:He?.top,bottom:He?.bottom,width:He?.width,maxHeight:He?.maxHeight??b,visibility:He?void 0:"hidden",...g()},qe=/* @__PURE__ */I("div",{ref:de,id:ke,role:"listbox","aria-labelledby":_??(Z?void 0:Ne),"aria-label":_?void 0:Z,"aria-multiselectable":F||void 0,className:pe?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:pe?null!==fe?{maxHeight:fe}:void 0:null!==fe?{...Qe,maxHeight:fe}:Qe,children:Ge}),Xe=pe?/* @__PURE__ */C("div",{ref:se,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Qe,children:[qe,
|
|
12
|
+
/* @__PURE__ */I("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:Q.map((e,t)=>/* @__PURE__ */C("button",{ref:e=>{ce.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(We(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(Q?.length??0)-1,i=t=>{e.preventDefault(),ce.current[t]?.focus()},n=()=>{e.preventDefault(),oe.current?.focus()};switch(e.key){case"ArrowDown":return void i(Math.min(t+1,r));case"ArrowUp":return void(0===t?n():i(t-1));case"Home":return void i(0);case"End":return void i(r);case"Tab":return e.shiftKey?void(0===t?n():i(t-1)):t<r?void i(t+1):(e.preventDefault(),void We());case"Escape":return e.preventDefault(),e.stopPropagation(),void We()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${ve} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-gray-400":"cursor-pointer text-gray-700 hover:bg-blue-50 hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */I(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
13
|
+
/* @__PURE__ */I("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):qe;/* @__PURE__ */
|
|
14
|
+
return C("div",{ref:le,className:"relative",children:[
|
|
15
|
+
/* @__PURE__ */I("button",{ref:oe,id:Ne,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":re,"aria-controls":re?ke:void 0,"aria-activedescendant":re&&ne>=0?$e(ne):void 0,"aria-invalid":B||void 0,"aria-describedby":Te,"aria-label":Z,"aria-labelledby":_,title:W,disabled:A,"aria-readonly":J||void 0,onClick:()=>re?We():Fe(),onKeyDown:t=>{if(!A&&!J)switch(t.key){case"ArrowDown":return t.preventDefault(),void(re?ae(e=>i(Ce,e,1)):Fe());case"ArrowUp":return t.preventDefault(),void(re?ae(e=>i(Ce,e,-1)):Fe());case"Home":return void(re&&(t.preventDefault(),ae(e(Ce))));case"End":return void(re&&(t.preventDefault(),ae(r(Ce))));case"Enter":return void(re&&(t.preventDefault(),Le(ne)));case" ":return t.preventDefault(),void(re?Le(ne):Fe());case"Escape":return void(re&&(t.preventDefault(),t.stopPropagation(),We()));case"Tab":return re&&pe&&!t.shiftKey?(t.preventDefault(),void ce.current[0]?.focus()):void(re&&We(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),Me(t.key))}},className:s({invalid:B,size:P,readOnly:J,auto:Se,className:`${J?"":"pr-8 "}text-left ${U}`.trim()}),children:q?
|
|
16
|
+
/* @__PURE__ */C("span",{className:"flex min-w-0 items-center gap-1",children:[Je,
|
|
17
|
+
/* @__PURE__ */I("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Je}),q&&/* @__PURE__ */I("span",{id:De,hidden:!0,children:ge.select.changed}),Se&&/* @__PURE__ */I("span",{id:Ee,hidden:!0,children:ge.settingView.auto}),!J&&/* @__PURE__ */I(m,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${c}`,strokeWidth:2}),
|
|
18
|
+
/* @__PURE__ */C("select",{ref:te,value:l,multiple:F||void 0,onChange:e=>Oe(F?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:A,"aria-hidden":"true",tabIndex:-1,className:"sr-only",...ee,children:[void 0!==R&&!F&&/* @__PURE__ */I("option",{value:"",disabled:!0,children:R}),
|
|
19
|
+
/* @__PURE__ */I(z,{items:w})]}),re&&T(Xe,document.body)]})}),U=w(function({touchSize:e="touch",...t},r){const i=u();return!i||void 0===t.footer&&void 0===t.changed||t.readOnly?i&&!t.readOnly?/* @__PURE__ */I(R,{ref:r,...t,size:e}):/* @__PURE__ */I(B,{ref:r,...t}):/* @__PURE__ */I(B,{ref:r,...t,size:e})});export{R as NativeSelect,U as Select_default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Segmented as e}from"./chunk-N6DTTOB6.js";import{ColorPicker as t}from"./chunk-
|
|
2
|
-
return a("div",{role:"group","aria-label":r,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[w?c?/* @__PURE__ */a(o,{children:[k("left",b.sides.left,h.left,
|
|
1
|
+
import{Segmented as e}from"./chunk-N6DTTOB6.js";import{ColorPicker as t}from"./chunk-VV37BGSY.js";import{InputNumber_default as l}from"./chunk-4SQNLU2Q.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{jsxs as a,Fragment as o,jsx as s}from"react/jsx-runtime";var i=["solid","dashed","dotted"],n=["top","right","bottom","left"];function d(e){const t=e??{},l="number"==typeof t.width?t.width:0;return Object.fromEntries(n.map(e=>[e,"number"==typeof t[e]?t[e]:l]))}function m(e,t){const l=e??{},r=d(t),a=n.some(e=>"number"==typeof l[e]),o=n.map(e=>"number"==typeof l[e]?l[e]:"number"==typeof l.width?l.width:a?0:r[e]);return!o.every(e=>e===o[0])}var c="h-3.5 w-3.5",h={all:/* @__PURE__ */s(r,{name:"border-all","aria-hidden":"true",className:c}),top:/* @__PURE__ */s(r,{name:"border-top","aria-hidden":"true",className:c}),right:/* @__PURE__ */s(r,{name:"border-right","aria-hidden":"true",className:c}),bottom:/* @__PURE__ */s(r,{name:"border-bottom","aria-hidden":"true",className:c}),left:/* @__PURE__ */s(r,{name:"border-left","aria-hidden":"true",className:c})},p={solid:/* @__PURE__ */s(r,{name:"line-solid","aria-hidden":"true",className:c}),dashed:/* @__PURE__ */s(r,{name:"line-dashed","aria-hidden":"true",className:c}),dotted:/* @__PURE__ */s(r,{name:"line-dotted","aria-hidden":"true",className:c})};function u({label:r,value:d,onChange:m,each:c,placeholder:u,presets:f,words:b,widths:w=!0,styles:y=!0,min:g=0,max:N=20,step:v=1,readOnly:x}){const S=e=>"number"==typeof d[e]?d[e]:null,j=(e,t)=>{const l={...d};if("number"==typeof d.width)for(const e of n)null===S(e)&&(l[e]=d.width);l[e]=t,delete l.width,m(l)},k=(e,t,r,a,o,i)=>/* @__PURE__ */s("div",{"data-side":e,className:"all"===e?"col-span-2 min-w-0":"min-w-0",children:/* @__PURE__ */s(l,{value:a,onChange:i,min:g,max:N,step:v,precision:0,steppers:"compact",readOnly:x,placeholder:o,prefix:r,suffix:b.unit,"aria-label":t})}),C=n.map(S),O="number"==typeof d.width?d.width:C.every(e=>null!==e&&e===C[0])?C[0]:null,B=null===O&&C.some(e=>null!==e),T=n.every(e=>u.sides[e]===u.sides.top)?String(u.sides.top):"–",z=e=>S(e)??("number"==typeof d.width?d.width:null),I=d.style??u.style;/* @__PURE__ */
|
|
2
|
+
return a("div",{role:"group","aria-label":r,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[w?c?/* @__PURE__ */a(o,{children:[k("left",b.sides.left,h.left,z("left"),String(u.sides.left),e=>j("left",e)),k("top",b.sides.top,h.top,z("top"),String(u.sides.top),e=>j("top",e)),k("right",b.sides.right,h.right,z("right"),String(u.sides.right),e=>j("right",e)),k("bottom",b.sides.bottom,h.bottom,z("bottom"),String(u.sides.bottom),e=>j("bottom",e))]}):k("all",b.width,h.all,O,B?"–":T,e=>{const t={...d,width:e};for(const e of n)delete t[e];m(t)}):null,y&&/* @__PURE__ */s("div",{"data-border-style":"",className:"col-span-2 min-w-0",children:/* @__PURE__ */s(e,{block:!0,size:"sm",label:b.style,value:I,onChange:e=>{x||m({...d,style:e})},options:i.map(e=>({value:e,label:/* @__PURE__ */a(o,{children:[p[e],
|
|
3
3
|
/* @__PURE__ */s("span",{className:"sr-only",children:b.styles[e]})]}),title:b.styles[e]}))})}),
|
|
4
4
|
/* @__PURE__ */s("div",{"data-border-color":"",className:"col-span-2 flex min-w-0 items-center",children:/* @__PURE__ */s(t,{value:d.color??"",onChange:e=>{x||m({...d,color:e})},label:b.color,presets:f,fallback:u.color,showHexInput:!0,size:"sm",disabled:x})})]})}export{i as BORDER_LINE_STYLES,u as BorderInput,d as borderSides,m as borderStartEach};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Modal as e}from"./chunk-
|
|
1
|
+
import{Modal as e}from"./chunk-WISGY2OI.js";import{keepsNativeMenu as a}from"./chunk-5QFPTDQF.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
|
|
2
2
|
return i("div",{onPointerDown:e=>e.stopPropagation(),onContextMenu:e=>{e.stopPropagation(),a(e.target)||e.preventDefault()},children:/* @__PURE__ */i(e,{open:t,onClose:r,title:l,size:"sm",children:/* @__PURE__ */n("div",{className:"space-y-4",children:[o,
|
|
3
3
|
/* @__PURE__ */n("div",{children:[
|
|
4
4
|
/* @__PURE__ */i("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Appearance"}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{client_default as a}from"./chunk-
|
|
1
|
+
import{client_default as a}from"./chunk-WISGY2OI.js";var t=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),e="uploaded:wallpaper";function r(a,t){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===e?t||"":a}var l=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=(t,e)=>{const r=new FormData;r.append("wallpaper",t);const l=e?{onUploadProgress:a=>e(a.total?Math.round(a.loaded/a.total*100):null)}:void 0;return a.post("/auth/me/wallpaper/",r,l).then(a=>a.data)},p=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function o(a){const t=a?.response?.status,e=a?.response?.data,r=Array.isArray(e?.wallpaper)?e.wallpaper[0]:void 0;return r||(413===t?"That picture is too large to use as a wallpaper.":415===t?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{e as WALLPAPER_PREF_TOKEN,p as deleteWallpaper,t as getNumberingConfigs,l as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,o as wallpaperUploadError};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SidebarLayout as e}from"./chunk-
|
|
1
|
+
import{SidebarLayout as e}from"./chunk-TFMOGKW2.js";import{Avatar as t}from"./chunk-MMFJBWJC.js";import{Input_default as a}from"./chunk-UNEJ2ABD.js";import{Button_default as i}from"./chunk-4IU5BSVE.js";import{useState as s}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var r=[{id:1,name:"Priya Patel",last:"Sounds good — shipping it now",time:"9:41",status:"online"},{id:2,name:"Design team",last:"Marco: updated the tokens",time:"9:12",status:"away"},{id:3,name:"Tom Becker",last:"Thanks!",time:"Yest",status:"offline"},{id:4,name:"Sara Lind",last:"See you Friday 🎉",time:"Yest",status:"busy"}],m=[{mine:!1,text:"Hey! Did the latest build go out?"},{mine:!0,text:"Just merged — deploying now."},{mine:!1,text:"Nice. Any breaking changes for the portal?"},{mine:!0,text:"Nope, fully additive. New components only."},{mine:!1,text:"Sounds good — shipping it now"}];function d(){const[d,o]=s(1),c=r.find(e=>e.id===d)??r[0];/* @__PURE__ */
|
|
2
2
|
return l("div",{className:"h-full",children:/* @__PURE__ */l(e,{side:"left",defaultWidth:260,sidebar:/* @__PURE__ */l("div",{className:"h-full overflow-auto",children:r.map(e=>/* @__PURE__ */n("button",{onClick:()=>o(e.id),className:"flex w-full items-center gap-3 border-b border-gray-100 px-3 py-3 text-left hover:bg-gray-50 "+(e.id===d?"bg-blue-50/50":""),children:[
|
|
3
3
|
/* @__PURE__ */l(t,{name:e.name,status:e.status}),
|
|
4
4
|
/* @__PURE__ */n("div",{className:"min-w-0 flex-1",children:[
|