dga-ui-react 1.5.2 → 1.6.1

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/esm/index.js CHANGED
@@ -236,10 +236,13 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{useDeb
236
236
  }
237
237
 
238
238
  &:hover {
239
- background-color: ${e=>e.$theme.palette.neutral[25]};
239
+ background-color: ${e=>e.$theme.palette.neutral[100]};
240
240
  }
241
241
  &:active {
242
- background-color: ${e=>e.$theme.palette.neutral[50]};
242
+ background-color: ${e=>e.$theme.palette.neutral[200]};
243
+ }
244
+ &:focus {
245
+ border: 2px solid ${e=>e.$theme.textColor};
243
246
  }
244
247
 
245
248
  .dgaui_checkbox {
@@ -623,6 +626,10 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{useDeb
623
626
  margin-inline-start: 4px;
624
627
  display: inline-flex;
625
628
  }
629
+
630
+ .iconOnly {
631
+ display: inline-flex;
632
+ }
626
633
  `,Gr=n=>{var i,{title:a,description:l,icon:s,type:d="default",state:c="default",effect:p="withShadow",expandableContent:u,actionsButtons:g,selected:h,expanded:A,onChange:f}=n,x=v(n,["title","description","icon","type","state","effect","expandableContent","actionsButtons","selected","expanded","onChange"]);const y=b(),[C,w]=o.useState(!1),[$,k]=o.useState(0),S=o.useRef(null),B=void 0!==A?A:C,E="selectable"===d,N="expandable"===d,z="expandable"===d||"selectable"===d?"all":"none";o.useEffect((()=>{var e;N&&(null===(e=S.current)||void 0===e?void 0:e.clientHeight)&&k(S.current.clientHeight)}),[N,null===(i=S.current)||void 0===i?void 0:i.clientHeight]);return t(Wr,Object.assign({className:m("dgaui dgaui_card"+("disabled"===c?" disabled":"")+(E?" selectable":""),x.className),$theme:y,$pointerEvents:z,$effect:p,$contentHeight:$,$expanded:B,$state:c},x,{tabIndex:0,onClick:e=>{x.onClick&&x.onClick(e),null==f||f(e,!h)},children:[(s||E)&&t("div",{className:"cardHeader",children:[e("div",{className:"iconContainer",children:s}),E&&e("div",{className:"checkboxContainer",onClick:e=>e.stopPropagation(),children:e(vr,{value:h,onChange:f,size:"medium",disabled:"disabled"===c})})]}),a&&e("div",{className:"titleContainer",children:a}),l&&e("div",{className:"descriptionContainer",children:l}),!!g&&g.length>0&&"default"===d&&e("div",{className:"actionsButtonsContainer",onClick:e=>e.stopPropagation(),children:g}),N&&t(r,{children:[e("div",{className:"caretButtonContainer",children:e("img",{src:pr,onClick:()=>{void 0===A&&w((e=>!e))},style:{transition:"all 0.2s",transform:B?"rotateZ(-180deg)":"none"}})}),e("div",{className:"expandableContentContainer",style:{height:B?$:0},children:e("div",{className:"expandableContent",ref:S,style:{visibility:B?"visible":"hidden"},children:u})})]})]}))},Wr=sr.div`
627
634
  direction: ${e=>e.$theme.direction};
628
635
  /* pointer-events: ${e=>e.$pointerEvents}; */