@ctlyst.id/internal-ui 1.0.4-canary.2 → 1.0.4-canary.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,7 +32,7 @@
32
32
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.05);
33
33
  border-radius: 4px;
34
34
  border-color: ${({isError:e})=>e?""+M.danger[500]:""+M.primary[500]};
35
- `,j=({onChange:e,isError:r=!1,min:a="2020-01-01",max:o="2020-12-31"})=>{const[i,c]=n.useState([null,null]);return n.createElement(O,{isError:r},n.createElement(F,{"data-test-id":"CT_DatePickerMonth_StartDate",onChange:t=>{e(t,i[1]),c([t,i[1]])},min:a,max:o}),n.createElement(t.Box,null,"-"),n.createElement(F,{"data-test-id":"CT_DatePickerMonth_EndDate",onChange:t=>{e(i[0],t),c([i[0],t])},min:a,max:o}))};j.defaultProps={min:"2020-01-01",max:"2020-12-31",isError:!1};const R=e=>{const{label:r,isError:a,error:o,helperText:i,isRequired:c,children:d}=e;return n.createElement(t.FormControl,{isInvalid:a},r&&("string"==typeof r?n.createElement(t.FormLabel,{fontSize:"field.sm",requiredIndicator:void 0},c&&n.createElement(t.Box,{as:"span",color:"red.500",ml:0,mr:1},"*"),r):r),d,a?"string"==typeof o?n.createElement(t.FormErrorMessage,{textStyle:"field.sm",fontSize:"field.sm",mt:1,marginStart:1},o):o:i&&n.createElement(t.FormHelperText,{fontSize:"field.sm"},i))};R.defaultProps={label:"",isError:!1,error:void 0,helperText:void 0,isRequired:!1};const I=n.forwardRef((e,r)=>{const{value:a,type:o,addOnLeft:i,addOnRight:c,elementLeft:d,elementRight:l,size:p,isRequired:s,label:m,isError:u,error:_,helperText:g,...h}=e;return n.createElement(R,{label:m,isError:u,error:_,helperText:g,isRequired:s},n.createElement(t.InputGroup,{size:p},i&&n.createElement(t.InputLeftAddon,null,i),d&&n.createElement(t.InputLeftElement,null,d),n.createElement(t.Input,Object.assign({ref:r,type:o,value:a},h)),c&&n.createElement(t.InputRightAddon,null,c),l&&n.createElement(t.InputRightElement,null,l)))});I.defaultProps={addOnLeft:void 0,addOnRight:void 0,elementLeft:void 0,elementRight:void 0};const H=n.forwardRef((e,r)=>{const{value:a,...o}=e;return n.createElement(R,Object.assign({},o),n.createElement(t.Textarea,Object.assign({ref:r,value:a},o)))});H.defaultProps={addOnLeft:void 0,addOnRight:void 0,elementLeft:void 0,elementRight:void 0};const q=()=>n.createElement(t.Image,{height:8,src:t.useColorModeValue("https://assets.voila.id/xms/logo-xms.jpg","https://assets.voila.id/xms/logo-xms-dark.png")}),V=()=>n.createElement(t.Image,{src:"https://s3.ap-southeast-1.amazonaws.com/assets.voila.id/xms/logo-voila-black.png?v=1",filter:t.useColorModeValue("none","invert(1)"),maxW:24}),W=({data:e,onLogout:n})=>{var o;const{isOpen:i,onToggle:c,onClose:d}=t.useDisclosure();return r.createElement(t.Popover,{placement:"bottom-end",isOpen:i,onClose:d},r.createElement(t.Box,{"data-test-id":"WE0UYbA93LOZy6S09IhDO",as:"button",cursor:"pointer",minW:0,_hover:{textDecor:"none"},m:0,onClick:c},r.createElement(t.HStack,null,r.createElement(t.VStack,{alignItems:"flex-end",spacing:-.5,ml:"2"},r.createElement(t.Text,{fontSize:"text.xs",mb:1,fontWeight:400,lineHeight:"14px",color:t.useColorModeValue("neutral.800","white")},null==e?void 0:e.email),r.createElement(t.Text,{fontSize:"text.xs",fontWeight:400,lineHeight:"14px",color:t.useColorModeValue("primary.500","success.400")},(null==e?void 0:e.office)&&r.createElement(t.Text,{color:"neutral.700",display:"inline-block",mr:.5},e.office," |"," "),null==e?void 0:e.userRole)),r.createElement(t.PopoverTrigger,null,r.createElement(t.Avatar,{size:"sm",bg:"primary.500",color:"white",name:null!==(o=null==e?void 0:e.name)&&void 0!==o?o:null==e?void 0:e.email})))),r.createElement(t.PopoverContent,{bg:t.useColorModeValue("white","mirage.900"),maxW:200},r.createElement(t.PopoverArrow,{bg:t.useColorModeValue("white","mirage.900")}),r.createElement(t.PopoverBody,{p:1},r.createElement(t.Flex,{"data-test-id":"gA7F9pucPX_Q3_dkgXIYZ",alignItems:"center",px:3,py:2,borderRadius:"sm",cursor:"pointer",_hover:{bg:t.useColorModeValue("primary.500","mirage.900"),color:"white"},onClick:n,fontSize:"text.xs"},r.createElement(a.FiPower,null),r.createElement(t.Text,{ml:2},"Logout")))))};W.defaultProps={data:void 0,onLogout:void 0};const L=()=>{const{colorMode:e,toggleColorMode:n}=t.useColorMode();return r.createElement(t.Box,{"data-test-id":"rhYuTDCiWkFqr96upiEEh",mx:5,onClick:n,cursor:"pointer"},r.createElement("light"===e?a.FiMoon:a.FiSun,{size:20}))};function $(e){switch(e){case"DEVELOPMENT":return"Dev";case"STAGING":return"Staging";default:return null}}const N=({version:e,environment:n,onOpenModalRelease:a})=>r.createElement(r.Fragment,null,e&&r.createElement(t.Badge,{"data-test-id":"dzl3esjhCphobaaIXpiUE",bg:t.useColorModeValue("primary.500","rgba(124, 124, 124, 0.12)"),color:t.useColorModeValue("white","secondary.400"),fontSize:"text.xs",py:1,px:2.5,fontWeight:"bold",textTransform:"lowercase",borderRadius:"md",onClick:a,cursor:a?"pointer":"auto"},e),null!==$(n)&&e&&r.createElement(t.Box,{background:"primary.50",color:"primary.500",fontSize:"text.xs",py:1,px:2.5,fontWeight:"bold",borderRadius:"md"},$(n)));N.defaultProps={environment:void 0,version:void 0,onOpenModalRelease:void 0};const U=({data:e,onLogout:n,onOpenModalRelease:a,...o})=>r.createElement(t.Box,Object.assign({minH:14,bg:t.useColorModeValue("white","ebony-clay.800"),boxShadow:"0 4px 20px 0 rgb(0 0 0 / 5%)",px:4,py:1},o),r.createElement(t.Flex,{h:14,alignItems:"center",justifyContent:"space-between"},r.createElement(q,null),r.createElement(t.HStack,{spacing:2,alignItems:"center"},r.createElement(V,null),r.createElement(N,{version:null==e?void 0:e.version,environment:null==e?void 0:e.environment,onOpenModalRelease:a})),r.createElement(t.Flex,{alignItems:"center"},r.createElement(L,null),r.createElement(W,{data:e,onLogout:n}))));U.defaultProps={data:void 0,onLogout:void 0,onOpenModalRelease:void 0};const G=n.forwardRef(({children:e,...r},a)=>n.createElement(t.ModalBody,Object.assign({ref:a,background:t.useColorModeValue("white","mirage.900")},r),e)),X=r.forwardRef((e,r)=>n.createElement(t.ModalCloseButton,Object.assign({ref:r,top:4,right:4,size:"sm",background:t.useColorModeValue("neutral.50","mirage.900")},e))),Y=r.forwardRef(({children:e,...r},a)=>n.createElement(t.ModalFooter,Object.assign({ref:a,background:t.useColorModeValue("neutral.200","mirage.900"),borderBottomRadius:"md"},r),e)),K=r.forwardRef(({children:e,...r},a)=>n.createElement(t.ModalHeader,Object.assign({ref:a,background:t.useColorModeValue("neutral.200","mirage.900"),borderTopRadius:"md",fontSize:"lg"},r),e)),J=({navigations:e,activePath:n,as:a,host:c,...d})=>r.createElement(t.Box,Object.assign({bg:t.useColorModeValue("white","ebony-clay.800"),boxShadow:"0 4px 20px 0 rgb(0 0 0 / 5%)",borderRadius:"md",overflowX:"auto"},d),r.createElement(t.Flex,{alignItems:"center",p:2},r.createElement(t.HStack,{spacing:2},null==e?void 0:e.map(e=>{const d=n.startsWith(e.navLink||""),l=d?"primary.500":void 0;return r.createElement(t.Popover,{key:e.title,trigger:"hover",placement:"bottom-start"},({isOpen:p})=>r.createElement(r.Fragment,null,r.createElement(t.PopoverTrigger,null,r.createElement(t.Box,{display:"flex",alignItems:"center",borderRadius:"md",cursor:"pointer",_hover:{backgroundColor:d?l:t.useColorModeValue("dove-gray.50","transparent")},backgroundColor:p&&!d?t.useColorModeValue("dove-gray.50","transparent"):l,color:d?"white":"inherit",p:2},r.createElement(t.Icon,{as:e.icon,mr:2}),r.createElement(t.Text,{whiteSpace:"nowrap",fontSize:"text.sm",fontWeight:400},e.title),r.createElement(o.ChevronDownIcon,{ml:2}))),e.children&&r.createElement(t.Portal,null,r.createElement(t.Box,{zIndex:"popover"},r.createElement(t.PopoverContent,{key:e.title,bg:t.useColorModeValue("white","ebony-clay.800"),maxW:250,border:"none",borderRadius:"md",boxShadow:"0 5px 25px rgb(0 0 0 / 10%)"},e.children.map(({title:e,navHost:o,navLink:d,icon:l})=>{const p=n===d;return r.createElement(t.Link,{as:c===o?a:void 0,key:e,href:o?`${o}${d}`:d,_hover:{textDecoration:"none"}},r.createElement(t.Box,{display:"flex",position:"relative",alignItems:"center",cursor:"pointer",transition:"padding 0.35s ease 0s",_hover:{backgroundColor:t.useColorModeValue("dove-gray.50","mirage.900"),color:t.useColorModeValue("primary.500","dove-gray.600"),px:5,py:4,_first:{borderTopRadius:"md"},_last:{borderBottomRadius:"md"}},color:p?"primary.500":"inherit",css:i.css`
35
+ `,R=({onChange:e,isError:r=!1,min:a="2020-01-01",max:o="2020-12-31"})=>{const[i,c]=n.useState([null,null]);return n.createElement(O,{isError:r},n.createElement(F,{"data-test-id":"CT_DatePickerMonth_StartDate",onChange:t=>{e(t,i[1]),c([t,i[1]])},min:a,max:o}),n.createElement(t.Box,null,"-"),n.createElement(F,{"data-test-id":"CT_DatePickerMonth_EndDate",onChange:t=>{e(i[0],t),c([i[0],t])},min:a,max:o}))};R.defaultProps={min:"2020-01-01",max:"2020-12-31",isError:!1};const j=e=>{const{label:r,isError:a,error:o,helperText:i,isRequired:c,children:d}=e;return n.createElement(t.FormControl,{isInvalid:a},r&&("string"==typeof r?n.createElement(t.FormLabel,{fontSize:"field.sm",requiredIndicator:void 0},c&&n.createElement(t.Box,{as:"span",color:"red.500",ml:0,mr:1},"*"),r):r),d,a?"string"==typeof o?n.createElement(t.FormErrorMessage,{textStyle:"field.sm",fontSize:"field.sm",mt:1,marginStart:1},o):o:i&&n.createElement(t.FormHelperText,{fontSize:"field.sm"},i))};j.defaultProps={label:"",isError:!1,error:void 0,helperText:void 0,isRequired:!1};const I=n.forwardRef((e,r)=>{const{value:a,type:o,addOnLeft:i,addOnRight:c,elementLeft:d,elementRight:l,size:p,isRequired:s,label:m,isError:u,error:_,helperText:g,...h}=e;return n.createElement(j,{label:m,isError:u,error:_,helperText:g,isRequired:s},n.createElement(t.InputGroup,{size:p},i&&n.createElement(t.InputLeftAddon,null,i),d&&n.createElement(t.InputLeftElement,null,d),n.createElement(t.Input,Object.assign({ref:r,type:o,value:a},h)),c&&n.createElement(t.InputRightAddon,null,c),l&&n.createElement(t.InputRightElement,null,l)))});I.defaultProps={addOnLeft:void 0,addOnRight:void 0,elementLeft:void 0,elementRight:void 0};const H=n.forwardRef((e,r)=>{const{value:a,...o}=e;return n.createElement(j,Object.assign({},o),n.createElement(t.Textarea,Object.assign({ref:r,value:a},o)))});H.defaultProps={addOnLeft:void 0,addOnRight:void 0,elementLeft:void 0,elementRight:void 0};const q=()=>n.createElement(t.Image,{height:8,src:t.useColorModeValue("https://assets.voila.id/xms/logo-xms.jpg","https://assets.voila.id/xms/logo-xms-dark.png")}),V=()=>n.createElement(t.Image,{src:"https://s3.ap-southeast-1.amazonaws.com/assets.voila.id/xms/logo-voila-black.png?v=1",filter:t.useColorModeValue("none","invert(1)"),maxW:24}),W=({data:e,onLogout:n})=>{var o;const{isOpen:i,onToggle:c,onClose:d}=t.useDisclosure();return r.createElement(t.Popover,{placement:"bottom-end",isOpen:i,onClose:d},r.createElement(t.Box,{"data-test-id":"WE0UYbA93LOZy6S09IhDO",as:"button",cursor:"pointer",minW:0,_hover:{textDecor:"none"},m:0,onClick:c},r.createElement(t.HStack,null,r.createElement(t.VStack,{alignItems:"flex-end",spacing:-.5,ml:"2"},r.createElement(t.Text,{fontSize:"text.xs",mb:1,fontWeight:400,lineHeight:"14px",color:t.useColorModeValue("neutral.800","white")},null==e?void 0:e.email),r.createElement(t.Text,{fontSize:"text.xs",fontWeight:400,lineHeight:"14px",color:t.useColorModeValue("primary.500","success.400")},(null==e?void 0:e.office)&&r.createElement(t.Text,{color:"neutral.700",display:"inline-block",mr:.5},e.office," |"," "),null==e?void 0:e.userRole)),r.createElement(t.PopoverTrigger,null,r.createElement(t.Avatar,{size:"sm",bg:"primary.500",color:"white",name:null!==(o=null==e?void 0:e.name)&&void 0!==o?o:null==e?void 0:e.email})))),r.createElement(t.PopoverContent,{bg:t.useColorModeValue("white","mirage.900"),maxW:200},r.createElement(t.PopoverArrow,{bg:t.useColorModeValue("white","mirage.900")}),r.createElement(t.PopoverBody,{p:1},r.createElement(t.Flex,{"data-test-id":"gA7F9pucPX_Q3_dkgXIYZ",alignItems:"center",px:3,py:2,borderRadius:"sm",cursor:"pointer",_hover:{bg:t.useColorModeValue("primary.500","mirage.900"),color:"white"},onClick:n,fontSize:"text.xs"},r.createElement(a.FiPower,null),r.createElement(t.Text,{ml:2},"Logout")))))};W.defaultProps={data:void 0,onLogout:void 0};const L=()=>{const{colorMode:e,toggleColorMode:n}=t.useColorMode();return r.createElement(t.Box,{"data-test-id":"rhYuTDCiWkFqr96upiEEh",mx:5,onClick:n,cursor:"pointer"},r.createElement("light"===e?a.FiMoon:a.FiSun,{size:20}))};function $(e){switch(e){case"DEVELOPMENT":return"Dev";case"STAGING":return"Staging";default:return null}}const N=({version:e,environment:n,onOpenModalRelease:a})=>r.createElement(r.Fragment,null,e&&r.createElement(t.Badge,{"data-test-id":"dzl3esjhCphobaaIXpiUE",bg:t.useColorModeValue("primary.500","rgba(124, 124, 124, 0.12)"),color:t.useColorModeValue("white","secondary.400"),fontSize:"text.xs",py:1,px:2.5,fontWeight:"bold",textTransform:"lowercase",borderRadius:"md",onClick:a,cursor:a?"pointer":"auto"},e),null!==$(n)&&e&&r.createElement(t.Box,{background:"primary.50",color:"primary.500",fontSize:"text.xs",py:1,px:2.5,fontWeight:"bold",borderRadius:"md"},$(n)));N.defaultProps={environment:void 0,version:void 0,onOpenModalRelease:void 0};const U=({data:e,onLogout:n,onOpenModalRelease:a,...o})=>r.createElement(t.Box,Object.assign({minH:14,bg:t.useColorModeValue("white","ebony-clay.800"),boxShadow:"0 4px 20px 0 rgb(0 0 0 / 5%)",px:4,py:1},o),r.createElement(t.Flex,{h:14,alignItems:"center",justifyContent:"space-between"},r.createElement(q,null),r.createElement(t.HStack,{spacing:2,alignItems:"center"},r.createElement(V,null),r.createElement(N,{version:null==e?void 0:e.version,environment:null==e?void 0:e.environment,onOpenModalRelease:a})),r.createElement(t.Flex,{alignItems:"center"},r.createElement(L,null),r.createElement(W,{data:e,onLogout:n}))));U.defaultProps={data:void 0,onLogout:void 0,onOpenModalRelease:void 0};const G=n.forwardRef(({children:e,...r},a)=>n.createElement(t.ModalBody,Object.assign({ref:a,background:t.useColorModeValue("white","mirage.900")},r),e)),Z=r.forwardRef((e,r)=>n.createElement(t.ModalCloseButton,Object.assign({ref:r,top:4,right:4,size:"sm",background:t.useColorModeValue("neutral.50","mirage.900")},e))),X=r.forwardRef(({children:e,...r},a)=>n.createElement(t.ModalFooter,Object.assign({ref:a,background:t.useColorModeValue("neutral.200","mirage.900"),borderBottomRadius:"md"},r),e)),Y=r.forwardRef(({children:e,...r},a)=>n.createElement(t.ModalHeader,Object.assign({ref:a,background:t.useColorModeValue("neutral.200","mirage.900"),borderTopRadius:"md",fontSize:"lg"},r),e)),K=new Map([["Order",a.FiShoppingBag],["Fulfillment",a.FiShoppingCart],["Transfer Stock",a.FiRepeat],["Stock",a.FiBox],["Product Database",a.FiLayers],["Purchasing",a.FiDollarSign],["Reseller",a.FiUsers],["Retur",a.FiRotateCcw],["Other",a.FiSettings],["Content",a.FiLayout],["Voucher",a.FiGift],["Customer",t.createIcon({displayName:"CustomerIcon",viewBox:"0 0 16 16",path:[n.createElement("path",{fill:"currentColor",fillRule:"inherit",d:"M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM.667 8a7.333 7.333 0 1 1 14.666 0A7.333 7.333 0 0 1 .667 8Z",clipRule:"inherit"}),n.createElement("path",{fill:"currentColor",d:"M12.416 12.698a1.997 1.997 0 0 0-1.75-1.031H5.334a2 2 0 0 0-1.864 1.277 7.722 7.722 0 0 1-.943-1.074 3.329 3.329 0 0 1 2.807-1.537h5.334a3.333 3.333 0 0 1 2.703 1.384c-.275.325-.594.66-.954.98Z"}),n.createElement("path",{fill:"currentColor",fillRule:"inherit",d:"M8 5.333A1.333 1.333 0 1 0 8 8a1.333 1.333 0 0 0 0-2.667ZM5.333 6.667a2.667 2.667 0 1 1 5.334 0 2.667 2.667 0 0 1-5.334 0Z",clipRule:"inherit"})]})]]),J=({navigations:e,activePath:n,as:a,host:c,...d})=>r.createElement(t.Box,Object.assign({bg:t.useColorModeValue("white","ebony-clay.800"),boxShadow:"0 4px 20px 0 rgb(0 0 0 / 5%)",borderRadius:"md",overflowX:"auto"},d),r.createElement(t.Flex,{alignItems:"center",p:2},r.createElement(t.HStack,{spacing:2},null==e?void 0:e.map(e=>{const d=n.startsWith(e.navLink||""),l=d?"primary.500":void 0;return r.createElement(t.Popover,{key:e.title,trigger:"hover",placement:"bottom-start"},({isOpen:p})=>r.createElement(r.Fragment,null,r.createElement(t.PopoverTrigger,null,r.createElement(t.Box,{display:"flex",alignItems:"center",borderRadius:"md",cursor:"pointer",_hover:{backgroundColor:d?l:t.useColorModeValue("dove-gray.50","transparent")},backgroundColor:p&&!d?t.useColorModeValue("dove-gray.50","transparent"):l,color:d?"white":"inherit",p:2},r.createElement(t.Icon,{as:K.get(e.title),mr:2}),r.createElement(t.Text,{whiteSpace:"nowrap",fontSize:"text.sm",fontWeight:400},e.title),r.createElement(o.ChevronDownIcon,{ml:2}))),e.children&&r.createElement(t.Portal,null,r.createElement(t.Box,{zIndex:"popover"},r.createElement(t.PopoverContent,{key:e.title,bg:t.useColorModeValue("white","ebony-clay.800"),maxW:250,border:"none",borderRadius:"md",boxShadow:"0 5px 25px rgb(0 0 0 / 10%)"},e.children.map(({title:o,navHost:d,navLink:l})=>{const p=n===l;return r.createElement(t.Link,{as:c===d?a:void 0,key:o,href:d?`${d}${l}`:l,_hover:{textDecoration:"none"}},r.createElement(t.Box,{display:"flex",position:"relative",alignItems:"center",cursor:"pointer",transition:"padding 0.35s ease 0s",_hover:{backgroundColor:t.useColorModeValue("dove-gray.50","mirage.900"),color:t.useColorModeValue("primary.500","dove-gray.600"),px:5,py:4,_first:{borderTopRadius:"md"},_last:{borderBottomRadius:"md"}},color:p?"primary.500":"inherit",css:i.css`
36
36
  border-spacing: 4px;
37
- `,px:6,py:4},r.createElement(t.Icon,{as:l,mr:3}),r.createElement(t.Text,{fontSize:"text.sm"},e),p&&r.createElement(t.Box,{width:.5,height:8,position:"absolute",bg:"primary.500",right:0,zIndex:"popover"})))}))))))}))));J.defaultProps={navigations:void 0,as:"a",host:void 0};const Q=t.forwardRef(({className:e,style:r,isActive:a,children:o,...i},c)=>{const d=t.useColorModeValue("neutral.300","mirage.900"),l=t.useColorModeValue("black.high","primary.300"),p=t.useColorModeValue("secondary.50","primary.500"),s=t.useColorModeValue("primary.500","white");return n.createElement(t.Button,Object.assign({"data-test-id":"Pagination-Button",ref:c,className:e,style:r,borderRadius:50,fontWeight:700,m:0,px:3,py:2,h:8,minW:"auto",background:a?"primary.500":d,color:a?"white":l,_hover:a?{}:{background:p,color:s},_disabled:{background:t.useColorModeValue("neutral.300","mirage.900"),color:"neutral.600",pointerEvents:"none"}},i),o)});Q.displayName="PaginationButton",Q.defaultProps={isActive:void 0};const Z=({color:e,isDisabled:n,onClick:a,visuallyHidden:o,icon:i})=>r.createElement(Q,{"data-test-id":"DLVCc_fBK35spHm5WxjcJ",color:e,isDisabled:n,onClick:a},r.createElement(t.VisuallyHidden,null,o),i);Z.defaultProps={color:void 0,isDisabled:void 0,onClick:void 0,visuallyHidden:void 0,icon:void 0};const ee=({className:e,current:n,total:a,onSelect:i})=>{const c=t.useColorModeValue("secondary.100","primary.500"),d=t.useColorModeValue("primary.500","secondary.100"),l=1===n,p=l?c:d,s=n===a,m=s?c:d,u=e=>{i&&i(e)};return r.createElement(t.Box,{className:e,display:"inline-flex",alignItems:"center"},r.createElement(t.Box,{mr:1},r.createElement(Z,{"data-test-id":"Pagination-Button",color:p,isDisabled:l,onClick:()=>u(1),visuallyHidden:"First Page",icon:r.createElement(o.ArrowLeftIcon,{width:2})})),r.createElement(t.Box,{backgroundColor:t.useColorModeValue("neutral.300","mirage.900"),borderRadius:50},r.createElement(Z,{"data-test-id":"Pagination-Button",color:p,isDisabled:l,onClick:()=>u(n-1),visuallyHidden:"Previous Page",icon:r.createElement(o.ChevronLeftIcon,null)}),(()=>{const e=[];let t,r;5<a?(t=Math.max(Math.min(n-Math.floor(2.5),a-5+1),1),r=t+5-1):(t=1,r=a);for(let n=t;n<=r;++n)e.push(n);return e})().map(e=>r.createElement(Q,{"data-test-id":"Pagination-Button",key:e,isActive:e===n,onClick:()=>"number"==typeof e?u(e):null},r.createElement(t.Text,{scale:300,fontSize:"text.sm",lineHeight:18,fontWeight:500},e))),r.createElement(Z,{"data-test-id":"Pagination-Button",color:m,isDisabled:s,onClick:()=>u(n+1),visuallyHidden:"Next Page",icon:r.createElement(o.ChevronRightIcon,null)})),r.createElement(t.Box,{ml:1},r.createElement(Z,{"data-test-id":"Pagination-Button",color:m,isDisabled:s,onClick:()=>u(a),visuallyHidden:"Last Page",icon:r.createElement(o.ArrowRightIcon,{width:2})})))};ee.defaultProps={className:void 0,onSelect:void 0},ee.displayName="Pagination";const te=({limit:e,label:n="Baris per halaman:",items:o,onChange:i,...c})=>{const[d,l]=r.useState(e);return r.createElement(t.Box,{display:"flex",flexDirection:"row",alignItems:"center"},r.createElement(t.Text,Object.assign({fontSize:"text.sm",lineHeight:18,color:t.useColorModeValue("neutral.900","white")},c),n),r.createElement(t.Select,{textAlign:"center",size:"xs",outline:"none",border:"none",boxShadow:"none",width:18,icon:r.createElement(a.FiChevronDown,null),_focusVisible:{boxShadow:"none"},onChange:e=>{const t=Number(e.target.value);i(t),l(t)},value:d},o.map(e=>r.createElement("option",{key:e,value:e},e))))};te.defaultProps={limit:10,label:void 0};const re=A.text.sm,ne={fontSize:re.fontSize,lineHeight:re.lineHeight,letterSpacing:0};function ae(e){return{control:t=>"dark"===e?{...t,...ne,background:"transparent",color:M.primary[300],borderColor:M.secondary[500]}:{...t,...ne},option:(t,{isSelected:r})=>"dark"===e?{...t,...ne,background:r?M.primary[700]:M.dark[800],color:"white"}:{...t,...ne},menu:t=>"dark"===e?{...t,...ne,background:M.dark[800],zIndex:5}:{...t,...ne,zIndex:5},singleValue:t=>"dark"===e?{...t,...ne,color:"white"}:{...t,...ne},input:t=>"dark"===e?{...t,...ne,color:"white"}:{...t,...ne},dropdownIndicator:t=>"dark"===e?{...t,...ne,color:M.secondary[500]}:{...t,...ne},indicatorSeparator:t=>"dark"===e?{...t,...ne,backgroundColor:M.secondary[500]}:{...t,...ne}}}const oe=e=>({...e,colors:{...e.colors,primary:M.primary[500],primary25:M.primary[50],primary50:M.primary[100],primary75:M.primary[200]}}),ie=t.forwardRef((e,n)=>{var a,o;const i=t.useTab({...e,ref:n}),c=!!i["aria-selected"],d=t.useMultiStyleConfig("Tabs",i);return r.createElement(t.Button,Object.assign({p:3,fontSize:"text.md",_selected:{borderColor:t.useColorModeValue("primary.400","primary.300"),color:t.useColorModeValue("primary.500","primary.300"),transform:"translateY(-2px)"},color:t.useColorModeValue("black.high","primary.300"),_focus:{bg:"none"},__css:d.tab},i),r.createElement(t.Flex,null,null===(a=e.leftAddon)||void 0===a?void 0:a.call(e,{isSelected:c}),i.children,null===(o=e.rightAddon)||void 0===o?void 0:o.call(e,{isSelected:c})))}),ce=t.forwardRef((e,r)=>n.createElement(t.TabList,{borderBottom:"1px solid",borderColor:t.useColorModeValue("gray.200","bright-gray.800"),ref:r},e.children)),de=t.forwardRef((e,r)=>n.createElement(t.TabPanel,{px:0,ref:r},e.children)),le=({onHandleUploadFile:e,onHandleRejections:n,accept:a,multiple:o,selected:i,maxFiles:c=1,renderError:d,validator:l,...p})=>{const[s,m]=r.useState(),[u,_]=r.useState(i||!1),g=r.useCallback(t=>{t.length>0&&(null==e||e(t),o||(_(!0),m(t[0])))},[o,e]),{getRootProps:b,getInputProps:k,isDragActive:f,fileRejections:x}=h.useDropzone({onDrop:g,accept:a,maxFiles:c,multiple:o,validator:l});r.useEffect(()=>{x.length>0&&n&&n(x)},[x,n]);const y=r.useMemo(()=>{const e=x.length>0;return e&&_(!1),e},[x]);return r.useEffect(()=>{_(null!=i&&i)},[i]),r.createElement(t.Stack,{direction:"column"},r.createElement(t.Flex,Object.assign({minH:200,border:"1px dashed",borderColor:y?"danger.500":"primary.500",alignItems:"center",justifyContent:"center",cursor:"pointer"},p,b()),r.createElement("input",Object.assign({},k())),f?r.createElement(t.Text,null,"Drop file disini..."):r.createElement(t.Flex,{flexDirection:"column",alignItems:"center",color:y?"danger.500":"primary.500"},!o&&u&&r.createElement(t.Heading,{fontWeight:400,fontSize:"18px",lineHeight:28,color:"black.high",mb:2},null==s?void 0:s.name),!u&&r.createElement(t.Heading,{fontWeight:400,fontSize:"18px",lineHeight:28,mb:2},"Upload File"),r.createElement(t.Text,null,u?"(Klik atau drag untuk mengganti file)":"(Klik atau drag untuk input file)"))),null==d?void 0:d(x))};le.defaultProps={onHandleUploadFile:void 0,onHandleRejections:void 0,renderError:void 0,selected:!1};const pe={baseStyle:{fontSize:"body.1",fontWeight:"normal",lineHeight:"1.25",minW:24,px:4,py:2,borderRadius:"md",_disabled:{opacity:.3},_hover:{_disabled:{opacity:.3}},_active:{_disabled:{opacity:.3}},_loading:{opacity:.7}},sizes:{lg:{fontSize:"button.lg",h:12},md:{fontSize:"button.md",h:9},sm:{fontSize:"button.sm",h:6}},variants:{solid:{color:"white",bg:"primary.500",_disabled:{bg:"primary.700"},_hover:{bg:"primary.600"},_active:{bg:"primary.700"},_focus:{bg:"primary.700"}},outline:e=>({color:"primary.500",borderWidth:1,borderStyle:"inside",bg:b.mode("white","transparent")(e),borderColor:b.mode("primary.500","primary.500")(e),_hover:{bg:"primary.50"},_active:{bg:"primary.100"},_focus:{bg:"primary.100"}}),"outline-danger":{color:"danger.500",bg:"white",borderStyle:"inside",borderWidth:1,borderColor:"danger.500"},ghost:{color:"primary.500",_disabled:{bg:"primary.100"}},link:{bg:"transparent",color:"primary.500"}},defaultProps:{size:"md",variant:"solid",orientation:"vertical",colorScheme:"primary"}},{definePartsStyle:se}=f.createMultiStyleConfigHelpers(k.checkboxAnatomy.keys),me=f.cssVar("checkbox-size"),ue={baseStyle:{borderRadius:"sm"},sizes:{sm:se({control:{[me.variable]:"sizes.4",borderRadius:"md"},label:{fontSize:"text.sm"},icon:{fontSize:"3xs"}}),md:se({control:{[me.variable]:"sizes.5",borderRadius:"md"},label:{fontSize:"text.md"},icon:{fontSize:"2xs"}}),lg:se({control:{[me.variable]:"sizes.6",borderRadius:"md"},label:{fontSize:"text.lg"},icon:{fontSize:"xs"}})},variants:{},defaultProps:{size:"sm",variant:"solid",orientation:"vertical",colorScheme:"primary"}},_e=f.defineStyleConfig({baseStyle:f.defineStyle({fontSize:"field.sm",marginEnd:1,mb:1})}),{definePartsStyle:ge,defineMultiStyleConfig:he}=f.createMultiStyleConfigHelpers(k.inputAnatomy.keys),be=ge({field:{width:"100%",minWidth:0,outline:0,px:2.5,py:2,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",color:"black.high",_disabled:{bg:"neutral.300",border:"1px solid",borderColor:"neutral.400",cursor:"not-allowed"},_placeholder:{color:"black.low"}}}),ke={lg:f.defineStyle({fontSize:"field.lg",h:12,borderRadius:"md"}),md:f.defineStyle({fontSize:"field.md",h:10,borderRadius:"md"}),sm:f.defineStyle({fontSize:"field.sm",h:9.5,borderRadius:"md"})},fe=he({baseStyle:be,sizes:{lg:ge({field:ke.lg,addon:ke.lg}),md:ge({field:ke.md,addon:ke.md}),sm:ge({field:ke.sm,addon:ke.sm})},variants:{outline:ge(e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n,readOnlyBorderColor:a}=function(e){const{focusBorderColor:t,errorBorderColor:r,readOnlyBorderColor:n}=e;return{focusBorderColor:t||b.mode("primary.500","primary.300")(e),errorBorderColor:r||b.mode("danger.500","danger.300")(e),readOnlyBorderColor:n||b.mode(".500","danger.300")(e)}}(e);return{field:{border:"1px solid",borderColor:b.mode("dark.200","inherit")(e),bg:b.mode("white","inherit")(e),color:b.mode("inherit","white")(e),_hover:{borderColor:b.mode("gray.300","whiteAlpha.400")(e)},_readOnly:{userSelect:"all",borderColor:b.getColor(t,a),boxShadow:"0 0 0 0 "+b.getColor(t,a)},_invalid:{borderColor:b.getColor(t,n),boxShadow:"0 0 0 0 "+b.getColor(t,n)},_focusVisible:{zIndex:1,borderColor:b.getColor(t,r),boxShadow:"0 0 0 0 "+b.getColor(t,r)}},addon:{border:"1px solid",borderColor:b.mode("inherit","whiteAlpha.50")(e),bg:b.mode("gray.100","whiteAlpha.300")(e)}}}),unstyled:ge({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}})},defaultProps:{size:"sm",variant:"outline"}}),{definePartsStyle:xe}=f.createMultiStyleConfigHelpers(k.radioAnatomy.keys),ye={baseStyle:xe({control:{_checked:{borderColor:"primary.500",bg:"white",_before:{h:"72%",w:"72%",bg:"primary.500"},_hover:{borderColor:"primary.500",bg:"gray.200"}}}}),sizes:{sm:xe({control:{w:"3",h:"3"},label:{fontSize:"text.sm"}}),md:xe({control:{w:"4",h:"4"},label:{fontSize:"text.md"}}),lg:xe({control:{w:"5",h:"5"},label:{fontSize:"text.lg"}})},variants:{},defaultProps:{size:"sm",variant:"solid",orientation:"vertical",colorScheme:"primary"}},{definePartsStyle:ve,defineMultiStyleConfig:we}=t.createMultiStyleConfigHelpers(k.switchAnatomy.keys),Ce=we({baseStyle:ve({container:{},thumb:{bg:"white"},track:{bg:"neutral.400",p:1,_checked:{bg:"primary.500"}}})}),{definePartsStyle:Ee}=f.createMultiStyleConfigHelpers(k.popoverAnatomy.keys),Se=t.extendTheme({...T,components:{__proto__:null,Button:pe,Checkbox:ue,FormLabel:_e,Input:fe,Radio:ye,Switch:Ce,Popover:{baseStyle:e=>Ee({popper:{background:b.mode("white","inherit")(e)}})},Textarea:{baseStyle:{_hover:{borderColor:"primary.500",boxShadow:"none",outline:"none"},_focus:{borderColor:"primary.500",boxShadow:"none",outline:"none"},_focusVisible:{borderColor:"primary.500",boxShadow:"none",outline:"none"},_focusWithin:{borderColor:"primary.500",boxShadow:"none",outline:"none"}}}},styles:{global:{"*::-webkit-scrollbar-thumb":{background:"neutral.400"},body:{fontSize:"text.sm"}}},config:{initialColorMode:"light",useSystemColorMode:!1}}),Fe=r.createContext({instance:void 0}),Me=({children:e,config:t,requestInterceptors:a,responseInterceptors:o})=>{const i=r.useRef(x.create(t));r.useEffect(()=>{null==a||a.forEach(e=>{i.current.interceptors.request.use(e)}),null==o||o.forEach(e=>{i.current.interceptors.response.use(e)})},[a,o]);const c=r.useMemo(()=>({instance:i.current}),[]);return n.createElement(Fe.Provider,{value:c},e)};Me.displayName="Provider",Object.defineProperty(exports,"AlertDialog",{enumerable:!0,get:function(){return t.AlertDialog}}),Object.defineProperty(exports,"AlertDialogBody",{enumerable:!0,get:function(){return t.ModalBody}}),Object.defineProperty(exports,"AlertDialogCloseButton",{enumerable:!0,get:function(){return t.ModalCloseButton}}),Object.defineProperty(exports,"AlertDialogContent",{enumerable:!0,get:function(){return t.AlertDialogContent}}),Object.defineProperty(exports,"AlertDialogFooter",{enumerable:!0,get:function(){return t.ModalFooter}}),Object.defineProperty(exports,"AlertDialogHeader",{enumerable:!0,get:function(){return t.ModalHeader}}),Object.defineProperty(exports,"AlertDialogOverlay",{enumerable:!0,get:function(){return t.ModalOverlay}}),Object.defineProperty(exports,"Drawer",{enumerable:!0,get:function(){return t.Drawer}}),Object.defineProperty(exports,"DrawerBody",{enumerable:!0,get:function(){return t.ModalBody}}),Object.defineProperty(exports,"DrawerCloseButton",{enumerable:!0,get:function(){return t.ModalCloseButton}}),Object.defineProperty(exports,"DrawerContent",{enumerable:!0,get:function(){return t.DrawerContent}}),Object.defineProperty(exports,"DrawerFooter",{enumerable:!0,get:function(){return t.ModalFooter}}),Object.defineProperty(exports,"DrawerHeader",{enumerable:!0,get:function(){return t.ModalHeader}}),Object.defineProperty(exports,"DrawerOverlay",{enumerable:!0,get:function(){return t.ModalOverlay}}),Object.defineProperty(exports,"Modal",{enumerable:!0,get:function(){return t.Modal}}),Object.defineProperty(exports,"ModalContent",{enumerable:!0,get:function(){return t.ModalContent}}),Object.defineProperty(exports,"ModalContextProvider",{enumerable:!0,get:function(){return t.ModalContextProvider}}),Object.defineProperty(exports,"ModalFocusScope",{enumerable:!0,get:function(){return t.ModalFocusScope}}),Object.defineProperty(exports,"ModalOverlay",{enumerable:!0,get:function(){return t.ModalOverlay}}),Object.defineProperty(exports,"TabIndicator",{enumerable:!0,get:function(){return t.TabIndicator}}),Object.defineProperty(exports,"TabPanels",{enumerable:!0,get:function(){return t.TabPanels}}),Object.defineProperty(exports,"Tabs",{enumerable:!0,get:function(){return t.Tabs}}),Object.defineProperty(exports,"TabsDescendantsProvider",{enumerable:!0,get:function(){return t.TabsDescendantsProvider}}),Object.defineProperty(exports,"TabsProvider",{enumerable:!0,get:function(){return t.TabsProvider}}),Object.defineProperty(exports,"useDrawerContext",{enumerable:!0,get:function(){return t.useDrawerContext}}),Object.defineProperty(exports,"useModal",{enumerable:!0,get:function(){return t.useModal}}),Object.defineProperty(exports,"useModalContext",{enumerable:!0,get:function(){return t.useModalContext}}),Object.defineProperty(exports,"useModalStyles",{enumerable:!0,get:function(){return t.useModalStyles}}),Object.defineProperty(exports,"useTab",{enumerable:!0,get:function(){return t.useTab}}),Object.defineProperty(exports,"useTabIndicator",{enumerable:!0,get:function(){return t.useTabIndicator}}),Object.defineProperty(exports,"useTabList",{enumerable:!0,get:function(){return t.useTabList}}),Object.defineProperty(exports,"useTabPanel",{enumerable:!0,get:function(){return t.useTabPanel}}),Object.defineProperty(exports,"useTabPanels",{enumerable:!0,get:function(){return t.useTabPanels}}),Object.defineProperty(exports,"useTabs",{enumerable:!0,get:function(){return t.useTabs}}),Object.defineProperty(exports,"useTabsContext",{enumerable:!0,get:function(){return t.useTabsContext}}),Object.defineProperty(exports,"useTabsDescendant",{enumerable:!0,get:function(){return t.useTabsDescendant}}),Object.defineProperty(exports,"useTabsDescendants",{enumerable:!0,get:function(){return t.useTabsDescendants}}),Object.defineProperty(exports,"useTabsDescendantsContext",{enumerable:!0,get:function(){return t.useTabsDescendantsContext}}),Object.defineProperty(exports,"useTabsStyles",{enumerable:!0,get:function(){return t.useTabsStyles}}),exports.BreadCrumb=y,exports.DataTable=w,exports.DatePickerMonth=F,exports.Datepicker=S,exports.Field=R,exports.Header=U,exports.InputField=I,exports.MainMenu=J,exports.ModalBody=G,exports.ModalCloseButton=X,exports.ModalFooter=Y,exports.ModalHeader=K,exports.MultiDatePickerMonth=j,exports.Pagination=ee,exports.PaginationDetail=({page:e,limit:n,length:a,scale:o=300,fontSize:i="xs",lineHeight:c=18,...d})=>r.createElement(t.Text,Object.assign({scale:o,fontSize:i,lineHeight:c},d),`${(e-1)*n+1}-${n*e<a?n*e:a} dari ${a} item`),exports.PaginationFilter=te,exports.Provider=Me,exports.ProviderContext=Fe,exports.Select=function({styles:e,...t}){const{colorMode:r}=p.useColorMode();return n.createElement(m,Object.assign({},t,{styles:{...ae(r),...e},theme:oe}))},exports.SelectAsync=function({styles:e,...t}){const{colorMode:r}=p.useColorMode();return n.createElement(u.AsyncPaginate,Object.assign({},t,{styles:{...ae(r),...e},theme:oe}))},exports.SelectAsyncCreatable=function({styles:e,...t}){const{colorMode:r}=p.useColorMode();return n.createElement(_,Object.assign({},t,{styles:{...ae(r),...e},theme:oe}))},exports.SelectCreatable=function({styles:e,...t}){const{colorMode:r}=p.useColorMode();return n.createElement(g,Object.assign({},t,{styles:{...ae(r),...e},theme:oe}))},exports.Tab=ie,exports.TabList=ce,exports.TabPanel=de,exports.TextareaField=H,exports.Uploader=le,exports.theme=Se,exports.useInternalUI=()=>{const{instance:e}=r.useContext(Fe);return{instance:e}};
37
+ `,px:6,py:4},r.createElement(t.Icon,{as:K.get(e.title),mr:3}),r.createElement(t.Text,{fontSize:"text.sm"},o),p&&r.createElement(t.Box,{width:.5,height:8,position:"absolute",bg:"primary.500",right:0,zIndex:"popover"})))}))))))}))));J.defaultProps={navigations:void 0,as:"a",host:void 0};const Q=t.forwardRef(({className:e,style:r,isActive:a,children:o,...i},c)=>{const d=t.useColorModeValue("neutral.300","mirage.900"),l=t.useColorModeValue("black.high","primary.300"),p=t.useColorModeValue("secondary.50","primary.500"),s=t.useColorModeValue("primary.500","white");return n.createElement(t.Button,Object.assign({"data-test-id":"Pagination-Button",ref:c,className:e,style:r,borderRadius:50,fontWeight:700,m:0,px:3,py:2,h:8,minW:"auto",background:a?"primary.500":d,color:a?"white":l,_hover:a?{}:{background:p,color:s},_disabled:{background:t.useColorModeValue("neutral.300","mirage.900"),color:"neutral.600",pointerEvents:"none"}},i),o)});Q.displayName="PaginationButton",Q.defaultProps={isActive:void 0};const ee=({color:e,isDisabled:n,onClick:a,visuallyHidden:o,icon:i})=>r.createElement(Q,{"data-test-id":"DLVCc_fBK35spHm5WxjcJ",color:e,isDisabled:n,onClick:a},r.createElement(t.VisuallyHidden,null,o),i);ee.defaultProps={color:void 0,isDisabled:void 0,onClick:void 0,visuallyHidden:void 0,icon:void 0};const te=({className:e,current:n,total:a,onSelect:i})=>{const c=t.useColorModeValue("secondary.100","primary.500"),d=t.useColorModeValue("primary.500","secondary.100"),l=1===n,p=l?c:d,s=n===a,m=s?c:d,u=e=>{i&&i(e)};return r.createElement(t.Box,{className:e,display:"inline-flex",alignItems:"center"},r.createElement(t.Box,{mr:1},r.createElement(ee,{"data-test-id":"Pagination-Button",color:p,isDisabled:l,onClick:()=>u(1),visuallyHidden:"First Page",icon:r.createElement(o.ArrowLeftIcon,{width:2})})),r.createElement(t.Box,{backgroundColor:t.useColorModeValue("neutral.300","mirage.900"),borderRadius:50},r.createElement(ee,{"data-test-id":"Pagination-Button",color:p,isDisabled:l,onClick:()=>u(n-1),visuallyHidden:"Previous Page",icon:r.createElement(o.ChevronLeftIcon,null)}),(()=>{const e=[];let t,r;5<a?(t=Math.max(Math.min(n-Math.floor(2.5),a-5+1),1),r=t+5-1):(t=1,r=a);for(let n=t;n<=r;++n)e.push(n);return e})().map(e=>r.createElement(Q,{"data-test-id":"Pagination-Button",key:e,isActive:e===n,onClick:()=>"number"==typeof e?u(e):null},r.createElement(t.Text,{scale:300,fontSize:"text.sm",lineHeight:18,fontWeight:500},e))),r.createElement(ee,{"data-test-id":"Pagination-Button",color:m,isDisabled:s,onClick:()=>u(n+1),visuallyHidden:"Next Page",icon:r.createElement(o.ChevronRightIcon,null)})),r.createElement(t.Box,{ml:1},r.createElement(ee,{"data-test-id":"Pagination-Button",color:m,isDisabled:s,onClick:()=>u(a),visuallyHidden:"Last Page",icon:r.createElement(o.ArrowRightIcon,{width:2})})))};te.defaultProps={className:void 0,onSelect:void 0},te.displayName="Pagination";const re=({limit:e,label:n="Baris per halaman:",items:o,onChange:i,...c})=>{const[d,l]=r.useState(e);return r.createElement(t.Box,{display:"flex",flexDirection:"row",alignItems:"center"},r.createElement(t.Text,Object.assign({fontSize:"text.sm",lineHeight:18,color:t.useColorModeValue("neutral.900","white")},c),n),r.createElement(t.Select,{textAlign:"center",size:"xs",outline:"none",border:"none",boxShadow:"none",width:18,icon:r.createElement(a.FiChevronDown,null),_focusVisible:{boxShadow:"none"},onChange:e=>{const t=Number(e.target.value);i(t),l(t)},value:d},o.map(e=>r.createElement("option",{key:e,value:e},e))))};re.defaultProps={limit:10,label:void 0};const ne=A.text.sm,ae={fontSize:ne.fontSize,lineHeight:ne.lineHeight,letterSpacing:0};function oe(e){return{control:t=>"dark"===e?{...t,...ae,background:"transparent",color:M.primary[300],borderColor:M.secondary[500]}:{...t,...ae},option:(t,{isSelected:r})=>"dark"===e?{...t,...ae,background:r?M.primary[700]:M.dark[800],color:"white"}:{...t,...ae},menu:t=>"dark"===e?{...t,...ae,background:M.dark[800],zIndex:5}:{...t,...ae,zIndex:5},singleValue:t=>"dark"===e?{...t,...ae,color:"white"}:{...t,...ae},input:t=>"dark"===e?{...t,...ae,color:"white"}:{...t,...ae},dropdownIndicator:t=>"dark"===e?{...t,...ae,color:M.secondary[500]}:{...t,...ae},indicatorSeparator:t=>"dark"===e?{...t,...ae,backgroundColor:M.secondary[500]}:{...t,...ae}}}const ie=e=>({...e,colors:{...e.colors,primary:M.primary[500],primary25:M.primary[50],primary50:M.primary[100],primary75:M.primary[200]}}),ce=t.forwardRef((e,n)=>{var a,o;const i=t.useTab({...e,ref:n}),c=!!i["aria-selected"],d=t.useMultiStyleConfig("Tabs",i);return r.createElement(t.Button,Object.assign({p:3,fontSize:"text.md",_selected:{borderColor:t.useColorModeValue("primary.400","primary.300"),color:t.useColorModeValue("primary.500","primary.300"),transform:"translateY(-2px)"},color:t.useColorModeValue("black.high","primary.300"),_focus:{bg:"none"},__css:d.tab},i),r.createElement(t.Flex,null,null===(a=e.leftAddon)||void 0===a?void 0:a.call(e,{isSelected:c}),i.children,null===(o=e.rightAddon)||void 0===o?void 0:o.call(e,{isSelected:c})))}),de=t.forwardRef((e,r)=>n.createElement(t.TabList,{borderBottom:"1px solid",borderColor:t.useColorModeValue("gray.200","bright-gray.800"),ref:r},e.children)),le=t.forwardRef((e,r)=>n.createElement(t.TabPanel,{px:0,ref:r},e.children)),pe=({onHandleUploadFile:e,onHandleRejections:n,accept:a,multiple:o,selected:i,maxFiles:c=1,renderError:d,validator:l,...p})=>{const[s,m]=r.useState(),[u,_]=r.useState(i||!1),g=r.useCallback(t=>{t.length>0&&(null==e||e(t),o||(_(!0),m(t[0])))},[o,e]),{getRootProps:b,getInputProps:k,isDragActive:f,fileRejections:x}=h.useDropzone({onDrop:g,accept:a,maxFiles:c,multiple:o,validator:l});r.useEffect(()=>{x.length>0&&n&&n(x)},[x,n]);const y=r.useMemo(()=>{const e=x.length>0;return e&&_(!1),e},[x]);return r.useEffect(()=>{_(null!=i&&i)},[i]),r.createElement(t.Stack,{direction:"column"},r.createElement(t.Flex,Object.assign({minH:200,border:"1px dashed",borderColor:y?"danger.500":"primary.500",alignItems:"center",justifyContent:"center",cursor:"pointer"},p,b()),r.createElement("input",Object.assign({},k())),f?r.createElement(t.Text,null,"Drop file disini..."):r.createElement(t.Flex,{flexDirection:"column",alignItems:"center",color:y?"danger.500":"primary.500"},!o&&u&&r.createElement(t.Heading,{fontWeight:400,fontSize:"18px",lineHeight:28,color:"black.high",mb:2},null==s?void 0:s.name),!u&&r.createElement(t.Heading,{fontWeight:400,fontSize:"18px",lineHeight:28,mb:2},"Upload File"),r.createElement(t.Text,null,u?"(Klik atau drag untuk mengganti file)":"(Klik atau drag untuk input file)"))),null==d?void 0:d(x))};pe.defaultProps={onHandleUploadFile:void 0,onHandleRejections:void 0,renderError:void 0,selected:!1};const se={baseStyle:{fontSize:"body.1",fontWeight:"normal",lineHeight:"1.25",minW:24,px:4,py:2,borderRadius:"md",_disabled:{opacity:.3},_hover:{_disabled:{opacity:.3}},_active:{_disabled:{opacity:.3}},_loading:{opacity:.7}},sizes:{lg:{fontSize:"button.lg",h:12},md:{fontSize:"button.md",h:9},sm:{fontSize:"button.sm",h:6}},variants:{solid:{color:"white",bg:"primary.500",_disabled:{bg:"primary.700"},_hover:{bg:"primary.600"},_active:{bg:"primary.700"},_focus:{bg:"primary.700"}},outline:e=>({color:"primary.500",borderWidth:1,borderStyle:"inside",bg:b.mode("white","transparent")(e),borderColor:b.mode("primary.500","primary.500")(e),_hover:{bg:"primary.50"},_active:{bg:"primary.100"},_focus:{bg:"primary.100"}}),"outline-danger":{color:"danger.500",bg:"white",borderStyle:"inside",borderWidth:1,borderColor:"danger.500"},ghost:{color:"primary.500",_disabled:{bg:"primary.100"}},link:{bg:"transparent",color:"primary.500"}},defaultProps:{size:"md",variant:"solid",orientation:"vertical",colorScheme:"primary"}},{definePartsStyle:me}=f.createMultiStyleConfigHelpers(k.checkboxAnatomy.keys),ue=f.cssVar("checkbox-size"),_e={baseStyle:{borderRadius:"sm"},sizes:{sm:me({control:{[ue.variable]:"sizes.4",borderRadius:"md"},label:{fontSize:"text.sm"},icon:{fontSize:"3xs"}}),md:me({control:{[ue.variable]:"sizes.5",borderRadius:"md"},label:{fontSize:"text.md"},icon:{fontSize:"2xs"}}),lg:me({control:{[ue.variable]:"sizes.6",borderRadius:"md"},label:{fontSize:"text.lg"},icon:{fontSize:"xs"}})},variants:{},defaultProps:{size:"sm",variant:"solid",orientation:"vertical",colorScheme:"primary"}},ge=f.defineStyleConfig({baseStyle:f.defineStyle({fontSize:"field.sm",marginEnd:1,mb:1})}),{definePartsStyle:he,defineMultiStyleConfig:be}=f.createMultiStyleConfigHelpers(k.inputAnatomy.keys),ke=he({field:{width:"100%",minWidth:0,outline:0,px:2.5,py:2,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",color:"black.high",_disabled:{bg:"neutral.300",border:"1px solid",borderColor:"neutral.400",cursor:"not-allowed"},_placeholder:{color:"black.low"}}}),fe={lg:f.defineStyle({fontSize:"field.lg",h:12,borderRadius:"md"}),md:f.defineStyle({fontSize:"field.md",h:10,borderRadius:"md"}),sm:f.defineStyle({fontSize:"field.sm",h:9.5,borderRadius:"md"})},xe=be({baseStyle:ke,sizes:{lg:he({field:fe.lg,addon:fe.lg}),md:he({field:fe.md,addon:fe.md}),sm:he({field:fe.sm,addon:fe.sm})},variants:{outline:he(e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n,readOnlyBorderColor:a}=function(e){const{focusBorderColor:t,errorBorderColor:r,readOnlyBorderColor:n}=e;return{focusBorderColor:t||b.mode("primary.500","primary.300")(e),errorBorderColor:r||b.mode("danger.500","danger.300")(e),readOnlyBorderColor:n||b.mode(".500","danger.300")(e)}}(e);return{field:{border:"1px solid",borderColor:b.mode("dark.200","inherit")(e),bg:b.mode("white","inherit")(e),color:b.mode("inherit","white")(e),_hover:{borderColor:b.mode("gray.300","whiteAlpha.400")(e)},_readOnly:{userSelect:"all",borderColor:b.getColor(t,a),boxShadow:"0 0 0 0 "+b.getColor(t,a)},_invalid:{borderColor:b.getColor(t,n),boxShadow:"0 0 0 0 "+b.getColor(t,n)},_focusVisible:{zIndex:1,borderColor:b.getColor(t,r),boxShadow:"0 0 0 0 "+b.getColor(t,r)}},addon:{border:"1px solid",borderColor:b.mode("inherit","whiteAlpha.50")(e),bg:b.mode("gray.100","whiteAlpha.300")(e)}}}),unstyled:he({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}})},defaultProps:{size:"sm",variant:"outline"}}),{definePartsStyle:ye}=f.createMultiStyleConfigHelpers(k.radioAnatomy.keys),ve={baseStyle:ye({control:{_checked:{borderColor:"primary.500",bg:"white",_before:{h:"72%",w:"72%",bg:"primary.500"},_hover:{borderColor:"primary.500",bg:"gray.200"}}}}),sizes:{sm:ye({control:{w:"3",h:"3"},label:{fontSize:"text.sm"}}),md:ye({control:{w:"4",h:"4"},label:{fontSize:"text.md"}}),lg:ye({control:{w:"5",h:"5"},label:{fontSize:"text.lg"}})},variants:{},defaultProps:{size:"sm",variant:"solid",orientation:"vertical",colorScheme:"primary"}},{definePartsStyle:we,defineMultiStyleConfig:Ce}=t.createMultiStyleConfigHelpers(k.switchAnatomy.keys),Ee=Ce({baseStyle:we({container:{},thumb:{bg:"white"},track:{bg:"neutral.400",p:1,_checked:{bg:"primary.500"}}})}),{definePartsStyle:Se}=f.createMultiStyleConfigHelpers(k.popoverAnatomy.keys),Fe=t.extendTheme({...T,components:{__proto__:null,Button:se,Checkbox:_e,FormLabel:ge,Input:xe,Radio:ve,Switch:Ee,Popover:{baseStyle:e=>Se({popper:{background:b.mode("white","inherit")(e)}})},Textarea:{baseStyle:{_hover:{borderColor:"primary.500",boxShadow:"none",outline:"none"},_focus:{borderColor:"primary.500",boxShadow:"none",outline:"none"},_focusVisible:{borderColor:"primary.500",boxShadow:"none",outline:"none"},_focusWithin:{borderColor:"primary.500",boxShadow:"none",outline:"none"}}}},styles:{global:{"*::-webkit-scrollbar-thumb":{background:"neutral.400"},body:{fontSize:"text.sm"}}},config:{initialColorMode:"light",useSystemColorMode:!1}}),Me=r.createContext({instance:void 0}),Pe=({children:e,config:t,requestInterceptors:a,responseInterceptors:o})=>{const i=r.useRef(x.create(t));r.useEffect(()=>{null==a||a.forEach(e=>{i.current.interceptors.request.use(e)}),null==o||o.forEach(e=>{i.current.interceptors.response.use(e)})},[a,o]);const c=r.useMemo(()=>({instance:i.current}),[]);return n.createElement(Me.Provider,{value:c},e)};Pe.displayName="Provider",Object.defineProperty(exports,"AlertDialog",{enumerable:!0,get:function(){return t.AlertDialog}}),Object.defineProperty(exports,"AlertDialogBody",{enumerable:!0,get:function(){return t.ModalBody}}),Object.defineProperty(exports,"AlertDialogCloseButton",{enumerable:!0,get:function(){return t.ModalCloseButton}}),Object.defineProperty(exports,"AlertDialogContent",{enumerable:!0,get:function(){return t.AlertDialogContent}}),Object.defineProperty(exports,"AlertDialogFooter",{enumerable:!0,get:function(){return t.ModalFooter}}),Object.defineProperty(exports,"AlertDialogHeader",{enumerable:!0,get:function(){return t.ModalHeader}}),Object.defineProperty(exports,"AlertDialogOverlay",{enumerable:!0,get:function(){return t.ModalOverlay}}),Object.defineProperty(exports,"Drawer",{enumerable:!0,get:function(){return t.Drawer}}),Object.defineProperty(exports,"DrawerBody",{enumerable:!0,get:function(){return t.ModalBody}}),Object.defineProperty(exports,"DrawerCloseButton",{enumerable:!0,get:function(){return t.ModalCloseButton}}),Object.defineProperty(exports,"DrawerContent",{enumerable:!0,get:function(){return t.DrawerContent}}),Object.defineProperty(exports,"DrawerFooter",{enumerable:!0,get:function(){return t.ModalFooter}}),Object.defineProperty(exports,"DrawerHeader",{enumerable:!0,get:function(){return t.ModalHeader}}),Object.defineProperty(exports,"DrawerOverlay",{enumerable:!0,get:function(){return t.ModalOverlay}}),Object.defineProperty(exports,"Modal",{enumerable:!0,get:function(){return t.Modal}}),Object.defineProperty(exports,"ModalContent",{enumerable:!0,get:function(){return t.ModalContent}}),Object.defineProperty(exports,"ModalContextProvider",{enumerable:!0,get:function(){return t.ModalContextProvider}}),Object.defineProperty(exports,"ModalFocusScope",{enumerable:!0,get:function(){return t.ModalFocusScope}}),Object.defineProperty(exports,"ModalOverlay",{enumerable:!0,get:function(){return t.ModalOverlay}}),Object.defineProperty(exports,"TabIndicator",{enumerable:!0,get:function(){return t.TabIndicator}}),Object.defineProperty(exports,"TabPanels",{enumerable:!0,get:function(){return t.TabPanels}}),Object.defineProperty(exports,"Tabs",{enumerable:!0,get:function(){return t.Tabs}}),Object.defineProperty(exports,"TabsDescendantsProvider",{enumerable:!0,get:function(){return t.TabsDescendantsProvider}}),Object.defineProperty(exports,"TabsProvider",{enumerable:!0,get:function(){return t.TabsProvider}}),Object.defineProperty(exports,"useDrawerContext",{enumerable:!0,get:function(){return t.useDrawerContext}}),Object.defineProperty(exports,"useModal",{enumerable:!0,get:function(){return t.useModal}}),Object.defineProperty(exports,"useModalContext",{enumerable:!0,get:function(){return t.useModalContext}}),Object.defineProperty(exports,"useModalStyles",{enumerable:!0,get:function(){return t.useModalStyles}}),Object.defineProperty(exports,"useTab",{enumerable:!0,get:function(){return t.useTab}}),Object.defineProperty(exports,"useTabIndicator",{enumerable:!0,get:function(){return t.useTabIndicator}}),Object.defineProperty(exports,"useTabList",{enumerable:!0,get:function(){return t.useTabList}}),Object.defineProperty(exports,"useTabPanel",{enumerable:!0,get:function(){return t.useTabPanel}}),Object.defineProperty(exports,"useTabPanels",{enumerable:!0,get:function(){return t.useTabPanels}}),Object.defineProperty(exports,"useTabs",{enumerable:!0,get:function(){return t.useTabs}}),Object.defineProperty(exports,"useTabsContext",{enumerable:!0,get:function(){return t.useTabsContext}}),Object.defineProperty(exports,"useTabsDescendant",{enumerable:!0,get:function(){return t.useTabsDescendant}}),Object.defineProperty(exports,"useTabsDescendants",{enumerable:!0,get:function(){return t.useTabsDescendants}}),Object.defineProperty(exports,"useTabsDescendantsContext",{enumerable:!0,get:function(){return t.useTabsDescendantsContext}}),Object.defineProperty(exports,"useTabsStyles",{enumerable:!0,get:function(){return t.useTabsStyles}}),exports.BreadCrumb=y,exports.DataTable=w,exports.DatePickerMonth=F,exports.Datepicker=S,exports.Field=j,exports.Header=U,exports.InputField=I,exports.MainMenu=J,exports.ModalBody=G,exports.ModalCloseButton=Z,exports.ModalFooter=X,exports.ModalHeader=Y,exports.MultiDatePickerMonth=R,exports.Pagination=te,exports.PaginationDetail=({page:e,limit:n,length:a,scale:o=300,fontSize:i="xs",lineHeight:c=18,...d})=>r.createElement(t.Text,Object.assign({scale:o,fontSize:i,lineHeight:c},d),`${(e-1)*n+1}-${n*e<a?n*e:a} dari ${a} item`),exports.PaginationFilter=re,exports.Provider=Pe,exports.ProviderContext=Me,exports.Select=function({styles:e,...t}){const{colorMode:r}=p.useColorMode();return n.createElement(m,Object.assign({},t,{styles:{...oe(r),...e},theme:ie}))},exports.SelectAsync=function({styles:e,...t}){const{colorMode:r}=p.useColorMode();return n.createElement(u.AsyncPaginate,Object.assign({},t,{styles:{...oe(r),...e},theme:ie}))},exports.SelectAsyncCreatable=function({styles:e,...t}){const{colorMode:r}=p.useColorMode();return n.createElement(_,Object.assign({},t,{styles:{...oe(r),...e},theme:ie}))},exports.SelectCreatable=function({styles:e,...t}){const{colorMode:r}=p.useColorMode();return n.createElement(g,Object.assign({},t,{styles:{...oe(r),...e},theme:ie}))},exports.Tab=ce,exports.TabList=de,exports.TabPanel=le,exports.TextareaField=H,exports.Uploader=pe,exports.theme=Fe,exports.useInternalUI=()=>{const{instance:e}=r.useContext(Me);return{instance:e}};
38
38
  //# sourceMappingURL=internal-ui.cjs.production.min.js.map