@kwantis-id3/frontend-library 1.0.0-rc.35 → 1.0.0-rc.37

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
@@ -58,7 +58,7 @@ import{jsx as e,jsxs as t,Fragment as n}from"@emotion/react/jsx-runtime";import*
58
58
  > .accordion[data-open="false"]:first-of-type {
59
59
  border-top-left-radius: 4px;
60
60
  border-top-right-radius: 4px;
61
- border-top: 1px solid ${({theme:e})=>e.activePalette.border.main};
61
+ border-top: ${({theme:e,$variant:t})=>"default"===t?`1px solid ${e.activePalette.border.main}`:"none"};
62
62
  }
63
63
 
64
64
  > .accordion[data-open="false"]:last-of-type {
@@ -70,7 +70,7 @@ import{jsx as e,jsxs as t,Fragment as n}from"@emotion/react/jsx-runtime";import*
70
70
  }
71
71
 
72
72
  > .accordion[data-open="true"] + .accordion {
73
- border-top: 1px solid ${({theme:e})=>e.activePalette.border.main};
73
+ border-top: ${({theme:e,$variant:t})=>"default"===t?`1px solid ${e.activePalette.border.main}`:"none"};
74
74
  }
75
75
  `,We=x("div",we)`
76
76
  label: AccordionContainer;
@@ -570,7 +570,7 @@ import{jsx as e,jsxs as t,Fragment as n}from"@emotion/react/jsx-runtime";import*
570
570
  label: DrawerContent;
571
571
  flex-grow: 1;
572
572
  height: 100%;
573
- overflow: auto;
573
+ width: 100%;
574
574
  `,rr=x("div",we)`
575
575
  label: DrawerTrigger;
576
576
  display: ${({$hideTrigger:e})=>e?"none":"flex"};
@@ -587,5 +587,5 @@ import{jsx as e,jsxs as t,Fragment as n}from"@emotion/react/jsx-runtime";import*
587
587
  }
588
588
 
589
589
  ${({$anchor:e})=>{switch(e){case"top":return"\n left: 50%;\n bottom: 0;\n transform: translateX(-50%) translateY(100%);\n border-radius: 0 0 10px 10px;\n box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.15);\n ";case"right":return"\n top: 50%;\n transform: translateY(-50%) translateX(-100%);\n border-radius: 10px 0 0 10px;\n min-width: 20px;\n min-height: 40px;\n box-shadow: -2px 0px 4px 0px rgba(0, 0, 0, 0.15);\n ";case"bottom":return"\n left: 50%;\n top: 0;\n transform: translateX(-50%) translateY(-100%);\n border-radius: 10px 10px 0 0;\n box-shadow: 0px -2px 4px 0px rgba(0, 0, 0, 0.15);\n ";case"left":return"\n top: 50%;\n right: 0;\n transform: translateY(-50%) translateX(100%);\n min-width: 20px;\n min-height: 40px;\n border-radius: 0 10px 10px 0;\n box-shadow: 2px 0px 4px 0px rgba(0, 0, 0, 0.15);\n ";default:return""}}}
590
- `,ar=(t,n)=>e(A,{icon:{top:n?"prime:arrow-up":"prime:arrow-down",right:n?"prime:arrow-right":"prime:arrow-left",bottom:n?"prime:arrow-down":"prime:arrow-up",left:n?"prime:arrow-left":"prime:arrow-right"}[t],width:16,height:16}),lr=({anchor:i="bottom",isOpen:o,openContent:a,closedContent:l,openTrigger:c,closedTrigger:d,minOpen:g,maxOpen:b,bgColor:h,triggerColor:m,triggerHoverColor:f,onOpen:v,onClose:I,zIndex:C,hideTrigger:x=!1,keepMounted:y=!1,sx:A})=>{const[G,w]=r(!1),B=u(null),[V,R]=r(`${b}px`),[X,M]=r(`${g}px`),T=o??G;p((()=>{const e=B.current;e&&requestAnimationFrame((()=>{const t="top"===i||"bottom"===i?e.scrollHeight:e.scrollWidth;let n;n="top"===i||"bottom"===i?.9*window.innerHeight:.9*window.innerWidth;const o=b?Math.min(b,n):n,r=Math.min(t+1,o);R(`${r}px`)}))}),[a,i,T,b]),p((()=>{B.current&&requestAnimationFrame((()=>{const e="top"===i||"bottom"===i?B.current?.scrollHeight:B.current?.scrollWidth;M(`${g??e??0}px`)}))}),[l,i,g]);const Z=s((()=>{const e=d??ar(i,!1),t=c??ar(i,!0);return T?t:e}),[i,T,c,d]);return t(ir,{css:A,$anchor:i,$isOpen:T,$minOpen:X,$maxOpen:V,$bgColor:h,$zIndex:C,children:[e(rr,{$anchor:i,$hideTrigger:x,onClick:()=>{T&&I?.(),T||v?.(),w((e=>!e))},"data-testid":"drawer-trigger",$bgColor:h,$triggerColor:m,$triggerHoverColor:f,children:Z}),t(or,{ref:B,$anchor:i,$isOpen:T,children:[y&&t(n,{children:[e("div",{style:{display:T?"block":"none"},children:a}),e("div",{style:{display:T?"none":"block"},children:l})]}),!y&&(T?a:l)]})]})};export{He as Accordion,Ze as AccordionGroup,Te as Button,To as Card,Wo as CardContent,Fo as CardFooter,Zo as CardHeader,ko as CardIndicators,Po as CardMediaSection,tr as ControlledTreeView,Jo as DataGrid,lr as Drawer,fo as Dropdown,yo as Indicator,Oe as InputField,Co as Modal,Zi as MultiSelect,$o as MultiViewGrid,jo as MultiViewList,Ti as SingleSelect,to as Slider,Lo as Table,Go as Tag,H as ThemeContextProvider,nr as UncontrolledTreeView,W as commonColors,xe as darkenColor,k as defaultDarkPalette,F as defaultLightPalette,Ge as getActiveColor,Ce as getContrastColor,Ae as getHoverColor,ye as lightenColor,Yo as renderCell,we as transientOptions,Be as useIsMobile,Z as usePrefersColorScheme,N as useThemeContext};
590
+ `,ar=(t,n)=>e(A,{icon:{top:n?"prime:arrow-up":"prime:arrow-down",right:n?"prime:arrow-right":"prime:arrow-left",bottom:n?"prime:arrow-down":"prime:arrow-up",left:n?"prime:arrow-left":"prime:arrow-right"}[t],width:16,height:16}),lr=({anchor:i="bottom",isOpen:o,openContent:a,closedContent:l,openTrigger:c,closedTrigger:d,minOpen:g,maxOpen:b,bgColor:h,triggerColor:m,triggerHoverColor:f,onOpen:v,onClose:I,zIndex:C,hideTrigger:x=!1,keepMounted:y=!1,sx:A})=>{const[G,w]=r(!1),B=u(null),[V,R]=r(`${b}px`),[X,M]=r(`${g}px`),T=o??G;p((()=>{const e=B.current;e&&requestAnimationFrame((()=>{const t="top"===i||"bottom"===i?e.scrollHeight:e.scrollWidth;let n;n="top"===i||"bottom"===i?.9*window.innerHeight:.9*window.innerWidth;const o=b?Math.min(b,n):n,r=Math.min(t+1,o);R(`${r}px`)}))}),[a,i,T,b]),p((()=>{B.current&&requestAnimationFrame((()=>{const e="top"===i||"bottom"===i?B.current?.scrollHeight:B.current?.scrollWidth;M(`${g??e??0}px`)}))}),[l,i,g]);const Z=s((()=>{const e=d??ar(i,!1),t=c??ar(i,!0);return T?t:e}),[i,T,c,d]),W={width:"100%",height:"100%"};return t(ir,{css:A,$anchor:i,$isOpen:T,$minOpen:X,$maxOpen:V,$bgColor:h,$zIndex:C,children:[e(rr,{$anchor:i,$hideTrigger:x,onClick:()=>{T&&I?.(),T||v?.(),w((e=>!e))},"data-testid":"drawer-trigger",$bgColor:h,$triggerColor:m,$triggerHoverColor:f,children:Z}),t(or,{ref:B,$anchor:i,$isOpen:T,children:[y&&t(n,{children:[e("div",{style:{...W,display:T?"block":"none"},children:a}),e("div",{style:{...W,display:T?"none":"block"},children:l})]}),!y&&(T?a:l)]})]})};export{He as Accordion,Ze as AccordionGroup,Te as Button,To as Card,Wo as CardContent,Fo as CardFooter,Zo as CardHeader,ko as CardIndicators,Po as CardMediaSection,tr as ControlledTreeView,Jo as DataGrid,lr as Drawer,fo as Dropdown,yo as Indicator,Oe as InputField,Co as Modal,Zi as MultiSelect,$o as MultiViewGrid,jo as MultiViewList,Ti as SingleSelect,to as Slider,Lo as Table,Go as Tag,H as ThemeContextProvider,nr as UncontrolledTreeView,W as commonColors,xe as darkenColor,k as defaultDarkPalette,F as defaultLightPalette,Ge as getActiveColor,Ce as getContrastColor,Ae as getHoverColor,ye as lightenColor,Yo as renderCell,we as transientOptions,Be as useIsMobile,Z as usePrefersColorScheme,N as useThemeContext};
591
591
  //# sourceMappingURL=index.js.map