@odigos/ui-kit 0.0.227 → 0.0.228

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.228](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.227...ui-kit-v0.0.228) (2026-05-04)
4
+
5
+
6
+ ### Features
7
+
8
+ * **source-drawer:** add profilingEnabled prop and hide profiling tab in accordance ([#847](https://github.com/odigos-io/ui-kit/issues/847)) ([788daec](https://github.com/odigos-io/ui-kit/commit/788daeca699085f4a8f549e7b527077f01bd1982))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * bug list in new v2 drawers ([#843](https://github.com/odigos-io/ui-kit/issues/843)) ([6a86b43](https://github.com/odigos-io/ui-kit/commit/6a86b43fa5e36be602f041853939a206bbcf3909))
14
+
3
15
  ## [0.0.227](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.226...ui-kit-v0.0.227) (2026-05-03)
4
16
 
5
17
 
@@ -1,3 +1,3 @@
1
- import{jsx as t}from"react/jsx-runtime";import{useMemo as e}from"react";import i from"styled-components";import{u as o,B as s,a,A as n,g as l,D as r,C as c,b as p,N as m}from"./ui-components-C7i9zbc-.js";import{VIcon as d,CopyIcon as u,YamlIcon as f}from"../icons.js";const h=i.div`
1
+ import{jsx as t}from"react/jsx-runtime";import{useMemo as e}from"react";import i from"styled-components";import{u as o,B as s,a,A as n,g as l,D as r,C as c,b as p,N as m}from"./ui-components-B4xHrszQ.js";import{VIcon as d,CopyIcon as u,YamlIcon as f}from"../icons.js";const h=i.div`
2
2
  padding: 0 12px;
3
3
  `,g=({title:i="YAML",yaml:g,defaultOpen:b,fullHeight:T,bgTint:y="1000"})=>{const{clickCopy:C,isCopied:x}=o(),A=e(()=>g?[{id:l(),type:n.Button,buttonProps:{variant:a.Text,size:s.S,leftIcon:x?d:u,onClick:()=>C(g||""),disabled:x}}]:[],[g,x]);return t(r,{bgTint:y,richTitle:{icon:f,title:i},actions:A,withCollapse:!0,collapseIsDefaultOpen:b,fullHeight:T,children:t(h,{children:g?t(c,{code:g,language:"yaml",theme:"duotoneDark"}):t(p,{children:t(m,{title:"YAML not found",subTitle:"The YAML for this resource is not available"})})})})};export{g as Y};
@@ -1,4 +1,4 @@
1
- import{c5 as e,p as a,T as l,k as t,e9 as r,e as s,am as o,w as i,j as n,ap as d,l as c,I as p,h as u,as as h,aw as g,n as m,F as v,d as f,S as b,an as y,aa as x,ea as S,eb as w,ax as C,ec as k,s as T,ed as $,t as L,ee as P,ef as M,eg as A,eh as O,ei as N,ej as z,ek as D,el as R,em as X,en as I,eo as E,ep as H,eq as V,bj as j,a as K,B as U,er as q,es as G,et as J,eu as B,ev as F,ew as W,ex as Z,ey as Y,ez as _,a7 as Q,a3 as ee,eA as ae,eB as le,ab as te,a6 as re,eC as se,eD as oe,eE as ie,eF as ne,b2 as de,eG as ce,eH as pe,eI as ue,eJ as he,eK as ge,eL as me,eM as ve,eN as fe,bG as be,o as ye,eO as xe,eP as Se,eQ as we,eR as Ce,eS as ke,eT as Te,eU as $e,eV as Le,eW as Pe,eX as Me,z as Ae,eY as Oe,E as Ne,eZ as ze,e_ as De,e$ as Re,f0 as Xe,f1 as Ie,dO as Ee,_ as He,ao as Ve,dm as je,f as Ke,f2 as Ue,d7 as qe,b as Ge,N as Je,aI as Be,aj as Fe,bw as We,dP as Ze}from"./ui-components-C7i9zbc-.js";import{jsx as Ye,jsxs as _e,Fragment as Qe}from"react/jsx-runtime";import{OdigosLogoTextEnterprise as ea,OdigosLogoTextCommunity as aa,EditIcon as la,ArrowLeftIcon as ta,ArrowRightIcon as ra,VSquareIcon as sa}from"../icons.js";import{useCallback as oa,useMemo as ia,useState as na,useRef as da,useEffect as ca,forwardRef as pa,useImperativeHandle as ua}from"react";import ha,{useTheme as ga}from"styled-components";import"./index-B0b5lJH3.js";const ma=({isOpen:a,onClose:l,onDeny:t,onApprove:r})=>Ye(e,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",isOpen:a,onClose:l,onDeny:t,denyLabel:"Keep editing",onApprove:r,approveLabel:"Discard changes"}),va=({isOpen:a,onClose:l,onDeny:t,onApprove:r,action:s="delete",target:o})=>{const i=s.charAt(0).toUpperCase()+s.substring(1),n=o?.endsWith("s")?"these":"this";return Ye(e,{title:`${i}${o?` ${o}`:""}?`,description:`Are you sure you want to ${s}${o?` ${n} ${o}`:""}?`,isOpen:a,onClose:l,onDeny:t,denyLabel:"Go back",onApprove:r,approveLabel:i})},fa=({componentType:e,inputType:h,name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:S,setValue:w,errorMessage:C,warnMessage:k,helpMessage:T,dropdownOptions:$,dropdownNoSearch:L,dropdownNoCheckbox:P,timeUnits:M,timeDefaultUnit:A})=>{switch(e){case a.Input:return Ye(p,{name:g,type:h,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:S??"",onChange:e=>{const a=e.target.value;w(h===u.Number?""===a?null:Number(a):a)},errorMessage:C,warnMessage:k,helpMessage:T},g);case a.MultiInput:return Ye(c,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,values:Array.isArray(S)?S:d(S,[]),setValues:e=>w(e),errorMessage:C,warnMessage:k,helpMessage:T},g);case a.KeyValuePair:return Ye(n,{name:g,label:m,tooltip:v,badge:f,required:y,disabled:x,limitFieldsPerRow:2,columns:[{keyName:"key",label:"Key"},{keyName:"value",label:"Value"}],values:Array.isArray(S)?S:d(S,[]),setValues:e=>w(e),errorMessage:C,warnMessage:k,helpMessage:T},g);case a.TextArea:return Ye(i,{name:g,label:m,tooltip:v,badge:f,required:y,disabled:x,placeholder:b,value:S??"",onChange:e=>w(e.target.value),errorMessage:C,warnMessage:k,helpMessage:T},g);case a.Dropdown:return Ye(o,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,withSearch:!L,options:$?.map(e=>({id:e.id||"",label:e.value||"",withCheckbox:!P}))||[],values:S?[String(S)]:[],setValues:e=>w(e[0]),errorMessage:C,warnMessage:k,helpMessage:T},g);case a.Checkbox:return Ye(s,{name:g,label:m,tooltip:v,badge:f,value:!0===S||"true"===S,onChange:e=>w(e),disabled:x,errorMessage:C,warnMessage:k,helpMessage:T},g);case a.Time:return Ye(r,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:S??"",setValue:e=>w(e),units:M,defaultUnit:A,errorMessage:C,warnMessage:k,helpMessage:T},g);case a.Toggle:return Ye(l,{name:g,labelAlign:t.Right,label:m,tooltip:v,badge:f,value:!0===S||"true"===S,onChange:e=>w(e),disabled:x,errorMessage:C,warnMessage:k,helpMessage:T},g);default:return null}},ba=({size:e=200})=>{const{tier:a}=h();return a===g.Onprem?Ye(ea,{size:e}):Ye(aa,{size:e})},ya=[{value:"50",label:"50%"},{value:"25",label:"25%"},{value:"10",label:"10%"},{value:"1",label:"1%"},{value:"0",label:"0%"},{value:"custom",label:"Custom"}],xa=[{value:"10",label:"10%"},{value:"1",label:"1%"},{value:"0.5",label:"0.5%"},{value:"0.1",label:"0.1%"},{value:"0",label:"0%"},{value:"custom",label:"Custom"}],Sa=[{value:"5000",label:"5s"},{value:"1000",label:"1s"},{value:"500",label:"500ms"},{value:"100",label:"100ms"},{value:"50",label:"50ms"},{value:"custom",label:"Custom"}],wa=({description:e,options:a,selected:l,onSelect:t,customName:r,customLabel:s,customPlaceholder:o,customValue:i,onCustomChange:n})=>_e(m,{$gap:16,$alignItems:"flex-end",children:[_e(v,{$gap:6,children:[Ye(f,{label:e}),Ye(b,{size:y.S,options:a,selected:l,setSelected:t})]}),"custom"===l&&Ye(p,{name:r,label:s,placeholder:o,type:u.Number,value:i,onChange:n,width:160})]}),Ca=()=>{},ka=e=>e.readOnly?Ye(Ta,{rule:e.rule}):Ye($a,{ruleType:e.ruleType,formState:e.formState,onChange:e.onChange}),Ta=({rule:e})=>{const a=ga(),r=null!=e.durationAtLeastMs;return e.error?Ye(x,{richTitle:{title:S},children:Ye(l,{name:"sampling-view-toggle-keep-errors",onChange:Ca,value:!0,size:C.S,label:w,labelAlign:t.Right})}):r?Ye(x,{richTitle:{title:k},children:_e("div",{children:[Ye(T,{size:L.XXXS,color:a.v2.colors.silver[200],children:$}),Ye(T,{size:L.XS,children:`${e.durationAtLeastMs}ms`})]})}):null},$a=({ruleType:e,formState:a,onChange:r})=>{const s=oa(e=>r({durationPreset:e}),[r]),o=oa(e=>r({customDurationMs:e.target.value}),[r]);return"Error"===e?Ye(x,{richTitle:{title:S,subTitle:P},children:Ye(l,{name:"sampling-toggle-keep-errors",value:!0,onChange:Ca,size:C.S,label:w,labelAlign:t.Right})}):"Duration"===e?Ye(x,{richTitle:{title:k,subTitle:M},children:Ye(wa,{description:$,options:Sa,selected:a.durationPreset,onSelect:s,customName:"sampling-input-custom-duration",customLabel:A,customPlaceholder:"200ms",customValue:a.customDurationMs,onCustomChange:o})}):null},La=ha.div`
1
+ import{c5 as e,p as a,T as l,k as t,e9 as r,e as s,am as o,w as i,j as n,ap as d,l as c,I as p,h as u,as as h,aw as g,n as m,F as v,d as f,S as b,an as y,aa as x,ea as S,eb as w,ax as C,ec as k,s as T,ed as $,t as L,ee as P,ef as M,eg as A,eh as O,ei as N,ej as z,ek as D,el as R,em as X,en as I,eo as E,ep as H,eq as V,bj as j,a as K,B as U,er as q,es as G,et as J,eu as B,ev as F,ew as W,ex as Z,ey as Y,ez as _,a7 as Q,a3 as ee,eA as ae,eB as le,ab as te,a6 as re,eC as se,eD as oe,eE as ie,eF as ne,b2 as de,eG as ce,eH as pe,eI as ue,eJ as he,eK as ge,eL as me,eM as ve,eN as fe,bG as be,o as ye,eO as xe,eP as Se,eQ as we,eR as Ce,eS as ke,eT as Te,eU as $e,eV as Le,eW as Pe,eX as Me,z as Ae,eY as Oe,E as Ne,eZ as ze,e_ as De,e$ as Re,f0 as Xe,f1 as Ie,dO as Ee,_ as He,ao as Ve,dm as je,f as Ke,f2 as Ue,d7 as qe,b as Ge,N as Je,aI as Be,aj as Fe,bw as We,dP as Ze}from"./ui-components-B4xHrszQ.js";import{jsx as Ye,jsxs as _e,Fragment as Qe}from"react/jsx-runtime";import{OdigosLogoTextEnterprise as ea,OdigosLogoTextCommunity as aa,EditIcon as la,ArrowLeftIcon as ta,ArrowRightIcon as ra,VSquareIcon as sa}from"../icons.js";import{useCallback as oa,useMemo as ia,useState as na,useRef as da,useEffect as ca,forwardRef as pa,useImperativeHandle as ua}from"react";import ha,{useTheme as ga}from"styled-components";import"./index-DJZLguZq.js";const ma=({isOpen:a,onClose:l,onDeny:t,onApprove:r})=>Ye(e,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",isOpen:a,onClose:l,onDeny:t,denyLabel:"Keep editing",onApprove:r,approveLabel:"Discard changes"}),va=({isOpen:a,onClose:l,onDeny:t,onApprove:r,action:s="delete",target:o})=>{const i=s.charAt(0).toUpperCase()+s.substring(1),n=o?.endsWith("s")?"these":"this";return Ye(e,{title:`${i}${o?` ${o}`:""}?`,description:`Are you sure you want to ${s}${o?` ${n} ${o}`:""}?`,isOpen:a,onClose:l,onDeny:t,denyLabel:"Go back",onApprove:r,approveLabel:i})},fa=({componentType:e,inputType:h,name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:S,setValue:w,errorMessage:C,warnMessage:k,helpMessage:T,dropdownOptions:$,dropdownNoSearch:L,dropdownNoCheckbox:P,timeUnits:M,timeDefaultUnit:A})=>{switch(e){case a.Input:return Ye(p,{name:g,type:h,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:S??"",onChange:e=>{const a=e.target.value;w(h===u.Number?""===a?null:Number(a):a)},errorMessage:C,warnMessage:k,helpMessage:T},g);case a.MultiInput:return Ye(c,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,values:Array.isArray(S)?S:d(S,[]),setValues:e=>w(e),errorMessage:C,warnMessage:k,helpMessage:T},g);case a.KeyValuePair:return Ye(n,{name:g,label:m,tooltip:v,badge:f,required:y,disabled:x,limitFieldsPerRow:2,columns:[{keyName:"key",label:"Key"},{keyName:"value",label:"Value"}],values:Array.isArray(S)?S:d(S,[]),setValues:e=>w(e),errorMessage:C,warnMessage:k,helpMessage:T},g);case a.TextArea:return Ye(i,{name:g,label:m,tooltip:v,badge:f,required:y,disabled:x,placeholder:b,value:S??"",onChange:e=>w(e.target.value),errorMessage:C,warnMessage:k,helpMessage:T},g);case a.Dropdown:return Ye(o,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,withSearch:!L,options:$?.map(e=>({id:e.id||"",label:e.value||"",withCheckbox:!P}))||[],values:S?[String(S)]:[],setValues:e=>w(e[0]),errorMessage:C,warnMessage:k,helpMessage:T},g);case a.Checkbox:return Ye(s,{name:g,label:m,tooltip:v,badge:f,value:!0===S||"true"===S,onChange:e=>w(String(e)),disabled:x,errorMessage:C,warnMessage:k,helpMessage:T},g);case a.Time:return Ye(r,{name:g,label:m,tooltip:v,badge:f,placeholder:b,required:y,disabled:x,value:S??"",setValue:e=>w(e),units:M,defaultUnit:A,errorMessage:C,warnMessage:k,helpMessage:T},g);case a.Toggle:return Ye(l,{name:g,labelAlign:t.Right,label:m,tooltip:v,badge:f,value:!0===S||"true"===S,onChange:e=>w(String(e)),disabled:x,errorMessage:C,warnMessage:k,helpMessage:T},g);default:return null}},ba=({size:e=200})=>{const{tier:a}=h();return a===g.Onprem?Ye(ea,{size:e}):Ye(aa,{size:e})},ya=[{value:"50",label:"50%"},{value:"25",label:"25%"},{value:"10",label:"10%"},{value:"1",label:"1%"},{value:"0",label:"0%"},{value:"custom",label:"Custom"}],xa=[{value:"10",label:"10%"},{value:"1",label:"1%"},{value:"0.5",label:"0.5%"},{value:"0.1",label:"0.1%"},{value:"0",label:"0%"},{value:"custom",label:"Custom"}],Sa=[{value:"5000",label:"5s"},{value:"1000",label:"1s"},{value:"500",label:"500ms"},{value:"100",label:"100ms"},{value:"50",label:"50ms"},{value:"custom",label:"Custom"}],wa=({description:e,options:a,selected:l,onSelect:t,customName:r,customLabel:s,customPlaceholder:o,customValue:i,onCustomChange:n})=>_e(m,{$gap:16,$alignItems:"flex-end",children:[_e(v,{$gap:6,children:[Ye(f,{label:e}),Ye(b,{size:y.S,options:a,selected:l,setSelected:t})]}),"custom"===l&&Ye(p,{name:r,label:s,placeholder:o,type:u.Number,value:i,onChange:n,width:160})]}),Ca=()=>{},ka=e=>e.readOnly?Ye(Ta,{rule:e.rule}):Ye($a,{ruleType:e.ruleType,formState:e.formState,onChange:e.onChange}),Ta=({rule:e})=>{const a=ga(),r=null!=e.durationAtLeastMs;return e.error?Ye(x,{richTitle:{title:S},children:Ye(l,{name:"sampling-view-toggle-keep-errors",onChange:Ca,value:!0,size:C.S,label:w,labelAlign:t.Right})}):r?Ye(x,{richTitle:{title:k},children:_e("div",{children:[Ye(T,{size:L.XXXS,color:a.v2.colors.silver[200],children:$}),Ye(T,{size:L.XS,children:`${e.durationAtLeastMs}ms`})]})}):null},$a=({ruleType:e,formState:a,onChange:r})=>{const s=oa(e=>r({durationPreset:e}),[r]),o=oa(e=>r({customDurationMs:e.target.value}),[r]);return"Error"===e?Ye(x,{richTitle:{title:S,subTitle:P},children:Ye(l,{name:"sampling-toggle-keep-errors",value:!0,onChange:Ca,size:C.S,label:w,labelAlign:t.Right})}):"Duration"===e?Ye(x,{richTitle:{title:k,subTitle:M},children:Ye(wa,{description:$,options:Sa,selected:a.durationPreset,onSelect:s,customName:"sampling-input-custom-duration",customLabel:A,customPlaceholder:"200ms",customValue:a.customDurationMs,onCustomChange:o})}):null},La=ha.div`
2
2
  display: flex;
3
3
  gap: 32px;
4
4
  `,Pa=ha.div`