@cognitiv/components-web 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2231,13 +2231,103 @@ interface LoadingPlaceholderProps {
2231
2231
  */
2232
2232
  declare const LoadingPlaceholder: React$1.FC<LoadingPlaceholderProps>;
2233
2233
 
2234
- declare function Modal({ open, setOpen, title, children, trigger }: {
2235
- open: any;
2236
- setOpen: any;
2237
- title: any;
2238
- children: any;
2239
- trigger: any;
2240
- }): react_jsx_runtime.JSX.Element;
2234
+ /**
2235
+ * Modal component for displaying blocking dialog overlays.
2236
+ *
2237
+ * A modal dialog component built on Radix UI Dialog that displays content in
2238
+ * a centered overlay. Blocks interaction with the rest of the page until
2239
+ * closed. Includes focus management, keyboard navigation, and accessibility
2240
+ * features.
2241
+ *
2242
+ * @category Overlay
2243
+ * @see Slideout
2244
+ *
2245
+ * @remarks
2246
+ * - Requires UIProvider wrapper for theming
2247
+ * - Built on Radix UI Dialog for accessibility
2248
+ * - Focus trap within modal when open
2249
+ * - Escape key closes the modal
2250
+ * - Backdrop click closes (via Radix UI default behavior)
2251
+ * - Focus returns to trigger element when closed
2252
+ * - Use for important dialogs that require user attention
2253
+ *
2254
+ * @example Basic usage with trigger
2255
+ * ```tsx
2256
+ * <Modal
2257
+ * trigger={<Button>Open Modal</Button>}
2258
+ * title="Confirm Action"
2259
+ * >
2260
+ * <Text>Are you sure you want to proceed?</Text>
2261
+ * <Button onClick={() => handleConfirm()}>Confirm</Button>
2262
+ * </Modal>
2263
+ * ```
2264
+ *
2265
+ * @example Controlled modal
2266
+ * ```tsx
2267
+ * const [open, setOpen] = useState(false)
2268
+ *
2269
+ * <Modal
2270
+ * open={open}
2271
+ * setOpen={setOpen}
2272
+ * title="Edit Item"
2273
+ * >
2274
+ * <InputContainer label="Name">
2275
+ * <Input onTextChange={(v) => setName(v)} />
2276
+ * </InputContainer>
2277
+ * </Modal>
2278
+ * ```
2279
+ *
2280
+ * @example Without title
2281
+ * ```tsx
2282
+ * <Modal
2283
+ * open={isOpen}
2284
+ * setOpen={setIsOpen}
2285
+ * >
2286
+ * <Text>Simple modal without title</Text>
2287
+ * </Modal>
2288
+ * ```
2289
+ */
2290
+ interface ModalProps {
2291
+ /**
2292
+ * Whether the modal is open.
2293
+ *
2294
+ * For controlled modals, use this with setOpen.
2295
+ *
2296
+ * @default undefined
2297
+ */
2298
+ open?: boolean;
2299
+ /**
2300
+ * Callback function triggered when the modal open state changes.
2301
+ *
2302
+ * @param open - The new open state (boolean)
2303
+ */
2304
+ setOpen?: (open: boolean) => void;
2305
+ /**
2306
+ * Title text or React node displayed in the modal header.
2307
+ *
2308
+ * When provided, displays in the header with a close button.
2309
+ *
2310
+ * @default undefined
2311
+ */
2312
+ title?: ReactNode;
2313
+ /**
2314
+ * Content to display in the modal body.
2315
+ *
2316
+ * Can be any React node.
2317
+ */
2318
+ children: ReactNode;
2319
+ /**
2320
+ * Optional trigger element that opens the modal when clicked.
2321
+ *
2322
+ * If provided, clicking this element will open the modal. For controlled
2323
+ * modals, this is optional.
2324
+ *
2325
+ * @default undefined
2326
+ */
2327
+ trigger?: ReactNode;
2328
+ }
2329
+
2330
+ declare const Modal: React$1.FC<ModalProps>;
2241
2331
 
2242
2332
  /**
2243
2333
  * Option type for MultiSelect component.
@@ -2604,10 +2694,61 @@ interface SlideoutProps {
2604
2694
  */
2605
2695
  declare const Slideout: React$1.FC<SlideoutProps>;
2606
2696
 
2607
- declare const Spinner: ({ width, color }: {
2608
- width: any;
2609
- color: any;
2610
- }) => react_jsx_runtime.JSX.Element;
2697
+ /**
2698
+ * Spinner component for displaying loading indicators.
2699
+ *
2700
+ * A loading spinner component that displays an animated circular spinner
2701
+ * to indicate that content is loading or an operation is in progress.
2702
+ * Supports custom size and color.
2703
+ *
2704
+ * @category Feedback
2705
+ * @see LoadingPlaceholder
2706
+ *
2707
+ * @remarks
2708
+ * - Requires UIProvider wrapper for theming
2709
+ * - Should have aria-label='Loading' for accessibility
2710
+ * - Should be announced to screen readers
2711
+ * - Consider using aria-live regions for status updates
2712
+ * - Use for loading states during async operations
2713
+ *
2714
+ * @example Basic usage
2715
+ * ```tsx
2716
+ * <Spinner />
2717
+ * ```
2718
+ *
2719
+ * @example Custom size
2720
+ * ```tsx
2721
+ * <Spinner width="40px" />
2722
+ * ```
2723
+ *
2724
+ * @example Custom color
2725
+ * ```tsx
2726
+ * <Spinner color="primary" />
2727
+ * ```
2728
+ *
2729
+ * @example With accessibility
2730
+ * ```tsx
2731
+ * <div role="status" aria-label="Loading">
2732
+ * <Spinner />
2733
+ * </div>
2734
+ * ```
2735
+ */
2736
+ interface SpinnerProps {
2737
+ /**
2738
+ * Width of the spinner (CSS value).
2739
+ *
2740
+ * @default '60px'
2741
+ */
2742
+ width?: string;
2743
+ /**
2744
+ * Color of the spinner (theme color name or CSS color value).
2745
+ *
2746
+ * @default 'primary'
2747
+ */
2748
+ color?: string;
2749
+ }
2750
+
2751
+ declare const Spinner: React$1.FC<SpinnerProps>;
2611
2752
 
2612
2753
  /**
2613
2754
  * StatusLabel component for displaying status indicators and badges.
@@ -3085,6 +3226,47 @@ interface TableProps {
3085
3226
 
3086
3227
  declare const Table: React$1.FC<TableProps>;
3087
3228
 
3229
+ declare const COLORS: {
3230
+ link: string;
3231
+ primary: string;
3232
+ primaryDark: string;
3233
+ textLight: string;
3234
+ textNormal: string;
3235
+ textDark: string;
3236
+ border: string;
3237
+ backgroundLight: string;
3238
+ background: string;
3239
+ yellow100: string;
3240
+ yellow200: string;
3241
+ yellow300: string;
3242
+ yellow400: string;
3243
+ yellow500: string;
3244
+ yellow600: string;
3245
+ yellow700: string;
3246
+ yellow800: string;
3247
+ yellow900: string;
3248
+ yellow1000: string;
3249
+ red100: string;
3250
+ red200: string;
3251
+ red300: string;
3252
+ red400: string;
3253
+ red500: string;
3254
+ red600: string;
3255
+ red700: string;
3256
+ red800: string;
3257
+ red900: string;
3258
+ red1000: string;
3259
+ green100: string;
3260
+ green200: string;
3261
+ green300: string;
3262
+ green400: string;
3263
+ green500: string;
3264
+ green600: string;
3265
+ green700: string;
3266
+ green800: string;
3267
+ green900: string;
3268
+ green1000: string;
3269
+ };
3088
3270
  declare const TYPOGRAPHY: {
3089
3271
  [k: string]: string;
3090
3272
  };
@@ -3520,4 +3702,35 @@ declare const UIProvider: ({ children, locale }: {
3520
3702
  locale: string;
3521
3703
  }) => react_jsx_runtime.JSX.Element;
3522
3704
 
3523
- export { Avatar, type AvatarProps, Banner, Button, ButtonVariant, Calendar, Checkbox, ClickableIcon, CurrencyInput, type CurrencyInputProps, DateInput, DatePicker, Divider, DragList, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, DropdownVariant, Filters, type FiltersProps, Flex, type FlexProps, Icon, type IconName, type IconProps, type IconStyle, Image, Input, InputContainer, type InputContainerProps, type InputProps, LoadingPlaceholder, Modal, MultiSelect, Select, Slideout, Spinner, StatusLabel, Switch, TabBar, Table, Text, TextArea, type TextProps, TimeInput, Tooltip, type TooltipProps, UIProvider };
3705
+ interface ThemeType {
3706
+ colors: typeof COLORS;
3707
+ typography: typeof TYPOGRAPHY;
3708
+ hoverable: (value: boolean) => string;
3709
+ spacing: (value: number) => string;
3710
+ padding: (value1: number, value2?: number) => string;
3711
+ paddingHorizontal: (value: number) => string;
3712
+ paddingVertical: (value: number) => string;
3713
+ paddingTop: (value: number) => string;
3714
+ paddingBottom: (value: number) => string;
3715
+ paddingLeft: (value: number) => string;
3716
+ paddingRight: (value: number) => string;
3717
+ margin: (value1: number, value2?: number) => string;
3718
+ marginHorizontal: (value: number) => string;
3719
+ marginVertical: (value: number) => string;
3720
+ marginTop: (value: number) => string;
3721
+ marginBottom: (value: number) => string;
3722
+ marginLeft: (value: number) => string;
3723
+ marginRight: (value: number) => string;
3724
+ border: (size?: number) => string;
3725
+ borderTop: (size?: number) => string;
3726
+ borderBottom: (size?: number) => string;
3727
+ borderLeft: (size?: number) => string;
3728
+ borderRight: (size?: number) => string;
3729
+ media: {
3730
+ phone: string;
3731
+ tablet: string;
3732
+ desktop: string;
3733
+ };
3734
+ }
3735
+
3736
+ export { Avatar, type AvatarProps, Banner, Button, ButtonVariant, Calendar, Checkbox, ClickableIcon, CurrencyInput, type CurrencyInputProps, DateInput, DatePicker, Divider, DragList, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, DropdownVariant, Filters, type FiltersProps, Flex, type FlexProps, Icon, type IconName, type IconProps, type IconStyle, Image, Input, InputContainer, type InputContainerProps, type InputProps, LoadingPlaceholder, Modal, MultiSelect, Select, Slideout, Spinner, StatusLabel, Switch, TabBar, Table, Text, TextArea, type TextProps, type ThemeType, TimeInput, Tooltip, type TooltipProps, UIProvider };
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ import Vo from"react";import bt from"styled-components";import*as J from"@radix-
16
16
  ${e=>e.theme.typography.headingXs};
17
17
  font-size: ${e=>e.$size*.4}px;
18
18
  line-height: 1;
19
- `,Xo=Vo.forwardRef((e,t)=>{let r=Wo(e.variant||"small");return Uo(J.Root,{ref:t,children:[xt(Yo,{$size:r,...e}),xt(_o,{$size:r,children:Ao(e.alt)})]})});import mr,{useState as pr,useEffect as fr}from"react";import ze from"styled-components";import{forwardRef as Go}from"react";import Ko from"styled-components";import{jsx as Qo}from"react/jsx-runtime";var qo=e=>e.$center||e.$direction==="row"?"center":"flex-start",Jo=e=>e.$center?"center":"flex-start",jo=Ko.div`
19
+ `,Xo=Vo.forwardRef((e,t)=>{let r=Wo(e.variant||"small");return Uo(J.Root,{ref:t,children:[xt(Yo,{$size:r,...e}),xt(_o,{$size:r,children:Ao(e.alt)})]})});import mr,{useState as pr,useEffect as fr}from"react";import Ne from"styled-components";import{forwardRef as Go}from"react";import Ko from"styled-components";import{jsx as Qo}from"react/jsx-runtime";var qo=e=>e.$center||e.$direction==="row"?"center":"flex-start",Jo=e=>e.$center?"center":"flex-start",jo=Ko.div`
20
20
  display: flex;
21
21
  width: ${e=>e.$width||"100%"};
22
22
  flex-direction: ${e=>e.$direction};
@@ -29,7 +29,7 @@ import Vo from"react";import bt from"styled-components";import*as J from"@radix-
29
29
  ${e=>e.$gapFactor&&`gap: ${e.theme.spacing(e.$gapFactor)};`}
30
30
  ${e=>e.$paddingFactor&&e.theme.padding(e.$paddingFactor)};
31
31
  ${e=>e.theme.hoverable(e.$hoverable)}
32
- `,m=Go((e,t)=>{let{children:r,className:o,width:n,height:i,row:a=!1,align:l,justify:s,grow:d=!1,gap:p,padding:c,hoverable:f,center:y=!1,...u}=e;return Qo(jo,{ref:t,className:o,$direction:a?"row":"column",$width:n,$height:i,$align:l,$justify:s,$grow:d,$gapFactor:p,$paddingFactor:c,$center:y,$hoverable:!!f,...u,children:r})});import Zo from"react";import er from"styled-components";import{jsx as or}from"react/jsx-runtime";var tr=er.span`
32
+ `,m=Go((e,t)=>{let{children:r,className:o,width:n,height:i,row:a=!1,align:l,justify:s,grow:d=!1,gap:p,padding:c,hoverable:f,center:y=!1,...h}=e;return Qo(jo,{ref:t,className:o,$direction:a?"row":"column",$width:n,$height:i,$align:l,$justify:s,$grow:d,$gapFactor:p,$paddingFactor:c,$center:y,$hoverable:!!f,...h,children:r})});import Zo from"react";import er from"styled-components";import{jsx as or}from"react/jsx-runtime";var tr=er.span`
33
33
  ${e=>e.theme.typography[e.$variant||"bodyMd"]||e.theme.typography.bodyMd}
34
34
  text-align: ${e=>e.$align};
35
35
  text-decoration: ${e=>e.$underline==="true"?"underline":"none"};
@@ -42,18 +42,18 @@ import Vo from"react";import bt from"styled-components";import*as J from"@radix-
42
42
  overflow: hidden;
43
43
  white-space: nowrap;
44
44
  `}
45
- `,h=Zo.forwardRef(({children:e,className:t,variant:r,align:o="left",fontWeight:n,color:i="textDark",truncate:a,uppercase:l=!1,underline:s=!1,...d},p)=>or(tr,{className:t,$variant:r,$align:o,$fontWeight:n,$color:i,$uppercase:l?.toString()||"false",$underline:s?.toString()||"false",$truncate:!!a,ref:p,...d,children:e}));import lr,{useTheme as sr}from"styled-components";import{FontAwesomeIcon as dr}from"@fortawesome/react-fontawesome";import*as rr from"@fortawesome/pro-solid-svg-icons";import*as nr from"@fortawesome/pro-regular-svg-icons";import*as ir from"@fortawesome/pro-duotone-svg-icons";import*as ar from"@fortawesome/free-brands-svg-icons";var $t={solid:rr,regular:nr,duotone:ir,brands:ar};import{jsx as yt}from"react/jsx-runtime";var cr=lr(dr)`
45
+ `,u=Zo.forwardRef(({children:e,className:t,variant:r,align:o="left",fontWeight:n,color:i="textDark",truncate:a,uppercase:l=!1,underline:s=!1,...d},p)=>or(tr,{className:t,$variant:r,$align:o,$fontWeight:n,$color:i,$uppercase:l?.toString()||"false",$underline:s?.toString()||"false",$truncate:!!a,ref:p,...d,children:e}));import lr,{useTheme as sr}from"styled-components";import{FontAwesomeIcon as dr}from"@fortawesome/react-fontawesome";import*as rr from"@fortawesome/pro-solid-svg-icons";import*as nr from"@fortawesome/pro-regular-svg-icons";import*as ir from"@fortawesome/pro-duotone-svg-icons";import*as ar from"@fortawesome/free-brands-svg-icons";var $t={solid:rr,regular:nr,duotone:ir,brands:ar};import{jsx as yt}from"react/jsx-runtime";var cr=lr(dr)`
46
46
  flex-shrink: 0;
47
47
  color: ${e=>e.theme.colors?.[e.$color||""]||e.$color||e.theme.colors?.textDark};
48
- `,x=({name:e,iconStyle:t="solid",color:r,size:o,className:n})=>{let i=sr(),l=$t[t][e];if(!l)return yt("span",{className:n});let s=i?.colors?.[r||""]||r;return yt(cr,{icon:l,$color:r,size:o,className:n,style:s?{color:s}:void 0})};import{jsx as ae,jsxs as Ct}from"react/jsx-runtime";var gr=e=>{switch(e){case"success":return"green100";case"warning":return"yellow100";case"error":return"red100";default:return"backgroundLight"}},vt=e=>{switch(e){case"success":return"green800";case"warning":return"yellow900";case"error":return"red800";default:return"textDark"}},hr=e=>{switch(e){case"success":return"faCheck";case"error":case"warning":return"faTriangleExclamation";default:return"faCircleInfo"}},ur=ze(m).attrs({row:!0,gap:3,padding:3})`
48
+ `,x=({name:e,iconStyle:t="solid",color:r,size:o,className:n})=>{let i=sr(),l=$t[t][e];if(!l)return yt("span",{className:n});let s=i?.colors?.[r||""]||r;return yt(cr,{icon:l,$color:r,size:o,className:n,style:s?{color:s}:void 0})};import{jsx as ae,jsxs as Ct}from"react/jsx-runtime";var gr=e=>{switch(e){case"success":return"green100";case"warning":return"yellow100";case"error":return"red100";default:return"backgroundLight"}},vt=e=>{switch(e){case"success":return"green800";case"warning":return"yellow900";case"error":return"red800";default:return"textDark"}},ur=e=>{switch(e){case"success":return"faCheck";case"error":case"warning":return"faTriangleExclamation";default:return"faCircleInfo"}},hr=Ne(m).attrs({row:!0,gap:3,padding:3})`
49
49
  border-radius: 8px;
50
50
  background-color: ${e=>e.theme.colors[gr(e.$type)]};
51
51
  color: ${e=>e.theme.colors[vt(e.$type)]};
52
- `,xr=ze(m).attrs({center:!0})`
52
+ `,xr=Ne(m).attrs({center:!0})`
53
53
  width: 20px;
54
54
  height: 20px;
55
55
  cursor: pointer;
56
- `,wt=ze(x).attrs({color:"inherit",size:"lg"})``,br=mr.forwardRef((e,t)=>{let{className:r,type:o="info",title:n,content:i,required:a=!1,dismissAfter:l}=e,[s,d]=pr(!0);if(fr(()=>{if(l){let c=setTimeout(()=>{d(!1)},l);return()=>clearTimeout(c)}},[l]),!s)return;let p=vt(o);return Ct(ur,{className:r,ref:t,$type:o,children:[ae(wt,{name:hr(o)}),(n||i)&&Ct(m,{gap:1,grow:!0,children:[n&&ae(h,{variant:"headingMd",color:p,children:n}),i&&ae(h,{color:p,children:i})]}),!a&&ae(xr,{onClick:()=>d(!1),children:ae(wt,{name:"faCircleXmark"})})]})});import $r from"react";import Dt from"styled-components";var j=(o=>(o.primary="primary",o.secondary="secondary",o.tertiary="tertiary",o))(j||{});import{jsx as kt,jsxs as vr}from"react/jsx-runtime";var yr=Dt.button`
56
+ `,wt=Ne(x).attrs({color:"inherit",size:"lg"})``,br=mr.forwardRef((e,t)=>{let{className:r,type:o="info",title:n,content:i,required:a=!1,dismissAfter:l}=e,[s,d]=pr(!0);if(fr(()=>{if(l){let c=setTimeout(()=>{d(!1)},l);return()=>clearTimeout(c)}},[l]),!s)return;let p=vt(o);return Ct(hr,{className:r,ref:t,$type:o,children:[ae(wt,{name:ur(o)}),(n||i)&&Ct(m,{gap:1,grow:!0,children:[n&&ae(u,{variant:"headingMd",color:p,children:n}),i&&ae(u,{color:p,children:i})]}),!a&&ae(xr,{onClick:()=>d(!1),children:ae(wt,{name:"faCircleXmark"})})]})});import $r from"react";import Dt from"styled-components";var j=(o=>(o.primary="primary",o.secondary="secondary",o.tertiary="tertiary",o))(j||{});import{jsx as kt,jsxs as vr}from"react/jsx-runtime";var yr=Dt.button`
57
57
  width: ${e=>e.$width};
58
58
  border: 1px solid ${e=>e.theme.colors[e.$borderColor]};
59
59
  background-color: ${e=>e.theme.colors[e.$backgroundColor]};
@@ -86,10 +86,10 @@ import Vo from"react";import bt from"styled-components";import*as J from"@radix-
86
86
  ${({theme:e})=>e.typography.headingSm};
87
87
  font-weight: 500;
88
88
  color: ${({theme:e,$color:t})=>e.colors[t]};
89
- `,Cr=e=>{switch(e){case"secondary":return{backgroundColor:"background",borderColor:"border",color:"textNormal",hoverBackgroundColor:"backgroundLight"};case"tertiary":return{backgroundColor:"background",borderColor:"background",color:"textNormal",hoverBackgroundColor:"backgroundLight"};case"primary":default:return{backgroundColor:"primary",borderColor:"primary",color:"background",hoverBackgroundColor:"primaryDark"}}},L=$r.forwardRef((e,t)=>{let{className:r,children:o,variant:n="primary",mini:i=!1,disabled:a=!1,fullWidth:l=!1,iconName:s,...d}=e,{backgroundColor:p,borderColor:c,color:f,hoverBackgroundColor:y}=Cr(n),u=i?"xs":"sm";return kt(yr,{className:r,ref:t,$width:l?"100%":"auto",$backgroundColor:p,$borderColor:c,$hoverBackgroundColor:y,$mini:i,$disabled:a?.toString()||"false",$iconOnly:s&&!o,...d,children:vr(wr,{$color:f,children:[s&&kt(x,{name:s,color:f,size:u}),o]})})});import Xr,{useMemo as ee,useState as Ur}from"react";import le from"dayjs";import kr from"dayjs/plugin/advancedFormat";import Dr from"dayjs/plugin/isBetween";import Tr from"dayjs/plugin/isoWeek";import Pr from"dayjs/plugin/updateLocale";le.extend(kr);le.extend(Dr);le.extend(Tr);le.extend(Pr);var B=le;import{createContext as Ir,useContext as Sr}from"react";var Tt=Ir({}),Pt=Tt.Provider,Q=()=>Sr(Tt);import{memo as Rr}from"react";import $e from"styled-components";import{jsx as se,jsxs as Or}from"react/jsx-runtime";var Fr=$e(m).attrs({align:"center",justify:"space-between",row:!0})``,Lr=$e(h)`
89
+ `,Cr=e=>{switch(e){case"secondary":return{backgroundColor:"background",borderColor:"border",color:"textNormal",hoverBackgroundColor:"backgroundLight"};case"tertiary":return{backgroundColor:"background",borderColor:"background",color:"textNormal",hoverBackgroundColor:"backgroundLight"};case"primary":default:return{backgroundColor:"primary",borderColor:"primary",color:"background",hoverBackgroundColor:"primaryDark"}}},L=$r.forwardRef((e,t)=>{let{className:r,children:o,variant:n="primary",mini:i=!1,disabled:a=!1,fullWidth:l=!1,iconName:s,...d}=e,{backgroundColor:p,borderColor:c,color:f,hoverBackgroundColor:y}=Cr(n),h=i?"xs":"sm";return kt(yr,{className:r,ref:t,$width:l?"100%":"auto",$backgroundColor:p,$borderColor:c,$hoverBackgroundColor:y,$mini:i,$disabled:a?.toString()||"false",$iconOnly:s&&!o,...d,children:vr(wr,{$color:f,children:[s&&kt(x,{name:s,color:f,size:h}),o]})})});import Xr,{useMemo as ee,useState as Ur}from"react";import le from"dayjs";import kr from"dayjs/plugin/advancedFormat";import Dr from"dayjs/plugin/isBetween";import Tr from"dayjs/plugin/isoWeek";import Pr from"dayjs/plugin/updateLocale";le.extend(kr);le.extend(Dr);le.extend(Tr);le.extend(Pr);var E=le;import{createContext as Rr,useContext as Sr}from"react";var Tt=Rr({}),Pt=Tt.Provider,Q=()=>Sr(Tt);import{memo as Ir}from"react";import $e from"styled-components";import{jsx as se,jsxs as Or}from"react/jsx-runtime";var Fr=$e(m).attrs({align:"center",justify:"space-between",row:!0})``,Lr=$e(u)`
90
90
  flex-grow: 2;
91
91
  text-align: center;
92
- `,It=$e(m).attrs({center:!0,padding:2})`
92
+ `,Rt=$e(m).attrs({center:!0,padding:2})`
93
93
  width: 32px;
94
94
  height: 32px;
95
95
  border-radius: 32px;
@@ -104,7 +104,7 @@ import Vo from"react";import bt from"styled-components";import*as J from"@radix-
104
104
  background-color: ${e.theme.colors.backgroundLight};
105
105
  }
106
106
  `}
107
- `,St=$e(x).attrs({size:"xs",color:"inherit"})``,Rt=Rr(()=>{let{minDay:e,maxDay:t,months:r,selectedMonth:o,setSelectedMonth:n}=Q(),i=r[0],a=r[r.length-1],l=()=>{let p=i.format("MMMM YYYY");return r.length===1?p:`${p} - ${a.format("MMMM YYYY")}`},s=!e||i.startOf("month").valueOf()>=e,d=!t||a.endOf("month").valueOf()<=t;return Or(Fr,{children:[se(It,{$disabled:!s,onClick:()=>s&&n(o.clone().subtract(1,"months")),children:se(St,{name:"faChevronLeft"})}),se(Lr,{children:l()}),se(It,{$disabled:!d,onClick:()=>d&&n(o.clone().add(1,"months")),children:se(St,{name:"faChevronRight"})})]})});import{memo as Yr,useMemo as At,useState as _r}from"react";import{memo as Er}from"react";import He from"styled-components";import Mr from"styled-components";import*as H from"@radix-ui/react-tooltip";import{keyframes as O}from"styled-components";var is=O`
107
+ `,St=$e(x).attrs({size:"xs",color:"inherit"})``,It=Ir(()=>{let{minDay:e,maxDay:t,months:r,selectedMonth:o,setSelectedMonth:n}=Q(),i=r[0],a=r[r.length-1],l=()=>{let p=i.format("MMMM YYYY");return r.length===1?p:`${p} - ${a.format("MMMM YYYY")}`},s=!e||i.startOf("month").valueOf()>=e,d=!t||a.endOf("month").valueOf()<=t;return Or(Fr,{children:[se(Rt,{$disabled:!s,onClick:()=>s&&n(o.clone().subtract(1,"months")),children:se(St,{name:"faChevronLeft"})}),se(Lr,{children:l()}),se(Rt,{$disabled:!d,onClick:()=>d&&n(o.clone().add(1,"months")),children:se(St,{name:"faChevronRight"})})]})});import{memo as Yr,useMemo as At,useState as _r}from"react";import{memo as Br}from"react";import He from"styled-components";import Mr from"styled-components";import*as H from"@radix-ui/react-tooltip";import{keyframes as O}from"styled-components";var is=O`
108
108
  100% {
109
109
  stroke-dashoffset: 0;
110
110
  }
@@ -152,7 +152,7 @@ from {
152
152
  to {
153
153
  opacity: 1;
154
154
  transform: translateX(0);
155
- }`,Nt=O`
155
+ }`,zt=O`
156
156
  from {
157
157
  opacity: 0;
158
158
  transform: translateY(2px);
@@ -160,7 +160,7 @@ from {
160
160
  to {
161
161
  opacity: 1;
162
162
  transform: translateY(0);
163
- }`,zt=O`
163
+ }`,Nt=O`
164
164
  from {
165
165
  opacity: 0;
166
166
  transform: translateX(-2px);
@@ -175,7 +175,7 @@ to {
175
175
  to {
176
176
  opacity: 0.1;
177
177
  }
178
- `,Et=O`
178
+ `,Bt=O`
179
179
  from {
180
180
  opacity: 0;
181
181
  transform: translate(-50%, -48%) scale(0.96);
@@ -184,7 +184,7 @@ to {
184
184
  opacity: 1;
185
185
  transform: translate(-50%, -50%) scale(1);
186
186
  }
187
- `;import{Fragment as zr,jsx as de,jsxs as Hr}from"react/jsx-runtime";var Nr=Mr(H.Content)`
187
+ `;import{Fragment as Nr,jsx as de,jsxs as Hr}from"react/jsx-runtime";var zr=Mr(H.Content)`
188
188
  width: ${e=>e.$width};
189
189
  ${e=>e.theme.typography.bodyMd};
190
190
  border-radius: 4px;
@@ -217,12 +217,12 @@ to {
217
217
  animation: ${Mt} 400ms cubic-bezier(0.16, 1, 0.3, 1);
218
218
  }
219
219
  &[data-state='delayed-open'][data-side='bottom'] {
220
- animation: ${Nt} 400ms cubic-bezier(0.16, 1, 0.3, 1);
220
+ animation: ${zt} 400ms cubic-bezier(0.16, 1, 0.3, 1);
221
221
  }
222
222
  &[data-state='delayed-open'][data-side='left'] {
223
- animation: ${zt} 400ms cubic-bezier(0.16, 1, 0.3, 1);
223
+ animation: ${Nt} 400ms cubic-bezier(0.16, 1, 0.3, 1);
224
224
  }
225
- `,ce=({children:e,side:t="top",sideOffset:r,align:o="center",alignOffset:n,style:i="dark",content:a,disabled:l=!1,width:s,className:d})=>l||!a?de(zr,{children:e}):de(H.Provider,{children:Hr(H.Root,{delayDuration:0,children:[de(H.Trigger,{asChild:!0,children:e}),de(H.Portal,{children:de(Nr,{side:t,align:o,alignOffset:n,sideOffset:r,$width:s||"auto",$style:i,collisionPadding:4,className:d,children:a})})]})});import{jsx as Z,jsxs as Wr}from"react/jsx-runtime";var Br=He.div`
225
+ `,ce=({children:e,side:t="top",sideOffset:r,align:o="center",alignOffset:n,style:i="dark",content:a,disabled:l=!1,width:s,className:d})=>l||!a?de(Nr,{children:e}):de(H.Provider,{children:Hr(H.Root,{delayDuration:0,children:[de(H.Trigger,{asChild:!0,children:e}),de(H.Portal,{children:de(zr,{side:t,align:o,alignOffset:n,sideOffset:r,$width:s||"auto",$style:i,collisionPadding:4,className:d,children:a})})]})});import{jsx as Z,jsxs as Wr}from"react/jsx-runtime";var Er=He.div`
226
226
  display: grid;
227
227
  grid-template-columns: repeat(7, 1fr);
228
228
  row-gap: ${e=>e.theme.spacing(1)};
@@ -287,7 +287,7 @@ to {
287
287
  border-top-right-radius: 32px;
288
288
  border-bottom-right-radius: 32px;
289
289
  `}
290
- `,Bt=7,Vt=Er(({month:e,selectedDays:t,hoverDays:r,setHoverDay:o})=>{let{highlightedDays:n,startDate:i,startDay:a,endDay:l,minDay:s,maxDay:d,onChange:p,useRange:c}=Q(),f=B().startOf("day").valueOf(),y=e.startOf("month"),g=e.endOf("month").diff(y,"weeks")+1,C=Array.from({length:g},(w,v)=>{let T=y.clone().add(v,"weeks").startOf("week");return Array.from({length:Bt},(z,Le)=>T.clone().add(Le,"days"))}).flat(),b=a&&l,$=w=>B().isoWeekday(w).format("dd").charAt(0);return Wr(Br,{children:[Array.from({length:Bt}).map((w,v)=>Z(Vr,{children:Z(h,{uppercase:!0,color:"textLight",children:$(v+1)})},v)),C.map(w=>{let v=w.month()===e.month(),T=w.valueOf();if(!v)return Z("div",{},T);let z=n.find(Ne=>Ne.day===T),Le=!!(z||T===f),No=d?T>=d:!1,zo=s?T<=s:!1,ut=!!!(z?.disabled||No||zo),Oe=t.includes(T),Me=r.includes(T),Ho=Oe&&t[0]===T||Me&&r[0]===T,Eo=()=>Me?r[r.length-1]===T:Oe&&t[t.length-1]===T,Bo=()=>{if(ut){let Ne=a?T<a:!1;!c||b||Ne?p?.(w,void 0):p?.(i,w)}};return Z(ce,{content:z?.tooltip,sideOffset:2,children:Z(Ar,{$isClickable:ut,$isHighlighted:Le,$isSelected:Oe||Me,$isStart:Ho,$isEnd:Eo(),onClick:Bo,onMouseEnter:()=>c&&o(T),children:Z(h,{children:w.format("D")})})},T)})]})});import{jsx as Wt}from"react/jsx-runtime";var Yt=Yr(()=>{let{startDate:e,endDate:t,startDay:r,endDay:o,maxDay:n,useRange:i,months:a}=Q(),[l,s]=_r(),d=At(()=>i&&l&&e&&!o&&l>=r?Array.from({length:B(l).diff(e,"days")+1},(c,f)=>{let y=e.clone().add(f,"days").valueOf();return!n||y<=n?y:void 0}).filter(Boolean):[],[i,l,e,o]),p=At(()=>{if(!r)return[];if(!o)return[r];let c=t.diff(e,"days")+1;return Array.from({length:c},(f,y)=>e.clone().add(y,"days").valueOf())},[e,t]);return Wt(m,{row:!0,gap:3,onMouseLeave:()=>i&&s(void 0),children:a.map(c=>Wt(Vt,{month:c,hoverDays:d,setHoverDay:s,selectedDays:p},`month-${c.valueOf()}`))})});import{jsx as Ee,jsxs as Gr}from"react/jsx-runtime";var me=Xr.forwardRef((e,t)=>{let{startDate:r,endDate:o,minDate:n,maxDate:i,highlightedDates:a,useRange:l,displayMonths:s=1,onChange:d}=e,[p,c]=Ur(B().subtract(s-1,"months").startOf("month")),f=ee(()=>a?.map($=>({...$,day:$.date.valueOf()}))||[],[a]),y=ee(()=>r?.valueOf(),[r]),u=ee(()=>o?.valueOf(),[o]),g=ee(()=>n?.valueOf(),[n]),C=ee(()=>i?.valueOf(),[i]),b=ee(()=>Array.from({length:s},($,w)=>p.clone().add(w,"months")),[p,s]);return Ee(m,{width:"auto",gap:2,ref:t,children:Gr(Pt,{value:{highlightedDays:f,startDate:r,endDate:o,startDay:y,endDay:u,minDay:g,maxDay:C,useRange:l,onChange:d,months:b,selectedMonth:p,setSelectedMonth:c},children:[Ee(Rt,{}),Ee(Yt,{})]})})});import Kr from"react";import _t from"styled-components";import{jsx as Be,jsxs as jr}from"react/jsx-runtime";var qr=_t(m).attrs({row:!0,gap:2})`
290
+ `,Et=7,Vt=Br(({month:e,selectedDays:t,hoverDays:r,setHoverDay:o})=>{let{highlightedDays:n,startDate:i,startDay:a,endDay:l,minDay:s,maxDay:d,onChange:p,useRange:c}=Q(),f=E().startOf("day").valueOf(),y=e.startOf("month"),g=e.endOf("month").diff(y,"weeks")+1,C=Array.from({length:g},(w,v)=>{let T=y.clone().add(v,"weeks").startOf("week");return Array.from({length:Et},(N,Le)=>T.clone().add(Le,"days"))}).flat(),b=a&&l,$=w=>E().isoWeekday(w).format("dd").charAt(0);return Wr(Er,{children:[Array.from({length:Et}).map((w,v)=>Z(Vr,{children:Z(u,{uppercase:!0,color:"textLight",children:$(v+1)})},v)),C.map(w=>{let v=w.month()===e.month(),T=w.valueOf();if(!v)return Z("div",{},T);let N=n.find(ze=>ze.day===T),Le=!!(N||T===f),zo=d?T>=d:!1,No=s?T<=s:!1,ht=!!!(N?.disabled||zo||No),Oe=t.includes(T),Me=r.includes(T),Ho=Oe&&t[0]===T||Me&&r[0]===T,Bo=()=>Me?r[r.length-1]===T:Oe&&t[t.length-1]===T,Eo=()=>{if(ht){let ze=a?T<a:!1;!c||b||ze?p?.(w,void 0):p?.(i,w)}};return Z(ce,{content:N?.tooltip,sideOffset:2,children:Z(Ar,{$isClickable:ht,$isHighlighted:Le,$isSelected:Oe||Me,$isStart:Ho,$isEnd:Bo(),onClick:Eo,onMouseEnter:()=>c&&o(T),children:Z(u,{children:w.format("D")})})},T)})]})});import{jsx as Wt}from"react/jsx-runtime";var Yt=Yr(()=>{let{startDate:e,endDate:t,startDay:r,endDay:o,maxDay:n,useRange:i,months:a}=Q(),[l,s]=_r(),d=At(()=>i&&l&&e&&!o&&l>=r?Array.from({length:E(l).diff(e,"days")+1},(c,f)=>{let y=e.clone().add(f,"days").valueOf();return!n||y<=n?y:void 0}).filter(Boolean):[],[i,l,e,o]),p=At(()=>{if(!r)return[];if(!o)return[r];let c=t.diff(e,"days")+1;return Array.from({length:c},(f,y)=>e.clone().add(y,"days").valueOf())},[e,t]);return Wt(m,{row:!0,gap:3,onMouseLeave:()=>i&&s(void 0),children:a.map(c=>Wt(Vt,{month:c,hoverDays:d,setHoverDay:s,selectedDays:p},`month-${c.valueOf()}`))})});import{jsx as Be,jsxs as Gr}from"react/jsx-runtime";var me=Xr.forwardRef((e,t)=>{let{startDate:r,endDate:o,minDate:n,maxDate:i,highlightedDates:a,useRange:l,displayMonths:s=1,onChange:d}=e,[p,c]=Ur(E().subtract(s-1,"months").startOf("month")),f=ee(()=>a?.map($=>({...$,day:$.date.valueOf()}))||[],[a]),y=ee(()=>r?.valueOf(),[r]),h=ee(()=>o?.valueOf(),[o]),g=ee(()=>n?.valueOf(),[n]),C=ee(()=>i?.valueOf(),[i]),b=ee(()=>Array.from({length:s},($,w)=>p.clone().add(w,"months")),[p,s]);return Be(m,{width:"auto",gap:2,ref:t,children:Gr(Pt,{value:{highlightedDays:f,startDate:r,endDate:o,startDay:y,endDay:h,minDay:g,maxDay:C,useRange:l,onChange:d,months:b,selectedMonth:p,setSelectedMonth:c},children:[Be(It,{}),Be(Yt,{})]})})});import Kr from"react";import _t from"styled-components";import{jsx as Ee,jsxs as jr}from"react/jsx-runtime";var qr=_t(m).attrs({row:!0,gap:2})`
291
291
  ${e=>e.$disabled?`
292
292
  cursor: not-allowed;
293
293
  pointer-events: none;
@@ -308,7 +308,7 @@ to {
308
308
  border-radius: 4px;
309
309
  background-color: ${e=>e.$checked?e.theme.colors.textNormal:e.theme.colors.background};
310
310
  transition: background 0.2s ease-in-out;
311
- `,Y=Kr.forwardRef((e,t)=>{let{checked:r=!1,setChecked:o,label:n,disabled:i=!1}=e;return jr(qr,{ref:t,$disabled:i,onClick:()=>o?.(!r),children:[Be(Jr,{$checked:r,children:Be(x,{name:"faCheck",color:"background",size:"xs"})}),n&&Be(h,{children:n})]})});import Qr from"react";import Zr from"styled-components";import{jsx as Xt}from"react/jsx-runtime";var en=Zr.div`
311
+ `,Y=Kr.forwardRef((e,t)=>{let{checked:r=!1,setChecked:o,label:n,disabled:i=!1}=e;return jr(qr,{ref:t,$disabled:i,onClick:()=>o?.(!r),children:[Ee(Jr,{$checked:r,children:Ee(x,{name:"faCheck",color:"background",size:"xs"})}),n&&Ee(u,{children:n})]})});import Qr from"react";import Zr from"styled-components";import{jsx as Xt}from"react/jsx-runtime";var en=Zr.div`
312
312
  ${e=>e.theme.padding(2)}
313
313
  display: flex;
314
314
  align-items: center;
@@ -365,7 +365,7 @@ to {
365
365
  * {
366
366
  flex-shrink: 0;
367
367
  }
368
- `,pe=nn.forwardRef((e,t)=>{let{className:r,label:o,isOpen:n,onClick:i,variant:a="normal",disabled:l=!1,fullWidth:s=!1}=e;return sn(ln,{className:r,ref:t,$width:s?"100%":"auto",$variant:a,$disabled:l?.toString()||"false",onClick:i,children:[Ut(h,{truncate:!0,children:o}),Ut(x,{name:n?"faChevronUp":"faChevronDown",size:"sm"})]})});import dn from"react";import cn from"styled-components";import{jsx as Gt,jsxs as pn}from"react/jsx-runtime";var mn=cn(m).attrs({row:!0})`
368
+ `,pe=nn.forwardRef((e,t)=>{let{className:r,label:o,isOpen:n,onClick:i,variant:a="normal",disabled:l=!1,fullWidth:s=!1}=e;return sn(ln,{className:r,ref:t,$width:s?"100%":"auto",$variant:a,$disabled:l?.toString()||"false",onClick:i,children:[Ut(u,{truncate:!0,children:o}),Ut(x,{name:n?"faChevronUp":"faChevronDown",size:"sm"})]})});import dn from"react";import cn from"styled-components";import{jsx as Gt,jsxs as pn}from"react/jsx-runtime";var mn=cn(m).attrs({row:!0})`
369
369
  ${e=>e.theme.padding(e.$sizeFactor)};
370
370
  gap: ${e=>e.theme.spacing(e.$sizeFactor)};
371
371
  border-radius: ${e=>e.theme.spacing(e.$sizeFactor)};
@@ -377,12 +377,12 @@ to {
377
377
  cursor: not-allowed;
378
378
  color: ${e.theme.colors.textLight};
379
379
  `}
380
- `,M=dn.forwardRef((e,t)=>{let{iconName:r,label:o,onClick:n,disabled:i,color:a,variant:l="normal",rightContent:s}=e;return pn(mn,{ref:t,$sizeFactor:l==="small"?1:2,$color:a||"textDark",onClick:i?void 0:n,children:[r&&Gt(x,{name:r,color:"inherit",size:l==="small"?"xs":"sm"}),Gt(h,{truncate:!0,color:"inherit",style:{flexGrow:1},children:o}),s]})});import gn,{useState as hn}from"react";import un from"styled-components";import fn from"styled-components";var Ae=fn.div`
380
+ `,M=dn.forwardRef((e,t)=>{let{iconName:r,label:o,onClick:n,disabled:i,color:a,variant:l="normal",rightContent:s}=e;return pn(mn,{ref:t,$sizeFactor:l==="small"?1:2,$color:a||"textDark",onClick:i?void 0:n,children:[r&&Gt(x,{name:r,color:"inherit",size:l==="small"?"xs":"sm"}),Gt(u,{truncate:!0,color:"inherit",style:{flexGrow:1},children:o}),s]})});import gn,{useState as un}from"react";import hn from"styled-components";import fn from"styled-components";var Ae=fn.div`
381
381
  width: ${e=>e.width||(e.vertical?"1px":"100%")};
382
382
  height: ${e=>e.height||(e.vertical?"100%":"1px")};
383
383
  border-${e=>e.vertical?"right":"bottom"}: 1px ${e=>e.dashed?"dashed":"solid"}
384
384
  ${e=>e.theme.colors[e.color||"border"]};
385
- `;import{jsx as ye,jsxs as Kt}from"react/jsx-runtime";import{createElement as $n}from"react";var xn=un(m)`
385
+ `;import{jsx as ye,jsxs as Kt}from"react/jsx-runtime";import{createElement as $n}from"react";var xn=hn(m)`
386
386
  width: 100%;
387
387
  overflow-y: auto;
388
388
 
@@ -393,7 +393,7 @@ to {
393
393
  min-width: 300px;
394
394
  max-height: 90vh;
395
395
  `}
396
- `,bn=({trigger:e,header:t,sections:r,footer:o,onItemClick:n,variant:i="normal",side:a,sideOffset:l,align:s,alignOffset:d})=>{let[p,c]=hn(!1),f=i==="small"?1:2;return ye(P,{trigger:e,content:Kt(m,{children:[t,ye(xn,{$variant:i,children:r.map((y,u)=>Kt(gn.Fragment,{children:[ye(m,{padding:f,children:y.map((g,C)=>$n(M,{...g,key:`item-${C}-${C}`,variant:i,onClick:g.disabled?void 0:()=>{n?.(g),g.onClick?.(),c(!1)}}))}),u<r.length-1&&ye(Ae,{})]},`section-${u}`))}),o]}),isOpen:p,setOpen:c,variant:i,side:a,sideOffset:l,align:s,alignOffset:d})};import{css as yn}from"styled-components";var N=yn`
396
+ `,bn=({trigger:e,header:t,sections:r,footer:o,onItemClick:n,variant:i="normal",side:a,sideOffset:l,align:s,alignOffset:d})=>{let[p,c]=un(!1),f=i==="small"?1:2;return ye(P,{trigger:e,content:Kt(m,{children:[t,ye(xn,{$variant:i,children:r.map((y,h)=>Kt(gn.Fragment,{children:[ye(m,{padding:f,children:y.map((g,C)=>$n(M,{...g,key:`item-${C}-${C}`,variant:i,onClick:g.disabled?void 0:()=>{n?.(g),g.onClick?.(),c(!1)}}))}),h<r.length-1&&ye(Ae,{})]},`section-${h}`))}),o]}),isOpen:p,setOpen:c,variant:i,side:a,sideOffset:l,align:s,alignOffset:d})};import{css as yn}from"styled-components";var z=yn`
397
397
  ${e=>e.theme.typography.bodyMd}
398
398
  width: 100%;
399
399
  height: 36px;
@@ -420,7 +420,7 @@ to {
420
420
  color: ${e=>e.theme.colors.textLight};
421
421
  }
422
422
  `;import{jsx as q,jsxs as Tn}from"react/jsx-runtime";var Cn=Ye(m).attrs({row:!0})`
423
- ${N};
423
+ ${z};
424
424
  padding: 0;
425
425
  `,vn=Ye(m).attrs({center:!0})`
426
426
  width: auto;
@@ -431,14 +431,14 @@ to {
431
431
  ${e=>e.theme.paddingHorizontal(2)}
432
432
  ${e=>e.theme.borderRight()}
433
433
  `,kn=Ye(wn)`
434
- ${N};
434
+ ${z};
435
435
  border: 0;
436
436
  border-radius: 0;
437
437
  &:hover:not(:disabled),
438
438
  &:focus-visible {
439
439
  border: 0;
440
440
  }
441
- `,Dn=({className:e,value:t,onChange:r,placeholder:o,disabled:n})=>{let i=["USD"],[a,l]=We(!1),[s,d]=We(t?.currency||i[0]),[p,c]=We(t?.amount||0);return Tn(Cn,{className:e,children:[q(P,{isOpen:a,setOpen:l,disabled:i.length<1||n,trigger:q(vn,{$disabled:n,children:q(h,{color:"textNormal",children:s?.toUpperCase()})}),content:q(m,{width:"200px",padding:1,children:i.map(f=>q(M,{label:f?.toUpperCase(),onClick:()=>{c(0),d(f),l(!1)},rightContent:s===f?q(x,{name:"faCheck",size:"xs"}):void 0},f))})}),q(kn,{value:p,placeholder:o,intlConfig:{locale:"en-US",currency:s,currencyDisplay:"narrowSymbol"},allowDecimals:!0,decimalsLimit:2,disabled:n,onValueChange:(f,y,u)=>{c(f),r?.({currency:s,amount:u?.float,formatted:u?.formatted})}})]})};import Pn,{useState as In}from"react";import _e from"styled-components";import{jsx as te,jsxs as Mn}from"react/jsx-runtime";var Sn=_e(m).attrs({row:!0,align:"center",gap:1})`
441
+ `,Dn=({className:e,value:t,onChange:r,placeholder:o,disabled:n})=>{let i=["USD"],[a,l]=We(!1),[s,d]=We(t?.currency||i[0]),[p,c]=We(t?.amount||0);return Tn(Cn,{className:e,children:[q(P,{isOpen:a,setOpen:l,disabled:i.length<1||n,trigger:q(vn,{$disabled:n,children:q(u,{color:"textNormal",children:s?.toUpperCase()})}),content:q(m,{width:"200px",padding:1,children:i.map(f=>q(M,{label:f?.toUpperCase(),onClick:()=>{c(0),d(f),l(!1)},rightContent:s===f?q(x,{name:"faCheck",size:"xs"}):void 0},f))})}),q(kn,{value:p,placeholder:o,intlConfig:{locale:"en-US",currency:s,currencyDisplay:"narrowSymbol"},allowDecimals:!0,decimalsLimit:2,disabled:n,onValueChange:(f,y,h)=>{c(f),r?.({currency:s,amount:h?.float,formatted:h?.formatted})}})]})};import Pn,{useState as Rn}from"react";import _e from"styled-components";import{jsx as te,jsxs as Mn}from"react/jsx-runtime";var Sn=_e(m).attrs({row:!0,align:"center",gap:1})`
442
442
  height: 36px;
443
443
  border-radius: 4px;
444
444
  background-color: ${e=>e.theme.colors.background};
@@ -454,8 +454,8 @@ to {
454
454
  &:hover {
455
455
  border: 1px solid ${e.theme.colors.textLight};
456
456
  }`}
457
- `,Rn=_e.input`
458
- ${N};
457
+ `,In=_e.input`
458
+ ${z};
459
459
  background-color: transparent;
460
460
  height: auto;
461
461
  border: 0;
@@ -468,21 +468,21 @@ to {
468
468
  `,Fn=_e(m).attrs({width:"auto",center:!0})`
469
469
  height: 36px;
470
470
  ${e=>e.theme.paddingHorizontal(2)}
471
- `,Ln="MMMM DD, YYYY",On=Pn.forwardRef((e,t)=>{let[r,o]=In(!1),{disabled:n}=e;return te(P,{fullWidth:!1,disabled:n,isOpen:r,setOpen:o,trigger:Mn(Sn,{ref:t,$disabled:n,children:[te(Fn,{children:te(x,{name:"faCalendar",color:"textLight",size:"sm"})}),te(Rn,{placeholder:e.placeholder,disabled:n,onChange:()=>"",value:e.startDate?.format(Ln)||""})]}),content:te(m,{padding:3,gap:3,children:te(me,{...e,onChange:i=>{e.onChange?.(i),o(!1)}})})})});import Nn,{useState as Xe}from"react";import{jsx as fe,jsxs as qt}from"react/jsx-runtime";var zn="MMMM DD, YYYY",Hn=Nn.forwardRef((e,t)=>{let r=zn,[o,n]=Xe(!1),[i,a]=Xe(e.startDate),[l,s]=Xe(e.endDate),d=()=>!e.startDate&&(!e.useRange||!e.endDate)?"Select date":e.useRange&&e.endDate?`${e.startDate.format(r)} - ${e.endDate.format(r)}`:e.startDate.format(r);return fe(P,{isOpen:o,setOpen:n,variant:e.dropdownVariant,fullWidth:!1,trigger:fe(pe,{ref:t,label:d(),variant:e.dropdownVariant}),content:qt(m,{padding:3,gap:3,children:[fe(me,{...e,startDate:i,endDate:l,onChange:(p,c)=>{a(p),s(c)}}),qt(m,{row:!0,justify:"flex-end",gap:3,children:[fe(L,{mini:!0,variant:"secondary",onClick:()=>n(!1),children:"Cancel"}),fe(L,{mini:!0,onClick:()=>{e.onChange?.(i,l),n(!1)},children:"Apply"})]})]})})});import _n from"react";import Xn from"styled-components";import{DndProvider as Un}from"react-dnd";import{HTML5Backend as Gn}from"react-dnd-html5-backend";import En from"react";import Bn from"styled-components";import{useDrag as Vn,useDrop as An}from"react-dnd";import{jsx as Yn}from"react/jsx-runtime";var Wn=Bn.div`
471
+ `,Ln="MMMM DD, YYYY",On=Pn.forwardRef((e,t)=>{let[r,o]=Rn(!1),{disabled:n}=e;return te(P,{fullWidth:!1,disabled:n,isOpen:r,setOpen:o,trigger:Mn(Sn,{ref:t,$disabled:n,children:[te(Fn,{children:te(x,{name:"faCalendar",color:"textLight",size:"sm"})}),te(In,{placeholder:e.placeholder,disabled:n,onChange:()=>"",value:e.startDate?.format(Ln)||""})]}),content:te(m,{padding:3,gap:3,children:te(me,{...e,onChange:i=>{e.onChange?.(i),o(!1)}})})})});import zn,{useState as Xe}from"react";import{jsx as fe,jsxs as qt}from"react/jsx-runtime";var Nn="MMMM DD, YYYY",Hn=zn.forwardRef((e,t)=>{let r=Nn,[o,n]=Xe(!1),[i,a]=Xe(e.startDate),[l,s]=Xe(e.endDate),d=()=>!e.startDate&&(!e.useRange||!e.endDate)?"Select date":e.useRange&&e.endDate?`${e.startDate.format(r)} - ${e.endDate.format(r)}`:e.startDate.format(r);return fe(P,{isOpen:o,setOpen:n,variant:e.dropdownVariant,fullWidth:!1,trigger:fe(pe,{ref:t,label:d(),variant:e.dropdownVariant}),content:qt(m,{padding:3,gap:3,children:[fe(me,{...e,startDate:i,endDate:l,onChange:(p,c)=>{a(p),s(c)}}),qt(m,{row:!0,justify:"flex-end",gap:3,children:[fe(L,{mini:!0,variant:"secondary",onClick:()=>n(!1),children:"Cancel"}),fe(L,{mini:!0,onClick:()=>{e.onChange?.(i,l),n(!1)},children:"Apply"})]})]})})});import _n from"react";import Xn from"styled-components";import{DndProvider as Un}from"react-dnd";import{HTML5Backend as Gn}from"react-dnd-html5-backend";import Bn from"react";import En from"styled-components";import{useDrag as Vn,useDrop as An}from"react-dnd";import{jsx as Yn}from"react/jsx-runtime";var Wn=En.div`
472
472
  cursor: grab;
473
473
  opacity: ${e=>e.$opacity};
474
- `,Jt=({item:e,onMove:t})=>{let{id:r,index:o}=e,n=En.useRef(null),[{handlerId:i},a]=An({accept:"item",collect:d=>({handlerId:d.getHandlerId()}),hover:(d,p)=>{if(!n.current)return;let c=d.index,f=o;if(c===f)return;let y=n.current?.getBoundingClientRect(),u=(y.bottom-y.top)/2,C=p.getClientOffset().y-y.top;c<f&&C<u||c>f&&C>u||(t(c,f),d.index=f)}}),[{isDragging:l},s]=Vn({type:"item",item:()=>({id:r,index:o}),collect:d=>({isDragging:d.isDragging()})});return s(a(n)),Yn(Wn,{ref:n,$opacity:l?0:1,"data-handler-id":i,children:e.content})};import{jsx as we}from"react/jsx-runtime";var Kn=Xn.div`
474
+ `,Jt=({item:e,onMove:t})=>{let{id:r,index:o}=e,n=Bn.useRef(null),[{handlerId:i},a]=An({accept:"item",collect:d=>({handlerId:d.getHandlerId()}),hover:(d,p)=>{if(!n.current)return;let c=d.index,f=o;if(c===f)return;let y=n.current?.getBoundingClientRect(),h=(y.bottom-y.top)/2,C=p.getClientOffset().y-y.top;c<f&&C<h||c>f&&C>h||(t(c,f),d.index=f)}}),[{isDragging:l},s]=Vn({type:"item",item:()=>({id:r,index:o}),collect:d=>({isDragging:d.isDragging()})});return s(a(n)),Yn(Wn,{ref:n,$opacity:l?0:1,"data-handler-id":i,children:e.content})};import{jsx as we}from"react/jsx-runtime";var Kn=Xn.div`
475
475
  display: flex;
476
476
  flex-direction: column;
477
477
  gap: ${e=>e.theme.spacing(1)};
478
478
  `,Ue=({className:e,items:t,onChange:r})=>{let o=t.sort((i,a)=>i.index-a.index),n=(i,a)=>{let l=o[i],s=o[a];r(o.map(d=>d.id===l.id?{...d,index:s.index}:d.id===s.id?{...d,index:l.index}:d))};return we(Un,{backend:Gn,children:we(Kn,{className:e,children:o.map(i=>i.disabled?we(_n.Fragment,{children:i.content},i.id):we(Jt,{item:i,onMove:n},i.id))})})};import{memo as si,useState as di}from"react";import mo from"styled-components";import{useState as ao}from"react";import V from"styled-components";import{useRef as qn,useState as Jn}from"react";import jn from"styled-components";import{jsx as ge}from"react/jsx-runtime";var Ge=jn.input`
479
- ${N};
479
+ ${z};
480
480
  `,oe=({className:e,value:t,onChange:r,onTextChange:o,onEnter:n,options:i,...a})=>{let l=qn(null),[s,d]=Jn(!1),p=ge(Ge,{...a,ref:l,className:e,value:t||"",onChange:c=>{let f=c.target?.value||"";o?.(f),r?.(c),setTimeout(()=>{d(!!i?.length),l?.current?.focus()},100)},onKeyDown:c=>{c.key==="Enter"&&n?.(),a.onKeyDown?.(c)}});return!i?.length||a.disabled?p:ge(P,{isOpen:s,setOpen:d,modal:!1,variant:"small",trigger:ge("div",{children:p}),content:ge(m,{children:i.map(c=>ge(M,{label:c.label,disabled:c.disabled,onClick:()=>{o?.(c.value),d(!1)}},c.value))})})};import Qn from"styled-components";import{jsx as Ke,jsxs as jt}from"react/jsx-runtime";var Zn=Qn(m)`
481
481
  height: ${e=>e.$show?"20px":0};
482
482
  justify-content: flex-start;
483
483
  gap: ${e=>e.theme.spacing(1)};
484
484
  transition: height 0.3s;
485
- `,re=({label:e,children:t,rightContent:r,error:o})=>jt(m,{gap:1,children:[(e||r)&&jt(m,{row:!0,justify:"space-between",children:[Ke(h,{variant:"headingXs",color:"textLight",uppercase:!0,children:e}),r]}),t,Ke(Zn,{$show:!!o,children:Ke(h,{variant:"bodySm",color:"textLight",children:o})})]});import{jsx as qe}from"react/jsx-runtime";var Qt=({filter:e,value:t,onChange:r})=>qe(m,{padding:3,children:qe(re,{label:e.label,children:qe(oe,{type:"text",placeholder:e.placeholder,value:t?.like||"",onTextChange:o=>r({...t||{},like:o})})})});import{jsx as Zt}from"react/jsx-runtime";var eo=({filter:e,value:t,onChange:r})=>{let o=t?.includes||[];return Zt(m,{gap:1,padding:3,children:e.options?.map(n=>Zt(Y,{label:n.label,checked:o.includes(n.value),setChecked:i=>{let a=i?[...o,n.value]:o.filter(l=>l!==n.value);r({...t||{},includes:a})}},String(n.value)))})};import{jsx as Je}from"react/jsx-runtime";var to=({filter:e,value:t,onChange:r})=>Je(m,{padding:1,children:e.options?.map(o=>Je(M,{iconName:o.iconName,label:o.label,disabled:o.disabled,onClick:()=>{r({...t||{},value:o.value})},rightContent:t?.value===o.value?Je(x,{name:"faCheck",size:"sm"}):void 0},String(o.value)))});import{useState as oo}from"react";import{jsx as Ce,jsxs as ei}from"react/jsx-runtime";var ro=({value:e,onChange:t})=>{let[r,o]=oo(String(e?.min||"")),[n,i]=oo(String(e?.max||"")),a=(l,s)=>{let d=l?.replace(/[^0-9.-]/g,"")||"",p=d.length?Number(d):void 0;t({...e,[s]:p&&isNaN(p)?void 0:p})};return ei(m,{padding:3,gap:2,children:[Ce(re,{label:"M\xEDnimo",children:Ce(oe,{type:"text",value:r,onTextChange:l=>{o(l),a(l,"min")}})}),Ce(re,{label:"M\xE1ximo",children:Ce(oe,{type:"text",value:n,onTextChange:l=>{i(l),a(l,"max")}})})]})};var no=({filter:e,value:t})=>{if(!t)return;let r=e.getError?.(t);if(r)return r;if(e.type==="text"){let o=t?.like||"";if(o?.length){if(e.minValue&&o.length<e.minValue)return`Debe tener al menos ${e.minValue} caracteres`;if(e.maxValue&&o.length>e.maxValue)return`La longitud m\xE1xima es ${e.maxValue} caracteres`}}if(e.type==="checkbox"){let o=t?.includes||[];if(e.minValue&&o.length<e.minValue)return`Debe seleccionar al menos ${e.minValue} opciones`;if(e.maxValue&&o.length>e.maxValue)return`Debe seleccionar como m\xE1ximo ${e.maxValue} opciones`}if(e.type==="range"){let o=t?.min,n=t?.max;if(o!==void 0&&o<e.minValue)return`El valor m\xEDnimo debe ser al menos ${e.minValue.toLocaleString()}`;if(n!==void 0&&n>e.maxValue)return`El valor m\xE1ximo debe ser como m\xE1ximo ${e.maxValue.toLocaleString()}`;if(o!==void 0&&n!==void 0&&o>n)return"El valor m\xEDnimo no puede ser mayor que el valor m\xE1ximo"}};var io=({filter:e,value:t})=>{if(t)switch(e.type){case"text":return t.like;case"select":return e.options?.find(r=>r.value===t?.value)?.label;case"checkbox":{let r=e.options.map(o=>{if(t?.includes?.includes(o.value))return o.label;if(t?.excludes?.includes(o.value))return`-${o.label}`}).filter(Boolean);return r.length?r.join(", "):void 0}case"range":return t?.min!==void 0&&t?.max!==void 0?`${t.min.toLocaleString()} - ${t.max.toLocaleString()}`:t?.min!==void 0?`${t.min.toLocaleString()} - \u221E`:t?.max!==void 0?`0 - ${t.max.toLocaleString()}`:void 0;default:return t?.value}};import{jsx as I,jsxs as je}from"react/jsx-runtime";var ti=V(m).attrs({width:"auto",row:!0,align:"center",gap:1})`
485
+ `,re=({label:e,children:t,rightContent:r,error:o})=>jt(m,{gap:1,children:[(e||r)&&jt(m,{row:!0,justify:"space-between",children:[Ke(u,{variant:"headingXs",color:"textLight",uppercase:!0,children:e}),r]}),t,Ke(Zn,{$show:!!o,children:Ke(u,{variant:"bodySm",color:"textLight",children:o})})]});import{jsx as qe}from"react/jsx-runtime";var Qt=({filter:e,value:t,onChange:r})=>qe(m,{padding:3,children:qe(re,{label:e.label,children:qe(oe,{type:"text",placeholder:e.placeholder,value:t?.like||"",onTextChange:o=>r({...t||{},like:o})})})});import{jsx as Zt}from"react/jsx-runtime";var eo=({filter:e,value:t,onChange:r})=>{let o=t?.includes||[];return Zt(m,{gap:1,padding:3,children:e.options?.map(n=>Zt(Y,{label:n.label,checked:o.includes(n.value),setChecked:i=>{let a=i?[...o,n.value]:o.filter(l=>l!==n.value);r({...t||{},includes:a})}},String(n.value)))})};import{jsx as Je}from"react/jsx-runtime";var to=({filter:e,value:t,onChange:r})=>Je(m,{padding:1,children:e.options?.map(o=>Je(M,{iconName:o.iconName,label:o.label,disabled:o.disabled,onClick:()=>{r({...t||{},value:o.value})},rightContent:t?.value===o.value?Je(x,{name:"faCheck",size:"sm"}):void 0},String(o.value)))});import{useState as oo}from"react";import{jsx as Ce,jsxs as ei}from"react/jsx-runtime";var ro=({value:e,onChange:t})=>{let[r,o]=oo(String(e?.min||"")),[n,i]=oo(String(e?.max||"")),a=(l,s)=>{let d=l?.replace(/[^0-9.-]/g,"")||"",p=d.length?Number(d):void 0;t({...e,[s]:p&&isNaN(p)?void 0:p})};return ei(m,{padding:3,gap:2,children:[Ce(re,{label:"M\xEDnimo",children:Ce(oe,{type:"text",value:r,onTextChange:l=>{o(l),a(l,"min")}})}),Ce(re,{label:"M\xE1ximo",children:Ce(oe,{type:"text",value:n,onTextChange:l=>{i(l),a(l,"max")}})})]})};var no=({filter:e,value:t})=>{if(!t)return;let r=e.getError?.(t);if(r)return r;if(e.type==="text"){let o=t?.like||"";if(o?.length){if(e.minValue&&o.length<e.minValue)return`Debe tener al menos ${e.minValue} caracteres`;if(e.maxValue&&o.length>e.maxValue)return`La longitud m\xE1xima es ${e.maxValue} caracteres`}}if(e.type==="checkbox"){let o=t?.includes||[];if(e.minValue&&o.length<e.minValue)return`Debe seleccionar al menos ${e.minValue} opciones`;if(e.maxValue&&o.length>e.maxValue)return`Debe seleccionar como m\xE1ximo ${e.maxValue} opciones`}if(e.type==="range"){let o=t?.min,n=t?.max;if(o!==void 0&&o<e.minValue)return`El valor m\xEDnimo debe ser al menos ${e.minValue.toLocaleString()}`;if(n!==void 0&&n>e.maxValue)return`El valor m\xE1ximo debe ser como m\xE1ximo ${e.maxValue.toLocaleString()}`;if(o!==void 0&&n!==void 0&&o>n)return"El valor m\xEDnimo no puede ser mayor que el valor m\xE1ximo"}};var io=({filter:e,value:t})=>{if(t)switch(e.type){case"text":return t.like;case"select":return e.options?.find(r=>r.value===t?.value)?.label;case"checkbox":{let r=e.options.map(o=>{if(t?.includes?.includes(o.value))return o.label;if(t?.excludes?.includes(o.value))return`-${o.label}`}).filter(Boolean);return r.length?r.join(", "):void 0}case"range":return t?.min!==void 0&&t?.max!==void 0?`${t.min.toLocaleString()} - ${t.max.toLocaleString()}`:t?.min!==void 0?`${t.min.toLocaleString()} - \u221E`:t?.max!==void 0?`0 - ${t.max.toLocaleString()}`:void 0;default:return t?.value}};import{jsx as R,jsxs as je}from"react/jsx-runtime";var ti=V(m).attrs({width:"auto",row:!0,align:"center",gap:1})`
486
486
  min-width: 100px;
487
487
  max-width: 200px;
488
488
  height: 28px;
@@ -527,7 +527,7 @@ to {
527
527
  `,ai=V(m).attrs({width:"auto",row:!0,align:"center",gap:2})``,li=V(ai).attrs({width:"100%",justify:"space-between",padding:3})`
528
528
  ${e=>e.theme.paddingTop(2)};
529
529
  ${e=>e.theme.borderTop()}
530
- `,so=V(L).attrs({mini:!0})``,co=({filter:e,value:t,onChange:r})=>{let[o,n]=ao(!1),[i,a]=ao(t),l=no({filter:e,value:i}),s=t!=null,d=()=>{switch(e.type){case"checkbox":return I(eo,{filter:e,value:i,onChange:a});case"select":return I(to,{filter:e,value:i,onChange:a});case"range":return I(ro,{filter:e,value:i,onChange:a});default:return I(Qt,{filter:e,value:i,onChange:a})}};return I(P,{isOpen:o,setOpen:c=>{c||a(t),n(c)},trigger:je(ti,{$hasValue:s,children:[s?I(oi,{onClick:c=>{c.stopPropagation(),r(void 0)},children:I(lo,{name:"faCircleXmark"})}):I(lo,{name:"faCirclePlus"}),I(h,{variant:"bodySm",fontWeight:s?500:400,truncate:!0,style:{flexGrow:1},children:(()=>{if(s){let c=io({filter:e,value:t});if(c)return`${e.label}: ${c}`}return e.label})()}),s&&I(x,{name:"faChevronDown",size:"sm",color:"inherit"})]}),content:je(ri,{children:[I(ni,{children:d()}),l?.length&&I(ii,{children:I(h,{variant:"bodySm",color:"red",children:l})}),je(li,{children:[i?I(so,{variant:"tertiary",onClick:()=>a(void 0),children:"Borrar"}):I("div",{}),I(so,{variant:"primary",disabled:!!l,onClick:()=>{r(i),n(!1)},children:"Aplicar"})]})]})})};import{jsx as Qe,jsxs as fi}from"react/jsx-runtime";var ci=mo.div`
530
+ `,so=V(L).attrs({mini:!0})``,co=({filter:e,value:t,onChange:r})=>{let[o,n]=ao(!1),[i,a]=ao(t),l=no({filter:e,value:i}),s=t!=null,d=()=>{switch(e.type){case"checkbox":return R(eo,{filter:e,value:i,onChange:a});case"select":return R(to,{filter:e,value:i,onChange:a});case"range":return R(ro,{filter:e,value:i,onChange:a});default:return R(Qt,{filter:e,value:i,onChange:a})}};return R(P,{isOpen:o,setOpen:c=>{c||a(t),n(c)},trigger:je(ti,{$hasValue:s,children:[s?R(oi,{onClick:c=>{c.stopPropagation(),r(void 0)},children:R(lo,{name:"faCircleXmark"})}):R(lo,{name:"faCirclePlus"}),R(u,{variant:"bodySm",fontWeight:s?500:400,truncate:!0,style:{flexGrow:1},children:(()=>{if(s){let c=io({filter:e,value:t});if(c)return`${e.label}: ${c}`}return e.label})()}),s&&R(x,{name:"faChevronDown",size:"sm",color:"inherit"})]}),content:je(ri,{children:[R(ni,{children:d()}),l?.length&&R(ii,{children:R(u,{variant:"bodySm",color:"red",children:l})}),je(li,{children:[i?R(so,{variant:"tertiary",onClick:()=>a(void 0),children:"Borrar"}):R("div",{}),R(so,{variant:"primary",disabled:!!l,onClick:()=>{r(i),n(!1)},children:"Aplicar"})]})]})})};import{jsx as Qe,jsxs as fi}from"react/jsx-runtime";var ci=mo.div`
531
531
  width: 100%;
532
532
  display: inline-flex;
533
533
  gap: ${e=>e.theme.spacing(2)};
@@ -542,11 +542,11 @@ to {
542
542
  color: ${e=>e.theme.colors.red800};
543
543
  background-color: ${e=>e.theme.colors.red100};
544
544
  }
545
- `,pi=si(e=>{let{className:t,filters:r,values:o,onFilterChange:n}=e,[i,a]=di(0);return fi(ci,{className:t,children:[r.map(l=>Qe(co,{filter:l,value:o[l.id],onChange:s=>n({...o,[l.id]:s})},`${l.id}-${i}`)),Object.keys(o).length>0&&Qe(mi,{onClick:()=>{n({}),a(l=>l+1)},children:Qe(h,{variant:"headingSm",children:"Clear Filters"})})]})});import bi,{useState as go}from"react";import et from"styled-components";import fo,{useTheme as gi}from"styled-components";import{jsx as po,jsxs as xi}from"react/jsx-runtime";var hi=fo.svg`
545
+ `,pi=si(e=>{let{className:t,filters:r,values:o,onFilterChange:n}=e,[i,a]=di(0);return fi(ci,{className:t,children:[r.map(l=>Qe(co,{filter:l,value:o[l.id],onChange:s=>n({...o,[l.id]:s})},`${l.id}-${i}`)),Object.keys(o).length>0&&Qe(mi,{onClick:()=>{n({}),a(l=>l+1)},children:Qe(u,{variant:"headingSm",children:"Clear Filters"})})]})});import bi,{useState as go}from"react";import et from"styled-components";import fo,{useTheme as gi}from"styled-components";import{jsx as po,jsxs as xi}from"react/jsx-runtime";var ui=fo.svg`
546
546
  color: ${({theme:e,$color:t})=>e.colors[t]};
547
547
  overflow: visible;
548
548
  width: ${({$width:e})=>e};
549
- `,ui=fo.circle`
549
+ `,hi=fo.circle`
550
550
  animation: spinners-react-circular 1s linear infinite;
551
551
 
552
552
  @keyframes spinners-react-circular {
@@ -561,7 +561,7 @@ to {
561
561
  stroke-dashoffset: 132;
562
562
  }
563
563
  }
564
- `,Ze=({width:e,color:t})=>{let{colors:r}=gi();return xi(hi,{fill:"none",viewBox:"0 0 66 66",$width:e||"60px",$color:t||"primary",children:[po("circle",{cx:"33",cy:"33",fill:"none",r:"28",stroke:r.textLight,strokeWidth:"4"}),po(ui,{cx:"33",cy:"33",fill:"none",r:"28",stroke:"currentColor",strokeDasharray:"1, 174",strokeDashoffset:"306",strokeLinecap:"round",strokeWidth:"5"})]})};import{jsx as ve,jsxs as vi}from"react/jsx-runtime";var $i=et(m).attrs({center:!0})`
564
+ `,Ze=({width:e,color:t})=>{let{colors:r}=gi();return xi(ui,{fill:"none",viewBox:"0 0 66 66",$width:e||"60px",$color:t||"primary",children:[po("circle",{cx:"33",cy:"33",fill:"none",r:"28",stroke:r.textLight,strokeWidth:"4"}),po(hi,{cx:"33",cy:"33",fill:"none",r:"28",stroke:"currentColor",strokeDasharray:"1, 174",strokeDashoffset:"306",strokeLinecap:"round",strokeWidth:"5"})]})};import{jsx as ve,jsxs as vi}from"react/jsx-runtime";var $i=et(m).attrs({center:!0})`
565
565
  position: relative;
566
566
  background-color: ${e=>e.theme.colors[e.$backgroundColor]||e.theme.colors.backgroundLight};
567
567
  border-radius: ${e=>e.$borderRadius||"0"};
@@ -596,7 +596,7 @@ to {
596
596
  -moz-user-drag: none;
597
597
  -o-user-drag: none;
598
598
  user-drag: none;
599
- `,Ci=bi.forwardRef((e,t)=>{let{className:r,src:o,alt:n,fallback:i,onClick:a,width:l="20px",height:s="20px",borderRadius:d="0",objectFit:p="cover",backgroundColor:c="backgroundLight"}=e,[f,y]=go(!1),[u,g]=go(!1),C=()=>{if(o?.length)return ve(wi,{src:o,alt:n||"",$objectFit:p,style:{opacity:f?1:0},onLoad:()=>y(!0),onError:()=>g(!0)})};return vi($i,{className:r,ref:t,width:l,height:s,onClick:a,$borderRadius:d,$backgroundColor:c,children:[ve(yi,{children:(()=>{if(!f)return!f&&!u&&o?.length?ve(Ze,{width:"30px",color:"textLight"}):i||ve(x,{name:"faCircleQuestion",color:"textLight"})})()}),C()]})});import ki,{keyframes as Di}from"styled-components";import{jsx as Ii}from"react/jsx-runtime";var Ti=Di`
599
+ `,Ci=bi.forwardRef((e,t)=>{let{className:r,src:o,alt:n,fallback:i,onClick:a,width:l="20px",height:s="20px",borderRadius:d="0",objectFit:p="cover",backgroundColor:c="backgroundLight"}=e,[f,y]=go(!1),[h,g]=go(!1),C=()=>{if(o?.length)return ve(wi,{src:o,alt:n||"",$objectFit:p,style:{opacity:f?1:0},onLoad:()=>y(!0),onError:()=>g(!0)})};return vi($i,{className:r,ref:t,width:l,height:s,onClick:a,$borderRadius:d,$backgroundColor:c,children:[ve(yi,{children:(()=>{if(!f)return!f&&!h&&o?.length?ve(Ze,{width:"30px",color:"textLight"}):i||ve(x,{name:"faCircleQuestion",color:"textLight"})})()}),C()]})});import ki,{keyframes as Di}from"styled-components";import{jsx as Ri}from"react/jsx-runtime";var Ti=Di`
600
600
  from { background-position: 200% 0;}
601
601
  to { background-position: -200% 0; }
602
602
  `,Pi=ki.div`
@@ -613,13 +613,13 @@ to {
613
613
  border-radius: 4px;
614
614
  width: ${e=>e.$width};
615
615
  height: ${e=>e.$height};
616
- `,tt=({width:e="auto",height:t="auto",className:r})=>Ii(Pi,{$width:e,$height:t,className:r});import"react";import De from"styled-components";import*as S from"@radix-ui/react-dialog";import{jsx as he,jsxs as ke}from"react/jsx-runtime";var Si=De(S.Overlay)`
616
+ `,tt=({width:e="auto",height:t="auto",className:r})=>Ri(Pi,{$width:e,$height:t,className:r});import De from"styled-components";import*as S from"@radix-ui/react-dialog";import{jsx as ue,jsxs as ke}from"react/jsx-runtime";var Si=De(S.Overlay)`
617
617
  background-color: #000;
618
618
  position: fixed;
619
619
  inset: 0;
620
620
  opacity: 0.1;
621
621
  animation: ${Ht} 00ms;
622
- `,Ri=De(S.Content)`
622
+ `,Ii=De(S.Content)`
623
623
  background-color: white;
624
624
  border-radius: 8px;
625
625
  box-shadow: 0px 24px 60px 0px rgba(0, 0, 0, 0.1);
@@ -627,7 +627,7 @@ to {
627
627
  top: 50%;
628
628
  left: 50%;
629
629
  transform: translate(-50%, -50%);
630
- animation: ${Et} 400ms ease-out;
630
+ animation: ${Bt} 400ms ease-out;
631
631
  min-width: min(480px, 90%);
632
632
  ${e=>e.theme.padding(2,3)};
633
633
  display: flex;
@@ -644,13 +644,13 @@ to {
644
644
  ${e=>e.theme.borderBottom()}
645
645
  `,Li=De(S.Description)`
646
646
  display: none;
647
- `,ot=({open:e,setOpen:t,title:r,children:o,trigger:n})=>ke(S.Root,{open:e,onOpenChange:t,children:[n&&he(S.Trigger,{asChild:!0,children:n}),ke(S.Portal,{children:[he(Si,{}),ke(Ri,{children:[r&&ke(Fi,{children:[he(h,{variant:"headingMd",children:r}),he(_,{iconName:"CLOSE_CIRCLE",color:"textLight",size:"20px",onClick:()=>t(!1)})]}),he(Li,{}),o]})]})]});import{useEffect as Oi,useState as ho}from"react";import ue from"styled-components";import{jsx as E,jsxs as uo}from"react/jsx-runtime";var Mi=ue.div`
647
+ `,ot=({open:e,setOpen:t,title:r,children:o,trigger:n})=>ke(S.Root,{open:e,onOpenChange:t,children:[n&&ue(S.Trigger,{asChild:!0,children:n}),ke(S.Portal,{children:[ue(Si,{}),ke(Ii,{children:[r&&ke(Fi,{children:[ue(u,{variant:"headingMd",children:r}),ue(_,{iconName:"faCircleXmark",color:"textLight",size:"lg",onClick:()=>t?.(!1)})]}),ue(Li,{}),o]})]})]});import{useEffect as Oi,useState as uo}from"react";import he from"styled-components";import{jsx as B,jsxs as ho}from"react/jsx-runtime";var Mi=he.div`
648
648
  display: flex;
649
649
  flex-direction: column;
650
650
  width: 100%;
651
651
  min-width: var(--radix-popover-trigger-width);
652
652
  overflow: hidden;
653
- `,rt=ue.div`
653
+ `,rt=he.div`
654
654
  padding: 8px;
655
655
  display: flex;
656
656
  align-items: center;
@@ -660,26 +660,26 @@ to {
660
660
  &:hover {
661
661
  background-color: ${({theme:e})=>e.colors.backgroundLight};
662
662
  }
663
- `,Ni=ue.div`
663
+ `,zi=he.div`
664
664
  width: 100%;
665
665
  position: relative;
666
666
  cursor: pointer;
667
- `,zi=ue(Ge)`
667
+ `,Ni=he(Ge)`
668
668
  cursor: inherit;
669
- `,Hi=ue.div`
669
+ `,Hi=he.div`
670
670
  position: absolute;
671
671
  right: 8px;
672
672
  top: 8px;
673
- `,Ei=({values:e,onChange:t,options:r,placeholder:o,renderValues:n,disabled:i})=>{let[a,l]=ho(!1),[s,d]=ho(""),p=r.filter(g=>e?.includes(g.value)),c=r.filter(g=>!s?.length||g.label.toLowerCase().includes(s.toLowerCase())),f=g=>{e?.includes(g)?t(e?.filter(C=>C!==g)):t([...e||[],g])};Oi(()=>{a||d("")},[a]);let y=()=>uo(Mi,{children:[!s?.length&&E(rt,{children:E(Y,{label:"Select all",checked:p.length===r.length,setChecked:g=>{t(g?r.map(C=>C.value):[])}})}),c?.length>0?c.map(g=>E(rt,{onClick:()=>{f(g.value)},children:E(Y,{checked:e?.includes(g.value),label:g.label})},g.value)):E(rt,{children:E(h,{children:"No results found"})})]}),u="Type to search...";return E(P,{isOpen:a,setOpen:l,trigger:uo(Ni,{onClick:()=>l(!0),children:[E(zi,{value:a?s:n(p),onChange:g=>{d(g.target.value),l(!0)},placeholder:a?u:o||u,disabled:i}),E(Hi,{children:E(x,{name:a?"faChevronUp":"faChevronDown",size:"sm"})})]}),content:y(),disabled:i})};import{useState as Bi}from"react";import Vi from"styled-components";import{jsx as Te}from"react/jsx-runtime";import{createElement as Yi}from"react";var Ai=Vi(pe)`
673
+ `,Bi=({values:e,onChange:t,options:r,placeholder:o,renderValues:n,disabled:i})=>{let[a,l]=uo(!1),[s,d]=uo(""),p=r.filter(g=>e?.includes(g.value)),c=r.filter(g=>!s?.length||g.label.toLowerCase().includes(s.toLowerCase())),f=g=>{e?.includes(g)?t(e?.filter(C=>C!==g)):t([...e||[],g])};Oi(()=>{a||d("")},[a]);let y=()=>ho(Mi,{children:[!s?.length&&B(rt,{children:B(Y,{label:"Select all",checked:p.length===r.length,setChecked:g=>{t(g?r.map(C=>C.value):[])}})}),c?.length>0?c.map(g=>B(rt,{onClick:()=>{f(g.value)},children:B(Y,{checked:e?.includes(g.value),label:g.label})},g.value)):B(rt,{children:B(u,{children:"No results found"})})]}),h="Type to search...";return B(P,{isOpen:a,setOpen:l,trigger:ho(zi,{onClick:()=>l(!0),children:[B(Ni,{value:a?s:n(p),onChange:g=>{d(g.target.value),l(!0)},placeholder:a?h:o||h,disabled:i}),B(Hi,{children:B(x,{name:a?"faChevronUp":"faChevronDown",size:"sm"})})]}),content:y(),disabled:i})};import{useState as Ei}from"react";import Vi from"styled-components";import{jsx as Te}from"react/jsx-runtime";import{createElement as Yi}from"react";var Ai=Vi(pe)`
674
674
  border-radius: 4px;
675
- `,Wi=({value:e,onChange:t,options:r,placeholder:o,disabled:n,fullWidth:i=!0,variant:a})=>{let[l,s]=Bi(!1),d=r.find(p=>p.value===e);return Te(P,{isOpen:l,setOpen:s,variant:"small",trigger:Te(Ai,{label:d?.label||o,isOpen:l,disabled:n,fullWidth:i,variant:a}),content:Te(m,{padding:1,children:r.map(p=>Yi(M,{...p,key:p.value,variant:a,onClick:()=>{t(p.value),s(!1)},rightContent:e===p.value?Te(x,{name:"faCheck",size:"xs"}):void 0}))})})};import{useEffect as nt,useRef as _i,useState as it}from"react";import ne from"styled-components";import*as R from"@radix-ui/react-dialog";import{jsx as A,jsxs as at}from"react/jsx-runtime";var Pe=580,bo="slideoutWidth",Xi=ne(R.Title)`
675
+ `,Wi=({value:e,onChange:t,options:r,placeholder:o,disabled:n,fullWidth:i=!0,variant:a})=>{let[l,s]=Ei(!1),d=r.find(p=>p.value===e);return Te(P,{isOpen:l,setOpen:s,variant:"small",trigger:Te(Ai,{label:d?.label||o,isOpen:l,disabled:n,fullWidth:i,variant:a}),content:Te(m,{padding:1,children:r.map(p=>Yi(M,{...p,key:p.value,variant:a,onClick:()=>{t(p.value),s(!1)},rightContent:e===p.value?Te(x,{name:"faCheck",size:"xs"}):void 0}))})})};import{useEffect as nt,useRef as _i,useState as it}from"react";import ne from"styled-components";import*as I from"@radix-ui/react-dialog";import{jsx as A,jsxs as at}from"react/jsx-runtime";var Pe=580,bo="slideoutWidth",Xi=ne(I.Title)`
676
676
  ${e=>e.theme.borderBottom()};
677
677
  display: flex;
678
678
  align-items: center;
679
679
  justify-content: space-between;
680
680
  ${e=>e.theme.padding(4)};
681
681
  padding-top: 0;
682
- `,Ui=ne(R.Content)`
682
+ `,Ui=ne(I.Content)`
683
683
  display: flex;
684
684
  flex-direction: column;
685
685
  position: fixed;
@@ -708,7 +708,7 @@ to {
708
708
  }
709
709
  `,Gi=ne.div`
710
710
  ${e=>e.theme.padding(4)};
711
- `,Ki=ne(R.Close)`
711
+ `,Ki=ne(I.Close)`
712
712
  all: unset;
713
713
  display: flex;
714
714
  align-items: center;
@@ -736,7 +736,7 @@ to {
736
736
  width: 4px;
737
737
  background-color: ${e=>e.theme.colors.textLight};
738
738
  border-radius: 4px;
739
- `,xo=(e,t)=>{let r=sessionStorage.getItem(bo);switch(!0){case(t&&r&&parseInt(r)<e):return r;case e>=1440:return"800px";case e>=1280:return"720px";case e>=600:return`${Pe}px`;default:return"100%"}},ji=({children:e,trigger:t,disabled:r=!1,open:o,setOpen:n,title:i,resizable:a=!0})=>{let[l,s]=it(window.innerWidth),[d,p]=it(""),[c,f]=it(!1),y=_i(null);return nt(()=>{let u=()=>{let g=window.innerWidth;s(g),p(xo(g,a))};return window.addEventListener("resize",u),u(),()=>window.removeEventListener("resize",u)},[]),nt(()=>{if(!a||!c)return;let u,g=b=>{if(!y.current)return;let $=window.innerWidth-b.clientX,w=$>=window.innerWidth;window.innerWidth<Pe||w?u="100%":$<Pe?u=`${Pe}px`:u=`${$}px`,y.current.style.width=u},C=()=>{p(u),sessionStorage.setItem(bo,u),f(!1)};return window.addEventListener("mousemove",g),window.addEventListener("mouseup",C),()=>{window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",C)}},[c]),nt(()=>{p(xo(l,a))},[o]),r?t:at(R.Root,{open:o,onOpenChange:n,modal:!1,children:[t&&A(R.Trigger,{asChild:!0,children:t}),A(R.Portal,{children:at(Ui,{$width:d,$open:o||!1,ref:y,children:[i&&at(Xi,{children:[A(h,{variant:"headingXl",children:i}),A(Ki,{children:A(_,{iconName:"faCircleXmark",color:"textLight"})})]}),A(R.Description,{}),A(Gi,{children:e}),a&&A(qi,{onMouseDown:()=>f(!0),"aria-label":"resize slideout handle",children:A(Ji,{})})]})})]})};import Qi from"react";import Zi from"styled-components";import{jsx as lt,jsxs as oa}from"react/jsx-runtime";var ea=Zi.div`
739
+ `,xo=(e,t)=>{let r=sessionStorage.getItem(bo);switch(!0){case(t&&r&&parseInt(r)<e):return r;case e>=1440:return"800px";case e>=1280:return"720px";case e>=600:return`${Pe}px`;default:return"100%"}},ji=({children:e,trigger:t,disabled:r=!1,open:o,setOpen:n,title:i,resizable:a=!0})=>{let[l,s]=it(window.innerWidth),[d,p]=it(""),[c,f]=it(!1),y=_i(null);return nt(()=>{let h=()=>{let g=window.innerWidth;s(g),p(xo(g,a))};return window.addEventListener("resize",h),h(),()=>window.removeEventListener("resize",h)},[]),nt(()=>{if(!a||!c)return;let h,g=b=>{if(!y.current)return;let $=window.innerWidth-b.clientX,w=$>=window.innerWidth;window.innerWidth<Pe||w?h="100%":$<Pe?h=`${Pe}px`:h=`${$}px`,y.current.style.width=h},C=()=>{p(h),sessionStorage.setItem(bo,h),f(!1)};return window.addEventListener("mousemove",g),window.addEventListener("mouseup",C),()=>{window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",C)}},[c]),nt(()=>{p(xo(l,a))},[o]),r?t:at(I.Root,{open:o,onOpenChange:n,modal:!1,children:[t&&A(I.Trigger,{asChild:!0,children:t}),A(I.Portal,{children:at(Ui,{$width:d,$open:o||!1,ref:y,children:[i&&at(Xi,{children:[A(u,{variant:"headingXl",children:i}),A(Ki,{children:A(_,{iconName:"faCircleXmark",color:"textLight"})})]}),A(I.Description,{}),A(Gi,{children:e}),a&&A(qi,{onMouseDown:()=>f(!0),"aria-label":"resize slideout handle",children:A(Ji,{})})]})})]})};import Qi from"react";import Zi from"styled-components";import{jsx as lt,jsxs as oa}from"react/jsx-runtime";var ea=Zi.div`
740
740
  display: flex;
741
741
  align-items: center;
742
742
  justify-content: flex-start;
@@ -745,7 +745,7 @@ to {
745
745
  float: left;
746
746
  ${e=>e.theme.padding(1,2)};
747
747
  background-color: ${e=>e.theme.colors[e.$color]};
748
- `,ta=Qi.forwardRef((e,t)=>{let{label:r,color:o="plain",iconName:n,tooltip:i}=e,a=o==="plain"?"textNormal":`${o}800`,l=o==="plain"?"backgroundLight":`${o}100`;return lt(ce,{content:i,children:oa(ea,{ref:t,$color:l,children:[lt(h,{variant:"headingSm",color:a,children:r}),n&&lt(x,{name:n,color:a,size:"sm"})]})})});import ra from"react";import dt from"styled-components";import*as Ie from"@radix-ui/react-switch";import{jsx as st,jsxs as sa}from"react/jsx-runtime";var na=dt.div`
748
+ `,ta=Qi.forwardRef((e,t)=>{let{label:r,color:o="plain",iconName:n,tooltip:i}=e,a=o==="plain"?"textNormal":`${o}800`,l=o==="plain"?"backgroundLight":`${o}100`;return lt(ce,{content:i,children:oa(ea,{ref:t,$color:l,children:[lt(u,{variant:"headingSm",color:a,children:r}),n&&lt(x,{name:n,color:a,size:"sm"})]})})});import ra from"react";import dt from"styled-components";import*as Re from"@radix-ui/react-switch";import{jsx as st,jsxs as sa}from"react/jsx-runtime";var na=dt.div`
749
749
  display: flex;
750
750
  align-items: center;
751
751
  gap: ${e=>e.theme.spacing(2)};
@@ -757,7 +757,7 @@ to {
757
757
  `:`
758
758
  cursor: pointer;
759
759
  `};
760
- `,ia=dt(Ie.Root)`
760
+ `,ia=dt(Re.Root)`
761
761
  all: unset;
762
762
  display: inline-block;
763
763
  width: 38px;
@@ -771,7 +771,7 @@ to {
771
771
  &:enabled {
772
772
  cursor: pointer;
773
773
  }
774
- `,aa=dt(Ie.Thumb)`
774
+ `,aa=dt(Re.Thumb)`
775
775
  display: block;
776
776
  background-color: white;
777
777
  width: 16px;
@@ -782,16 +782,16 @@ to {
782
782
  &[data-state='checked'] {
783
783
  transform: translateX(20px);
784
784
  }
785
- `,la=ra.forwardRef((e,t)=>{let{checked:r,setChecked:o,label:n,disabled:i=!1}=e;return sa(na,{ref:t,onClick:()=>o?.(!r),$disabled:i,children:[st(ia,{checked:r,onCheckedChange:o,disabled:i,children:st(aa,{})}),n&&st(h,{children:n})]})});import da,{useState as ca,useEffect as ma,useRef as $o}from"react";import Re from"styled-components";import{jsx as Se,jsxs as xa}from"react/jsx-runtime";var pa=Re.div`
785
+ `,la=ra.forwardRef((e,t)=>{let{checked:r,setChecked:o,label:n,disabled:i=!1}=e;return sa(na,{ref:t,onClick:()=>o?.(!r),$disabled:i,children:[st(ia,{checked:r,onCheckedChange:o,disabled:i,children:st(aa,{})}),n&&st(u,{children:n})]})});import da,{useState as ca,useEffect as ma,useRef as $o}from"react";import Ie from"styled-components";import{jsx as Se,jsxs as xa}from"react/jsx-runtime";var pa=Ie.div`
786
786
  width: 100%;
787
- `,fa=Re.div`
787
+ `,fa=Ie.div`
788
788
  width: 100%;
789
789
  display: flex;
790
790
  align-items: center;
791
791
  gap: ${e=>e.theme.spacing(6)};
792
792
  ${e=>e.theme.paddingVertical(1)};
793
793
  ${e=>e.theme.borderBottom(1)};
794
- `,ga=Re.div`
794
+ `,ga=Ie.div`
795
795
  position: relative;
796
796
  color: ${e=>e.theme.colors.textLight};
797
797
  background-color: transparent;
@@ -801,7 +801,7 @@ to {
801
801
  &:hover {
802
802
  background-color: ${e=>e.theme.colors.backgroundLight};
803
803
  }
804
- `,ha=Re.div`
804
+ `,ua=Ie.div`
805
805
  position: relative;
806
806
  width: ${e=>e.$width};
807
807
  height: 3px;
@@ -810,7 +810,7 @@ to {
810
810
  background-color: ${e=>e.theme.colors.primary};
811
811
  border-radius: 4px;
812
812
  transition: all 0.25s ease-in-out;
813
- `,ua=da.memo(({className:e,value:t,onChange:r,tabs:o})=>{let n=$o(null),i=$o(null),[a,l]=ca({width:"0px",left:"0px"});return ma(()=>{n?.current&&i?.current&&l({width:`${i.current.offsetWidth||0}px`,left:`${(i.current.offsetLeft||0)-n.current.offsetLeft}px`})},[t,n,i]),xa(pa,{children:[Se(fa,{ref:n,className:e,children:o.map((s,d)=>{let p=t?t===s.value:d===0;return Se(ga,{onClick:()=>r(s.value),ref:p?i:null,children:Se(h,{color:p?"primary":"textLight",variant:"headingSm",children:s.label})},s.value)})}),Se(ha,{$width:a.width,$left:a.left})]})});import ie from"styled-components";import ba,{useState as $a}from"react";import ko from"styled-components";var yo=e=>JSON.parse(localStorage.getItem(e)||"{}"),wo=(e,t)=>localStorage.setItem(e,JSON.stringify(t));import{jsx as G,jsxs as vo}from"react/jsx-runtime";var ya=ko.div`
813
+ `,ha=da.memo(({className:e,value:t,onChange:r,tabs:o})=>{let n=$o(null),i=$o(null),[a,l]=ca({width:"0px",left:"0px"});return ma(()=>{n?.current&&i?.current&&l({width:`${i.current.offsetWidth||0}px`,left:`${(i.current.offsetLeft||0)-n.current.offsetLeft}px`})},[t,n,i]),xa(pa,{children:[Se(fa,{ref:n,className:e,children:o.map((s,d)=>{let p=t?t===s.value:d===0;return Se(ga,{onClick:()=>r(s.value),ref:p?i:null,children:Se(u,{color:p?"primary":"textLight",variant:"headingSm",children:s.label})},s.value)})}),Se(ua,{$width:a.width,$left:a.left})]})});import ie from"styled-components";import ba,{useState as $a}from"react";import ko from"styled-components";var yo=e=>JSON.parse(localStorage.getItem(e)||"{}"),wo=(e,t)=>localStorage.setItem(e,JSON.stringify(t));import{jsx as G,jsxs as vo}from"react/jsx-runtime";var ya=ko.div`
814
814
  display: flex;
815
815
  flex-direction: column;
816
816
  gap: ${e=>e.theme.spacing(2)};
@@ -819,7 +819,7 @@ to {
819
819
  align-items: center;
820
820
  justify-content: flex-end;
821
821
  gap: ${e=>e.theme.spacing(2)};
822
- `,Co="tableSettings",Do=({id:e,columns:t})=>{let[r,o]=ba.useState(!1),n=yo(Co),i=n?.[e]||[],a=i?.columns||[],l=t.map((g,C)=>{let b=a?.find?.($=>$.id===g.id);return{...g,order:b?b.order:C,hidden:b?.hidden||!1}}),[s,d]=$a(l),p="Edit Columns",c=()=>{d(t.map((g,C)=>({...g,order:C,hidden:!1})))},f=()=>{wo(Co,{...n,[e]:{...i,columns:s.map(g=>({id:g.id,order:g.order,hidden:g.hidden}))}}),o(!1)},y=s.map(g=>({id:g.id,index:g.order,content:G("div",{children:G(Y,{label:g.header,disabled:g.required,checked:!g.hidden,setChecked:C=>{d(b=>b.map($=>$.id===g.id?{...$,hidden:!C}:$))}})},g.id)})),u=g=>d(C=>C.map(b=>{let $=g.find(w=>w.id===b.id);return{...b,order:$.index}}));return G(ot,{title:p,trigger:G(L,{iconName:"faGear",mini:!0,variant:"secondary",children:p}),open:r,setOpen:o,children:vo(ya,{children:[G(Ue,{items:y,onChange:u}),vo(wa,{children:[G(L,{variant:"tertiary",onClick:c,children:"Reset"}),G(L,{variant:"secondary",onClick:()=>o(!1),children:"Cancel"}),G(L,{onClick:f,children:"Save"})]})]})})};import W from"styled-components";var To=W.table`
822
+ `,Co="tableSettings",Do=({id:e,columns:t})=>{let[r,o]=ba.useState(!1),n=yo(Co),i=n?.[e]||[],a=i?.columns||[],l=t.map((g,C)=>{let b=a?.find?.($=>$.id===g.id);return{...g,order:b?b.order:C,hidden:b?.hidden||!1}}),[s,d]=$a(l),p="Edit Columns",c=()=>{d(t.map((g,C)=>({...g,order:C,hidden:!1})))},f=()=>{wo(Co,{...n,[e]:{...i,columns:s.map(g=>({id:g.id,order:g.order,hidden:g.hidden}))}}),o(!1)},y=s.map(g=>({id:g.id,index:g.order,content:G("div",{children:G(Y,{label:g.header,disabled:g.required,checked:!g.hidden,setChecked:C=>{d(b=>b.map($=>$.id===g.id?{...$,hidden:!C}:$))}})},g.id)})),h=g=>d(C=>C.map(b=>{let $=g.find(w=>w.id===b.id);return{...b,order:$.index}}));return G(ot,{title:p,trigger:G(L,{iconName:"faGear",mini:!0,variant:"secondary",children:p}),open:r,setOpen:o,children:vo(ya,{children:[G(Ue,{items:y,onChange:h}),vo(wa,{children:[G(L,{variant:"tertiary",onClick:c,children:"Reset"}),G(L,{variant:"secondary",onClick:()=>o(!1),children:"Cancel"}),G(L,{onClick:f,children:"Save"})]})]})})};import W from"styled-components";var To=W.table`
823
823
  width: 100%;
824
824
  border-collapse: collapse;
825
825
  border-spacing: 0;
@@ -830,7 +830,7 @@ to {
830
830
  position: sticky;
831
831
  top: 0;
832
832
  background-color: ${e=>e.theme.colors.background};
833
- `,Io=W.td`
833
+ `,Ro=W.td`
834
834
  width: 100%;
835
835
  width: ${e=>e.$width||"100%"};
836
836
  min-width: ${e=>e.$width||"60px"};
@@ -843,7 +843,7 @@ to {
843
843
  display: flex;
844
844
  align-items: center;
845
845
  ${e=>e.theme.borderBottom()}
846
- `,ct=W(So)``,Ro=W(Io)`
846
+ `,ct=W(So)``,Io=W(Ro)`
847
847
  ${e=>e.$canSort&&"cursor: pointer;"}
848
848
  `,mt=W.tbody``,Fo=W(So)`
849
849
  ${e=>e.onClick&&"cursor: pointer;"}
@@ -854,7 +854,7 @@ to {
854
854
  &:hover {
855
855
  background-color: ${e=>e.theme.colors.backgroundLight};
856
856
  }
857
- `,pt=W(Io)`
857
+ `,pt=W(Ro)`
858
858
  ${e=>e.theme.typography.bodyMd};
859
859
  color: ${e=>e.theme.colors.textNormal};
860
860
  `;import{Fragment as Sa,jsx as D,jsxs as K}from"react/jsx-runtime";var Ca=ie.div`
@@ -889,15 +889,15 @@ to {
889
889
  display: flex;
890
890
  align-items: center;
891
891
  gap: ${e=>e.theme.spacing(2)};
892
- `,Ia=({id:e,columns:t,data:r,isLoading:o,emptyState:n,header:i,onRowClick:a,sorting:l,onSortChange:s,pagination:d,onPaginationChange:p,disableCustomization:c,height:f})=>{let y=()=>!i&&c?null:K(va,{children:[i||D("div",{}),D(ka,{children:!c&&D(Do,{id:e,columns:t})})]}),u=()=>{if(o)return D(mt,{children:Array.from({length:15}).map(($,w)=>D(ct,{children:t.map(v=>D(pt,{$width:v.width,$align:v.align,children:D(tt,{width:"100%",height:"18px"})},`loadingrow-${w}-column-${v.id}`))},`loadingrow-${w}`))});if(!r?.length)return null;let b=($,w)=>{if($.cell)return $.cell(w);let v=w[$.id];return $.formatter?$.formatter(v,w):v};return D(mt,{children:r.map(($,w)=>D(Fo,{onClick:a?()=>a($):null,children:t.map(v=>D(pt,{$width:v.width,$align:v.align,children:b(v,$)},`row-${w}-column-${v.id}`))},`row-${w}`))})},g=()=>!o&&r?.length===0?n:D(Sa,{children:K(To,{children:[D(Po,{children:D(ct,{children:t.map(b=>{let $=l?.column===b.id,w=$?l?.direction!=="desc":b.type==="number",v=()=>b.sortable&&s?.({column:b.id,direction:w?"desc":"asc"}),z=(()=>{if(b.sortable)return $?{name:l.direction==="desc"?"faChevronDown":"faChevronUp",color:"textDark",size:"lg"}:{name:"faChevronUp",color:"textNormal",size:"xs"}})();return K(Ro,{$align:b.align,$width:b.width,$canSort:b.sortable,onClick:v,children:[D(h,{variant:"headingSm",color:z?.color||"textNormal",children:b.header}),z&&D(x,{name:z.name,color:z.color,size:z.size})]},b.id)})})}),u()]})}),C=()=>{if(!d)return;let b=d.page||1,$=Math.ceil(d.total/d.size);if($<=1)return;let w=v=>{p?.({...d,page:v})};return K(Ta,{children:[K(h,{variant:"bodySm",color:"textLight",children:[d.total," items"]}),K(Pa,{children:[D(_,{iconName:"faChevronLeft",color:"textNormal",size:"xs",disabled:o||b===1,onClick:()=>w(b-1)}),K(h,{variant:"bodySm",color:"textNormal",children:[b," de ",$]}),D(_,{iconName:"faChevronRight",color:"textNormal",size:"xs",disabled:o||b===$,onClick:()=>w(b+1)})]})]})};return K(Ca,{children:[y(),D(Da,{$height:f,$isLoading:o,children:g()}),C()]})};import{useRef as Ra}from"react";import Fa from"styled-components";import{jsx as Ma}from"react/jsx-runtime";var La=Fa.textarea`
893
- ${N};
892
+ `,Ra=({id:e,columns:t,data:r,isLoading:o,emptyState:n,header:i,onRowClick:a,sorting:l,onSortChange:s,pagination:d,onPaginationChange:p,disableCustomization:c,height:f})=>{let y=()=>!i&&c?null:K(va,{children:[i||D("div",{}),D(ka,{children:!c&&D(Do,{id:e,columns:t})})]}),h=()=>{if(o)return D(mt,{children:Array.from({length:15}).map(($,w)=>D(ct,{children:t.map(v=>D(pt,{$width:v.width,$align:v.align,children:D(tt,{width:"100%",height:"18px"})},`loadingrow-${w}-column-${v.id}`))},`loadingrow-${w}`))});if(!r?.length)return null;let b=($,w)=>{if($.cell)return $.cell(w);let v=w[$.id];return $.formatter?$.formatter(v,w):v};return D(mt,{children:r.map(($,w)=>D(Fo,{onClick:a?()=>a($):null,children:t.map(v=>D(pt,{$width:v.width,$align:v.align,children:b(v,$)},`row-${w}-column-${v.id}`))},`row-${w}`))})},g=()=>!o&&r?.length===0?n:D(Sa,{children:K(To,{children:[D(Po,{children:D(ct,{children:t.map(b=>{let $=l?.column===b.id,w=$?l?.direction!=="desc":b.type==="number",v=()=>b.sortable&&s?.({column:b.id,direction:w?"desc":"asc"}),N=(()=>{if(b.sortable)return $?{name:l.direction==="desc"?"faChevronDown":"faChevronUp",color:"textDark",size:"lg"}:{name:"faChevronUp",color:"textNormal",size:"xs"}})();return K(Io,{$align:b.align,$width:b.width,$canSort:b.sortable,onClick:v,children:[D(u,{variant:"headingSm",color:N?.color||"textNormal",children:b.header}),N&&D(x,{name:N.name,color:N.color,size:N.size})]},b.id)})})}),h()]})}),C=()=>{if(!d)return;let b=d.page||1,$=Math.ceil(d.total/d.size);if($<=1)return;let w=v=>{p?.({...d,page:v})};return K(Ta,{children:[K(u,{variant:"bodySm",color:"textLight",children:[d.total," items"]}),K(Pa,{children:[D(_,{iconName:"faChevronLeft",color:"textNormal",size:"xs",disabled:o||b===1,onClick:()=>w(b-1)}),K(u,{variant:"bodySm",color:"textNormal",children:[b," de ",$]}),D(_,{iconName:"faChevronRight",color:"textNormal",size:"xs",disabled:o||b===$,onClick:()=>w(b+1)})]})]})};return K(Ca,{children:[y(),D(Da,{$height:f,$isLoading:o,children:g()}),C()]})};import{useRef as Ia}from"react";import Fa from"styled-components";import{jsx as Ma}from"react/jsx-runtime";var La=Fa.textarea`
893
+ ${z};
894
894
  padding: 6px 8px;
895
895
  max-width: 100%;
896
896
  min-width: 100%;
897
897
  min-height: 72px;
898
898
  max-height: 288px;
899
899
  overflow: auto;
900
- `,Oa=({value:e,onTextChange:t,disabled:r,placeholder:o})=>{let n=Ra(null);return Ma(La,{ref:n,value:e,onChange:i=>{t?.(i.target.value),n.current?.style.setProperty("height","auto"),n.current?.style.setProperty("height",`${n.current?.scrollHeight}px`)},disabled:r,placeholder:o})};import Na,{useState as za}from"react";import gt from"styled-components";var ft=e=>{let t=/^\d{0,2}?\:?\d{0,2}$/,[r,o]=e.split(":");if(!t.test(e))return!1;let n=Number(r),i=Number(o),a=d=>Number.isInteger(d)&&d>=0&&d<24,l=d=>Number.isInteger(d)&&n>=0&&n<24||Number.isNaN(d);if(!a(n)||!l(i)||i<10&&Number(o[0])>5)return!1;let s=e.indexOf(":")!==-1?e.split(":"):[e];return!(s[0]&&s[0].length&&(parseInt(s[0],10)<0||parseInt(s[0],10)>23)||s[1]&&s[1].length&&(parseInt(s[1],10)<0||parseInt(s[1],10)>59))};import{jsx as Fe,jsxs as Aa}from"react/jsx-runtime";var Ha=gt(m).attrs({row:!0,align:"center",gap:2})`
900
+ `,Oa=({value:e,onTextChange:t,disabled:r,placeholder:o})=>{let n=Ia(null);return Ma(La,{ref:n,value:e,onChange:i=>{t?.(i.target.value),n.current?.style.setProperty("height","auto"),n.current?.style.setProperty("height",`${n.current?.scrollHeight}px`)},disabled:r,placeholder:o})};import za,{useState as Na}from"react";import gt from"styled-components";var ft=e=>{let t=/^\d{0,2}?\:?\d{0,2}$/,[r,o]=e.split(":");if(!t.test(e))return!1;let n=Number(r),i=Number(o),a=d=>Number.isInteger(d)&&d>=0&&d<24,l=d=>Number.isInteger(d)&&n>=0&&n<24||Number.isNaN(d);if(!a(n)||!l(i)||i<10&&Number(o[0])>5)return!1;let s=e.indexOf(":")!==-1?e.split(":"):[e];return!(s[0]&&s[0].length&&(parseInt(s[0],10)<0||parseInt(s[0],10)>23)||s[1]&&s[1].length&&(parseInt(s[1],10)<0||parseInt(s[1],10)>59))};import{jsx as Fe,jsxs as Aa}from"react/jsx-runtime";var Ha=gt(m).attrs({row:!0,align:"center",gap:2})`
901
901
  height: 36px;
902
902
  border-radius: 4px;
903
903
  background-color: ${e=>e.theme.colors.background};
@@ -914,8 +914,8 @@ to {
914
914
  &:hover {
915
915
  border: 1px solid ${e.theme.colors.textLight};
916
916
  }`}
917
- `,Ea=gt.input`
918
- ${N};
917
+ `,Ba=gt.input`
918
+ ${z};
919
919
  background-color: transparent;
920
920
  height: auto;
921
921
  border: 0;
@@ -925,12 +925,12 @@ to {
925
925
  &:focus-visible {
926
926
  border: 0;
927
927
  }
928
- `,Ba=gt(m).attrs({width:"auto",center:!0})`
928
+ `,Ea=gt(m).attrs({width:"auto",center:!0})`
929
929
  height: 36px;
930
- `,Va=Na.forwardRef((e,t)=>{let{value:r,onChange:o,placeholder:n,disabled:i}=e,[a,l]=za(ft(r||"")?r:""),s="";return Aa(Ha,{ref:t,$disabled:i,children:[Fe(Ba,{children:Fe(x,{name:"faClock",color:"textLight",size:"sm"})}),Fe(Ea,{placeholder:n,disabled:i,value:a,onChange:c=>{let f=c.target.value||"";if(f!==a&&ft(f)){if(f.length===2&&s.length!==3&&f.indexOf(":")===-1&&(f=f+":"),f.length===2&&s.length===3&&(f=f.slice(0,1)),f.length>5)return!1;s=f,l(f),f.length===5&&o?.(f)}}}),(()=>{if(a?.length!==5)return;let[c]=a.split(":");return Fe(h,{color:"textLight",children:parseInt(c)>=12?"PM":"AM"})})()]})});import{ThemeProvider as _a}from"styled-components";import{createGlobalStyle as Ya}from"styled-components";var xe={link:"#3E96ED",primary:"#E72175",primaryDark:"#cb0054",textLight:"#8C8C8C",textNormal:"#596171",textDark:"#22272B",border:"#D9D9D9",backgroundLight:"#F5F5F5",background:"#FFFFFF",yellow100:"#fffae6",yellow200:"#fff3c2",yellow300:"#ffea92",yellow400:"#ffe15f",yellow500:"#ffd82f",yellow600:"#ffcf01",yellow700:"#d9b001",yellow800:"#b59301",yellow900:"#917601",yellow1000:"#735d00",red100:"#fbeeed",red200:"#f6d6d5",red300:"#efb5b3",red400:"#e79390",red500:"#e0726f",red600:"#d9534f",red700:"#b84743",red800:"#9a3b38",red900:"#7c2f2d",red1000:"#622524",green100:"#eff8ef",green200:"#d8eed8",green300:"#b9e0b9",green400:"#98d298",green500:"#79c579",green600:"#5cb85c",green700:"#4e9c4e",green800:"#418341",green900:"#346934",green1000:"#295329"},F="Roboto, -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",Wa={bodyLg:{fontFamily:F,fontSize:"16px",fontWeight:"400",lineHeight:"24px"},bodyMd:{fontFamily:F,fontSize:"14px",fontWeight:"400",lineHeight:"20px"},bodySm:{fontFamily:F,fontSize:"12px",fontWeight:"400",lineHeight:"18px"},bodyXs:{fontFamily:F,fontSize:"10px",fontWeight:"400",lineHeight:"16px"},heading4xl:{fontFamily:F,fontSize:"40px",fontWeight:"700",lineHeight:"48px"},heading3xl:{fontFamily:F,fontSize:"32px",fontWeight:"700",lineHeight:"40px"},heading2xl:{fontFamily:F,fontSize:"28px",fontWeight:"600",lineHeight:"32px"},headingXl:{fontFamily:F,fontSize:"24px",fontWeight:"600",lineHeight:"28px"},headingLg:{fontFamily:F,fontSize:"20px",fontWeight:"600",lineHeight:"24px"},headingMd:{fontFamily:F,fontSize:"16px",fontWeight:"600",lineHeight:"20px"},headingSm:{fontFamily:F,fontSize:"14px",fontWeight:"600",lineHeight:"18px"},headingXs:{fontFamily:F,fontSize:"12px",fontWeight:"600",lineHeight:"16px"}},ht=Object.fromEntries(Object.entries(Wa).map(([e,t])=>[e,Object.entries(t).map(([r,o])=>`${r.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${o};`).join(`
930
+ `,Va=za.forwardRef((e,t)=>{let{value:r,onChange:o,placeholder:n,disabled:i}=e,[a,l]=Na(ft(r||"")?r:""),s="";return Aa(Ha,{ref:t,$disabled:i,children:[Fe(Ea,{children:Fe(x,{name:"faClock",color:"textLight",size:"sm"})}),Fe(Ba,{placeholder:n,disabled:i,value:a,onChange:c=>{let f=c.target.value||"";if(f!==a&&ft(f)){if(f.length===2&&s.length!==3&&f.indexOf(":")===-1&&(f=f+":"),f.length===2&&s.length===3&&(f=f.slice(0,1)),f.length>5)return!1;s=f,l(f),f.length===5&&o?.(f)}}}),(()=>{if(a?.length!==5)return;let[c]=a.split(":");return Fe(u,{color:"textLight",children:parseInt(c)>=12?"PM":"AM"})})()]})});import{ThemeProvider as _a}from"styled-components";import{createGlobalStyle as Ya}from"styled-components";var xe={link:"#3E96ED",primary:"#E72175",primaryDark:"#cb0054",textLight:"#8C8C8C",textNormal:"#596171",textDark:"#22272B",border:"#D9D9D9",backgroundLight:"#F5F5F5",background:"#FFFFFF",yellow100:"#fffae6",yellow200:"#fff3c2",yellow300:"#ffea92",yellow400:"#ffe15f",yellow500:"#ffd82f",yellow600:"#ffcf01",yellow700:"#d9b001",yellow800:"#b59301",yellow900:"#917601",yellow1000:"#735d00",red100:"#fbeeed",red200:"#f6d6d5",red300:"#efb5b3",red400:"#e79390",red500:"#e0726f",red600:"#d9534f",red700:"#b84743",red800:"#9a3b38",red900:"#7c2f2d",red1000:"#622524",green100:"#eff8ef",green200:"#d8eed8",green300:"#b9e0b9",green400:"#98d298",green500:"#79c579",green600:"#5cb85c",green700:"#4e9c4e",green800:"#418341",green900:"#346934",green1000:"#295329"},F="Roboto, -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",Wa={bodyLg:{fontFamily:F,fontSize:"16px",fontWeight:"400",lineHeight:"24px"},bodyMd:{fontFamily:F,fontSize:"14px",fontWeight:"400",lineHeight:"20px"},bodySm:{fontFamily:F,fontSize:"12px",fontWeight:"400",lineHeight:"18px"},bodyXs:{fontFamily:F,fontSize:"10px",fontWeight:"400",lineHeight:"16px"},heading4xl:{fontFamily:F,fontSize:"40px",fontWeight:"700",lineHeight:"48px"},heading3xl:{fontFamily:F,fontSize:"32px",fontWeight:"700",lineHeight:"40px"},heading2xl:{fontFamily:F,fontSize:"28px",fontWeight:"600",lineHeight:"32px"},headingXl:{fontFamily:F,fontSize:"24px",fontWeight:"600",lineHeight:"28px"},headingLg:{fontFamily:F,fontSize:"20px",fontWeight:"600",lineHeight:"24px"},headingMd:{fontFamily:F,fontSize:"16px",fontWeight:"600",lineHeight:"20px"},headingSm:{fontFamily:F,fontSize:"14px",fontWeight:"600",lineHeight:"18px"},headingXs:{fontFamily:F,fontSize:"12px",fontWeight:"600",lineHeight:"16px"}},ut=Object.fromEntries(Object.entries(Wa).map(([e,t])=>[e,Object.entries(t).map(([r,o])=>`${r.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${o};`).join(`
931
931
  `)]));var Lo=Ya`
932
932
  body {
933
- ${ht.bodyMd};
933
+ ${ut.bodyMd};
934
934
  color: ${xe.textDark};
935
935
  margin: 0;
936
936
  padding: 0;
@@ -940,7 +940,7 @@ to {
940
940
  * {
941
941
  box-sizing: border-box;
942
942
  }
943
- `,be=xe.border,k=4,Oo={colors:xe,typography:ht,padding:(e,t)=>`padding: ${e*k}px ${(t||e)*k}px;`,paddingHorizontal:e=>`
943
+ `,be=xe.border,k=4,Oo={colors:xe,typography:ut,padding:(e,t)=>`padding: ${e*k}px ${(t||e)*k}px;`,paddingHorizontal:e=>`
944
944
  padding-left: ${e*k}px;
945
945
  padding-right: ${e*k}px;
946
946
  `,paddingVertical:e=>`
@@ -976,4 +976,4 @@ to {
976
976
  background-color: ${xe.backgroundLight};
977
977
  }
978
978
  `}
979
- `,media:{phone:"@media (max-width: 576px)",tablet:"@media (max-width: 768px)",desktop:"@media (min-width: 922px)"}};import{Fragment as Xa,jsx as Mo,jsxs as Ua}from"react/jsx-runtime";var Og=({children:e,locale:t})=>(B.locale(t),Mo(_a,{theme:Oo,children:Ua(Xa,{children:[Mo(Lo,{}),e]})}));export{Xo as Avatar,br as Banner,L as Button,j as ButtonVariant,me as Calendar,Y as Checkbox,_ as ClickableIcon,Dn as CurrencyInput,On as DateInput,Hn as DatePicker,Ae as Divider,Ue as DragList,P as Dropdown,M as DropdownItem,bn as DropdownMenu,pe as DropdownTrigger,X as DropdownVariant,pi as Filters,m as Flex,x as Icon,Ci as Image,oe as Input,re as InputContainer,tt as LoadingPlaceholder,ot as Modal,Ei as MultiSelect,Wi as Select,ji as Slideout,Ze as Spinner,ta as StatusLabel,la as Switch,ua as TabBar,Ia as Table,h as Text,Oa as TextArea,Va as TimeInput,ce as Tooltip,Og as UIProvider};
979
+ `,media:{phone:"@media (max-width: 576px)",tablet:"@media (max-width: 768px)",desktop:"@media (min-width: 922px)"}};import{Fragment as Xa,jsx as Mo,jsxs as Ua}from"react/jsx-runtime";var Fg=({children:e,locale:t})=>(E.locale(t),Mo(_a,{theme:Oo,children:Ua(Xa,{children:[Mo(Lo,{}),e]})}));export{Xo as Avatar,br as Banner,L as Button,j as ButtonVariant,me as Calendar,Y as Checkbox,_ as ClickableIcon,Dn as CurrencyInput,On as DateInput,Hn as DatePicker,Ae as Divider,Ue as DragList,P as Dropdown,M as DropdownItem,bn as DropdownMenu,pe as DropdownTrigger,X as DropdownVariant,pi as Filters,m as Flex,x as Icon,Ci as Image,oe as Input,re as InputContainer,tt as LoadingPlaceholder,ot as Modal,Bi as MultiSelect,Wi as Select,ji as Slideout,Ze as Spinner,ta as StatusLabel,la as Switch,ha as TabBar,Ra as Table,u as Text,Oa as TextArea,Va as TimeInput,ce as Tooltip,Fg as UIProvider};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cognitiv/components-web",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Cognitiv new UI Components library",
5
5
  "author": "Cognitiv",
6
6
  "license": "MIT",
@@ -88,6 +88,7 @@
88
88
  "node": ">=22.12.0"
89
89
  },
90
90
  "peerDependencies": {
91
- "react": ">=19"
91
+ "react": ">=19",
92
+ "styled-components": "^6.3.8"
92
93
  }
93
94
  }