@ctlyst.id/internal-ui 2.0.27 → 2.0.29-canary.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/badge/__stories__/badge.stories.d.ts +0 -3
- package/dist/components/base/__stories__/switch.stories.d.ts +0 -3
- package/dist/components/breadcrumb/__stories__/breadcrumb.stories.d.ts +0 -3
- package/dist/components/button/__stories__/button.stories.d.ts +0 -3
- package/dist/components/card/__stories__/card.stories.d.ts +0 -3
- package/dist/components/checkbox/__stories__/checkbox-group.stories.d.ts +0 -3
- package/dist/components/checkbox/__stories__/checkbox.stories.d.ts +0 -3
- package/dist/components/chips/__stories__/chips.stories.d.ts +0 -3
- package/dist/components/data-table/__stories__/datatable.stories.d.ts +0 -3
- package/dist/components/datepicker/__stories__/datepicker.stories.d.ts +0 -3
- package/dist/components/form/__stories__/textarea.stories.d.ts +0 -3
- package/dist/components/header/__stories__/header.stories.d.ts +0 -3
- package/dist/components/loader/__stories__/loader.stories.d.ts +0 -3
- package/dist/components/modal/__stories__/modal.stories.d.ts +0 -3
- package/dist/components/navigation/__stories__/navigation.stories.d.ts +0 -3
- package/dist/components/pagination/__stories__/pagination.stories.d.ts +0 -3
- package/dist/components/radio/__stories__/radio-group.stories.d.ts +0 -3
- package/dist/components/radio/__stories__/radio.stories.d.ts +0 -3
- package/dist/components/rating/__stories__/rating.stories.d.ts +0 -3
- package/dist/components/select/__stories__/select.stories.d.ts +0 -3
- package/dist/components/switch/__stories__/switch.stories.d.ts +0 -3
- package/dist/components/tabs/__stories__/tabs.stories.d.ts +0 -3
- package/dist/components/tooltip/__stories__/tooltip.stories.d.ts +0 -3
- package/dist/components/uploader/__stories__/uploader.stories.d.ts +0 -3
- package/dist/config/theme/components/loader.d.ts +1 -1
- package/dist/config/theme/foundations/index.d.ts +0 -1
- package/dist/config/theme/themeConfiguration.d.ts +1 -0
- package/dist/internal-ui.cjs.development.js +286 -437
- package/dist/internal-ui.cjs.development.js.map +1 -1
- package/dist/internal-ui.cjs.production.min.js +5 -5
- package/dist/internal-ui.cjs.production.min.js.map +1 -1
- package/dist/internal-ui.esm.js +287 -439
- package/dist/internal-ui.esm.js.map +1 -1
- package/dist/provider/__stories__/provider.stories.d.ts +4 -0
- package/package.json +5 -4
- package/dist/config/theme/foundations/colors.d.ts +0 -158
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@chakra-ui/shared-utils"),r=require("@chakra-ui/system"),n=require("react"),a=e(n),o=require("@chakra-ui/react-context"),i=require("@ctlyst.id/internal-icon"),c=require("@chakra-ui/utils"),l=require("@chakra-ui/react"),d=require("react-icons/fi"),s=require("@chakra-ui/icons"),p=require("@emotion/react"),u=require("@tanstack/react-table"),m=e(require("classnames")),g=e(require("react-datepicker")),b=e(require("@emotion/styled")),h=e(require("react-select")),_=require("react-select-async-paginate"),f=e(require("react-select/async-creatable")),x=e(require("react-select/creatable")),k=require("react-dropzone"),y=require("@chakra-ui/anatomy"),v=require("@chakra-ui/styled-system"),w=require("@chakra-ui/theme-tools"),C=e(require("axios"));function E(){return a.createElement(i.Info,{color:"inherit",size:4})}const[S,P]=o.createContext({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[F,j]=o.createContext({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),O={info:{icon:E,colorScheme:"info"},warning:{icon:E,colorScheme:"warning"},success:{icon:function(){return a.createElement(i.CheckCircle,{color:"inherit",size:4})},colorScheme:"success"},error:{icon:function(){return a.createElement(i.AlertTriangle,{color:"inherit",size:4})},colorScheme:"danger"}},M=r.forwardRef((function(e,n){var o;const{status:i="info",addRole:c=!0,children:l,...d}=r.omitThemingProps(e),s=null!==(o=e.colorScheme)&&void 0!==o?o:function(e){return O[e].colorScheme}(i),p=r.useMultiStyleConfig("Alert",{...e,colorScheme:s}),u={width:"100%",display:"grid",gridTemplateColumns:"auto 1fr auto auto",alignItems:"center",position:"relative",overflow:"hidden",...p.container};return a.createElement(S,{value:{status:i}},a.createElement(F,{value:p},a.createElement(r.chakra.div,Object.assign({"data-status":i,role:c?"alert":void 0,ref:n},d,{className:t.cx("chakra-alert",e.className),__css:u}),l)))}));M.displayName="Alert";const T=l.forwardRef((e,t)=>{const r=l.useStyleConfig("LoaderStyle",e);return a.createElement(l.Box,{ref:t,__css:r})}),B=l.forwardRef((e,t)=>{const{children:r,variant:n,size:o,...i}=e;return a.createElement(l.Button,Object.assign({size:o,variant:n,spinner:a.createElement(T,{size:"lg"===o?"md":"md"===o?"sm":"xs",color:"primary"===n||"danger"===n?"white":"outline-danger"===n?"danger":"primary"}),ref:t},i),r)});function A({children:e,className:t}){const r=j().action;return a.createElement(B,{"data-test-id":"alert-action",className:c.cx("chakra-alert__close",t),variant:"link",color:"inherit",fontWeight:"700",__css:r},e)}function D({className:e,children:n,...o}){const c=j().close;return a.createElement(r.chakra.span,Object.assign({display:"inherit","data-status":"alert-close"},o,{className:t.cx("chakra-alert__close",e),__css:c}),n||a.createElement(i.Close,{color:"inherit",size:4}))}A.displayName="AlertAction",D.displayName="AlertClose";const z=r.forwardRef((function(e,n){const o=j(),{status:i}=P(),c={display:"inline",...o.description};return a.createElement(r.chakra.div,Object.assign({ref:n,"data-status":i},e,{className:t.cx("chakra-alert__desc",e.className),__css:c}))}));function I({className:e,children:n,...o}){const{status:i}=P(),c=function(e){return O[e].icon}(i),l=j().icon;return a.createElement(r.chakra.span,Object.assign({display:"inherit","data-status":i},o,{className:t.cx("chakra-alert__icon",e),__css:l}),n||a.createElement(c,null))}z.displayName="AlertDescription",I.displayName="AlertIcon";const R=r.forwardRef((function(e,n){const o=j(),{status:i}=P();return a.createElement(r.chakra.div,Object.assign({ref:n,"data-status":i},e,{className:t.cx("chakra-alert__title",e.className),__css:o.title}))}));R.displayName="AlertTitle";const H=e=>{const{children:t,pill:r,...n}=e;return a.createElement(l.Badge,Object.assign({borderRadius:r?10:4,variant:"primary-solid",padding:"0 8px",height:"18px",display:"inline-flex",alignItems:"center",justifyContent:"space-between",textTransform:"none"},n),t)};H.defaultProps={pill:!1};const q=e=>{const{title:t,children:r,parents:a,className:o,disableHome:i,spacing:c=2}=e,[s,p]=l.useToken("colors",["neutral.600","dark.500"]);return n.createElement(l.Box,{"data-test-id":"CT_component_breadcrumb_breadcrumb",className:o,display:"flex",justifyContent:"space-between",alignItems:"center",paddingY:2},n.createElement(l.Box,{display:"flex",alignItems:"center"},n.createElement(l.Text,{pr:2,fontWeight:600,textStyle:"heading.4",color:l.useColorModeValue("neutral.700","white")},t),n.createElement(l.Box,{h:"22px",borderLeft:"1px solid",borderColor:l.useColorModeValue(s,"white")}),n.createElement(l.Breadcrumb,{separator:n.createElement(d.FiChevronsRight,{color:l.useColorModeValue(s,p),size:14}),pl:2.5,pr:4,spacing:c,sx:{ol:{display:"flex",alignItems:"center"}},display:"flex",alignItems:"center",className:"breadcrumb-wrapper"},n.createElement(l.BreadcrumbItem,null,n.createElement(l.BreadcrumbLink,{href:i?void 0:"/",style:{...i&&{cursor:"default"}}},n.createElement(d.FiHome,{className:"align-top",size:16,color:l.useColorModeValue("#12784A","#ffffff")}))),null==a?void 0:a.map(e=>n.createElement(l.BreadcrumbItem,{key:e.name},n.createElement(l.BreadcrumbLink,{"data-test-id":"iadKcMAul3QAdvmfIQjRE",href:e.disable?void 0:e.link,onClick:e.onClick,style:{...e.disable&&{cursor:"default"}},_hover:{textDecoration:"none"}},n.createElement(l.Text,{color:e.disable?"dark.600":l.useColorModeValue("primary.500","white"),fontSize:"text.sm",fontWeight:400},e.name)))),n.createElement(l.BreadcrumbItem,null,n.createElement(l.BreadcrumbLink,{_hover:{textDecor:"none",cursor:"default"}},n.createElement(l.Text,{color:l.useColorModeValue(s,"white"),fontSize:"text.sm",fontWeight:400},t))))),r&&n.createElement(l.Box,null,r))};q.defaultProps={children:void 0,parents:void 0,className:void 0,disableHome:void 0,spacing:2};const W=n.forwardRef(({children:e,...t},r)=>{const n=l.useStyleConfig("Card",t);return a.createElement(l.Card,Object.assign({__css:n,backgroundColor:"white.high",ref:r},t),e)});W.defaultProps={withShadow:!0,isRounded:!0};const L=l.forwardRef(({isError:e=!1,helpText:t="",errorText:r="",boxProps:n,children:o,isDisabled:i,...c},d)=>{const s=e?"errors":"unstyled";return a.createElement(l.Box,Object.assign({},n),a.createElement(l.Box,{display:"flex"},a.createElement(l.Checkbox,Object.assign({variant:s,ref:d},c,{isDisabled:i}),o&&a.createElement(l.Text,{as:"span",display:"block",textStyle:"text.sm",color:i?"black.medium":"black.high"},o))),(e||t)&&a.createElement(l.Box,{mt:"5px",ml:"24px"},e?a.createElement(l.Text,{as:"span",display:"block",textStyle:"text.xs",color:"danger.500"},r):a.createElement(l.Text,{as:"span",display:"block",textStyle:"text.xs",color:"black.medium"},t)))});L.defaultProps={isError:!1,helpText:"",errorText:"",boxProps:{}};const V=e=>{const{label:t,isError:r,errorMessage:n,leftHelperText:o,rightHelperText:i,isRequired:c,children:d,isSuccess:s,boxProps:p={}}=e,u=r?"danger.500":s?"success.500":"black.medium",m=i&&(!o||r&&!n)?"flex-end":"space-between";return a.createElement(l.FormControl,Object.assign({isInvalid:r},p),t&&("string"==typeof t?a.createElement(l.FormLabel,{mb:1,fontSize:"text.sm",requiredIndicator:void 0},c&&a.createElement(l.Box,{as:"span",color:"danger.500",ml:0,mr:1},"*"),t):t),d,(r&&n||o||i)&&a.createElement(l.Box,{display:"flex",width:"full",justifyContent:m},r?"string"==typeof n?a.createElement(l.FormErrorMessage,{fontSize:"text.xs",color:"danger.500",mt:1},n):n:o&&("string"==typeof o?a.createElement(l.FormHelperText,{fontSize:"text.xs",color:u,mt:1},o):o),i&&("string"==typeof i?a.createElement(l.FormHelperText,{fontSize:"text.xs",color:u,mt:1},i):i)))};function N(e){const{children:t,label:r,helpText:n,isError:o,errorMessage:i,...c}=e;return a.createElement(V,Object.assign({},c,{label:r,leftHelperText:n,isError:o,errorMessage:i}),a.createElement(l.Box,{mt:"12px"},a.createElement(l.CheckboxGroup,Object.assign({},c),a.createElement(l.Stack,{spacing:[1,"16px"],direction:["column","row"]},t))))}V.defaultProps={label:"",isError:!1,isSuccess:!1,errorMessage:void 0,leftHelperText:void 0,rightHelperText:void 0,isRequired:!1,boxProps:{}},N.defaultProps={helpText:"",isError:!1,errorMessage:""};const $=({children:e,...t})=>{const{isActive:r,isDisabled:o,onClose:c}=t,d=l.useStyleConfig("Chips",t),s=n.useMemo(()=>r?"white.high":o?"black.low":"primary.500",[r,o]);return a.createElement(l.Box,Object.assign({__css:d,display:"inline-flex",alignItems:"center",justifyContent:"center"},t),e,c&&a.createElement(l.Box,{onClick:o?void 0:c,cursor:o?"not-allowed":"pointer",ml:2,display:"flex",alignItems:"center",justifyContent:"center"},a.createElement(i.Close,{color:s,size:4})))};$.defaultProps={isDisabled:!1,isActive:!1,onClose:void 0,children:void 0,size:"sm"};const G=n.forwardRef((e,t)=>{const{columns:r,dataSource:a=[],isLoading:o,withSelectedRow:i,onSelectedRow:c,onSort:d,sortDescFirst:m,styles:g,sortingState:b,headerSticky:h,manualSorting:_,onRowClick:f}=e,[x,k]=n.useState(!0),[y,v]=n.useState(null!=b?b:[]),[w,C]=n.useState({}),E=n.useMemo(()=>r,[r]),S=n.useMemo(()=>[{id:"select",header:({table:e})=>n.createElement(l.Checkbox,Object.assign({"data-test-id":"select-header-data-table"},{isChecked:e.getIsAllRowsSelected(),isIndeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()})),cell:({row:e})=>n.createElement(l.Checkbox,Object.assign({"data-test-id":"select-data-table-"+e.index},{isChecked:e.getIsSelected(),isIndeterminate:e.getIsSomeSelected(),onChange:e.getToggleSelectedHandler()}))}],[]),P=u.useReactTable({data:a,columns:i?[...S,...E]:E,getCoreRowModel:u.getCoreRowModel(),getSortedRowModel:u.getSortedRowModel(),manualPagination:!0,manualSorting:_,sortDescFirst:m,state:{sorting:y,rowSelection:w},onRowSelectionChange:C,onSortingChange:e=>{v(e)}}),{getSelectedRowModel:F,toggleAllRowsSelected:j}=P,{flatRows:O}=F();return n.useEffect(()=>{const e=O.map(e=>e.original);c&&c(e)},[O]),n.useImperativeHandle(t,()=>({toggleAllRowsSelected:j})),n.useEffect(()=>{d&&!x&&d(y)},[y]),n.useEffect(()=>{k(!1)},[]),n.createElement(l.Box,Object.assign({},e),o&&n.createElement(l.Flex,{w:"100%",h:"100%",pos:"absolute",bg:"white",align:"center",justify:"center",zIndex:2},n.createElement(l.Spinner,{color:"primary.500",thickness:"4px",size:"lg"})),n.createElement(l.Table,Object.assign({},null==g?void 0:g.table),n.createElement(l.Thead,Object.assign({},h?{position:"sticky",top:0,bg:"white",zIndex:1}:{}),P.getHeaderGroups().map(e=>n.createElement(l.Tr,Object.assign({key:e.id,bg:l.useColorModeValue("initial","ebony-clay.700")},null==g?void 0:g.tableRow),e.headers.map(e=>{var t;return n.createElement(l.Th,Object.assign({key:e.id,colSpan:e.colSpan},null==g?void 0:g.tableColumnHeader),n.createElement(l.Flex,{"data-test-id":"CT_Container_TableHeader_"+e.id,textTransform:"capitalize",userSelect:"none",align:"center",gap:2},n.createElement(l.Text,null,u.flexRender(e.column.columnDef.header,e.getContext())),n.createElement(l.Box,{as:"span",cursor:e.column.getCanSort()?"pointer":"default","data-test-id":"CT_Container_SortingIcon_"+e.id,onClick:e.column.getToggleSortingHandler()},null!==(t=e.column.getCanSort()&&{asc:n.createElement(s.ChevronUpIcon,null),desc:n.createElement(s.ChevronDownIcon,null)}[e.column.getIsSorted()])&&void 0!==t?t:n.createElement(s.UpDownIcon,{h:2}))))})))),n.createElement(l.Tbody,Object.assign({},null==g?void 0:g.tableBody),P.getRowModel().rows.map(e=>n.createElement(l.Tr,Object.assign({"data-test-id":"6aZAeefGHBA2oG1wLuv-L",key:e.id},null==g?void 0:g.tableRow,{css:p.css`
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@chakra-ui/shared-utils"),r=require("@chakra-ui/system"),n=require("react"),a=e(n),o=require("@chakra-ui/react-context"),i=require("@ctlyst.id/internal-icon"),c=require("@chakra-ui/utils"),l=require("@chakra-ui/react"),d=require("react-icons/fi"),s=require("@chakra-ui/icons"),p=require("@emotion/react"),u=require("@tanstack/react-table"),m=e(require("classnames")),g=e(require("react-datepicker")),b=e(require("@emotion/styled")),h=e(require("react-select")),_=require("react-select-async-paginate"),f=e(require("react-select/async-creatable")),x=e(require("react-select/creatable")),k=require("react-dropzone"),y=require("@chakra-ui/anatomy"),v=require("@chakra-ui/styled-system"),w=require("@chakra-ui/theme-tools"),C=e(require("axios"));function S(){return a.createElement(i.Info,{color:"inherit",size:4})}const[E,P]=o.createContext({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[j,O]=o.createContext({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),M={info:{icon:S,colorScheme:"info"},warning:{icon:S,colorScheme:"warning"},success:{icon:function(){return a.createElement(i.CheckCircle,{color:"inherit",size:4})},colorScheme:"success"},error:{icon:function(){return a.createElement(i.AlertTriangle,{color:"inherit",size:4})},colorScheme:"danger"}},T=r.forwardRef((function(e,n){var o;const{status:i="info",addRole:c=!0,children:l,...d}=r.omitThemingProps(e),s=null!==(o=e.colorScheme)&&void 0!==o?o:function(e){return M[e].colorScheme}(i),p=r.useMultiStyleConfig("Alert",{...e,colorScheme:s}),u={width:"100%",display:"grid",gridTemplateColumns:"auto 1fr auto auto",alignItems:"center",position:"relative",overflow:"hidden",...p.container};return a.createElement(E,{value:{status:i}},a.createElement(j,{value:p},a.createElement(r.chakra.div,Object.assign({"data-status":i,role:c?"alert":void 0,ref:n},d,{className:t.cx("chakra-alert",e.className),__css:u}),l)))}));T.displayName="Alert";const z=l.forwardRef((e,t)=>{const r=l.useStyleConfig("LoaderStyle",e);return a.createElement(l.Box,{ref:t,__css:r})}),I=l.forwardRef((e,t)=>{const{children:r,variant:n,size:o,...i}=e;return a.createElement(l.Button,Object.assign({size:o,variant:n,spinner:a.createElement(z,{size:"lg"===o?"md":"md"===o?"sm":"xs",color:"primary"===n||"danger"===n?"white":"outline-danger"===n?"danger":"primary"}),ref:t},i),r)});function R({children:e,className:t}){const r=O().action;return a.createElement(I,{"data-test-id":"alert-action",className:c.cx("chakra-alert__close",t),variant:"link",color:"inherit",fontWeight:"700",__css:r},e)}function B({className:e,children:n,...o}){const c=O().close;return a.createElement(r.chakra.span,Object.assign({display:"inherit","data-status":"alert-close"},o,{className:t.cx("chakra-alert__close",e),__css:c}),n||a.createElement(i.Close,{color:"inherit",size:4}))}R.displayName="AlertAction",B.displayName="AlertClose";const H=r.forwardRef((function(e,n){const o=O(),{status:i}=P(),c={display:"inline",...o.description};return a.createElement(r.chakra.div,Object.assign({ref:n,"data-status":i},e,{className:t.cx("chakra-alert__desc",e.className),__css:c}))}));function A({className:e,children:n,...o}){const{status:i}=P(),c=function(e){return M[e].icon}(i),l=O().icon;return a.createElement(r.chakra.span,Object.assign({display:"inherit","data-status":i},o,{className:t.cx("chakra-alert__icon",e),__css:l}),n||a.createElement(c,null))}H.displayName="AlertDescription",A.displayName="AlertIcon";const D=r.forwardRef((function(e,n){const o=O(),{status:i}=P();return a.createElement(r.chakra.div,Object.assign({ref:n,"data-status":i},e,{className:t.cx("chakra-alert__title",e.className),__css:o.title}))}));D.displayName="AlertTitle";const F=e=>{const{children:t,pill:r,...n}=e;return a.createElement(l.Badge,Object.assign({borderRadius:r?10:4,variant:"primary-solid",padding:"0 8px",height:"18px",display:"inline-flex",alignItems:"center",justifyContent:"space-between",textTransform:"none"},n),t)};F.defaultProps={pill:!1};const q=e=>{const{title:t,children:r,parents:a,className:o,disableHome:i,spacing:c=2}=e,[s,p]=l.useToken("colors",["neutral.600","dark.500"]);return n.createElement(l.Box,{"data-test-id":"CT_component_breadcrumb_breadcrumb",className:o,display:"flex",justifyContent:"space-between",alignItems:"center",paddingY:2},n.createElement(l.Box,{display:"flex",alignItems:"center"},n.createElement(l.Text,{pr:2,fontWeight:600,textStyle:"heading.4",color:l.useColorModeValue("neutral.700","white")},t),n.createElement(l.Box,{h:"22px",borderLeft:"1px solid",borderColor:l.useColorModeValue(s,"white")}),n.createElement(l.Breadcrumb,{separator:n.createElement(d.FiChevronsRight,{color:l.useColorModeValue(s,p),size:14}),pl:2.5,pr:4,spacing:c,sx:{ol:{display:"flex",alignItems:"center"}},display:"flex",alignItems:"center",className:"breadcrumb-wrapper"},n.createElement(l.BreadcrumbItem,null,n.createElement(l.BreadcrumbLink,{href:i?void 0:"/",style:{...i&&{cursor:"default"}}},n.createElement(d.FiHome,{className:"align-top",size:16,color:l.useColorModeValue("#12784A","#ffffff")}))),null==a?void 0:a.map(e=>n.createElement(l.BreadcrumbItem,{key:e.name},n.createElement(l.BreadcrumbLink,{"data-test-id":"iadKcMAul3QAdvmfIQjRE",href:e.disable?void 0:e.link,onClick:e.onClick,style:{...e.disable&&{cursor:"default"}},_hover:{textDecoration:"none"}},n.createElement(l.Text,{color:e.disable?"dark.600":l.useColorModeValue("primary.500","white"),fontSize:"text.sm",fontWeight:400},e.name)))),n.createElement(l.BreadcrumbItem,null,n.createElement(l.BreadcrumbLink,{_hover:{textDecor:"none",cursor:"default"}},n.createElement(l.Text,{color:l.useColorModeValue(s,"white"),fontSize:"text.sm",fontWeight:400},t))))),r&&n.createElement(l.Box,null,r))};q.defaultProps={children:void 0,parents:void 0,className:void 0,disableHome:void 0,spacing:2};const W=n.forwardRef(({children:e,...t},r)=>{const n=l.useStyleConfig("Card",t);return a.createElement(l.Card,Object.assign({__css:n,backgroundColor:"white.high",ref:r},t),e)});W.defaultProps={withShadow:!0,isRounded:!0};const L=l.forwardRef(({isError:e=!1,helpText:t="",errorText:r="",boxProps:n,children:o,isDisabled:i,...c},d)=>{const s=e?"errors":"unstyled";return a.createElement(l.Box,Object.assign({},n),a.createElement(l.Box,{display:"flex"},a.createElement(l.Checkbox,Object.assign({variant:s,ref:d},c,{isDisabled:i}),o&&a.createElement(l.Text,{as:"span",display:"block",textStyle:"text.sm",color:i?"black.medium":"black.high"},o))),(e||t)&&a.createElement(l.Box,{mt:"5px",ml:"24px"},e?a.createElement(l.Text,{as:"span",display:"block",textStyle:"text.xs",color:"danger.500"},r):a.createElement(l.Text,{as:"span",display:"block",textStyle:"text.xs",color:"black.medium"},t)))});L.defaultProps={isError:!1,helpText:"",errorText:"",boxProps:{}};const V=e=>{const{label:t,isError:r,errorMessage:n,leftHelperText:o,rightHelperText:i,isRequired:c,children:d,isSuccess:s,boxProps:p={}}=e,u=r?"danger.500":s?"success.500":"black.medium",m=i&&(!o||r&&!n)?"flex-end":"space-between";return a.createElement(l.FormControl,Object.assign({isInvalid:r},p),t&&("string"==typeof t?a.createElement(l.FormLabel,{mb:1,fontSize:"text.sm",requiredIndicator:void 0},c&&a.createElement(l.Box,{as:"span",color:"danger.500",ml:0,mr:1},"*"),t):t),d,(r&&n||o||i)&&a.createElement(l.Box,{display:"flex",width:"full",justifyContent:m},r?"string"==typeof n?a.createElement(l.FormErrorMessage,{fontSize:"text.xs",color:"danger.500",mt:1},n):n:o&&("string"==typeof o?a.createElement(l.FormHelperText,{fontSize:"text.xs",color:u,mt:1},o):o),i&&("string"==typeof i?a.createElement(l.FormHelperText,{fontSize:"text.xs",color:u,mt:1},i):i)))};function N(e){const{children:t,label:r,helpText:n,isError:o,errorMessage:i,...c}=e;return a.createElement(V,Object.assign({},c,{label:r,leftHelperText:n,isError:o,errorMessage:i}),a.createElement(l.Box,{mt:"12px"},a.createElement(l.CheckboxGroup,Object.assign({},c),a.createElement(l.Stack,{spacing:[1,"16px"],direction:["column","row"]},t))))}V.defaultProps={label:"",isError:!1,isSuccess:!1,errorMessage:void 0,leftHelperText:void 0,rightHelperText:void 0,isRequired:!1,boxProps:{}},N.defaultProps={helpText:"",isError:!1,errorMessage:""};const $=({children:e,...t})=>{const{isActive:r,isDisabled:o,onClose:c}=t,d=l.useStyleConfig("Chips",t),s=n.useMemo(()=>r?"white.high":o?"black.low":"primary.500",[r,o]);return a.createElement(l.Box,Object.assign({__css:d,display:"inline-flex",alignItems:"center",justifyContent:"center"},t),e,c&&a.createElement(l.Box,{onClick:o?void 0:c,cursor:o?"not-allowed":"pointer",ml:2,display:"flex",alignItems:"center",justifyContent:"center"},a.createElement(i.Close,{color:s,size:4})))};$.defaultProps={isDisabled:!1,isActive:!1,onClose:void 0,children:void 0,size:"sm"};const G=n.forwardRef((e,t)=>{const{columns:r,dataSource:a=[],isLoading:o,withSelectedRow:i,onSelectedRow:c,onSort:d,sortDescFirst:m,styles:g,sortingState:b,headerSticky:h,manualSorting:_,onRowClick:f}=e,[x,k]=n.useState(!0),[y,v]=n.useState(null!=b?b:[]),[w,C]=n.useState({}),S=n.useMemo(()=>r,[r]),E=n.useMemo(()=>[{id:"select",header:({table:e})=>n.createElement(l.Checkbox,Object.assign({"data-test-id":"select-header-data-table"},{isChecked:e.getIsAllRowsSelected(),isIndeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()})),cell:({row:e})=>n.createElement(l.Checkbox,Object.assign({"data-test-id":"select-data-table-"+e.index},{isChecked:e.getIsSelected(),isIndeterminate:e.getIsSomeSelected(),onChange:e.getToggleSelectedHandler()}))}],[]),P=u.useReactTable({data:a,columns:i?[...E,...S]:S,getCoreRowModel:u.getCoreRowModel(),getSortedRowModel:u.getSortedRowModel(),manualPagination:!0,manualSorting:_,sortDescFirst:m,state:{sorting:y,rowSelection:w},onRowSelectionChange:C,onSortingChange:e=>{v(e)}}),{getSelectedRowModel:j,toggleAllRowsSelected:O}=P,{flatRows:M}=j();return n.useEffect(()=>{const e=M.map(e=>e.original);c&&c(e)},[M]),n.useImperativeHandle(t,()=>({toggleAllRowsSelected:O})),n.useEffect(()=>{d&&!x&&d(y)},[y]),n.useEffect(()=>{k(!1)},[]),n.createElement(l.Box,Object.assign({},e),o&&n.createElement(l.Flex,{w:"100%",h:"100%",pos:"absolute",bg:"white",align:"center",justify:"center",zIndex:2},n.createElement(l.Spinner,{color:"primary.500",thickness:"4px",size:"lg"})),n.createElement(l.Table,Object.assign({},null==g?void 0:g.table),n.createElement(l.Thead,Object.assign({},h?{position:"sticky",top:0,bg:"white",zIndex:1}:{}),P.getHeaderGroups().map(e=>n.createElement(l.Tr,Object.assign({key:e.id,bg:l.useColorModeValue("initial","ebony-clay.700")},null==g?void 0:g.tableRow),e.headers.map(e=>{var t;return n.createElement(l.Th,Object.assign({key:e.id,colSpan:e.colSpan},null==g?void 0:g.tableColumnHeader),n.createElement(l.Flex,{"data-test-id":"CT_Container_TableHeader_"+e.id,textTransform:"capitalize",userSelect:"none",align:"center",gap:2},n.createElement(l.Text,null,u.flexRender(e.column.columnDef.header,e.getContext())),n.createElement(l.Box,{as:"span",cursor:e.column.getCanSort()?"pointer":"default","data-test-id":"CT_Container_SortingIcon_"+e.id,onClick:e.column.getToggleSortingHandler()},null!==(t=e.column.getCanSort()&&{asc:n.createElement(s.ChevronUpIcon,null),desc:n.createElement(s.ChevronDownIcon,null)}[e.column.getIsSorted()])&&void 0!==t?t:n.createElement(s.UpDownIcon,{h:2}))))})))),n.createElement(l.Tbody,Object.assign({},null==g?void 0:g.tableBody),P.getRowModel().rows.map(e=>n.createElement(l.Tr,Object.assign({"data-test-id":"6aZAeefGHBA2oG1wLuv-L",key:e.id},null==g?void 0:g.tableRow,{css:p.css`
|
2
2
|
&:last-child {
|
3
3
|
td {
|
4
4
|
border-bottom: none;
|
@@ -24,15 +24,15 @@
|
|
24
24
|
&::placeholder {
|
25
25
|
color: #111111;
|
26
26
|
}
|
27
|
-
`,value:null!=o?o:""}))};K.defaultProps={"data-test-id":""};const Q=
|
27
|
+
`,value:null!=o?o:""}))};K.defaultProps={"data-test-id":""};const Q=b(l.Box)`
|
28
28
|
display: flex;
|
29
29
|
align-items: center;
|
30
30
|
width: fit-content;
|
31
31
|
border: 1px solid;
|
32
32
|
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.05);
|
33
33
|
border-radius: 4px;
|
34
|
-
border-color: ${({isError:e})=>e?"
|
35
|
-
`,
|
34
|
+
border-color: ${({isError:e})=>e?"var(--chakra-colors-danger-500)":"var(--chakra-colors-primary-500)"};
|
35
|
+
`,J=({onChange:e,isError:t=!1,min:r="2020-01-01",max:n="2020-12-31"})=>{const[o,i]=a.useState([null,null]);return a.createElement(Q,{isError:t},a.createElement(K,{"data-test-id":"CT_DatePickerMonth_StartDate",onChange:t=>{e(t,o[1]),i([t,o[1]])},min:r,max:n}),a.createElement(l.Box,null,"-"),a.createElement(K,{"data-test-id":"CT_DatePickerMonth_EndDate",onChange:t=>{e(o[0],t),i([o[0],t])},min:r,max:n}))};J.defaultProps={min:"2020-01-01",max:"2020-12-31",isError:!1};const ee=a.forwardRef((e,t)=>{const{value:r,type:o,addOnLeft:c,addOnRight:d,size:s,isRequired:p,label:u,isError:m,isSuccess:g,isDisabled:b,errorMessage:h,leftHelperText:_,rightHelperText:f,withClear:x,onClear:k,isLoading:y,...v}=e,w=U(e),[C,S]=n.useState(!1),E=n.useMemo(()=>"password"===o&&C?"text":o,[C,o]),P=n.useMemo(()=>"password"===o&&!C&&r?"text.xl":"text.sm",[C,o,r]),j=n.useMemo(()=>b?"black.low":"black.medium",[b]);return a.createElement(V,{label:u,isSuccess:g,isError:m,errorMessage:h,leftHelperText:_,rightHelperText:f,isRequired:p},a.createElement(l.Box,{__css:w},a.createElement(l.InputGroup,{size:s,borderRadius:"md",backgroundColor:b?"neutral.300":"white.high",cursor:b?"not-allowed":"default"},c,a.createElement(l.Input,Object.assign({ref:t,type:E,value:r,isDisabled:b,isSuccess:g},v,{fontSize:P})),(x||y||"password"===o)&&a.createElement(l.Box,{"data-test-id":"CT_Component_ClearInput",display:"flex",alignItems:"center",justifyContent:"center",width:"16px",mr:"10px"},x&&!y&&a.createElement(l.Box,{display:"flex",justifyContent:"center",onClick:b?void 0:k,cursor:b?"not-allowed":"pointer"},a.createElement(i.Close,{size:4,color:j})),"password"===o&&!C&&!y&&a.createElement(l.Box,{"data-test-id":"q2Bj2G4FlamXyHuRKMZ1Q",onClick:()=>{b||S(!0)},cursor:b?"not-allowed":"pointer",display:"flex",justifyContent:"center"},a.createElement(i.EyeOff,{size:4,color:j})),"password"===o&&C&&!y&&a.createElement(l.Box,{"data-test-id":"sfc2388bmeXBmdla45Ibk",onClick:()=>{b||S(!1)},cursor:b?"not-allowed":"pointer",display:"flex",justifyContent:"center"},a.createElement(i.Eye,{size:4,color:j})),y&&a.createElement(z,{size:"sm"})),d)))});ee.defaultProps={addOnLeft:void 0,addOnRight:void 0,withClear:void 0,isLoading:void 0,onClear:void 0};const te=a.forwardRef((e,t)=>{const{value:r,isLoading:n,...o}=e;return a.createElement(V,Object.assign({},o),a.createElement(l.Box,{position:"relative"},a.createElement(l.Textarea,Object.assign({ref:t,value:r},o)),n&&a.createElement(l.Box,{zIndex:999,top:2,right:2,position:"absolute"},a.createElement(z,{size:"sm"}))))});te.defaultProps={isLoading:void 0};const re=()=>a.createElement(l.Image,{height:8,src:l.useColorModeValue("https://assets.voila.id/xms/logo-xms.jpg","https://assets.voila.id/xms/logo-xms-dark.png")}),ne=()=>a.createElement(l.Image,{src:"https://assets.voila.id/xms/logo-voila-black.png?v=1",filter:l.useColorModeValue("none","invert(1)"),maxW:24}),ae=({data:e,onLogout:t})=>{var r;const{isOpen:a,onToggle:o,onClose:i}=l.useDisclosure();return n.createElement(l.Popover,{placement:"bottom-end",isOpen:a,onClose:i},n.createElement(l.Box,{"data-test-id":"WE0UYbA93LOZy6S09IhDO",as:"button",cursor:"pointer",minW:0,_hover:{textDecor:"none"},m:0,onClick:o},n.createElement(l.HStack,null,n.createElement(l.VStack,{alignItems:"flex-end",spacing:-.5,ml:"2"},n.createElement(l.Text,{fontSize:"text.xs",mb:1,fontWeight:400,lineHeight:"14px",color:l.useColorModeValue("neutral.800","white")},null==e?void 0:e.email),n.createElement(l.Text,{fontSize:"text.xs",fontWeight:400,lineHeight:"14px",color:l.useColorModeValue("primary.500","success.400")},(null==e?void 0:e.office)&&n.createElement(l.Text,{color:"neutral.700",display:"inline-block",mr:.5,as:"span"},e.office," |"," "),null==e?void 0:e.userRole)),n.createElement(l.PopoverTrigger,null,n.createElement(l.Avatar,{size:"sm",bg:"primary.500",color:"white",name:null!==(r=null==e?void 0:e.name)&&void 0!==r?r:null==e?void 0:e.email})))),n.createElement(l.PopoverContent,{bg:l.useColorModeValue("white","mirage.900"),maxW:200},n.createElement(l.PopoverArrow,{bg:l.useColorModeValue("white","mirage.900")}),n.createElement(l.PopoverBody,{p:1},n.createElement(l.Flex,{"data-test-id":"gA7F9pucPX_Q3_dkgXIYZ",alignItems:"center",px:3,py:2,borderRadius:"sm",cursor:"pointer",_hover:{bg:l.useColorModeValue("primary.500","mirage.900"),color:"white"},onClick:t,fontSize:"text.xs"},n.createElement(d.FiPower,null),n.createElement(l.Text,{ml:2},"Logout")))))};ae.defaultProps={data:void 0,onLogout:void 0};const oe=()=>{const{colorMode:e,toggleColorMode:t}=l.useColorMode();return n.createElement(l.Box,{"data-test-id":"rhYuTDCiWkFqr96upiEEh",mx:5,onClick:t,cursor:"pointer"},n.createElement("light"===e?d.FiMoon:d.FiSun,{size:20}))};function ie(e){switch(e){case"DEVELOPMENT":return"Dev";case"STAGING":return"Staging";default:return null}}const ce=({version:e,environment:t,onOpenModalRelease:r})=>n.createElement(n.Fragment,null,e&&n.createElement(l.Badge,{"data-test-id":"dzl3esjhCphobaaIXpiUE",bg:l.useColorModeValue("primary.500","rgba(124, 124, 124, 0.12)"),color:l.useColorModeValue("white","secondary.400"),fontSize:"text.xs",py:1,px:2.5,fontWeight:"bold",textTransform:"lowercase",borderRadius:"md",onClick:r,cursor:r?"pointer":"auto"},e),null!==ie(t)&&e&&n.createElement(l.Box,{background:"primary.50",color:"primary.500",fontSize:"text.xs",py:1,px:2.5,fontWeight:"bold",borderRadius:"md"},ie(t)));ce.defaultProps={environment:void 0,version:void 0,onOpenModalRelease:void 0};const le=({data:e,onLogout:t,onOpenModalRelease:r,hideSwitchMode:a,...o})=>n.createElement(l.Box,Object.assign({minH:14,bg:l.useColorModeValue("white","ebony-clay.800"),boxShadow:"0 4px 20px 0 rgb(0 0 0 / 5%)",px:4,py:1},o),n.createElement(l.Flex,{h:14,alignItems:"center",justifyContent:"space-between"},n.createElement(re,null),n.createElement(l.HStack,{spacing:2,alignItems:"center"},n.createElement(ne,null),n.createElement(ce,{version:null==e?void 0:e.version,environment:null==e?void 0:e.environment,onOpenModalRelease:r})),n.createElement(l.Flex,{alignItems:"center"},!a&&n.createElement(oe,null),n.createElement(ae,{data:e,onLogout:t}))));le.defaultProps={data:void 0,onLogout:void 0,onOpenModalRelease:void 0,hideSwitchMode:!1};const de=a.forwardRef(({children:e,...t},r)=>a.createElement(l.ModalBody,Object.assign({ref:r,background:l.useColorModeValue("white","mirage.900")},t),e)),se=n.forwardRef((e,t)=>a.createElement(l.ModalCloseButton,Object.assign({ref:t,top:4,right:4,size:"sm",background:l.useColorModeValue("neutral.50","mirage.900")},e))),pe=n.forwardRef(({children:e,...t},r)=>a.createElement(l.ModalFooter,Object.assign({ref:r,background:l.useColorModeValue("neutral.200","mirage.900"),borderBottomRadius:"md"},t),e)),ue=n.forwardRef(({children:e,...t},r)=>a.createElement(l.ModalHeader,Object.assign({ref:r,background:l.useColorModeValue("neutral.200","mirage.900"),borderTopRadius:"md",fontSize:"lg"},t),e)),me=new Map([["Order",d.FiShoppingBag],["Fulfillment",d.FiShoppingCart],["Transfer Stock",d.FiRepeat],["Stock",d.FiBox],["Product Database",d.FiLayers],["Purchasing",d.FiDollarSign],["Reseller",d.FiUsers],["Retur",d.FiRotateCcw],["Other",d.FiSettings],["Content",d.FiLayout],["Voucher",d.FiGift],["Customer",l.createIcon({displayName:"CustomerIcon",viewBox:"0 0 16 16",path:[a.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"}),a.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"}),a.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"})]})]]),ge=({navigations:e,activePath:t,as:r,host:a,...o})=>n.createElement(l.Box,Object.assign({bg:l.useColorModeValue("white","ebony-clay.800"),boxShadow:"0 4px 20px 0 rgb(0 0 0 / 5%)",borderRadius:"md",overflowX:"auto"},o),n.createElement(l.Flex,{alignItems:"center",p:2},n.createElement(l.HStack,{spacing:2},null==e?void 0:e.map(e=>{const o=t.startsWith(e.navLink||""),i=o?"primary.500":void 0;return n.createElement(l.Popover,{key:e.title,trigger:"hover",placement:"bottom-start"},({isOpen:c})=>n.createElement(n.Fragment,null,n.createElement(l.PopoverTrigger,null,n.createElement(l.Box,{display:"flex",alignItems:"center",borderRadius:"md",cursor:"pointer",_hover:{backgroundColor:o?i:l.useColorModeValue("dove-gray.50","transparent")},backgroundColor:c&&!o?l.useColorModeValue("dove-gray.50","transparent"):i,color:o?"white":"inherit",p:2},n.createElement(l.Icon,{as:me.get(e.title),mr:2}),n.createElement(l.Text,{whiteSpace:"nowrap",fontSize:"text.sm",fontWeight:400},e.title),n.createElement(s.ChevronDownIcon,{ml:2}))),e.children&&n.createElement(l.Portal,null,n.createElement(l.Box,{zIndex:"popover"},n.createElement(l.PopoverContent,{key:e.title,bg:l.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:i,navLink:c})=>{const d=t===c;return n.createElement(l.Link,{as:a===i?r:void 0,key:o,href:i?`${i}${c}`:c,_hover:{textDecoration:"none"}},n.createElement(l.Box,{display:"flex",position:"relative",alignItems:"center",cursor:"pointer",transition:"padding 0.35s ease 0s",_hover:{backgroundColor:l.useColorModeValue("dove-gray.50","mirage.900"),color:l.useColorModeValue("primary.500","dove-gray.600"),px:5,py:4,_first:{borderTopRadius:"md"},_last:{borderBottomRadius:"md"}},color:d?"primary.500":"inherit",css:p.css`
|
36
36
|
border-spacing: 4px;
|
37
|
-
`,px:6,py:4},n.createElement(l.Icon,{as:ve.get(e.title),mr:3}),n.createElement(l.Text,{fontSize:"text.sm"},o),d&&n.createElement(l.Box,{width:.5,height:8,position:"absolute",bg:"primary.500",right:0,zIndex:"popover"})))}))))))}))));we.defaultProps={navigations:void 0,as:"a",host:void 0};const Ce=l.forwardRef(({className:e,style:t,isActive:r,children:n,...o},i)=>{const c=l.useColorModeValue("neutral.300","mirage.900"),d=l.useColorModeValue("black.high","primary.300"),s=l.useColorModeValue("secondary.50","primary.500"),p=l.useColorModeValue("primary.500","white");return a.createElement(l.Button,Object.assign({"data-test-id":"Pagination-Button",ref:i,className:e,style:t,borderRadius:50,fontWeight:700,m:0,px:3,py:2,h:8,minW:"auto",background:r?"primary.500":c,color:r?"white":d,_hover:r?{}:{background:s,color:p},_disabled:{background:l.useColorModeValue("neutral.300","mirage.900"),color:"neutral.600",pointerEvents:"none"}},o),n)});Ce.displayName="PaginationButton",Ce.defaultProps={isActive:void 0};const Ee=({color:e,isDisabled:t,onClick:r,visuallyHidden:a,icon:o})=>n.createElement(Ce,{"data-test-id":"DLVCc_fBK35spHm5WxjcJ",color:e,isDisabled:t,onClick:r},n.createElement(l.VisuallyHidden,null,a),o);Ee.defaultProps={color:void 0,isDisabled:void 0,onClick:void 0,visuallyHidden:void 0,icon:void 0};const Se=({className:e,current:t,total:r,onSelect:a})=>{const o=l.useColorModeValue("secondary.100","primary.500"),i=l.useColorModeValue("primary.500","secondary.100"),c=1===t,d=c?o:i,p=t===r,u=p?o:i,m=e=>{a&&a(e)};return n.createElement(l.Box,{className:e,display:"inline-flex",alignItems:"center"},n.createElement(l.Box,{mr:1},n.createElement(Ee,{"data-test-id":"Pagination-Button",color:d,isDisabled:c,onClick:()=>m(1),visuallyHidden:"First Page",icon:n.createElement(s.ArrowLeftIcon,{width:2})})),n.createElement(l.Box,{backgroundColor:l.useColorModeValue("neutral.300","mirage.900"),borderRadius:50},n.createElement(Ee,{"data-test-id":"Pagination-Button",color:d,isDisabled:c,onClick:()=>m(t-1),visuallyHidden:"Previous Page",icon:n.createElement(s.ChevronLeftIcon,null)}),(()=>{const e=[];let n,a;5<r?(n=Math.max(Math.min(t-Math.floor(2.5),r-5+1),1),a=n+5-1):(n=1,a=r);for(let t=n;t<=a;++t)e.push(t);return e})().map(e=>n.createElement(Ce,{"data-test-id":"Pagination-Button",key:e,isActive:e===t,onClick:()=>"number"==typeof e?m(e):null},n.createElement(l.Text,{scale:300,fontSize:"text.sm",lineHeight:18,fontWeight:500},e))),n.createElement(Ee,{"data-test-id":"Pagination-Button",color:u,isDisabled:p,onClick:()=>m(t+1),visuallyHidden:"Next Page",icon:n.createElement(s.ChevronRightIcon,null)})),n.createElement(l.Box,{ml:1},n.createElement(Ee,{"data-test-id":"Pagination-Button",color:u,isDisabled:p,onClick:()=>m(r),visuallyHidden:"Last Page",icon:n.createElement(s.ArrowRightIcon,{width:2})})))};Se.defaultProps={className:void 0,onSelect:void 0},Se.displayName="Pagination";const Pe=({limit:e,label:t="Baris per halaman:",items:r,onChange:a,...o})=>{const[i,c]=n.useState(e);return n.createElement(l.Box,{display:"flex",flexDirection:"row",alignItems:"center"},n.createElement(l.Text,Object.assign({fontSize:"text.sm",lineHeight:18,color:l.useColorModeValue("neutral.900","white")},o),t),n.createElement(l.Select,{textAlign:"center",size:"xs",outline:"none",border:"none",boxShadow:"none",width:18,icon:n.createElement(d.FiChevronDown,null),_focusVisible:{boxShadow:"none"},onChange:e=>{const t=Number(e.target.value);a(t),c(t)},value:i},r.map(e=>n.createElement("option",{key:e,value:e},e))))};function Fe({isError:e=!1,helpText:t="",errorText:r="",children:n,isDisabled:o,...i}){return a.createElement(l.Box,null,a.createElement(l.Box,{display:"flex"},a.createElement(l.Radio,Object.assign({variant:e?"errors":"unstyled"},i,{isDisabled:o}),n&&a.createElement(l.Text,{as:"span",display:"block",textStyle:"text.sm",color:o?"black.medium":"black.high"},n))),a.createElement(l.Box,{mt:"5px",ml:"24px"},e?a.createElement(l.Text,{as:"span",display:"block",textStyle:"text.xs",color:"danger.500"},r):a.createElement(l.Text,{as:"span",display:"block",textStyle:"text.xs",color:"black.medium"},t)))}function je(e){const{children:t,label:r,helpText:n,isError:o,errorMessage:i,...c}=e;return a.createElement(V,Object.assign({},c,{label:r,leftHelperText:n,isError:o,errorMessage:i}),a.createElement(l.Box,{mt:"12px"},a.createElement(l.RadioGroup,Object.assign({},c),a.createElement(l.Stack,{spacing:[1,"16px"],direction:["column","row"]},t))))}Pe.defaultProps={limit:10,label:void 0},Fe.defaultProps={isError:!1,helpText:"",errorText:""},je.defaultProps={helpText:"",isError:!1,errorMessage:""};const Oe=({children:e})=>a.createElement(l.Box,null,e);Oe.defaultProps={isError:!1};const Me=oe.text.sm,Te={fontSize:Me.fontSize,lineHeight:Me.lineHeight,letterSpacing:0};function Be(e,t){const r=(e=!1,t=!1)=>"0 0 0 1px "+(t&&e||t?Q.danger[500]:e?Q.primary[500]:Q.neutral[400]);return{control:(n,a)=>"dark"===e?{...n,...Te,background:"transparent",color:Q.primary[300],borderColor:Q.secondary[500],boxShadow:a.isFocused?"none":"inherit"}:{...n,...Te,borderWidth:0,boxShadow:r(a.isFocused,t)},option:(t,{isSelected:r})=>"dark"===e?{...t,...Te,background:r?Q.primary[700]:Q.dark[800],color:"white"}:{...t,...Te},menu:t=>"dark"===e?{...t,...Te,background:Q.dark[800],zIndex:5}:{...t,...Te,zIndex:5},singleValue:t=>"dark"===e?{...t,...Te,color:"white"}:{...t,...Te},input:t=>"dark"===e?{...t,...Te,color:"white"}:{...t,...Te},dropdownIndicator:t=>"dark"===e?{...t,...Te,color:Q.secondary[500]}:{...t,...Te},indicatorSeparator:t=>"dark"===e?{...t,...Te,backgroundColor:Q.secondary[500]}:{...t,...Te},placeholder:e=>({...e,...Te,color:Q.black.low})}}const Ae=e=>({...e,colors:{...e.colors,primary:Q.primary[500],primary25:Q.primary[50],primary50:Q.primary[100],primary75:Q.primary[200]}}),De=l.forwardRef((function(e,r){const o=l.useMultiStyleConfig("Switch",e),{spacing:c="0.5rem",children:d,...s}=l.omitThemingProps(e),{state:p,getInputProps:u,getCheckboxProps:m,getRootProps:g,getLabelProps:b}=l.useCheckbox(s),h=n.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...o.container}),[o.container]),_=n.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",width:200,...o.track}),[o.track]),f=n.useMemo(()=>({userSelect:"none",marginStart:c,...o.label}),[c,o.label]),x=e=>({sm:3,md:4,lg:5}[e]);return a.createElement(l.chakra.label,Object.assign({},g(),{display:"flex",alignItems:"center",className:t.cx("chakra-switch",e.className),__css:h}),a.createElement("input",Object.assign({"data-test-id":"",className:"chakra-switch__input"},u({},r))),a.createElement(l.chakra.span,Object.assign({},m(),{className:"chakra-switch__track",pos:"relative",__css:_}),a.createElement(l.Flex,{gap:2,pos:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},a.createElement(i.Check,{color:"white",size:x(e.size)}),a.createElement(i.Close,{color:p.isDisabled?"neutral.600":"neutral.900",size:x(e.size)})),a.createElement(l.chakra.span,{__css:o.thumb,className:"chakra-switch__thumb","data-checked":t.dataAttr(p.isChecked),"data-hover":t.dataAttr(p.isHovered)})),d&&a.createElement(l.chakra.span,Object.assign({className:"chakra-switch__label",color:p.isDisabled?"black.low":"black.high"},b(),{__css:f}),d))}));De.defaultProps={size:"sm"};const ze=l.forwardRef((e,t)=>{var r,a;const o=l.useTab({...e,ref:t}),i=!!o["aria-selected"],c=l.useMultiStyleConfig("Tabs",o);return n.createElement(l.Button,Object.assign({p:3,fontSize:"text.md",_selected:{borderColor:l.useColorModeValue("primary.400","primary.300"),color:l.useColorModeValue("primary.500","primary.300"),transform:"translateY(-2px)"},color:l.useColorModeValue("black.high","primary.300"),_focus:{bg:"none"},__css:c.tab},o),n.createElement(l.Flex,null,null===(r=e.leftAddon)||void 0===r?void 0:r.call(e,{isSelected:i}),o.children,null===(a=e.rightAddon)||void 0===a?void 0:a.call(e,{isSelected:i})))}),Ie=l.forwardRef((e,t)=>a.createElement(l.TabList,Object.assign({borderBottom:"1px solid",borderColor:l.useColorModeValue("gray.200","bright-gray.800")},e,{ref:t}),e.children)),Re=l.forwardRef((e,t)=>a.createElement(l.TabPanel,Object.assign({px:0},e,{ref:t}),e.children)),He=({onHandleUploadFile:e,onHandleRejections:t,accept:r,multiple:a,selected:o,maxFiles:i=1,renderError:c,validator:d,...s})=>{const[p,u]=n.useState(),[m,g]=n.useState(o||!1),b=n.useCallback(t=>{t.length>0&&(null==e||e(t),a||(g(!0),u(t[0])))},[a,e]),{getRootProps:h,getInputProps:_,isDragActive:f,fileRejections:x}=k.useDropzone({onDrop:b,accept:r,maxFiles:i,multiple:a,validator:d});n.useEffect(()=>{x.length>0&&t&&t(x)},[x,t]);const y=n.useMemo(()=>{const e=x.length>0;return e&&g(!1),e},[x]);return n.useEffect(()=>{g(null!=o&&o)},[o]),n.createElement(l.Stack,{direction:"column"},n.createElement(l.Flex,Object.assign({minH:200,border:"1px dashed",borderColor:y?"danger.500":"primary.500",alignItems:"center",justifyContent:"center",cursor:"pointer"},s,h()),n.createElement("input",Object.assign({},_())),f?n.createElement(l.Text,null,"Drop file disini..."):n.createElement(l.Flex,{flexDirection:"column",alignItems:"center",color:y?"danger.500":"primary.500"},!a&&m&&n.createElement(l.Heading,{fontWeight:400,fontSize:"18px",lineHeight:28,color:"black.high",mb:2},null==p?void 0:p.name),!m&&n.createElement(l.Heading,{fontWeight:400,fontSize:"18px",lineHeight:28,mb:2},"Upload File"),n.createElement(l.Text,null,m?"(Klik atau drag untuk mengganti file)":"(Klik atau drag untuk input file)"))),null==c?void 0:c(x))};He.defaultProps={onHandleUploadFile:void 0,onHandleRejections:void 0,renderError:void 0,selected:!1};const{definePartsStyle:qe,defineMultiStyleConfig:We}=v.createMultiStyleConfigHelpers(y.alertAnatomy.keys),Le=v.cssVar("alert-fg"),Ve=v.cssVar("alert-bg"),Ne=We({baseStyle:qe({container:{bg:Ve.reference,px:"4",py:"2",borderRadius:"md"},title:{fontWeight:"400",lineHeight:"18px",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:Le.reference,flexShrink:0,marginEnd:"3",w:"4",h:"4"},action:{"& +.chakra-alert__close":{ml:"3"}},close:{color:Le.reference,w:"4",h:"4"},spinner:{color:Le.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}}),variants:{subtle:qe(e=>{const{colorScheme:t}=e,r=function(e){const{theme:t,colorScheme:r}=e;return{light:`colors.${r}.50`,dark:w.transparentize(r+".200",.16)(t)}}(e);return{container:{[Le.variable]:`colors.${t}.700`,[Ve.variable]:r.light,_dark:{[Le.variable]:`colors.${t}.200`,[Ve.variable]:r.dark},color:Le.reference}}}),solid:qe(e=>{const{colorScheme:t}=e;return{container:{[Le.variable]:"colors.white.high",[Ve.variable]:`colors.${t}.500`,_dark:{[Le.variable]:"colors.gray.900",[Ve.variable]:`colors.${t}.200`},color:Le.reference}}})},defaultProps:{variant:"subtle",colorScheme:"info"}}),$e=v.defineStyleConfig({baseStyle:{fontSize:"body.1",fontWeight:"normal",px:4,py:2.5,borderRadius:"md",_disabled:{opacity:1,bg:"neutral.300",color:"black.low"},_hover:{_disabled:{bg:"neutral.300",color:"black.low"}}},sizes:{lg:e=>{const{variant:t}=e;return"icon"===t?{h:10,w:10,p:0}:{fontSize:"text.xl",h:12,px:4,py:2.5}},md:e=>{const{variant:t}=e;return"icon"===t?{h:9,w:9,p:0}:{fontSize:"text.md",h:9,px:3,py:"7px"}},sm:e=>{const{variant:t}=e;return"icon"===t?{h:"26px",w:"26px",p:0}:{fontSize:"text.sm",h:"26px",lineHeight:4,px:2,py:"5px"}}},variants:{primary:e=>{const{isLoading:t}=e;return t?{_disabled:{bg:"primary.500"},_hover:{_disabled:{bg:"primary.500"}}}:{color:"white.high",bg:"primary.500",_hover:{bg:"primary.600"},_active:{bg:"primary.700"}}},secondary:e=>{const{isLoading:t}=e,r={color:"primary.500",borderWidth:1,borderStyle:"inside",bg:"white.high",borderColor:"primary.500",_hover:{bg:"primary.50"},_active:{bg:"primary.100"},_disabled:{border:0}},n={...r,_disabled:{bg:"white.high"},_hover:{_disabled:{bg:"white.high"}}};return t?n:r},tertiary:e=>{const{isLoading:t}=e,r={color:"primary.500",_hover:{bg:"primary.50"},_active:{bg:"primary.100"}},n={...r,_disabled:{bg:"transparent"},_hover:{_disabled:{bg:"transparent"}}};return t?n:r},danger:e=>{const{isLoading:t}=e,r={bg:"danger.500",color:"white.high",_hover:{bg:"danger.600"},_active:{bg:"danger.700"}},n={...r,_disabled:{bg:"danger.500"},_hover:{_disabled:{bg:"danger.500"}}};return t?n:r},"outline-danger":e=>{const{isLoading:t}=e,r={color:"danger.500",borderWidth:1,borderStyle:"inside",bg:"white.high",borderColor:"danger.500",_hover:{bg:"danger.50"},_active:{bg:"danger.100"},_disabled:{border:0}},n={...r,_disabled:{bg:"white.high"},_hover:{_disabled:{bg:"white.high"}}};return t?n:r},link:{bg:"transparent",color:"primary.500",_disabled:{opacity:"1",bg:"transparent",color:"black.medium"},_hover:{_disabled:{bg:"transparent",color:"black.medium"}}},icon:{bg:"neutral.50",minW:0,borderColor:"neutral.200",borderWidth:"1px",_active:{bg:"neutral.500",borderColor:"neutral.50"},_disabled:{bg:"neutral.500",opacity:.3,borderColor:"neutral.50"},_hover:{bg:"neutral.400",_disabled:{bg:"neutral.500",opacity:.3,borderColor:"neutral.50"}}}},defaultProps:{size:"md",variant:"primary",colorScheme:"primary"}}),Ge=v.defineStyleConfig({baseStyle:e=>({shadow:e.withShadow?"raised":"none",borderRadius:e.isRounded?"lg":"none"})}),{definePartsStyle:Ue,defineMultiStyleConfig:Xe}=l.createMultiStyleConfigHelpers(y.checkboxAnatomy.keys),Ze=Xe({baseStyle:Ue({control:{borderRadius:"4px",width:"16px",height:"16px",border:"1px solid"},icon:{color:"neutral.50"},label:{fontWeight:"400",lineHeight:"18px",color:"black.high",ml:"8px"},_disabled:{background:"neutral.200",border:"0",borderColor:"neutral.500",cursor:"not-allowed"}}),variants:{errors:Ue({control:{borderColor:"danger.500",_checked:{borderColor:"danger.500",backgroundColor:"danger.500",_hover:{borderColor:"danger.600",backgroundColor:"danger.600"}},_indeterminate:{borderColor:"danger.500",backgroundColor:"danger.500"}},label:{fontSize:"12px"},icon:{fontSize:"7px"}}),unstyled:Ue({control:{borderColor:"neutral.600",_checked:{borderColor:"primary.500",backgroundColor:"primary.500",_hover:{borderColor:"primary.600",backgroundColor:"primary.600"},_disabled:{backgroundColor:"primary.500",borderColor:"primary.500",opacity:.3}},_disabled:{backgroundColor:"neutral.200",borderColor:"neutral.200"},_indeterminate:{borderColor:"primary.500",backgroundColor:"primary.500",_disabled:{backgroundColor:"primary.500",borderColor:"primary.500",opacity:.3}}},label:{fontSize:"12px",_disabled:{opacity:1}},icon:{fontSize:"7px"}})},defaultProps:{variant:"unstyled"}}),Ye=v.defineStyleConfig({baseStyle:e=>{const{isDisabled:t,isActive:r}=e;let n={color:"primary.500",fontSize:"text.small",borderRadius:"24px",borderWidth:"1px",borderColor:"primary.500",bg:"white.high",paddingX:3,paddingY:1,cursor:"default"};if(r){const e={bg:"primary.500",color:"white.high"};n={...n,...e}}if(t){const e={bg:"neutral.200",color:"black.low",borderColor:"neutral.200",cursor:"not-allowed"};n={...n,...e}}return{...n}},sizes:{sm:{fontSize:"12px",lineHeight:4},md:{fontSize:"14px",paddingY:2,lineHeight:5}},defaultProps:{size:"sm"}}),Ke=v.defineStyleConfig({baseStyle:v.defineStyle({fontSize:"field.sm",fontWeight:"normal",marginEnd:1,mb:1})}),{definePartsStyle:Qe,defineMultiStyleConfig:Je}=v.createMultiStyleConfigHelpers(y.inputAnatomy.keys),et=Qe({field:{width:"100%",minWidth:0,outline:0,px:2,py:2.5,paddingInlineStart:2,paddingInlineEnd:2,position:"relative",appearance:"none",color:"black.high",_disabled:{bg:"neutral.300",border:0,cursor:"not-allowed",opacity:1,boxShadow:"none",color:"black.medium"},_placeholder:{color:"black.low"}}}),tt={lg:v.defineStyle({fontSize:"text.lg",h:12,borderRadius:"md"}),md:v.defineStyle({fontSize:"text.md",h:10,borderRadius:"md"}),sm:v.defineStyle({fontSize:"text.sm",h:9,borderRadius:"md"})},rt=Je({baseStyle:et,sizes:{lg:Qe({field:tt.lg,addon:tt.lg}),md:Qe({field:tt.md,addon:tt.md}),sm:Qe({field:tt.sm,addon:tt.sm})},variants:{outline:Qe(e=>({field:{border:0,outline:0,bg:w.mode("white","inherit")(e),color:w.mode("inherit","white")(e),_invalid:{boxShadow:"none"},_focusVisible:{zIndex:1,boxShadow:"none"}}})),unstyled:Qe({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}})},defaultProps:{size:"sm",variant:"outline"}}),nt=p.keyframes({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),at=e=>"primary"===e?Q.primary[600]:"danger"===e?Q.danger[500]:"warning"===e?Q.warning[700]:Q.white.high,ot=v.defineStyleConfig({baseStyle:e=>{const t=at(e.color);return{borderRadius:"50%",display:"flex",justifyContent:"center",alignItems:"center",animation:nt+" 1s linear infinite",background:`conic-gradient(from 180deg at 50% 50%, ${t} 0deg, rgba(217, 217, 217, 0) 360deg);`,":before":{content:"''",display:"block",borderRadius:"50%",width:"6px",height:"6px",position:"absolute",bottom:0,background:t}}},sizes:{xs:{width:"12px",height:"12px",WebkitMask:"radial-gradient(farthest-side,#0000 calc(100% - 1.4px),#000 0);",":before":{width:"1.4px",height:"1.4px"}},sm:{width:"16px",height:"16px",WebkitMask:"radial-gradient(farthest-side,#0000 calc(100% - 1.87px),#000 0);",":before":{width:"1.87px",height:"1.87px"}},md:{width:"24px",height:"24px",WebkitMask:"radial-gradient(farthest-side,#0000 calc(100% - 2.8px),#000 0);",":before":{width:"2.8px",height:"2.8px"}},lg:{width:"50px",height:"50px",WebkitMask:"radial-gradient(farthest-side,#0000 calc(100% - 5.83px),#000 0);",":before":{width:"5.83px",height:"5.83px"}},xl:{width:"75px",height:"75px",WebkitMask:"radial-gradient(farthest-side,#0000 calc(100% - 8.75px),#000 0);",":before":{width:"8.75px",height:"8.75px"}},xxl:{width:"100px",height:"100px",WebkitMask:"radial-gradient(farthest-side,#0000 calc(100% - 11.67px),#000 0);",":before":{width:"11.67px",height:"11.67px"}}},defaultProps:{size:"lg"}}),{definePartsStyle:it}=v.createMultiStyleConfigHelpers(y.popoverAnatomy.keys),ct={baseStyle:e=>it({popper:{background:w.mode("white","inherit")(e)}})},{definePartsStyle:lt,defineMultiStyleConfig:dt}=l.createMultiStyleConfigHelpers(y.radioAnatomy.keys),st=dt({baseStyle:lt({control:{border:"1px solid",width:"16px",height:"16px"},label:{marginLeft:"8px",textStyle:"text.sm",color:"black.high",_disabled:{opacity:1,color:"black.medium"}}}),variants:{errors:lt({control:{borderColor:"danger.500",_checked:{borderColor:"danger.500",bg:"white",_before:{h:"10px",w:"10px",bg:"danger.500"},_hover:{borderColor:"danger.500",bg:"neutral.200"},_disabled:{borderColor:"danger.500",bg:"white.high",_before:{h:"10px",w:"10px",bg:"primary.500",opacity:.3}}},_disabled:{borderColor:"danger.500",bg:"neutral.200"}},label:{fontSize:"12px"}}),unstyled:lt({control:{borderColor:"neutral.600",_checked:{borderColor:"primary.500",bg:"white",_before:{h:"10px",w:"10px",bg:"primary.500"},_hover:{borderColor:"primary.500",bg:"gray.200"},_disabled:{borderColor:"primary.500",bg:"white.high",opacity:.3,_before:{h:"10px",w:"10px",bg:"primary.500"}}},_disabled:{borderColor:"neutral.200",bg:"neutral.200"}},label:{fontSize:"12px"}})},defaultProps:{variant:"unstyled"}}),{defineMultiStyleConfig:pt,definePartsStyle:ut}=v.createMultiStyleConfigHelpers(y.switchAnatomy.keys),mt=w.cssVar("switch-track-width"),gt=w.cssVar("switch-track-height"),bt=w.cssVar("switch-track-diff"),ht=w.calc.subtract(mt,gt),_t=w.cssVar("switch-thumb-x"),ft=v.defineStyle({bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[gt.reference],height:[gt.reference],_checked:{transform:`translateX(${_t.reference})`}}),xt=pt({baseStyle:ut(()=>({container:{[bt.variable]:ht,[_t.variable]:bt.reference,_rtl:{[_t.variable]:w.calc(bt).negate().toString()}},track:{bg:"neutral.400",p:1,_checked:{bg:"primary.500",_disabled:{bg:"neutral.600"}},_disabled:{bg:"neutral.500",opacity:"100%"}},thumb:ft})),sizes:{sm:ut({container:{[mt.variable]:"2.125rem",[gt.variable]:"1.063rem"}}),md:ut({container:{[mt.variable]:"2.875rem",[gt.variable]:"1.5rem"}}),lg:ut({container:{[mt.variable]:"3.625rem",[gt.variable]:"1.813rem"}})},defaultProps:{size:"md"}}),{defineMultiStyleConfig:kt,definePartsStyle:yt}=v.createMultiStyleConfigHelpers(y.tableAnatomy.keys),vt=yt({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"semibold",textTransform:"uppercase",letterSpacing:"normal",textAlign:"start",height:"50px",color:w.mode("neutral.900","white"),fontSize:"text.sm",lineHeight:"18px"},td:{textAlign:"start",height:"56px"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),wt=v.defineStyle({"&[data-is-numeric=true]":{textAlign:"end"}});var Ct={__proto__:null,Alert:Ne,Badge:{baseStyle:{display:"inline-block",fontSize:10,fontWeight:600,lineHeight:"1.25",textTransform:"none",px:2,py:"0.5"},variants:{"primary-solid":{bg:"primary.500",color:"white"},"success-solid":{bg:"success.500",color:"white"},"info-solid":{bg:"info.500",color:"white"},"warning-solid":{bg:"warning.500",color:"white"},"danger-solid":{bg:"danger.500",color:"white"},"neutral-solid":{bg:"neutral.900",color:"white"},"disabled-solid":{bg:"neutral.600",color:"white"},"primary-light":{bg:"primary.50",color:"primary.500"},"success-light":{bg:"success.50",color:"success.500"},"info-light":{bg:"info.50",color:"info.500"},"warning-light":{bg:"warning.50",color:"warning.500"},"danger-light":{bg:"danger.50",color:"danger.500"},"neutral-light":{bg:"neutral.200",color:"neutral.900"},"disabled-light":{bg:"neutral.200",color:"neutral.600"}},defaultProps:{variant:"primary-solid"}},Button:$e,Card:Ge,Checkbox:Ze,Chips:Ye,FormLabel:Ke,Input:rt,LoaderStyle:ot,Popover:ct,Radio:st,Switch:xt,Table:kt({baseStyle:vt,variants:{simple:yt(e=>{const{colorScheme:t}=e;return{th:{color:w.mode("gray.600","gray.400")(e),borderBottom:"1px",borderColor:w.mode(t+".100",t+".700")(e),...wt},td:{borderBottom:"1px",borderColor:w.mode(t+".100",t+".700")(e),...wt},caption:{color:w.mode("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),striped:yt(e=>{const{colorScheme:t}=e;return{th:{color:w.mode("gray.600","gray.400")(e),borderBottom:"1px",borderColor:w.mode(t+".100",t+".700")(e),...wt},td:{borderBottom:"1px",borderColor:w.mode(t+".100",t+".700")(e),...wt},caption:{color:w.mode("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:w.mode(t+".100",t+".700")(e)},td:{background:w.mode(t+".100",t+".700")(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),unstyled:v.defineStyle({})},sizes:{sm:yt({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:yt({th:{px:"2",py:"4",lineHeight:"4",fontSize:"xs","&:first-of-type":{pl:6},"&:last-of-type":{pr:6}},td:{px:"2",py:"4",lineHeight:"5","&:first-of-type":{pl:6},"&:last-of-type":{pr:6}},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:yt({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),Textarea:l.defineStyleConfig({variants:{outline:l.defineStyle(e=>{const{focusBorderColor:t,borderColor:r}=(e=>{const{isError:t,isSuccess:r,isDisabled:n}=e;let a="neutral.400",o="primary.500";return t?(a="danger.500",o="danger.500"):r?(a="success.500",o="success.500"):!n||t||r||(a="neutral.400",o="danger.500"),{focusBorderColor:o,borderColor:a}})(e);return{background:"white.high",color:"black.high",borderColor:r,fontSize:"text.sm",padding:2,borderRadius:"md",borderWidth:"1px",outline:"none",_disabled:{opacity:1,color:"black.medium",background:"neutral.300"},_placeholder:{color:"black.low"},_hover:{borderColor:r},_focus:{outline:"none",borderColor:t,boxShadow:"none"},_focusVisible:{outline:"none",borderColor:t,boxShadow:"none"},_focusWithin:{outline:"none",borderColor:t,boxShadow:"none"},_invalid:{outline:"none",borderColor:"danger.500",boxShadow:"none"}}})},defaultProps:{variant:"outline"}})};const Et=l.extendTheme({...ie,components:{...Ct},styles:{global:{"*::-webkit-scrollbar-thumb":{background:"neutral.400"},body:{fontSize:"text.sm",color:"black.high"}}},config:{initialColorMode:"light",useSystemColorMode:!1}}),St=n.createContext({instance:void 0}),Pt=()=>{const{instance:e}=n.useContext(St);return{instance:e}},Ft=({children:e,config:t,requestInterceptors:r,responseInterceptors:o})=>{const i=n.useRef(C.create(t));n.useEffect(()=>{null==r||r.forEach(e=>{i.current.interceptors.request.use(e)}),null==o||o.forEach(e=>{i.current.interceptors.response.use(e)})},[r,o]);const c=n.useMemo(()=>({instance:i.current}),[]);return a.createElement(St.Provider,{value:c},e)};Ft.displayName="Provider",Object.defineProperty(exports,"AlertDialog",{enumerable:!0,get:function(){return l.AlertDialog}}),Object.defineProperty(exports,"AlertDialogBody",{enumerable:!0,get:function(){return l.ModalBody}}),Object.defineProperty(exports,"AlertDialogCloseButton",{enumerable:!0,get:function(){return l.ModalCloseButton}}),Object.defineProperty(exports,"AlertDialogContent",{enumerable:!0,get:function(){return l.AlertDialogContent}}),Object.defineProperty(exports,"AlertDialogFooter",{enumerable:!0,get:function(){return l.ModalFooter}}),Object.defineProperty(exports,"AlertDialogHeader",{enumerable:!0,get:function(){return l.ModalHeader}}),Object.defineProperty(exports,"AlertDialogOverlay",{enumerable:!0,get:function(){return l.ModalOverlay}}),Object.defineProperty(exports,"Box",{enumerable:!0,get:function(){return l.Box}}),Object.defineProperty(exports,"ButtonGroup",{enumerable:!0,get:function(){return l.ButtonGroup}}),Object.defineProperty(exports,"Center",{enumerable:!0,get:function(){return l.Center}}),Object.defineProperty(exports,"ChakraProvider",{enumerable:!0,get:function(){return l.ChakraProvider}}),Object.defineProperty(exports,"ChakraTable",{enumerable:!0,get:function(){return l.Table}}),Object.defineProperty(exports,"CloseButton",{enumerable:!0,get:function(){return l.CloseButton}}),Object.defineProperty(exports,"Code",{enumerable:!0,get:function(){return l.Code}}),Object.defineProperty(exports,"Collapse",{enumerable:!0,get:function(){return l.Collapse}}),Object.defineProperty(exports,"ColorModeScript",{enumerable:!0,get:function(){return l.ColorModeScript}}),Object.defineProperty(exports,"Container",{enumerable:!0,get:function(){return l.Container}}),Object.defineProperty(exports,"Divider",{enumerable:!0,get:function(){return l.Divider}}),Object.defineProperty(exports,"Drawer",{enumerable:!0,get:function(){return l.Drawer}}),Object.defineProperty(exports,"DrawerBody",{enumerable:!0,get:function(){return l.ModalBody}}),Object.defineProperty(exports,"DrawerCloseButton",{enumerable:!0,get:function(){return l.ModalCloseButton}}),Object.defineProperty(exports,"DrawerContent",{enumerable:!0,get:function(){return l.DrawerContent}}),Object.defineProperty(exports,"DrawerFooter",{enumerable:!0,get:function(){return l.ModalFooter}}),Object.defineProperty(exports,"DrawerHeader",{enumerable:!0,get:function(){return l.ModalHeader}}),Object.defineProperty(exports,"DrawerOverlay",{enumerable:!0,get:function(){return l.ModalOverlay}}),Object.defineProperty(exports,"Flex",{enumerable:!0,get:function(){return l.Flex}}),Object.defineProperty(exports,"FormControl",{enumerable:!0,get:function(){return l.FormControl}}),Object.defineProperty(exports,"FormErrorMessage",{enumerable:!0,get:function(){return l.FormErrorMessage}}),Object.defineProperty(exports,"FormHelperText",{enumerable:!0,get:function(){return l.FormHelperText}}),Object.defineProperty(exports,"FormLabel",{enumerable:!0,get:function(){return l.FormLabel}}),Object.defineProperty(exports,"Grid",{enumerable:!0,get:function(){return l.Grid}}),Object.defineProperty(exports,"GridItem",{enumerable:!0,get:function(){return l.GridItem}}),Object.defineProperty(exports,"HStack",{enumerable:!0,get:function(){return l.HStack}}),Object.defineProperty(exports,"Heading",{enumerable:!0,get:function(){return l.Heading}}),Object.defineProperty(exports,"Icon",{enumerable:!0,get:function(){return l.Icon}}),Object.defineProperty(exports,"IconButton",{enumerable:!0,get:function(){return l.IconButton}}),Object.defineProperty(exports,"Image",{enumerable:!0,get:function(){return l.Image}}),Object.defineProperty(exports,"InputElementLeft",{enumerable:!0,get:function(){return l.InputLeftElement}}),Object.defineProperty(exports,"InputElementRight",{enumerable:!0,get:function(){return l.InputRightElement}}),Object.defineProperty(exports,"InputGroup",{enumerable:!0,get:function(){return l.InputGroup}}),Object.defineProperty(exports,"InputLeftAddon",{enumerable:!0,get:function(){return l.InputLeftAddon}}),Object.defineProperty(exports,"InputLeftElement",{enumerable:!0,get:function(){return l.InputLeftElement}}),Object.defineProperty(exports,"InputRightAddon",{enumerable:!0,get:function(){return l.InputRightAddon}}),Object.defineProperty(exports,"InputRightElement",{enumerable:!0,get:function(){return l.InputRightElement}}),Object.defineProperty(exports,"Link",{enumerable:!0,get:function(){return l.Link}}),Object.defineProperty(exports,"List",{enumerable:!0,get:function(){return l.List}}),Object.defineProperty(exports,"ListIcon",{enumerable:!0,get:function(){return l.ListIcon}}),Object.defineProperty(exports,"ListItem",{enumerable:!0,get:function(){return l.ListItem}}),Object.defineProperty(exports,"Modal",{enumerable:!0,get:function(){return l.Modal}}),Object.defineProperty(exports,"ModalContent",{enumerable:!0,get:function(){return l.ModalContent}}),Object.defineProperty(exports,"ModalContextProvider",{enumerable:!0,get:function(){return l.ModalContextProvider}}),Object.defineProperty(exports,"ModalFocusScope",{enumerable:!0,get:function(){return l.ModalFocusScope}}),Object.defineProperty(exports,"ModalOverlay",{enumerable:!0,get:function(){return l.ModalOverlay}}),Object.defineProperty(exports,"OrderedList",{enumerable:!0,get:function(){return l.OrderedList}}),Object.defineProperty(exports,"Popover",{enumerable:!0,get:function(){return l.Popover}}),Object.defineProperty(exports,"PopoverAnchor",{enumerable:!0,get:function(){return l.PopoverAnchor}}),Object.defineProperty(exports,"PopoverArrow",{enumerable:!0,get:function(){return l.PopoverArrow}}),Object.defineProperty(exports,"PopoverBody",{enumerable:!0,get:function(){return l.PopoverBody}}),Object.defineProperty(exports,"PopoverCloseButton",{enumerable:!0,get:function(){return l.PopoverCloseButton}}),Object.defineProperty(exports,"PopoverContent",{enumerable:!0,get:function(){return l.PopoverContent}}),Object.defineProperty(exports,"PopoverFooter",{enumerable:!0,get:function(){return l.PopoverFooter}}),Object.defineProperty(exports,"PopoverHeader",{enumerable:!0,get:function(){return l.PopoverHeader}}),Object.defineProperty(exports,"PopoverTrigger",{enumerable:!0,get:function(){return l.PopoverTrigger}}),Object.defineProperty(exports,"Portal",{enumerable:!0,get:function(){return l.Portal}}),Object.defineProperty(exports,"RequiredIndicator",{enumerable:!0,get:function(){return l.RequiredIndicator}}),Object.defineProperty(exports,"ScaleFade",{enumerable:!0,get:function(){return l.ScaleFade}}),Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:function(){return l.SimpleGrid}}),Object.defineProperty(exports,"Skeleton",{enumerable:!0,get:function(){return l.Skeleton}}),Object.defineProperty(exports,"Spacer",{enumerable:!0,get:function(){return l.Spacer}}),Object.defineProperty(exports,"Stack",{enumerable:!0,get:function(){return l.Stack}}),Object.defineProperty(exports,"TabIndicator",{enumerable:!0,get:function(){return l.TabIndicator}}),Object.defineProperty(exports,"TabPanels",{enumerable:!0,get:function(){return l.TabPanels}}),Object.defineProperty(exports,"Tabs",{enumerable:!0,get:function(){return l.Tabs}}),Object.defineProperty(exports,"TabsDescendantsProvider",{enumerable:!0,get:function(){return l.TabsDescendantsProvider}}),Object.defineProperty(exports,"TabsProvider",{enumerable:!0,get:function(){return l.TabsProvider}}),Object.defineProperty(exports,"Tbody",{enumerable:!0,get:function(){return l.Tbody}}),Object.defineProperty(exports,"Td",{enumerable:!0,get:function(){return l.Td}}),Object.defineProperty(exports,"Text",{enumerable:!0,get:function(){return l.Text}}),Object.defineProperty(exports,"Th",{enumerable:!0,get:function(){return l.Th}}),Object.defineProperty(exports,"Thead",{enumerable:!0,get:function(){return l.Thead}}),Object.defineProperty(exports,"Tooltip",{enumerable:!0,get:function(){return l.Tooltip}}),Object.defineProperty(exports,"Tr",{enumerable:!0,get:function(){return l.Tr}}),Object.defineProperty(exports,"UnorderedList",{enumerable:!0,get:function(){return l.UnorderedList}}),Object.defineProperty(exports,"VStack",{enumerable:!0,get:function(){return l.VStack}}),Object.defineProperty(exports,"Wrap",{enumerable:!0,get:function(){return l.Wrap}}),Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:function(){return l.WrapItem}}),Object.defineProperty(exports,"extendTheme",{enumerable:!0,get:function(){return l.extendTheme}}),Object.defineProperty(exports,"forwardRef",{enumerable:!0,get:function(){return l.forwardRef}}),Object.defineProperty(exports,"useBoolean",{enumerable:!0,get:function(){return l.useBoolean}}),Object.defineProperty(exports,"useColorMode",{enumerable:!0,get:function(){return l.useColorMode}}),Object.defineProperty(exports,"useColorModeValue",{enumerable:!0,get:function(){return l.useColorModeValue}}),Object.defineProperty(exports,"useDisclosure",{enumerable:!0,get:function(){return l.useDisclosure}}),Object.defineProperty(exports,"useDrawerContext",{enumerable:!0,get:function(){return l.useDrawerContext}}),Object.defineProperty(exports,"useModal",{enumerable:!0,get:function(){return l.useModal}}),Object.defineProperty(exports,"useModalContext",{enumerable:!0,get:function(){return l.useModalContext}}),Object.defineProperty(exports,"useModalStyles",{enumerable:!0,get:function(){return l.useModalStyles}}),Object.defineProperty(exports,"useTab",{enumerable:!0,get:function(){return l.useTab}}),Object.defineProperty(exports,"useTabIndicator",{enumerable:!0,get:function(){return l.useTabIndicator}}),Object.defineProperty(exports,"useTabList",{enumerable:!0,get:function(){return l.useTabList}}),Object.defineProperty(exports,"useTabPanel",{enumerable:!0,get:function(){return l.useTabPanel}}),Object.defineProperty(exports,"useTabPanels",{enumerable:!0,get:function(){return l.useTabPanels}}),Object.defineProperty(exports,"useTabs",{enumerable:!0,get:function(){return l.useTabs}}),Object.defineProperty(exports,"useTabsContext",{enumerable:!0,get:function(){return l.useTabsContext}}),Object.defineProperty(exports,"useTabsDescendant",{enumerable:!0,get:function(){return l.useTabsDescendant}}),Object.defineProperty(exports,"useTabsDescendants",{enumerable:!0,get:function(){return l.useTabsDescendants}}),Object.defineProperty(exports,"useTabsDescendantsContext",{enumerable:!0,get:function(){return l.useTabsDescendantsContext}}),Object.defineProperty(exports,"useTabsStyles",{enumerable:!0,get:function(){return l.useTabsStyles}}),Object.defineProperty(exports,"useToken",{enumerable:!0,get:function(){return l.useToken}}),exports.Alert=M,exports.AlertAction=A,exports.AlertClose=D,exports.AlertDescription=z,exports.AlertIcon=I,exports.AlertTitle=R,exports.Badge=H,exports.BreadCrumb=q,exports.Button=B,exports.Card=W,exports.Checkbox=L,exports.CheckboxGroup=N,exports.Chips=$,exports.DataTable=G,exports.DatePickerMonth=K,exports.Datepicker=Y,exports.Field=V,exports.Header=_e,exports.InputAddonLeft=({children:e})=>a.createElement(l.InputLeftAddon,{backgroundColor:"neutral.200",px:3,py:2.5,style:{border:0,marginInlineEnd:0}},e),exports.InputAddonRight=({children:e})=>a.createElement(l.InputRightAddon,{backgroundColor:"neutral.200",px:3,py:2.5,style:{border:0,marginInlineStart:0}},e),exports.InputField=de,exports.Loader=T,exports.MainMenu=we,exports.ModalBody=fe,exports.ModalCloseButton=xe,exports.ModalFooter=ke,exports.ModalHeader=ye,exports.MultiDatePickerMonth=le,exports.Pagination=Se,exports.PaginationDetail=({page:e,limit:t,length:r,scale:a=300,fontSize:o="xs",lineHeight:i=18,...c})=>n.createElement(l.Text,Object.assign({scale:a,fontSize:o,lineHeight:i},c),`${(e-1)*t+1}-${t*e<r?t*e:r} dari ${r} item`),exports.PaginationFilter=Pe,exports.Provider=Ft,exports.ProviderContext=St,exports.Radio=Fe,exports.RadioGroup=je,exports.Rating=({value:e})=>a.createElement(l.Grid,{gap:"4px",display:"flex"},[...Array(5)].map((t,r)=>a.createElement(i.Rating,{color:r<e?"#FFA230":"#E0E0E0",size:24}))),exports.Select=function({isError:e=!1,...t}){const{colorMode:n}=r.useColorMode();return a.createElement(Oe,{isError:e},a.createElement(h,Object.assign({classNamePrefix:"react-select"},t,{styles:{...Be(n,e)},theme:Ae})))},exports.SelectAsync=function({styles:e,isError:t=!1,...n}){const{colorMode:o}=r.useColorMode();return a.createElement(Oe,{isError:t},a.createElement(_.AsyncPaginate,Object.assign({classNamePrefix:"react-select"},n,{styles:{...Be(o,t),...e},theme:Ae})))},exports.SelectAsyncCreatable=function({styles:e,isError:t=!1,...n}){const{colorMode:o}=r.useColorMode();return a.createElement(Oe,{isError:t},a.createElement(f,Object.assign({classNamePrefix:"react-select"},n,{styles:{...Be(o,t),...e},theme:Ae})))},exports.SelectCreatable=function({styles:e,isError:t=!1,...n}){const{colorMode:o}=r.useColorMode();return a.createElement(Oe,{isError:t},a.createElement(x,Object.assign({classNamePrefix:"react-select"},n,{styles:{...Be(o,t),...e},theme:Ae})))},exports.Switch=De,exports.Tab=ze,exports.TabList=Ie,exports.TabPanel=Re,exports.TextareaField=se,exports.Uploader=He,exports.foundations=ie,exports.theme=Et,exports.useAlertStyles=j,exports.useFetcher=function(){const{instance:e}=Pt(),t=n.useMemo(()=>e||C,[e]);return{fetcher:async({url:e,data:r,method:n,headers:a,...o})=>await t.request({data:r,url:e,method:n,headers:{"Content-Type":"application/json; charset=utf-8",...a},...o})}},exports.useInternalUI=Pt;
|
37
|
+
`,px:6,py:4},n.createElement(l.Icon,{as:me.get(e.title),mr:3}),n.createElement(l.Text,{fontSize:"text.sm"},o),d&&n.createElement(l.Box,{width:.5,height:8,position:"absolute",bg:"primary.500",right:0,zIndex:"popover"})))}))))))}))));ge.defaultProps={navigations:void 0,as:"a",host:void 0};const be=l.forwardRef(({className:e,style:t,isActive:r,children:n,...o},i)=>{const c=l.useColorModeValue("neutral.300","mirage.900"),d=l.useColorModeValue("black.high","primary.300"),s=l.useColorModeValue("secondary.50","primary.500"),p=l.useColorModeValue("primary.500","white");return a.createElement(l.Button,Object.assign({"data-test-id":"Pagination-Button",ref:i,className:e,style:t,borderRadius:50,fontWeight:700,m:0,px:3,py:2,h:8,minW:"auto",width:8,background:r?"primary.500":c,color:r?"white":d,_hover:r?{}:{background:s,color:p},_disabled:{background:l.useColorModeValue("neutral.300","mirage.900"),color:"neutral.600",pointerEvents:"none"}},o),n)});be.displayName="PaginationButton",be.defaultProps={isActive:void 0};const he=({color:e,isDisabled:t,onClick:r,visuallyHidden:a,icon:o})=>n.createElement(be,{"data-test-id":"DLVCc_fBK35spHm5WxjcJ",color:e,isDisabled:t,onClick:r},n.createElement(l.VisuallyHidden,null,a),o);he.defaultProps={color:void 0,isDisabled:void 0,onClick:void 0,visuallyHidden:void 0,icon:void 0};const _e=({className:e,current:t,total:r,onSelect:a})=>{const o=l.useColorModeValue("secondary.100","primary.500"),i=l.useColorModeValue("primary.500","secondary.100"),c=1===t,d=c?o:i,p=t===r,u=p?o:i,m=e=>{a&&a(e)};return n.createElement(l.Box,{className:e,display:"inline-flex",alignItems:"center"},n.createElement(l.Box,{mr:1},n.createElement(he,{"data-test-id":"Pagination-Button",color:d,isDisabled:c,onClick:()=>m(1),visuallyHidden:"First Page",icon:n.createElement(s.ArrowLeftIcon,{width:2})})),n.createElement(l.Box,{backgroundColor:l.useColorModeValue("neutral.300","mirage.900"),borderRadius:50},n.createElement(he,{"data-test-id":"Pagination-Button",color:d,isDisabled:c,onClick:()=>m(t-1),visuallyHidden:"Previous Page",icon:n.createElement(s.ChevronLeftIcon,null)}),(()=>{const e=[];let n,a;5<r?(n=Math.max(Math.min(t-Math.floor(2.5),r-5+1),1),a=n+5-1):(n=1,a=r);for(let t=n;t<=a;++t)e.push(t);return e})().map(e=>n.createElement(be,{"data-test-id":"Pagination-Button",key:e,isActive:e===t,onClick:()=>"number"==typeof e?m(e):null},n.createElement(l.Text,{scale:300,fontSize:"text.sm",lineHeight:18,fontWeight:500},e))),n.createElement(he,{"data-test-id":"Pagination-Button",color:u,isDisabled:p,onClick:()=>m(t+1),visuallyHidden:"Next Page",icon:n.createElement(s.ChevronRightIcon,null)})),n.createElement(l.Box,{ml:1},n.createElement(he,{"data-test-id":"Pagination-Button",color:u,isDisabled:p,onClick:()=>m(r),visuallyHidden:"Last Page",icon:n.createElement(s.ArrowRightIcon,{width:2})})))};_e.defaultProps={className:void 0,onSelect:void 0},_e.displayName="Pagination";const fe=({limit:e,label:t="Baris per halaman:",items:r,onChange:a,...o})=>{const[i,c]=n.useState(e);return n.createElement(l.Box,{display:"flex",flexDirection:"row",alignItems:"center"},n.createElement(l.Text,Object.assign({fontSize:"text.sm",lineHeight:18,color:l.useColorModeValue("neutral.900","white")},o),t),n.createElement(l.Select,{textAlign:"center",size:"xs",outline:"none",border:"none",boxShadow:"none",width:18,icon:n.createElement(d.FiChevronDown,null),_focusVisible:{boxShadow:"none"},onChange:e=>{const t=Number(e.target.value);a(t),c(t)},value:i},r.map(e=>n.createElement("option",{key:e,value:e},e))))};function xe({isError:e=!1,helpText:t="",errorText:r="",children:n,isDisabled:o,...i}){return a.createElement(l.Box,null,a.createElement(l.Box,{display:"flex"},a.createElement(l.Radio,Object.assign({variant:e?"errors":"unstyled"},i,{isDisabled:o}),n&&a.createElement(l.Text,{as:"span",display:"block",textStyle:"text.sm",color:o?"black.medium":"black.high"},n))),a.createElement(l.Box,{mt:"5px",ml:"24px"},e?a.createElement(l.Text,{as:"span",display:"block",textStyle:"text.xs",color:"danger.500"},r):a.createElement(l.Text,{as:"span",display:"block",textStyle:"text.xs",color:"black.medium"},t)))}function ke(e){const{children:t,label:r,helpText:n,isError:o,errorMessage:i,...c}=e;return a.createElement(V,Object.assign({},c,{label:r,leftHelperText:n,isError:o,errorMessage:i}),a.createElement(l.Box,{mt:"12px"},a.createElement(l.RadioGroup,Object.assign({},c),a.createElement(l.Stack,{spacing:[1,"16px"],direction:["column","row"]},t))))}fe.defaultProps={limit:10,label:void 0},xe.defaultProps={isError:!1,helpText:"",errorText:""},ke.defaultProps={helpText:"",isError:!1,errorMessage:""};const ye=({children:e})=>a.createElement(l.Box,null,e);ye.defaultProps={isError:!1};const ve={...l.theme.shadows,raised:"0px 4px 20px rgba(0, 0, 0, 0.05)"},we={...l.theme.sizes,4.5:"1.125rem",9.5:"2.375rem",18:"4.5rem",22:"5.5rem",26:"6.5rem",30:"7.5rem"},Ce={...l.theme.space,4.5:"1.125rem",9.5:"2.375rem",18:"4.5rem",22:"5.5rem",26:"6.5rem",30:"7.5rem"},Se={normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,64:"4rem",56:"3.5rem",48:"3rem",40:"2.5rem",36:"2.25rem",34:"2.125rem",32:"2rem",30:"1.875rem",28:"1.75",26:"1.625rem",24:"1.5rem",22:"1.375rem",20:"1.25rem",18:"1.125rem",16:"1rem",14:"0.875rem",12:"0.75rem"},Ee={tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},Pe={heading:{1:"2.5rem",2:"2rem",3:"1.75rem",4:"1.5rem",5:"1.375rem",6:"1.125rem"},text:{xl:"1.125rem",lg:"1rem",md:"0.875rem",sm:"0.75rem",xs:"0.625rem"},button:{lg:"1.125rem",md:"0.875rem",sm:"0.625rem"},field:{lg:"1rem",md:"0.875rem",sm:"0.75rem"},table:{header:"0.75rem"}},je={heading:{1:{fontSize:Pe.heading[1],fontWeight:600,lineHeight:Se[64],letterSpacing:Ee.normal},2:{fontSize:Pe.heading[2],fontWeight:600,lineHeight:Se[56],letterSpacing:Ee.normal},3:{fontSize:Pe.heading[3],fontWeight:600,lineHeight:Se[48],letterSpacing:Ee.normal},4:{fontSize:Pe.heading[4],fontWeight:600,lineHeight:Se[40],letterSpacing:Ee.normal},5:{fontSize:Pe.heading[5],fontWeight:600,lineHeight:Se[36],letterSpacing:Ee.normal},6:{fontSize:Pe.heading[6],fontWeight:600,lineHeight:Se[32],letterSpacing:Ee.normal}},text:{xl:{fontSize:Pe.text.xl,fontWeight:400,lineHeight:Se[28],letterSpacing:Ee.normal},lg:{fontSize:Pe.text.lg,fontWeight:400,lineHeight:Se[24],letterSpacing:Ee.normal},md:{fontSize:Pe.text.md,fontWeight:400,lineHeight:Se[22],letterSpacing:Ee.normal},sm:{fontSize:Pe.text.sm,fontWeight:400,lineHeight:Se[18],letterSpacing:Ee.normal},xs:{fontSize:Pe.text.xs,fontWeight:400,lineHeight:Se[14],letterSpacing:Ee.normal}},button:{lg:{fontSize:Pe.button.lg,lineHeight:Se[28],letterSpacing:Ee.normal,fontWeight:400},md:{fontSize:Pe.button.md,lineHeight:Se[22],letterSpacing:Ee.normal,fontWeight:400},sm:{fontSize:Pe.button.sm,lineHeight:Se[14],letterSpacing:Ee.normal,fontWeight:400}},field:{lg:{fontSize:Pe.field.lg,lineHeight:Se[24],letterSpacing:Ee.normal,fontWeight:400},md:{fontSize:Pe.field.md,lineHeight:Se[22],letterSpacing:Ee.normal,fontWeight:400},sm:{fontSize:Pe.field.sm,lineHeight:Se[18],letterSpacing:Ee.normal,fontWeight:400}}};var Oe={__proto__:null,radii:{none:0,sm:"2px",md:"4px",lg:"8px",full:"9999px"},shadows:ve,sizes:we,space:Ce,fonts:{heading:"'Poppins', sans-serif",body:"'Poppins', sans-serif"},fontSizes:Pe,letterSpacings:Ee,lineHeights:Se,textStyles:je};const Me=je.text.sm,Te={fontSize:Me.fontSize,lineHeight:Me.lineHeight,letterSpacing:0};function ze(e,t){const r=(e=!1,t=!1)=>"0 0 0 1px "+(t&&e||t?"danger.500":e?"primary.500":"neutral.400");return{control:(n,a)=>"dark"===e?{...n,...Te,background:"transparent",color:"primary.300",borderColor:"secondary.500",boxShadow:a.isFocused?"none":"inherit"}:{...n,...Te,borderWidth:0,boxShadow:r(a.isFocused,t)},option:(t,{isSelected:r})=>"dark"===e?{...t,...Te,background:r?"primary.700":"dark.800",color:"white"}:{...t,...Te},menu:t=>"dark"===e?{...t,...Te,background:"dark.800",zIndex:5}:{...t,...Te,zIndex:5},singleValue:t=>"dark"===e?{...t,...Te,color:"white"}:{...t,...Te},input:t=>"dark"===e?{...t,...Te,color:"white"}:{...t,...Te},dropdownIndicator:t=>"dark"===e?{...t,...Te,color:"secondary.500"}:{...t,...Te},indicatorSeparator:t=>"dark"===e?{...t,...Te,backgroundColor:"secondary.500"}:{...t,...Te},placeholder:e=>({...e,...Te,color:"black.low"})}}const Ie=e=>({...e,colors:{...e.colors,primary:"primary.500",primary25:"primary.50",primary50:"primary.100",primary75:"primary.200"}}),Re=l.forwardRef((function(e,r){const o=l.useMultiStyleConfig("Switch",e),{spacing:c="0.5rem",children:d,...s}=l.omitThemingProps(e),{state:p,getInputProps:u,getCheckboxProps:m,getRootProps:g,getLabelProps:b}=l.useCheckbox(s),h=n.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...o.container}),[o.container]),_=n.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",width:200,...o.track}),[o.track]),f=n.useMemo(()=>({userSelect:"none",marginStart:c,...o.label}),[c,o.label]),x=e=>({sm:3,md:4,lg:5}[e]);return a.createElement(l.chakra.label,Object.assign({},g(),{display:"flex",alignItems:"center",className:t.cx("chakra-switch",e.className),__css:h}),a.createElement("input",Object.assign({"data-test-id":"",className:"chakra-switch__input"},u({},r))),a.createElement(l.chakra.span,Object.assign({},m(),{className:"chakra-switch__track",pos:"relative",__css:_}),a.createElement(l.Flex,{gap:2,pos:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},a.createElement(i.Check,{color:"white",size:x(e.size)}),a.createElement(i.Close,{color:p.isDisabled?"neutral.600":"neutral.900",size:x(e.size)})),a.createElement(l.chakra.span,{__css:o.thumb,className:"chakra-switch__thumb","data-checked":t.dataAttr(p.isChecked),"data-hover":t.dataAttr(p.isHovered)})),d&&a.createElement(l.chakra.span,Object.assign({className:"chakra-switch__label",color:p.isDisabled?"black.low":"black.high"},b(),{__css:f}),d))}));Re.defaultProps={size:"sm"};const Be=l.forwardRef((e,t)=>{var r,a;const o=l.useTab({...e,ref:t}),i=!!o["aria-selected"],c=l.useMultiStyleConfig("Tabs",o);return n.createElement(l.Button,Object.assign({p:3,fontSize:"text.md",_selected:{borderColor:l.useColorModeValue("primary.400","primary.300"),color:l.useColorModeValue("primary.500","primary.300"),transform:"translateY(-2px)"},color:l.useColorModeValue("black.high","primary.300"),_focus:{bg:"none"},__css:c.tab},o),n.createElement(l.Flex,null,null===(r=e.leftAddon)||void 0===r?void 0:r.call(e,{isSelected:i}),o.children,null===(a=e.rightAddon)||void 0===a?void 0:a.call(e,{isSelected:i})))}),He=l.forwardRef((e,t)=>a.createElement(l.TabList,Object.assign({borderBottom:"1px solid",borderColor:l.useColorModeValue("gray.200","bright-gray.800")},e,{ref:t}),e.children)),Ae=l.forwardRef((e,t)=>a.createElement(l.TabPanel,Object.assign({px:0},e,{ref:t}),e.children)),De=({onHandleUploadFile:e,onHandleRejections:t,accept:r,multiple:a,selected:o,maxFiles:i=1,renderError:c,validator:d,...s})=>{const[p,u]=n.useState(),[m,g]=n.useState(o||!1),b=n.useCallback(t=>{t.length>0&&(null==e||e(t),a||(g(!0),u(t[0])))},[a,e]),{getRootProps:h,getInputProps:_,isDragActive:f,fileRejections:x}=k.useDropzone({onDrop:b,accept:r,maxFiles:i,multiple:a,validator:d});n.useEffect(()=>{x.length>0&&t&&t(x)},[x,t]);const y=n.useMemo(()=>{const e=x.length>0;return e&&g(!1),e},[x]);return n.useEffect(()=>{g(null!=o&&o)},[o]),n.createElement(l.Stack,{direction:"column"},n.createElement(l.Flex,Object.assign({minH:200,border:"1px dashed",borderColor:y?"danger.500":"primary.500",alignItems:"center",justifyContent:"center",cursor:"pointer"},s,h()),n.createElement("input",Object.assign({},_())),f?n.createElement(l.Text,null,"Drop file disini..."):n.createElement(l.Flex,{flexDirection:"column",alignItems:"center",color:y?"danger.500":"primary.500"},!a&&m&&n.createElement(l.Heading,{fontWeight:400,fontSize:"18px",lineHeight:28,color:"black.high",mb:2},null==p?void 0:p.name),!m&&n.createElement(l.Heading,{fontWeight:400,fontSize:"18px",lineHeight:28,mb:2},"Upload File"),n.createElement(l.Text,null,m?"(Klik atau drag untuk mengganti file)":"(Klik atau drag untuk input file)"))),null==c?void 0:c(x))};De.defaultProps={onHandleUploadFile:void 0,onHandleRejections:void 0,renderError:void 0,selected:!1};const{definePartsStyle:Fe,defineMultiStyleConfig:qe}=v.createMultiStyleConfigHelpers(y.alertAnatomy.keys),We=v.cssVar("alert-fg"),Le=v.cssVar("alert-bg"),Ve=qe({baseStyle:Fe({container:{bg:Le.reference,px:"4",py:"2",borderRadius:"md"},title:{fontWeight:"400",lineHeight:"18px",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:We.reference,flexShrink:0,marginEnd:"3",w:"4",h:"4"},action:{"& +.chakra-alert__close":{ml:"3"}},close:{color:We.reference,w:"4",h:"4"},spinner:{color:We.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}}),variants:{subtle:Fe(e=>{const{colorScheme:t}=e,r=function(e){const{theme:t,colorScheme:r}=e;return{light:`colors.${r}.50`,dark:w.transparentize(r+".200",.16)(t)}}(e);return{container:{[We.variable]:`colors.${t}.700`,[Le.variable]:r.light,_dark:{[We.variable]:`colors.${t}.200`,[Le.variable]:r.dark},color:We.reference}}}),solid:Fe(e=>{const{colorScheme:t}=e;return{container:{[We.variable]:"colors.white.high",[Le.variable]:`colors.${t}.500`,_dark:{[We.variable]:"colors.gray.900",[Le.variable]:`colors.${t}.200`},color:We.reference}}})},defaultProps:{variant:"subtle",colorScheme:"info"}}),Ne=v.defineStyleConfig({baseStyle:{fontSize:"body.1",fontWeight:"normal",px:4,py:2.5,borderRadius:"md",_disabled:{opacity:1,bg:"neutral.300",color:"black.low"},_hover:{_disabled:{bg:"neutral.300",color:"black.low"}}},sizes:{lg:e=>{const{variant:t}=e;return"icon"===t?{h:10,w:10,p:0}:{fontSize:"text.xl",h:12,px:4,py:2.5}},md:e=>{const{variant:t}=e;return"icon"===t?{h:9,w:9,p:0}:{fontSize:"text.md",h:9,px:3,py:"7px"}},sm:e=>{const{variant:t}=e;return"icon"===t?{h:"26px",w:"26px",p:0}:{fontSize:"text.sm",h:"26px",lineHeight:4,px:2,py:"5px"}}},variants:{primary:e=>{const{isLoading:t}=e;return t?{_disabled:{bg:"primary.500"},_hover:{_disabled:{bg:"primary.500"}}}:{color:"white.high",bg:"primary.500",_hover:{bg:"primary.600"},_active:{bg:"primary.700"}}},secondary:e=>{const{isLoading:t}=e,r={color:"primary.500",borderWidth:1,borderStyle:"inside",bg:"white.high",borderColor:"primary.500",_hover:{bg:"primary.50"},_active:{bg:"primary.100"},_disabled:{border:0}},n={...r,_disabled:{bg:"white.high"},_hover:{_disabled:{bg:"white.high"}}};return t?n:r},tertiary:e=>{const{isLoading:t}=e,r={color:"primary.500",_hover:{bg:"primary.50"},_active:{bg:"primary.100"}},n={...r,_disabled:{bg:"transparent"},_hover:{_disabled:{bg:"transparent"}}};return t?n:r},danger:e=>{const{isLoading:t}=e,r={bg:"danger.500",color:"white.high",_hover:{bg:"danger.600"},_active:{bg:"danger.700"}},n={...r,_disabled:{bg:"danger.500"},_hover:{_disabled:{bg:"danger.500"}}};return t?n:r},"outline-danger":e=>{const{isLoading:t}=e,r={color:"danger.500",borderWidth:1,borderStyle:"inside",bg:"white.high",borderColor:"danger.500",_hover:{bg:"danger.50"},_active:{bg:"danger.100"},_disabled:{border:0}},n={...r,_disabled:{bg:"white.high"},_hover:{_disabled:{bg:"white.high"}}};return t?n:r},link:{bg:"transparent",color:"primary.500",_disabled:{opacity:"1",bg:"transparent",color:"black.medium"},_hover:{_disabled:{bg:"transparent",color:"black.medium"}}},icon:{bg:"neutral.50",minW:0,borderColor:"neutral.200",borderWidth:"1px",_active:{bg:"neutral.500",borderColor:"neutral.50"},_disabled:{bg:"neutral.500",opacity:.3,borderColor:"neutral.50"},_hover:{bg:"neutral.400",_disabled:{bg:"neutral.500",opacity:.3,borderColor:"neutral.50"}}}},defaultProps:{size:"md",variant:"primary",colorScheme:"primary"}}),$e=v.defineStyleConfig({baseStyle:e=>({shadow:e.withShadow?"raised":"none",borderRadius:e.isRounded?"lg":"none"})}),{definePartsStyle:Ge,defineMultiStyleConfig:Ue}=l.createMultiStyleConfigHelpers(y.checkboxAnatomy.keys),Xe=Ue({baseStyle:Ge({control:{borderRadius:"4px",width:"16px",height:"16px",border:"1px solid"},icon:{color:"neutral.50"},label:{fontWeight:"400",lineHeight:"18px",color:"black.high",ml:"8px"},_disabled:{background:"neutral.200",border:"0",borderColor:"neutral.500",cursor:"not-allowed"}}),variants:{errors:Ge({control:{borderColor:"danger.500",_checked:{borderColor:"danger.500",backgroundColor:"danger.500",_hover:{borderColor:"danger.600",backgroundColor:"danger.600"}},_indeterminate:{borderColor:"danger.500",backgroundColor:"danger.500"}},label:{fontSize:"12px"},icon:{fontSize:"7px"}}),unstyled:Ge({control:{borderColor:"neutral.600",_checked:{borderColor:"primary.500",backgroundColor:"primary.500",_hover:{borderColor:"primary.600",backgroundColor:"primary.600"},_disabled:{backgroundColor:"primary.500",borderColor:"primary.500",opacity:.3}},_disabled:{backgroundColor:"neutral.200",borderColor:"neutral.200"},_indeterminate:{borderColor:"primary.500",backgroundColor:"primary.500",_disabled:{backgroundColor:"primary.500",borderColor:"primary.500",opacity:.3}}},label:{fontSize:"12px",_disabled:{opacity:1}},icon:{fontSize:"7px"}})},defaultProps:{variant:"unstyled"}}),Ze=v.defineStyleConfig({baseStyle:e=>{const{isDisabled:t,isActive:r}=e;let n={color:"primary.500",fontSize:"text.small",borderRadius:"24px",borderWidth:"1px",borderColor:"primary.500",bg:"white.high",paddingX:3,paddingY:1,cursor:"default"};if(r){const e={bg:"primary.500",color:"white.high"};n={...n,...e}}if(t){const e={bg:"neutral.200",color:"black.low",borderColor:"neutral.200",cursor:"not-allowed"};n={...n,...e}}return{...n}},sizes:{sm:{fontSize:"12px",lineHeight:4},md:{fontSize:"14px",paddingY:2,lineHeight:5}},defaultProps:{size:"sm"}}),Ye=v.defineStyleConfig({baseStyle:v.defineStyle({fontSize:"field.sm",fontWeight:"normal",marginEnd:1,mb:1})}),{definePartsStyle:Ke,defineMultiStyleConfig:Qe}=v.createMultiStyleConfigHelpers(y.inputAnatomy.keys),Je=Ke({field:{width:"100%",minWidth:0,outline:0,px:2,py:2.5,paddingInlineStart:2,paddingInlineEnd:2,position:"relative",appearance:"none",color:"black.high",_disabled:{bg:"neutral.300",border:0,cursor:"not-allowed",opacity:1,boxShadow:"none",color:"black.medium"},_placeholder:{color:"black.low"}}}),et={lg:v.defineStyle({fontSize:"text.lg",h:12,borderRadius:"md"}),md:v.defineStyle({fontSize:"text.md",h:10,borderRadius:"md"}),sm:v.defineStyle({fontSize:"text.sm",h:9,borderRadius:"md"})},tt=Qe({baseStyle:Je,sizes:{lg:Ke({field:et.lg,addon:et.lg}),md:Ke({field:et.md,addon:et.md}),sm:Ke({field:et.sm,addon:et.sm})},variants:{outline:Ke(e=>({field:{border:0,outline:0,bg:w.mode("white","inherit")(e),color:w.mode("inherit","white")(e),_invalid:{boxShadow:"none"},_focusVisible:{zIndex:1,boxShadow:"none"}}})),unstyled:Ke({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}})},defaultProps:{size:"sm",variant:"outline"}}),rt=p.keyframes({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),nt=v.defineStyleConfig({baseStyle:e=>{const t="primary"===(r=e.color)?"--chakra-colors-primary-600":"danger"===r?"--chakra-colors-danger-500":"warning"===r?"--chakra-colors-warning-700":"--chakra-colors-white-high";var r;return{borderRadius:"50%",display:"flex",justifyContent:"center",alignItems:"center",animation:rt+" 1s linear infinite",background:`conic-gradient(from 180deg at 50% 50%, var(${t}) 0deg, rgba(217, 217, 217, 0) 360deg);`,":before":{content:"''",display:"block",borderRadius:"50%",width:"6px",height:"6px",position:"absolute",bottom:0,background:t}}},sizes:{xs:{width:"12px",height:"12px",WebkitMask:"radial-gradient(farthest-side,#0000 calc(100% - 1.4px),#000 0);",":before":{width:"1.4px",height:"1.4px"}},sm:{width:"16px",height:"16px",WebkitMask:"radial-gradient(farthest-side,#0000 calc(100% - 1.87px),#000 0);",":before":{width:"1.87px",height:"1.87px"}},md:{width:"24px",height:"24px",WebkitMask:"radial-gradient(farthest-side,#0000 calc(100% - 2.8px),#000 0);",":before":{width:"2.8px",height:"2.8px"}},lg:{width:"50px",height:"50px",WebkitMask:"radial-gradient(farthest-side,#0000 calc(100% - 5.83px),#000 0);",":before":{width:"5.83px",height:"5.83px"}},xl:{width:"75px",height:"75px",WebkitMask:"radial-gradient(farthest-side,#0000 calc(100% - 8.75px),#000 0);",":before":{width:"8.75px",height:"8.75px"}},xxl:{width:"100px",height:"100px",WebkitMask:"radial-gradient(farthest-side,#0000 calc(100% - 11.67px),#000 0);",":before":{width:"11.67px",height:"11.67px"}}},defaultProps:{size:"lg"}}),{definePartsStyle:at}=v.createMultiStyleConfigHelpers(y.popoverAnatomy.keys),ot={baseStyle:e=>at({popper:{background:w.mode("white","inherit")(e)}})},{definePartsStyle:it,defineMultiStyleConfig:ct}=l.createMultiStyleConfigHelpers(y.radioAnatomy.keys),lt=ct({baseStyle:it({control:{border:"1px solid",width:"16px",height:"16px"},label:{marginLeft:"8px",textStyle:"text.sm",color:"black.high",_disabled:{opacity:1,color:"black.medium"}}}),variants:{errors:it({control:{borderColor:"danger.500",_checked:{borderColor:"danger.500",bg:"white",_before:{h:"10px",w:"10px",bg:"danger.500"},_hover:{borderColor:"danger.500",bg:"neutral.200"},_disabled:{borderColor:"danger.500",bg:"white.high",_before:{h:"10px",w:"10px",bg:"primary.500",opacity:.3}}},_disabled:{borderColor:"danger.500",bg:"neutral.200"}},label:{fontSize:"12px"}}),unstyled:it({control:{borderColor:"neutral.600",_checked:{borderColor:"primary.500",bg:"white",_before:{h:"10px",w:"10px",bg:"primary.500"},_hover:{borderColor:"primary.500",bg:"gray.200"},_disabled:{borderColor:"primary.500",bg:"white.high",opacity:.3,_before:{h:"10px",w:"10px",bg:"primary.500"}}},_disabled:{borderColor:"neutral.200",bg:"neutral.200"}},label:{fontSize:"12px"}})},defaultProps:{variant:"unstyled"}}),{defineMultiStyleConfig:dt,definePartsStyle:st}=v.createMultiStyleConfigHelpers(y.switchAnatomy.keys),pt=w.cssVar("switch-track-width"),ut=w.cssVar("switch-track-height"),mt=w.cssVar("switch-track-diff"),gt=w.calc.subtract(pt,ut),bt=w.cssVar("switch-thumb-x"),ht=v.defineStyle({bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[ut.reference],height:[ut.reference],_checked:{transform:`translateX(${bt.reference})`}}),_t=dt({baseStyle:st(()=>({container:{[mt.variable]:gt,[bt.variable]:mt.reference,_rtl:{[bt.variable]:w.calc(mt).negate().toString()}},track:{bg:"neutral.400",p:1,_checked:{bg:"primary.500",_disabled:{bg:"neutral.600"}},_disabled:{bg:"neutral.500",opacity:"100%"}},thumb:ht})),sizes:{sm:st({container:{[pt.variable]:"2.125rem",[ut.variable]:"1.063rem"}}),md:st({container:{[pt.variable]:"2.875rem",[ut.variable]:"1.5rem"}}),lg:st({container:{[pt.variable]:"3.625rem",[ut.variable]:"1.813rem"}})},defaultProps:{size:"md"}}),{defineMultiStyleConfig:ft,definePartsStyle:xt}=v.createMultiStyleConfigHelpers(y.tableAnatomy.keys),kt=xt({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"semibold",textTransform:"uppercase",letterSpacing:"normal",textAlign:"start",height:"50px",color:w.mode("neutral.900","white"),fontSize:"text.sm",lineHeight:"18px"},td:{textAlign:"start",height:"56px"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),yt=v.defineStyle({"&[data-is-numeric=true]":{textAlign:"end"}});var vt={__proto__:null,Alert:Ve,Badge:{baseStyle:{display:"inline-block",fontSize:10,fontWeight:600,lineHeight:"1.25",textTransform:"none",px:2,py:"0.5"},variants:{"primary-solid":{bg:"primary.500",color:"white"},"success-solid":{bg:"success.500",color:"white"},"info-solid":{bg:"info.500",color:"white"},"warning-solid":{bg:"warning.500",color:"white"},"danger-solid":{bg:"danger.500",color:"white"},"neutral-solid":{bg:"neutral.900",color:"white"},"disabled-solid":{bg:"neutral.600",color:"white"},"primary-light":{bg:"primary.50",color:"primary.500"},"success-light":{bg:"success.50",color:"success.500"},"info-light":{bg:"info.50",color:"info.500"},"warning-light":{bg:"warning.50",color:"warning.500"},"danger-light":{bg:"danger.50",color:"danger.500"},"neutral-light":{bg:"neutral.200",color:"neutral.900"},"disabled-light":{bg:"neutral.200",color:"neutral.600"}},defaultProps:{variant:"primary-solid"}},Button:Ne,Card:$e,Checkbox:Xe,Chips:Ze,FormLabel:Ye,Input:tt,LoaderStyle:nt,Popover:ot,Radio:lt,Switch:_t,Table:ft({baseStyle:kt,variants:{simple:xt(e=>{const{colorScheme:t}=e;return{th:{color:w.mode("gray.600","gray.400")(e),borderBottom:"1px",borderColor:w.mode(t+".100",t+".700")(e),...yt},td:{borderBottom:"1px",borderColor:w.mode(t+".100",t+".700")(e),...yt},caption:{color:w.mode("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),striped:xt(e=>{const{colorScheme:t}=e;return{th:{color:w.mode("gray.600","gray.400")(e),borderBottom:"1px",borderColor:w.mode(t+".100",t+".700")(e),...yt},td:{borderBottom:"1px",borderColor:w.mode(t+".100",t+".700")(e),...yt},caption:{color:w.mode("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:w.mode(t+".100",t+".700")(e)},td:{background:w.mode(t+".100",t+".700")(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),unstyled:v.defineStyle({})},sizes:{sm:xt({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:xt({th:{px:"2",py:"4",lineHeight:"4",fontSize:"xs","&:first-of-type":{pl:6},"&:last-of-type":{pr:6}},td:{px:"2",py:"4",lineHeight:"5","&:first-of-type":{pl:6},"&:last-of-type":{pr:6}},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:xt({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),Textarea:l.defineStyleConfig({variants:{outline:l.defineStyle(e=>{const{focusBorderColor:t,borderColor:r}=(e=>{const{isError:t,isSuccess:r,isDisabled:n}=e;let a="neutral.400",o="primary.500";return t?(a="danger.500",o="danger.500"):r?(a="success.500",o="success.500"):!n||t||r||(a="neutral.400",o="danger.500"),{focusBorderColor:o,borderColor:a}})(e);return{background:"white.high",color:"black.high",borderColor:r,fontSize:"text.sm",padding:2,borderRadius:"md",borderWidth:"1px",outline:"none",_disabled:{opacity:1,color:"black.medium",background:"neutral.300"},_placeholder:{color:"black.low"},_hover:{borderColor:r},_focus:{outline:"none",borderColor:t,boxShadow:"none"},_focusVisible:{outline:"none",borderColor:t,boxShadow:"none"},_focusWithin:{outline:"none",borderColor:t,boxShadow:"none"},_invalid:{outline:"none",borderColor:"danger.500",boxShadow:"none"}}})},defaultProps:{variant:"outline"}})};const wt={initialColorMode:"light",useSystemColorMode:!1},Ct=l.extendTheme({...Oe,components:{...vt},styles:{global:{"*::-webkit-scrollbar-thumb":{background:"neutral.400"},body:{fontSize:"text.sm",color:"black.high"}}},config:wt}),St=n.createContext({instance:void 0}),Et=()=>{const{instance:e}=n.useContext(St);return{instance:e}},Pt=({children:e,config:t,requestInterceptors:r,responseInterceptors:o})=>{const i=n.useRef(C.create(t));n.useEffect(()=>{null==r||r.forEach(e=>{i.current.interceptors.request.use(e)}),null==o||o.forEach(e=>{i.current.interceptors.response.use(e)})},[r,o]);const c=n.useMemo(()=>({instance:i.current}),[]);return a.createElement(St.Provider,{value:c},e)};Pt.displayName="Provider",Object.defineProperty(exports,"AlertDialog",{enumerable:!0,get:function(){return l.AlertDialog}}),Object.defineProperty(exports,"AlertDialogBody",{enumerable:!0,get:function(){return l.ModalBody}}),Object.defineProperty(exports,"AlertDialogCloseButton",{enumerable:!0,get:function(){return l.ModalCloseButton}}),Object.defineProperty(exports,"AlertDialogContent",{enumerable:!0,get:function(){return l.AlertDialogContent}}),Object.defineProperty(exports,"AlertDialogFooter",{enumerable:!0,get:function(){return l.ModalFooter}}),Object.defineProperty(exports,"AlertDialogHeader",{enumerable:!0,get:function(){return l.ModalHeader}}),Object.defineProperty(exports,"AlertDialogOverlay",{enumerable:!0,get:function(){return l.ModalOverlay}}),Object.defineProperty(exports,"Box",{enumerable:!0,get:function(){return l.Box}}),Object.defineProperty(exports,"ButtonGroup",{enumerable:!0,get:function(){return l.ButtonGroup}}),Object.defineProperty(exports,"Center",{enumerable:!0,get:function(){return l.Center}}),Object.defineProperty(exports,"ChakraProvider",{enumerable:!0,get:function(){return l.ChakraProvider}}),Object.defineProperty(exports,"ChakraTable",{enumerable:!0,get:function(){return l.Table}}),Object.defineProperty(exports,"CloseButton",{enumerable:!0,get:function(){return l.CloseButton}}),Object.defineProperty(exports,"Code",{enumerable:!0,get:function(){return l.Code}}),Object.defineProperty(exports,"Collapse",{enumerable:!0,get:function(){return l.Collapse}}),Object.defineProperty(exports,"ColorModeScript",{enumerable:!0,get:function(){return l.ColorModeScript}}),Object.defineProperty(exports,"Container",{enumerable:!0,get:function(){return l.Container}}),Object.defineProperty(exports,"Divider",{enumerable:!0,get:function(){return l.Divider}}),Object.defineProperty(exports,"Drawer",{enumerable:!0,get:function(){return l.Drawer}}),Object.defineProperty(exports,"DrawerBody",{enumerable:!0,get:function(){return l.ModalBody}}),Object.defineProperty(exports,"DrawerCloseButton",{enumerable:!0,get:function(){return l.ModalCloseButton}}),Object.defineProperty(exports,"DrawerContent",{enumerable:!0,get:function(){return l.DrawerContent}}),Object.defineProperty(exports,"DrawerFooter",{enumerable:!0,get:function(){return l.ModalFooter}}),Object.defineProperty(exports,"DrawerHeader",{enumerable:!0,get:function(){return l.ModalHeader}}),Object.defineProperty(exports,"DrawerOverlay",{enumerable:!0,get:function(){return l.ModalOverlay}}),Object.defineProperty(exports,"Flex",{enumerable:!0,get:function(){return l.Flex}}),Object.defineProperty(exports,"FormControl",{enumerable:!0,get:function(){return l.FormControl}}),Object.defineProperty(exports,"FormErrorMessage",{enumerable:!0,get:function(){return l.FormErrorMessage}}),Object.defineProperty(exports,"FormHelperText",{enumerable:!0,get:function(){return l.FormHelperText}}),Object.defineProperty(exports,"FormLabel",{enumerable:!0,get:function(){return l.FormLabel}}),Object.defineProperty(exports,"Grid",{enumerable:!0,get:function(){return l.Grid}}),Object.defineProperty(exports,"GridItem",{enumerable:!0,get:function(){return l.GridItem}}),Object.defineProperty(exports,"HStack",{enumerable:!0,get:function(){return l.HStack}}),Object.defineProperty(exports,"Heading",{enumerable:!0,get:function(){return l.Heading}}),Object.defineProperty(exports,"Icon",{enumerable:!0,get:function(){return l.Icon}}),Object.defineProperty(exports,"IconButton",{enumerable:!0,get:function(){return l.IconButton}}),Object.defineProperty(exports,"Image",{enumerable:!0,get:function(){return l.Image}}),Object.defineProperty(exports,"InputElementLeft",{enumerable:!0,get:function(){return l.InputLeftElement}}),Object.defineProperty(exports,"InputElementRight",{enumerable:!0,get:function(){return l.InputRightElement}}),Object.defineProperty(exports,"InputGroup",{enumerable:!0,get:function(){return l.InputGroup}}),Object.defineProperty(exports,"InputLeftAddon",{enumerable:!0,get:function(){return l.InputLeftAddon}}),Object.defineProperty(exports,"InputLeftElement",{enumerable:!0,get:function(){return l.InputLeftElement}}),Object.defineProperty(exports,"InputRightAddon",{enumerable:!0,get:function(){return l.InputRightAddon}}),Object.defineProperty(exports,"InputRightElement",{enumerable:!0,get:function(){return l.InputRightElement}}),Object.defineProperty(exports,"Link",{enumerable:!0,get:function(){return l.Link}}),Object.defineProperty(exports,"List",{enumerable:!0,get:function(){return l.List}}),Object.defineProperty(exports,"ListIcon",{enumerable:!0,get:function(){return l.ListIcon}}),Object.defineProperty(exports,"ListItem",{enumerable:!0,get:function(){return l.ListItem}}),Object.defineProperty(exports,"Modal",{enumerable:!0,get:function(){return l.Modal}}),Object.defineProperty(exports,"ModalContent",{enumerable:!0,get:function(){return l.ModalContent}}),Object.defineProperty(exports,"ModalContextProvider",{enumerable:!0,get:function(){return l.ModalContextProvider}}),Object.defineProperty(exports,"ModalFocusScope",{enumerable:!0,get:function(){return l.ModalFocusScope}}),Object.defineProperty(exports,"ModalOverlay",{enumerable:!0,get:function(){return l.ModalOverlay}}),Object.defineProperty(exports,"OrderedList",{enumerable:!0,get:function(){return l.OrderedList}}),Object.defineProperty(exports,"Popover",{enumerable:!0,get:function(){return l.Popover}}),Object.defineProperty(exports,"PopoverAnchor",{enumerable:!0,get:function(){return l.PopoverAnchor}}),Object.defineProperty(exports,"PopoverArrow",{enumerable:!0,get:function(){return l.PopoverArrow}}),Object.defineProperty(exports,"PopoverBody",{enumerable:!0,get:function(){return l.PopoverBody}}),Object.defineProperty(exports,"PopoverCloseButton",{enumerable:!0,get:function(){return l.PopoverCloseButton}}),Object.defineProperty(exports,"PopoverContent",{enumerable:!0,get:function(){return l.PopoverContent}}),Object.defineProperty(exports,"PopoverFooter",{enumerable:!0,get:function(){return l.PopoverFooter}}),Object.defineProperty(exports,"PopoverHeader",{enumerable:!0,get:function(){return l.PopoverHeader}}),Object.defineProperty(exports,"PopoverTrigger",{enumerable:!0,get:function(){return l.PopoverTrigger}}),Object.defineProperty(exports,"Portal",{enumerable:!0,get:function(){return l.Portal}}),Object.defineProperty(exports,"RequiredIndicator",{enumerable:!0,get:function(){return l.RequiredIndicator}}),Object.defineProperty(exports,"ScaleFade",{enumerable:!0,get:function(){return l.ScaleFade}}),Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:function(){return l.SimpleGrid}}),Object.defineProperty(exports,"Skeleton",{enumerable:!0,get:function(){return l.Skeleton}}),Object.defineProperty(exports,"Spacer",{enumerable:!0,get:function(){return l.Spacer}}),Object.defineProperty(exports,"Stack",{enumerable:!0,get:function(){return l.Stack}}),Object.defineProperty(exports,"TabIndicator",{enumerable:!0,get:function(){return l.TabIndicator}}),Object.defineProperty(exports,"TabPanels",{enumerable:!0,get:function(){return l.TabPanels}}),Object.defineProperty(exports,"Tabs",{enumerable:!0,get:function(){return l.Tabs}}),Object.defineProperty(exports,"TabsDescendantsProvider",{enumerable:!0,get:function(){return l.TabsDescendantsProvider}}),Object.defineProperty(exports,"TabsProvider",{enumerable:!0,get:function(){return l.TabsProvider}}),Object.defineProperty(exports,"Tbody",{enumerable:!0,get:function(){return l.Tbody}}),Object.defineProperty(exports,"Td",{enumerable:!0,get:function(){return l.Td}}),Object.defineProperty(exports,"Text",{enumerable:!0,get:function(){return l.Text}}),Object.defineProperty(exports,"Th",{enumerable:!0,get:function(){return l.Th}}),Object.defineProperty(exports,"Thead",{enumerable:!0,get:function(){return l.Thead}}),Object.defineProperty(exports,"Tooltip",{enumerable:!0,get:function(){return l.Tooltip}}),Object.defineProperty(exports,"Tr",{enumerable:!0,get:function(){return l.Tr}}),Object.defineProperty(exports,"UnorderedList",{enumerable:!0,get:function(){return l.UnorderedList}}),Object.defineProperty(exports,"VStack",{enumerable:!0,get:function(){return l.VStack}}),Object.defineProperty(exports,"Wrap",{enumerable:!0,get:function(){return l.Wrap}}),Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:function(){return l.WrapItem}}),Object.defineProperty(exports,"extendTheme",{enumerable:!0,get:function(){return l.extendTheme}}),Object.defineProperty(exports,"forwardRef",{enumerable:!0,get:function(){return l.forwardRef}}),Object.defineProperty(exports,"useBoolean",{enumerable:!0,get:function(){return l.useBoolean}}),Object.defineProperty(exports,"useColorMode",{enumerable:!0,get:function(){return l.useColorMode}}),Object.defineProperty(exports,"useColorModeValue",{enumerable:!0,get:function(){return l.useColorModeValue}}),Object.defineProperty(exports,"useDisclosure",{enumerable:!0,get:function(){return l.useDisclosure}}),Object.defineProperty(exports,"useDrawerContext",{enumerable:!0,get:function(){return l.useDrawerContext}}),Object.defineProperty(exports,"useModal",{enumerable:!0,get:function(){return l.useModal}}),Object.defineProperty(exports,"useModalContext",{enumerable:!0,get:function(){return l.useModalContext}}),Object.defineProperty(exports,"useModalStyles",{enumerable:!0,get:function(){return l.useModalStyles}}),Object.defineProperty(exports,"useTab",{enumerable:!0,get:function(){return l.useTab}}),Object.defineProperty(exports,"useTabIndicator",{enumerable:!0,get:function(){return l.useTabIndicator}}),Object.defineProperty(exports,"useTabList",{enumerable:!0,get:function(){return l.useTabList}}),Object.defineProperty(exports,"useTabPanel",{enumerable:!0,get:function(){return l.useTabPanel}}),Object.defineProperty(exports,"useTabPanels",{enumerable:!0,get:function(){return l.useTabPanels}}),Object.defineProperty(exports,"useTabs",{enumerable:!0,get:function(){return l.useTabs}}),Object.defineProperty(exports,"useTabsContext",{enumerable:!0,get:function(){return l.useTabsContext}}),Object.defineProperty(exports,"useTabsDescendant",{enumerable:!0,get:function(){return l.useTabsDescendant}}),Object.defineProperty(exports,"useTabsDescendants",{enumerable:!0,get:function(){return l.useTabsDescendants}}),Object.defineProperty(exports,"useTabsDescendantsContext",{enumerable:!0,get:function(){return l.useTabsDescendantsContext}}),Object.defineProperty(exports,"useTabsStyles",{enumerable:!0,get:function(){return l.useTabsStyles}}),Object.defineProperty(exports,"useToken",{enumerable:!0,get:function(){return l.useToken}}),exports.Alert=T,exports.AlertAction=R,exports.AlertClose=B,exports.AlertDescription=H,exports.AlertIcon=A,exports.AlertTitle=D,exports.Badge=F,exports.BreadCrumb=q,exports.Button=I,exports.Card=W,exports.Checkbox=L,exports.CheckboxGroup=N,exports.Chips=$,exports.DataTable=G,exports.DatePickerMonth=K,exports.Datepicker=Y,exports.Field=V,exports.Header=le,exports.InputAddonLeft=({children:e})=>a.createElement(l.InputLeftAddon,{backgroundColor:"neutral.200",px:3,py:2.5,style:{border:0,marginInlineEnd:0}},e),exports.InputAddonRight=({children:e})=>a.createElement(l.InputRightAddon,{backgroundColor:"neutral.200",px:3,py:2.5,style:{border:0,marginInlineStart:0}},e),exports.InputField=ee,exports.Loader=z,exports.MainMenu=ge,exports.ModalBody=de,exports.ModalCloseButton=se,exports.ModalFooter=pe,exports.ModalHeader=ue,exports.MultiDatePickerMonth=J,exports.Pagination=_e,exports.PaginationDetail=({page:e,limit:t,length:r,scale:a=300,fontSize:o="xs",lineHeight:i=18,...c})=>n.createElement(l.Text,Object.assign({scale:a,fontSize:o,lineHeight:i},c),`${(e-1)*t+1}-${t*e<r?t*e:r} dari ${r} item`),exports.PaginationFilter=fe,exports.Provider=Pt,exports.ProviderContext=St,exports.Radio=xe,exports.RadioGroup=ke,exports.Rating=({value:e})=>a.createElement(l.Grid,{gap:"4px",display:"flex"},[...Array(5)].map((t,r)=>a.createElement(i.Rating,{color:r<e?"#FFA230":"#E0E0E0",size:24}))),exports.Select=function({isError:e=!1,...t}){const{colorMode:n}=r.useColorMode();return a.createElement(ye,{isError:e},a.createElement(h,Object.assign({classNamePrefix:"react-select"},t,{styles:{...ze(n,e)},theme:Ie})))},exports.SelectAsync=function({styles:e,isError:t=!1,...n}){const{colorMode:o}=r.useColorMode();return a.createElement(ye,{isError:t},a.createElement(_.AsyncPaginate,Object.assign({classNamePrefix:"react-select"},n,{styles:{...ze(o,t),...e},theme:Ie})))},exports.SelectAsyncCreatable=function({styles:e,isError:t=!1,...n}){const{colorMode:o}=r.useColorMode();return a.createElement(ye,{isError:t},a.createElement(f,Object.assign({classNamePrefix:"react-select"},n,{styles:{...ze(o,t),...e},theme:Ie})))},exports.SelectCreatable=function({styles:e,isError:t=!1,...n}){const{colorMode:o}=r.useColorMode();return a.createElement(ye,{isError:t},a.createElement(x,Object.assign({classNamePrefix:"react-select"},n,{styles:{...ze(o,t),...e},theme:Ie})))},exports.Switch=Re,exports.Tab=Be,exports.TabList=He,exports.TabPanel=Ae,exports.TextareaField=te,exports.Uploader=De,exports.foundations=Oe,exports.getTheme=e=>l.extendTheme({colors:e,...Oe,components:{...vt},styles:{global:{"*::-webkit-scrollbar-thumb":{background:"neutral.400"},body:{fontSize:"text.sm",color:"black.high"}}},config:wt}),exports.theme=Ct,exports.useAlertStyles=O,exports.useFetcher=function(){const{instance:e}=Et(),t=n.useMemo(()=>e||C,[e]);return{fetcher:async({url:e,data:r,method:n,headers:a,...o})=>await t.request({data:r,url:e,method:n,headers:{"Content-Type":"application/json; charset=utf-8",...a},...o})}},exports.useInternalUI=Et;
|
38
38
|
//# sourceMappingURL=internal-ui.cjs.production.min.js.map
|